Skip to content

Commit

Permalink
Merge pull request #305 from lisa-analyzer/giacomo-boldini/fix-statem…
Browse files Browse the repository at this point in the history
…ents

Fix type-checking errors in Addition and Remainder statements.
  • Loading branch information
lucaneg committed Feb 9, 2024
2 parents a30bd0e + 2fc4e73 commit 8c3a340
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public <A extends AbstractState<A>> AnalysisState<A> fwdBinarySemantics(
SymbolicExpression right,
StatementStore<A> expressions)
throws SemanticException {
if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType))
if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType))
return state.bottom();
if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType))
return state.bottom();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public <A extends AbstractState<A>> AnalysisState<A> fwdBinarySemantics(
throws SemanticException {
if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType))
return state.bottom();
if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType))
if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType))
return state.bottom();

return state.smallStepSemantics(
Expand Down

0 comments on commit 8c3a340

Please sign in to comment.