Skip to content
Snippets Groups Projects
Commit 382f1a2f authored by Nicolas Voirol's avatar Nicolas Voirol
Browse files

Extend supported fragment in AbstractPrincessSolver

parent 4b7b067a
Branches
Tags
No related merge requests found
...@@ -216,6 +216,9 @@ trait AbstractPrincessSolver extends AbstractSolver with ADTManagers { ...@@ -216,6 +216,9 @@ trait AbstractPrincessSolver extends AbstractSolver with ADTManagers {
case AsInstanceOf(expr, tpe) => case AsInstanceOf(expr, tpe) =>
parseTerm(expr) parseTerm(expr)
case BooleanLiteral(true) => i(0)
case BooleanLiteral(false) => i(1)
// @nv: this MUST come at least after having dealt with FunctionInvocation, // @nv: this MUST come at least after having dealt with FunctionInvocation,
// Application and ADTSelectors which can return booleans // Application and ADTSelectors which can return booleans
case IsTyped(_, BooleanType) => case IsTyped(_, BooleanType) =>
...@@ -252,14 +255,14 @@ trait AbstractPrincessSolver extends AbstractSolver with ADTManagers { ...@@ -252,14 +255,14 @@ trait AbstractPrincessSolver extends AbstractSolver with ADTManagers {
case Times(lhs, rhs) => { case Times(lhs, rhs) => {
val pLhs = parseTerm(lhs) val pLhs = parseTerm(lhs)
val pRhs = parseTerm(rhs) val pRhs = parseTerm(rhs)
pLhs * pRhs p.mult(pLhs, pRhs)
} }
case UMinus(e) => case UMinus(e) =>
- parseTerm(e) - parseTerm(e)
case Division(lhs, rhs) => case Division(lhs, rhs) =>
p.mulTheory.eDiv(parseTerm(lhs), parseTerm(rhs)) p.mulTheory.tDiv(parseTerm(lhs), parseTerm(rhs))
case Remainder(lhs, rhs) => case Remainder(lhs, rhs) =>
val q = parseTerm(Division(lhs, rhs)) val q = parseTerm(Division(lhs, rhs))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment