-
Notifications
You must be signed in to change notification settings - Fork 63
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
Fix for broken deadline propagation mechanism #1451
Merged
Merged
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
dd9eda4
Set the deadline member of ReactionInstance when declaredDeadline is set
7444959
Add getInheritedDeadline
f919955
Add tests for checking priority of deadline reactions
erlingrj 56dbd5b
Use inherited deadline to assign priority to reaction
ea95ede
Fix deadline tests. They need to be single-threaded.
erlingrj 397b62e
We need to make string of the UNSIGNED value of the index/deadline
erlingrj 5f61ddf
Format Deadline tests
erlingrj af4d53b
Rename to inferredDeadline and break cycles when setting it.
erlingrj 3a68ba3
FIx reference to reactionInstance.deadline, should be declaredDeadlin…
erlingrj 36c7b58
Move inferred deadline out of reactionInstance and into Runtime
erlingrj e05ef70
Implement assignInferredDeadlines in ReactionInstanceGraph. Call it i…
erlingrj fad06e9
WIP: Use Runtime.deadline in code-generation
erlingrj 0d089e6
Add functions for getting Set and List of deadlines from ReactionInst…
erlingrj 5733906
Fix mistake in assignInferredDeadlines
erlingrj 71b0591
Fix code generation. Get deadlines in same way as levels are got.
erlingrj e6378e3
Add new test program for Banked reactors
erlingrj ca43fe1
Increase deadline to 100sec to fix macOS CI
erlingrj e7ad63c
Detect if there are deadlines globally.
794de2c
Fix typo
erlingrj 02301f1
Fix some comments
erlingrj 53fd90e
Address Edwards comments
erlingrj 3c95857
Apply suggestions from code review
erlingrj 26b861b
Address Martens comments
erlingrj 1c95d0e
Remove redundant(?) calls to assignLevels
erlingrj a9c7a7e
Undo mistake
erlingrj 7228484
Merge branch 'master' into fix-index-deadline3
erlingrj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Unless
assignLevels
is invoked in the constructor, there is no assurance that this method will always return a sensible result. Where isassignLevels
called?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.
assignLevels is invoked once in
createMainReactorInstance()
inCGenerator.c
. So it is called once on the top level reactor, which, if my understanding is correct should do the calculation for the whole reaction graph exactly onceThere 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.
I think the problem that was addressed by calling assignLevels, "just in case" is that the level of a reaction is not known until you have constructed the whole reaction graph. So you cannot just do it in the constructor. A simple fix would be to add a simple function to reactorInstance which checks if levels has been assigned yet. (hasLevelsBeenAssigned()) this would walk up the containment hierarchy to the main reactor and check if it has created a reactionInstanceGraph yet (and thus assigned levels). If this for some reason is not true, then I propose to throw an error because the developer might be requesting the levels at a point in time where they are not available (e.g. before the reaction graph has been fully constructed).
How does this sound?
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.
OK, that sounds like a good stop-gap measure to me. Still not fond of the original design, but the error will help prevent confusion.