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