From 6530098e885b9eb798edc3911a4456e04fc650cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ali=20Sinan=20K=C3=B6ksal?= <alisinan@gmail.com>
Date: Tue, 12 Jul 2011 22:11:15 +0000
Subject: [PATCH] the "c" method

---
 src/cp/Terms.scala | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/cp/Terms.scala b/src/cp/Terms.scala
index 04a78daac..e70341a65 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 = {
-- 
GitLab