summaryrefslogtreecommitdiff
path: root/src/smt
diff options
context:
space:
mode:
authorajreynol <andrew.j.reynolds@gmail.com>2015-07-31 10:32:34 +0200
committerajreynol <andrew.j.reynolds@gmail.com>2015-07-31 10:32:34 +0200
commitbf7f7d6960f6e03e90880dd3da9ff1bf00943cf3 (patch)
tree87630123b624ea6ca98bb85d8cc3e99ca75edc01 /src/smt
parentf2da7296ff76920528c0e9edc35f96a715b85078 (diff)
Sygus support for inductive datatypes.
Diffstat (limited to 'src/smt')
-rw-r--r--src/smt/smt_engine.cpp6
-rw-r--r--src/smt/smt_engine.h11
2 files changed, 13 insertions, 4 deletions
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp
index fa145813c..ce8f68c09 100644
--- a/src/smt/smt_engine.cpp
+++ b/src/smt/smt_engine.cpp
@@ -1787,6 +1787,12 @@ void SmtEngine::defineFunction(Expr func,
d_definedFunctions->insert(funcNode, def);
}
+bool SmtEngine::isDefinedFunction( Expr func ){
+ Node nf = Node::fromExpr( func );
+ Debug("smt") << "isDefined function " << nf << "?" << std::endl;
+ return d_definedFunctions->find(nf) != d_definedFunctions->end();
+}
+
Node SmtEnginePrivate::expandDefinitions(TNode n, hash_map<Node, Node, NodeHashFunction>& cache, bool expandOnly)
throw(TypeCheckingException, LogicException, UnsafeInterruptException) {
diff --git a/src/smt/smt_engine.h b/src/smt/smt_engine.h
index de9b8127d..db0809308 100644
--- a/src/smt/smt_engine.h
+++ b/src/smt/smt_engine.h
@@ -189,9 +189,9 @@ class CVC4_PUBLIC SmtEngine {
*A vector of command definitions to be imported in the new
*SmtEngine when checking unsat-cores.
*/
-#ifdef CVC4_PROOF
+#ifdef CVC4_PROOF
std::vector<Command*> d_defineCommands;
-#endif
+#endif
/**
* The logic we're in.
*/
@@ -455,6 +455,9 @@ public:
const std::vector<Expr>& formals,
Expr formula);
+ /** is defined function */
+ bool isDefinedFunction(Expr func);
+
/**
* Add a formula to the current context: preprocess, do per-theory
* setup, use processAssertionList(), asserting to T-solver for
@@ -536,7 +539,7 @@ public:
* Print solution for synthesis conjectures found by ce_guided_instantiation module
*/
void printSynthSolution( std::ostream& out );
-
+
/**
* Get an unsatisfiable core (only if immediately preceded by an
* UNSAT or VALID query). Only permitted if CVC4 was built with
@@ -707,7 +710,7 @@ public:
* Set print function in model
*/
void setPrintFuncInModel(Expr f, bool p);
-
+
};/* class SmtEngine */
}/* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback