This repository was archived by the owner on May 18, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -997,7 +997,7 @@ algorithm
997997 algorithm
998998 // Flatten the condition and body of the branch.
999999 cond := flattenExp(cond, prefix);
1000- eql := listReverseInPlace( flattenEquations(eql, prefix) );
1000+ eql := flattenEquations(eql, prefix);
10011001
10021002 // Evaluate structural conditions.
10031003 if var <= Variability . STRUCTURAL_PARAMETER then
@@ -1022,12 +1022,12 @@ algorithm
10221022 equations := listAppend(eql, equations);
10231023 else
10241024 // Otherwise, append this branch.
1025- bl := Equation . makeBranch(cond, eql, var ) :: bl;
1025+ bl := Equation . makeBranch(cond, listReverseInPlace( eql) , var ) :: bl;
10261026 end if ;
10271027 elseif not Expression . isFalse(cond) then
10281028 // Only add the branch to the list of branches if the condition is not
10291029 // literal false, otherwise just drop it since it will never trigger.
1030- bl := Equation . makeBranch(cond, eql, var ) :: bl;
1030+ bl := Equation . makeBranch(cond, listReverseInPlace( eql) , var ) :: bl;
10311031 end if ;
10321032 then
10331033 bl;
Original file line number Diff line number Diff line change @@ -376,7 +376,9 @@ algorithm
376376 if Expression . isTrue(cond) then
377377 if listEmpty(accum) then
378378 // If it's the first branch, remove the if and keep only the branch body.
379- elements := listAppend(simplifyEquations(body), elements);
379+ for eq in body loop
380+ elements := simplifyEquation(eq, elements);
381+ end for ;
380382 return ;
381383 else
382384 // Otherwise just discard the rest of the branches.
You can’t perform that action at this time.
0 commit comments