Skip to content
Snippets Groups Projects
Commit fd68ef89 authored by Régis Blanc's avatar Régis Blanc
Browse files

plop

parent b9be93ca
Branches
Tags
No related merge requests found
...@@ -11,6 +11,7 @@ object LinearEquations { ...@@ -11,6 +11,7 @@ object LinearEquations {
//return a mapping for each of the n variables in (pre, map, freshVars) //return a mapping for each of the n variables in (pre, map, freshVars)
def elimVariable(as: Set[Identifier], normalizedEquation: List[Expr]): (Expr, List[Expr], List[Identifier]) = { def elimVariable(as: Set[Identifier], normalizedEquation: List[Expr]): (Expr, List[Expr], List[Identifier]) = {
println("elim in normalized: " + normalizedEquation) println("elim in normalized: " + normalizedEquation)
require(normalizedEquation.tail.forall{case IntLiteral(i) if i != 0 => true case _ => false})
val t: Expr = normalizedEquation.head val t: Expr = normalizedEquation.head
val coefsVars: List[Int] = normalizedEquation.tail.map{case IntLiteral(i) => i} val coefsVars: List[Int] = normalizedEquation.tail.map{case IntLiteral(i) => i}
val orderedParams: Array[Identifier] = as.toArray val orderedParams: Array[Identifier] = as.toArray
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment