Skip to content

Conversation

@keyboardDrummer
Copy link
Owner

@keyboardDrummer keyboardDrummer commented Jan 16, 2026

Changes

  1. Translates Laurel procedures to Core functions when possible (expression body and no contract)
  2. Translates Laurel procedure contracts to Core procedure contracts
  3. Implement Laurel's field access operator for mutable field
  4. Support both types of return value syntax in Laurel
  5. Some support for parsing composite type definitions in Laurel
  6. Identify which Laurel procedures read or mutate the heap, and introduce the Heap as an in or out parameter accordingly

Testing

  • For 1-2, add T5_ProcedureCallsBoogie.lean
  • For 3-5, turn on T1_MutableFields.lean

"

#guard_msgs(drop info, error) in
#eval! testInputWithOffset "T5_ProcedureCallsBoogie" program 20 processLaurelFile

Choose a reason for hiding this comment

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

Should this be Core?

- It has no precondition (or just `true`)
- It has exactly one output parameter (the return type)
-/
def canBeBoogieFunction (proc : Procedure) : Bool :=

Choose a reason for hiding this comment

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

Should this be core?

keyboardDrummer and others added 4 commits January 19, 2026 16:02
### Changes
1. Move Laurel grammar from a `.lean` into a `.st` file, so it can be
consumed by the `javaGen` command
1. Do not let the Laurel grammar use `fn` or `type`, since those are not
needed and are not supported by `javaGen`
1. For source code positions, store byte code array offsets in the AST
nodes, so that when parsing programs from Ion, these can be filled in
without having access to original source files
1. Enable the Ion deserialization code to deserialize multiple files
where each file has a filepath and a program AST.
1. Add a `laurelAnalyze` command to StrataMain that for now will serve
as a root for Laurel related interactions. I can imagine that in the
future we will introduce an analyze command that is agnostic to the
dialect used.

### Testing
- Laurel pipeline changes (1-3) are covered by existing tests
- (4) Added a test for the newly introduced `Ion.fromIonFiles`
- (5) No test added, although I've successfully used this command from
aws/jverify#372

---------

Co-authored-by: Fabio Madge <fmadge@amazon.com>
Co-authored-by: Fabio Madge <fabio@madge.me>
Co-authored-by: Joe Hendrix <joehx@amazon.com>
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.

5 participants