diff --git a/src/cp/Terms.scala b/src/cp/Terms.scala index 04a78daace54bf250c414b7cc3d8ffad49e6fe4d..e70341a65295f7c6d2e86e6177f5b1e2671c6092 100644 --- a/src/cp/Terms.scala +++ b/src/cp/Terms.scala @@ -13,6 +13,7 @@ import purescala.Common._ object Terms { /** Terms are functions with domain T (which can be a tuple) and range R */ abstract class Term[T,R](val program : Program, val expr : Expr, val types : Seq[TypeTree], val converter : Converter, val lVars: Set[L[_]]) { + self => /** The converting function defines how Expr values returned by the solver * will be converted back to Scala values */ val convertingFunction : (Seq[Expr] => T) @@ -38,6 +39,8 @@ object Terms { def lazyFindAll(implicit asConstraint: (Term[T,R]) => Constraint[T]): LIterator[T] = { new LIterator((l: L[T]) => asConstraint(this)) } + + def c(implicit isBoolean : R =:= Boolean) : self.type = this } def removeGuard(g: Identifier): Unit = {