-
Notifications
You must be signed in to change notification settings - Fork 5
Functions #88
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
Functions #88
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces function support to the program syntax by adding an "invoke" operation alongside refactoring the program representation to track size at the type level. The changes enable calling user-defined functions within the domain-specific language.
- Adds
invokesyntax and semantics for function calls - Refactors program representation to be size-indexed (
Program.Sized) - Updates macro rules to use a new intermediate syntax (
Ξ) for size tracking
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/Applib/Surface/Program/Syntax.lean | Converts example to use def mutualIncrement function and demonstrates invoke usage |
| Applib/Surface/Program/Syntax.lean | Adds invoke syntax rules and refactors macro expansion to use size-indexed programs |
| Applib/Surface/Program.lean | Implements size-indexed program type and invoke operations with lifting functions |
| AVM/Program/Parameters.lean | Adds Nonempty derivation to Program.Parameters |
| AVM/Program.lean | Refactors to size-indexed programs and implements invoke semantics with parameter handling |
| AVM/Class/Translation.lean | Updates program task generation to handle size-indexed programs and invoke operations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
janmasrovira
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #89
invokeprogram constructor.