support for isWellFounded/mkGroundTerm on uninterpretted sorts. cvc4 now assumes...
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Sat, 4 Feb 2012 22:19:12 +0000 (22:19 +0000)
committerAndrew Reynolds <andrew.j.reynolds@gmail.com>
Sat, 4 Feb 2012 22:19:12 +0000 (22:19 +0000)
src/theory/builtin/kinds
src/theory/builtin/theory_builtin_type_rules.h

index 50e4d53bbdd6d36dbdc45cb32c9ba1b61205eb4b..b7329cb3a0ca167c1b11d69f157cc887e3d32172 100644 (file)
@@ -260,8 +260,9 @@ parameterized SORT_TYPE SORT_TAG 0: "sort type"
 # enough (for now) ?  Once we support quantifiers, maybe reconsider
 # this..
 cardinality SORT_TYPE "Cardinality(Cardinality::INTEGERS)"
-well-founded SORT_TYPE false
-
+well-founded SORT_TYPE \
+    "::CVC4::theory::builtin::SortProperties::isWellFounded(%TYPE%)" \
+    "::CVC4::theory::builtin::SortProperties::mkGroundTerm(%TYPE%)"
 
 # A kind representing "inlined" operators defined with OPERATOR
 # Conceptually, (EQUAL a b) is actually an (APPLY EQUAL a b), but it's
index 48a5d475d18bda383bd6f442bc80c4117362db4a..86603f004cb57a6682e47ebb0e062294620feb9c 100644 (file)
@@ -138,6 +138,22 @@ public:
   }
 };/* class StringConstantTypeRule */
 
+class SortProperties {
+//private:  //FIXME?
+//  static std::map< TypeNode, TNode > d_groundTerms;
+public:
+  inline static bool isWellFounded(TypeNode type) {
+    return true;
+  }
+  inline static Node mkGroundTerm(TypeNode type) {
+    Assert(type.getKind() == kind::SORT_TYPE);
+    //if( d_groundTerms.find( type )==d_groundTerms.end() ){
+    //  d_groundTerms[type] = NodeManager::currentNM()->mkVar( type );
+    //}
+    //return d_groundTerms[type];
+    return NodeManager::currentNM()->mkVar( type );
+  }
+};
 
 class FunctionProperties {
 public: