Skip to content
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

Inference of logical execution times of reactions #1292

Merged
merged 22 commits into from
Aug 10, 2022
Merged

Conversation

lhstrh
Copy link
Member

@lhstrh lhstrh commented Jul 12, 2022

This is a WIP with @CloverCho and @Wonseo-C to infer logical execution times in ReactorInstance.

FIXMEs:

  • calculate LET for reaction (not reactor)
  • clean up and comments
  • write tests

@CloverCho
Copy link
Collaborator

I would simplify this by just assigning TimeValue.ZERO on line 456. That means you can also get rid of lines 470-472.

I see, then I will remove that part

@hokeun hokeun marked this pull request as ready for review August 9, 2022 00:32
@hokeun hokeun requested review from Soroosh129 and hokeun August 9, 2022 00:32
Copy link
Contributor

@Soroosh129 Soroosh129 left a comment

Choose a reason for hiding this comment

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

I think there is a residual piece of code in ReactorInstance that might need to be deleted.

I also had some comments about the usage of .iterator().next(), which was unclear for me.

return this.let;
}

if (this.parent.isGeneratedDelay()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be an error condition?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Because when we get the action delay by after lf syntax, the delay exists in the 'Delay' reactor, which is the additional reactor for only delay. So, if the parent is in the generated delay condition, we thought it should return the TimeValue.ZERO.

org.lflang/src/org/lflang/generator/ReactorInstance.java Outdated Show resolved Hide resolved
org.lflang/src/org/lflang/generator/ReactionInstance.java Outdated Show resolved Hide resolved
org.lflang/src/org/lflang/generator/ReactionInstance.java Outdated Show resolved Hide resolved
Copy link
Contributor

@Soroosh129 Soroosh129 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@hokeun hokeun left a comment

Choose a reason for hiding this comment

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

Overall, this looks good!

org.lflang/src/org/lflang/generator/c/CGenerator.java Outdated Show resolved Hide resolved
@Wonseo-C
Copy link
Collaborator

@lhstrh I think it is ready to merge.

@lhstrh lhstrh merged commit 29947fa into master Aug 10, 2022
@lhstrh lhstrh changed the title Implementation of LET inference in ReactorInstance Inference of logical execution times of reactions Aug 10, 2022
@lhstrh lhstrh added the feature New feature label Aug 10, 2022
@cmnrd cmnrd deleted the let-inference branch March 10, 2023 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants