diff --git a/src/main/scala/leon/purescala/TreeOps.scala b/src/main/scala/leon/purescala/TreeOps.scala index 2bec96b30ffd95dc6cf1eb58fd54560dc07f78fd..54bc87f1df0b9ba74292446b32266ab0fc674024 100644 --- a/src/main/scala/leon/purescala/TreeOps.scala +++ b/src/main/scala/leon/purescala/TreeOps.scala @@ -923,7 +923,7 @@ object TreeOps { case _ => throw new Exception("I can't choose simplest value for type " + tpe) } - //guarentee that all IfExpr will be at the top level and as soon as you encounter a non-IfExpr, then no more IfExpr can be find in the sub-expressions + //guarentee that all IfExpr will be at the top level and as soon as you encounter a non-IfExpr, then no more IfExpr can be found in the sub-expressions //require no-match, no-ets and only pure code def hoistIte(expr: Expr): Expr = { def transform(expr: Expr): Option[Expr] = expr match { diff --git a/src/main/scala/leon/purescala/Trees.scala b/src/main/scala/leon/purescala/Trees.scala index 9261a423e54dad5fc997c9d2be8b9d8123d372b9..8221bbffdb5a43aafb12db9f48dfc66f0982e481 100644 --- a/src/main/scala/leon/purescala/Trees.scala +++ b/src/main/scala/leon/purescala/Trees.scala @@ -88,7 +88,7 @@ object Trees { } } - // This must be 1-indexed ! + // This must be 1-indexed ! (So are methods of Scala Tuples) case class TupleSelect(tuple: Expr, index: Int) extends Expr { assert(index >= 1) } @@ -400,8 +400,8 @@ object Trees { case class ArrayFill(length: Expr, defaultValue: Expr) extends Expr case class ArrayMake(defaultValue: Expr) extends Expr case class ArraySelect(array: Expr, index: Expr) extends Expr with ScalacPositional - //the difference between ArrayUpdate and ArrayUpdated is that the former has a side effect while the latter is the function variant - //ArrayUpdate should be eliminated soon in the analysis while ArrayUpdated is keep all the way to the backend + //the difference between ArrayUpdate and ArrayUpdated is that the former has a side effect while the latter is the functional version + //ArrayUpdate should be eliminated soon in the analysis while ArrayUpdated is kept all the way to the backend case class ArrayUpdate(array: Expr, index: Expr, newValue: Expr) extends Expr with ScalacPositional with FixedType { val fixedType = UnitType }