Skip to content
Snippets Groups Projects
Commit e4d99601 authored by Philippe Suter's avatar Philippe Suter
Browse files

No commit message

No commit message
parent becae01d
No related branches found
No related tags found
No related merge requests found
...@@ -211,7 +211,7 @@ trait CodeExtraction extends Extractors { ...@@ -211,7 +211,7 @@ trait CodeExtraction extends Extractors {
realBody match { realBody match {
case ExEnsuredExpression(body2, resSym, contract) => { case ExEnsuredExpression(body2, resSym, contract) => {
varSubsts(resSym) = (() => ResultVariable()) varSubsts(resSym) = (() => ResultVariable().setType(funDef.returnType))
val c1 = s2ps(contract) val c1 = s2ps(contract)
// varSubsts.remove(resSym) // varSubsts.remove(resSym)
realBody = body2 realBody = body2
......
...@@ -93,6 +93,12 @@ class Analysis(val program: Program) { ...@@ -93,6 +93,12 @@ class Analysis(val program: Program) {
} }
} }
def rewritePatternMatching(expr: Expr) : Expr = {
expr
}
def replaceInExpr(substs: Map[Expr,Expr], expr: Expr) : Expr = { def replaceInExpr(substs: Map[Expr,Expr], expr: Expr) : Expr = {
def rec(ex: Expr) : Expr = ex match { def rec(ex: Expr) : Expr = ex match {
case _ if (substs.get(ex).isDefined) => substs(ex) case _ if (substs.get(ex).isDefined) => substs(ex)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment