You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds `modifies *` wildcard syntax to Laurel, as described in strata-org#1030.
## Changes
**Grammar** (`LaurelGrammar.st`): Added `modifiesWildcard` rule that
parses `modifies *`.
**Parser** (`ConcreteToAbstractTreeTranslator.lean`): Handles
`modifiesWildcard` by producing `StmtExpr.All` in the modifies list.
**Formatter** (`AbstractToConcreteTreeTranslator.lean`): Formats a
modifies list containing `All` back as `modifies *`.
**ModifiesClauses pass** (`ModifiesClauses.lean`):
- Added `hasModifiesWildcard` to detect `All` in the modifies list.
- `transformModifiesClauses` skips frame condition generation for
`modifies *` — the procedure may modify anything on the heap.
- `filterBodyNonCompositeModifies` preserves the wildcard through the
filter pass.
**HeapParameterization**: No changes needed — the existing
`!modif.isEmpty` check already marks procedures with `modifies *` as
heap writers, even without a body.
**Tests** (`T2_ModifiesClauses.lean`): Added three test cases:
- `modifiesWildcardBodiless`: bodiless procedure with `modifies *`
- `modifiesWildcardBodilessCaller`: caller that verifies heap state is
lost after calling a `modifies *` procedure (assertion correctly fails)
- `modifiesWildcardWithBody`: procedure with body and `modifies *` (no
frame condition error)
All 48 Laurel tests pass.
Closesstrata-org#1030
---------
Co-authored-by: keyboardDrummer-bot <keyboardDrummer-bot@users.noreply.github.com>
Co-authored-by: Shilpi Goel <shigoel@gmail.com>
Co-authored-by: thanhnguyen-aws <ntson@amazon.com>
Co-authored-by: Remy Willems <rwillems@amazon.com>
Co-authored-by: Michael Tautschnig <mt@debian.org>
0 commit comments