-
Notifications
You must be signed in to change notification settings - Fork 64
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
Native forever
and never
time literal
#2421
Conversation
Keywords in LF are all lowercase -- let's stick with that? |
Makes sense! I'll modify the PR. |
It's unclear to me how this is used. I don't see any changes in the code generator to detect "forever" and then use the C macro |
This implementation does not use the C macro |
Ah yes, that makes sense. |
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 looks good to me.
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.
Is there no practical use case fornever
? If there is, then shouldn't it also be allowed as a time value?
I haven't yet encountered a use case where |
I was looking into the tests and found a test reaction(startup) {=
// Unfortunately, a time state variable cannot be initialized with NEVER.
// So we do that here.
self->last = NEVER;
=} I think introducing the |
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.
LGTM!
forever
and never
time literal
This PR introduces a new
forever
time literal that can be used as STA and STAA in decentralized execution. This PR is related to #2368 and closes #2374.This PR also introduces a new
never
time literal that can be used to initialize state values.