Skip to content

Commit

Permalink
Removed chainID
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardalee authored and lhstrh committed May 29, 2024
1 parent 9c725a3 commit 24a6b20
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 deletions.
9 changes: 0 additions & 9 deletions core/src/main/java/org/lflang/generator/ReactionInstance.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,6 @@ public ReactionInstance(Reaction definition, ReactorInstance parent, int index)
//////////////////////////////////////////////////////
//// Public fields.

/**
* Indicates the chain this reaction is a part of. It is constructed through a bit-wise or among
* all upstream chains. Each fork in the dependency graph setting a new, unused bit to true in
* order to disambiguate it from parallel chains. Note that zero results in no overlap with any
* other reaction, which means the reaction can execute in parallel with any other reaction. The
* default is 1L. If left at the default, parallel execution will be based purely on levels.
*/
public long chainID = 1L;

/** The ports or actions that this reaction may write to. */
public Set<TriggerInstance<? extends Variable>> effects = new LinkedHashSet<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,6 @@ public static void generateReactionAndTriggerStructs(
// Set the defaults of the reaction_t struct in the constructor.
// Since the self struct is allocated using calloc, there is no need to set:
// self->_lf__reaction_"+reactionCount+".index = 0;
// self->_lf__reaction_"+reactionCount+".chain_id = 0;
// self->_lf__reaction_"+reactionCount+".pos = 0;
// self->_lf__reaction_"+reactionCount+".status = inactive;
// self->_lf__reaction_"+reactionCount+".deadline = 0LL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ private static boolean setReactionPriorities(ReactorInstance reactor, CodeBuilde
temp.pr(
String.join(
"\n",
CUtil.reactionRef(r) + ".chain_id = " + r.chainID + ";",
"// index is the OR of level " + level + " and ",
"// deadline " + inferredDeadline.toNanoSeconds() + " shifted left 16 bits.",
CUtil.reactionRef(r) + ".index = " + reactionIndex + ";"));
Expand All @@ -249,7 +248,6 @@ private static boolean setReactionPriorities(ReactorInstance reactor, CodeBuilde
temp.pr(
String.join(
"\n",
CUtil.reactionRef(r) + ".chain_id = " + r.chainID + ";",
"// index is the OR of levels[" + runtimeIdx + "] and ",
"// deadlines[" + runtimeIdx + "] shifted left 16 bits.",
CUtil.reactionRef(r)
Expand All @@ -266,7 +264,6 @@ private static boolean setReactionPriorities(ReactorInstance reactor, CodeBuilde
temp.pr(
String.join(
"\n",
CUtil.reactionRef(r) + ".chain_id = " + r.chainID + ";",
"// index is the OR of levels[" + runtimeIdx + "] and ",
"// deadlines[" + runtimeIdx + "] shifted left 16 bits.",
CUtil.reactionRef(r)
Expand All @@ -283,7 +280,6 @@ private static boolean setReactionPriorities(ReactorInstance reactor, CodeBuilde
temp.pr(
String.join(
"\n",
CUtil.reactionRef(r) + ".chain_id = " + r.chainID + ";",
"// index is the OR of levels[" + runtimeIdx + "] and ",
"// deadlines[" + runtimeIdx + "] shifted left 16 bits.",
CUtil.reactionRef(r)
Expand Down

0 comments on commit 24a6b20

Please sign in to comment.