diff options
author | ajreynol <andrew.j.reynolds@gmail.com> | 2014-10-31 11:35:11 +0100 |
---|---|---|
committer | ajreynol <andrew.j.reynolds@gmail.com> | 2014-10-31 11:35:19 +0100 |
commit | 458b2b7eb5bdf09a1a886f4e2a165380d5fd918f (patch) | |
tree | 342d05bab92d0aa349ab833e6a4b60e887670295 /src/theory/quantifiers/fun_def_process.cpp | |
parent | 5a285d5247b56b00895774c909f09c8ad1e3889c (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.cpp | 6 |
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; |