Skip to content
Snippets Groups Projects
Commit c7f64da8 authored by Marco Antognini's avatar Marco Antognini Committed by Etienne Kneuss
Browse files

Fix BVNot symbol and add purescala pretty printer support

parent 7fb472d5
No related branches found
No related tags found
No related merge requests found
...@@ -337,7 +337,7 @@ class CConverter(val ctx: LeonContext, val prog: Program) { ...@@ -337,7 +337,7 @@ class CConverter(val ctx: LeonContext, val prog: Program) {
case BVTimes(lhs, rhs) => buildBinOp(lhs, "*", rhs) case BVTimes(lhs, rhs) => buildBinOp(lhs, "*", rhs)
case BVDivision(lhs, rhs) => buildBinOp(lhs, "/", rhs) case BVDivision(lhs, rhs) => buildBinOp(lhs, "/", rhs)
case BVRemainder(lhs, rhs) => buildBinOp(lhs, "%", rhs) case BVRemainder(lhs, rhs) => buildBinOp(lhs, "%", rhs)
case BVNot(rhs) => buildUnOp ( "!", rhs) // TODO check if this one isn't in fact '~' case BVNot(rhs) => buildUnOp ( "~", rhs)
case BVAnd(lhs, rhs) => buildBinOp(lhs, "&", rhs) case BVAnd(lhs, rhs) => buildBinOp(lhs, "&", rhs)
case BVOr(lhs, rhs) => buildBinOp(lhs, "|", rhs) case BVOr(lhs, rhs) => buildBinOp(lhs, "|", rhs)
case BVXOr(lhs, rhs) => buildBinOp(lhs, "^", rhs) case BVXOr(lhs, rhs) => buildBinOp(lhs, "^", rhs)
......
...@@ -164,6 +164,7 @@ class PrettyPrinter(opts: PrinterOptions, ...@@ -164,6 +164,7 @@ class PrettyPrinter(opts: PrinterOptions,
case Or(exprs) => optP { p"${nary(exprs, "| || ")}" } // Ugliness award! The first | is there to shield from stripMargin() case Or(exprs) => optP { p"${nary(exprs, "| || ")}" } // Ugliness award! The first | is there to shield from stripMargin()
case Not(Equals(l, r)) => optP { p"$l \u2260 $r" } case Not(Equals(l, r)) => optP { p"$l \u2260 $r" }
case Implies(l,r) => optP { p"$l ==> $r" } case Implies(l,r) => optP { p"$l ==> $r" }
case BVNot(expr) => p"~$expr"
case UMinus(expr) => p"-$expr" case UMinus(expr) => p"-$expr"
case BVUMinus(expr) => p"-$expr" case BVUMinus(expr) => p"-$expr"
case RealUMinus(expr) => p"-$expr" case RealUMinus(expr) => p"-$expr"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment