From 276e845e2c3ddcea38a898521f5cf731e3abccfd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9gis=20Blanc?= <regwblanc@gmail.com>
Date: Mon, 5 Nov 2012 11:55:24 +0100
Subject: [PATCH] fix some comments

---
 src/main/scala/leon/purescala/TreeOps.scala | 2 +-
 src/main/scala/leon/purescala/Trees.scala   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/scala/leon/purescala/TreeOps.scala b/src/main/scala/leon/purescala/TreeOps.scala
index 2bec96b30..54bc87f1d 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 9261a423e..8221bbffd 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
   }
-- 
GitLab