-
Notifications
You must be signed in to change notification settings - Fork 43
# Syntax: Change rewrite arrow to <-
#192
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
base: main
Are you sure you want to change the base?
Conversation
Hi @mrscottyrose, Thanks for the contribution! The updated syntax is definitely an improvement—it helps eliminate ambiguity and makes specifications easier to read. That said, before we can merge this PR, all existing examples in the tests directory will need to be updated to use the new <- syntax. Otherwise, the CI tests will fail. Just a quick note: Act is still under active development, and the syntax may undergo changes in the future. Thanks again! |
…erations for consistency
Hey @zoep could you please check if everything's alright now |
|
||
x => x + y | ||
|
||
ensures |
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.
This is a test for postconditions, so the ensures
block should not be removed.
@@ -0,0 +1,14 @@ | |||
constructor of C |
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.
This test is added in the postcodnitions directory, so it should have an ensures
block.
The tests will still not pass as |
Hey @zoep Just to confirm—should I update every file and subdirectory under the |
Yes, exactly. Eventually, CI must turn green. |
…iles for consistency
Description
This PR implements the enhancement requested in Issue #128.
Currently, both rewrites and implications use the same
=>
syntax in Act specifications, which can be confusing. This PR changes the rewrite arrow to<-
while keeping implications as=>
, making specifications easier to write and read.Changes
LARROW
token to the lexer for the<-
symbol<-
instead of=>
for rewrites<-
instead of=>
Example
Before:
After:
This makes it easy to visually distinguish between rewrites (using
<-
) and implications (using=>
).Testing
I've verified that the changes properly handle the new syntax by:
The implementation is minimal and focused solely on addressing the syntax issue described in #128.
Related Issue
Resolves #128