diff --git a/src/main/scala/inox/ast/ExprOps.scala b/src/main/scala/inox/ast/ExprOps.scala index c5d3a275ecc5ad53accbbd89cf0331334625e9b2..21151ac9acd05d84054f116920c291190c90a853 100644 --- a/src/main/scala/inox/ast/ExprOps.scala +++ b/src/main/scala/inox/ast/ExprOps.scala @@ -3,10 +3,7 @@ package inox package ast -import utils._ -import scala.reflect._ - -/** Provides functions to manipulate [[purescala.Expressions]]. +/** Provides functions to manipulate [[Expressions.Expr]]. * * This object provides a few generic operations on Leon expressions, * as well as some common operations. @@ -114,9 +111,9 @@ trait ExprOps extends GenTreeOps { /** Returns if this expression behaves as a purely functional construct, * i.e. always returns the same value (for the same environment) and has no side-effects */ - def isPurelyFunctional(e: Expr): Boolean = exists { - case _ : Error => false - case _ => true + def isPurelyFunctional(e: Expr): Boolean = !exists { + case _ : Error => true + case _ => false }(e) /** Extracts the body without its specification diff --git a/src/main/scala/inox/ast/Trees.scala b/src/main/scala/inox/ast/Trees.scala index 426a6e9c912f9c89e76c23c1ade899f8338351fa..321ff6921c7fead1bfba19685f78fdeecce3c3a5 100644 --- a/src/main/scala/inox/ast/Trees.scala +++ b/src/main/scala/inox/ast/Trees.scala @@ -80,7 +80,6 @@ trait Trees extends Expressions with Extractors with Types with Definitions with /** Builds a fresh identifier * * @param name The name of the identifier - * @param tpe The type of the identifier * @param alwaysShowUniqueID If the unique ID should always be shown */ def apply(name: String, alwaysShowUniqueID: Boolean = false) : Identifier = { @@ -92,7 +91,7 @@ trait Trees extends Expressions with Extractors with Types with Definitions with * * @param name The name of the identifier * @param forceId The forced ID of the identifier - * @param tpe The type of the identifier + * @param alwaysShowUniqueID If the unique ID should always be shown */ def forceId(name: String, forceId: Int, alwaysShowUniqueID: Boolean = false): Identifier = new Identifier(decode(name), uniqueCounter.nextGlobal, forceId, alwaysShowUniqueID)