Skip to content
Snippets Groups Projects
Commit 5bf5101d authored by Emmanouil (Manos) Koukoutos's avatar Emmanouil (Manos) Koukoutos Committed by Etienne Kneuss
Browse files

Add example to a benchmark

parent 01e9a96a
No related branches found
No related tags found
No related merge requests found
...@@ -157,7 +157,10 @@ object Desugar { ...@@ -157,7 +157,10 @@ object Desugar {
case Trees.IntLiteral(v) => Literal(v) case Trees.IntLiteral(v) => Literal(v)
case Trees.BoolLiteral(b) => Literal(b2i(b)) case Trees.BoolLiteral(b) => Literal(b2i(b))
}} ensuring { res => }} ensuring { res =>
sem(res) == Semantics.semUntyped(e) sem(res) == Semantics.semUntyped(e) && ((e,res) passes {
case Trees.Minus(Trees.IntLiteral(42), Trees.IntLiteral(i)) =>
Plus(Literal(42), Neg(Literal(i)))
})
} }
def sem(e : SimpleE) : Int = e match { def sem(e : SimpleE) : Int = e match {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment