* Added LAMBDA kind and type rule, and Node::isClosure().
(this commit was certified error- and warning-free by the test-and-commit script.)
return getMetaKind() == kind::metakind::VARIABLE;
}
+ inline bool isClosure() const {
+ assertTNodeNotExpired();
+ return getKind() == kind::LAMBDA ||
+ getKind() == kind::FORALL ||
+ getKind() == kind::EXISTS ||
+ getKind() == kind::REWRITE_RULE;
+ }
+
/**
* Returns the unique id of this node
* @return the ud
variable SKOLEM "skolem var"
operator TUPLE 1: "a tuple"
+operator LAMBDA 2 "lambda"
+
constant TYPE_CONSTANT \
::CVC4::TypeConstant \
::CVC4::TypeConstantHashFunction \
typerule EQUAL ::CVC4::theory::builtin::EqualityTypeRule
typerule DISTINCT ::CVC4::theory::builtin::DistinctTypeRule
typerule TUPLE ::CVC4::theory::builtin::TupleTypeRule
+typerule LAMBDA ::CVC4::theory::builtin::LambdaTypeRule
constant SUBTYPE_TYPE \
::CVC4::Predicate \
}
};/* class StringConstantTypeRule */
+class LambdaTypeRule {
+public:
+ inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) {
+ if( n[0].getType(check) != nodeManager->boundVarListType() ) {
+ std::stringstream ss;
+ ss << "expected a bound var list for LAMBDA expression, got `"
+ << n[0].getType().toString() << "'";
+ throw TypeCheckingExceptionPrivate(n, ss.str());
+ }
+ std::vector<TypeNode> argTypes;
+ for(TNode::iterator i = n[0].begin(); i != n[0].end(); ++i) {
+ argTypes.push_back((*i).getType());
+ }
+ TypeNode rangeType = n[1].getType(check);
+ return nodeManager->mkFunctionType(argTypes, rangeType);
+ }
+};/* class LambdaTypeRule */
+
class SortProperties {
public:
inline static bool isWellFounded(TypeNode type) {
for( int i=0; i<(int)body[0].getNumChildren(); i++ ){
//if( std::find( args.begin(), args.end(), body[0][i] )!=args.end() ){
terms.push_back( body[0][i] );
- subs.push_back( NodeManager::currentNM()->mkSkolem( body[0][i].getType() ) );
+ subs.push_back( NodeManager::currentNM()->mkBoundVar( body[0][i].getType() ) );
}
args.insert( args.end(), subs.begin(), subs.end() );
}else{
** \brief Implementation of term databse class
**/
- #include "theory/quantifiers/term_database.h"
- #include "theory/quantifiers_engine.h"
- #include "theory/uf/theory_uf_instantiator.h"
- #include "theory/theory_engine.h"
- #include "theory/quantifiers/first_order_model.h"
+#include "theory/quantifiers/term_database.h"
+#include "theory/quantifiers_engine.h"
+#include "theory/uf/theory_uf_instantiator.h"
+#include "theory/theory_engine.h"
+#include "theory/quantifiers/first_order_model.h"
using namespace std;
using namespace CVC4;
}
return nodeManager->booleanType();
}
-};/* class RewriterulesTypeRule */
+};/* class RewriteRuleTypeRule */
class RRRewriteTypeRule {
opisavailable-12.smt2 \
ricart-agrawala6.smt2 \
set8.smt2 \
+ smtlib384a03.smt2 \
+ smtlib46f14a.smt2 \
+ smtlibf957ea.smt2 \
+ gauss_init_0030.fof.smt2 \
+ piVC_5581bd.smt2 \
set3.smt2
-# removed because failing
-# smtlib384a03.smt2 \
-# smtlib46f14a.smt2 \
-# smtlibf957ea.smt2 \
-# gauss_init_0030.fof.smt2 \
-# piVC_5581bd.smt2 \
-#
-
# removed because it now reports unknown
# symmetric_unsat_7.smt2 \
#