Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lukaszcz
Copy link
Collaborator

@lukaszcz lukaszcz commented Sep 4, 2025

  • Implements non-method functions with an invoke program constructor.

@lukaszcz lukaszcz self-assigned this Sep 4, 2025
@lukaszcz lukaszcz marked this pull request as ready for review September 4, 2025 16:48
Copy link
Contributor

Copilot AI left a 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 invoke syntax 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.

Copy link
Collaborator

@janmasrovira janmasrovira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #89

@janmasrovira janmasrovira merged commit d7ab739 into main Sep 4, 2025
2 checks passed
@janmasrovira janmasrovira deleted the function-invocation branch September 4, 2025 17:10
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.

3 participants