Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tensor opaque #20

Merged
merged 5 commits into from
Sep 27, 2024
Merged

Make tensor opaque #20

merged 5 commits into from
Sep 27, 2024

Conversation

stschaef
Copy link
Collaborator

WIP for making tensor opaque.

We make the definition opaque and propagate that opaqueness throughout the codebase. This changes the type signatures of some things, such as ⊗PathP and Kleene star, as to not leak the details of . The largest ergonomic changes relate to the inductive types, like Kleene star and NFA parses. The signatures of each constructor must be manually unfolded

  data KL* : Grammar ℓG
    where
    nil : ∀ w → ε w → KL* w
    cons : ∀ w →
      Σ[ s ∈ Splitting w ]
       g (s .fst .fst) × KL* (s .fst .snd) →
      KL* w

The remaining work here seems to be in the Kleene star regex-NFA equivalence

@stschaef
Copy link
Collaborator Author

But the inductive types thing is likely a moot point with the things you just wrote

@stschaef stschaef marked this pull request as draft September 26, 2024 03:05
@maxsnew
Copy link
Owner

maxsnew commented Sep 26, 2024

The signatures of each constructor must be manually unfolded

Can you define this instead in an opaque block unfolding tensor?

@stschaef
Copy link
Collaborator Author

The signatures of each constructor must be manually unfolded

Can you define this instead in an opaque block unfolding tensor?

No, because opaque doesn't apply to data declarations

@maxsnew
Copy link
Owner

maxsnew commented Sep 26, 2024

Well maybe you can make a non-opaque version of tensor to use in these spots? When you unfold the opaque tensor they will become definitionally equal anyway...Almost anything is better than manually inlining the definition

@stschaef stschaef marked this pull request as ready for review September 27, 2024 14:37
@stschaef stschaef merged commit d970635 into main Sep 27, 2024
2 checks passed
@stschaef stschaef deleted the tensoropaque branch September 27, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants