summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/fun_def_process.cpp
diff options
context:
space:
mode:
authorajreynol <andrew.j.reynolds@gmail.com>2014-10-31 11:35:11 +0100
committerajreynol <andrew.j.reynolds@gmail.com>2014-10-31 11:35:19 +0100
commit458b2b7eb5bdf09a1a886f4e2a165380d5fd918f (patch)
tree342d05bab92d0aa349ab833e6a4b60e887670295 /src/theory/quantifiers/fun_def_process.cpp
parent5a285d5247b56b00895774c909f09c8ad1e3889c (diff)
Do not allow duplication of function definitions. Set incomplete flag in model builder.
Diffstat (limited to 'src/theory/quantifiers/fun_def_process.cpp')
-rw-r--r--src/theory/quantifiers/fun_def_process.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/theory/quantifiers/fun_def_process.cpp b/src/theory/quantifiers/fun_def_process.cpp
index c375d68f2..0e365c875 100644
--- a/src/theory/quantifiers/fun_def_process.cpp
+++ b/src/theory/quantifiers/fun_def_process.cpp
@@ -39,6 +39,12 @@ void FunDefFmf::simplify( std::vector< Node >& assertions, bool doRewrite ) {
Assert( n.getKind()==APPLY_UF );
Node f = n.getOperator();
+ //check if already defined, if so, throw error
+ if( d_sorts.find( f )!=d_sorts.end() ){
+ Message() << "Cannot define function " << f << " more than once." << std::endl;
+ exit( 0 );
+ }
+
//create a sort S that represents the inputs of the function
std::stringstream ss;
ss << "I_" << f;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback