--- /dev/null
+// Place your settings in this file to overwrite default and user settings.
+{
+ "editor.fontSize": 18
+}
\ No newline at end of file
JOIN_TOK = 'JOIN';
TRANSPOSE_TOK = 'TRANSPOSE';
PRODUCT_TOK = 'PRODUCT';
- TRANSCLOSURE_TOK = 'TRANSCLOSURE';
+ TRANSCLOSURE_TOK = 'TCLOSURE';
// Strings
| TRANSPOSE_TOK bvNegTerm[f]
{ f = MK_EXPR(CVC4::kind::TRANSPOSE, f); }
| TRANSCLOSURE_TOK bvNegTerm[f]
- { f = MK_EXPR(CVC4::kind::TRANSCLOSURE, f); }
+ { f = MK_EXPR(CVC4::kind::TCLOSURE, f); }
| TUPLE_TOK LPAREN bvNegTerm[f] RPAREN
{ std::vector<Type> types;
std::vector<Expr> args;
addOperator(kind::SUBSET, "subset");
addOperator(kind::MEMBER, "member");
addOperator(kind::TRANSPOSE, "transpose");
- addOperator(kind::TRANSCLOSURE, "transclosure");
+ addOperator(kind::TCLOSURE, "tclosure");
addOperator(kind::JOIN, "join");
addOperator(kind::PRODUCT, "product");
addOperator(kind::SINGLETON, "singleton");
op << "TRANSPOSE";
opType = PREFIX;
break;
- case kind::TRANSCLOSURE:
- op << "TRANSCLOSURE";
+ case kind::TCLOSURE:
+ op << "TCLOSURE";
opType = PREFIX;
break;
case kind::SINGLETON:
case kind::SUBSET:
case kind::MEMBER:
case kind::SET_TYPE:
- case kind::TRANSCLOSURE:
+ case kind::TCLOSURE:
case kind::TRANSPOSE:
case kind::JOIN:
case kind::PRODUCT:
case kind::SET_TYPE: return "Set";
case kind::SINGLETON: return "singleton";
case kind::INSERT: return "insert";
- case kind::TRANSCLOSURE: return "transclosure";
+ case kind::TCLOSURE: return "tclosure";
case kind::TRANSPOSE: return "transpose";
case kind::PRODUCT: return "product";
case kind::JOIN: return "join";
operator JOIN 2 "set join"
operator PRODUCT 2 "set cartesian product"
operator TRANSPOSE 1 "set transpose"
-operator TRANSCLOSURE 1 "set transitive closure"
+operator TCLOSURE 1 "set transitive closure"
typerule UNION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule
typerule INTERSECTION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule
typerule JOIN ::CVC4::theory::sets::RelBinaryOperatorTypeRule
typerule PRODUCT ::CVC4::theory::sets::RelBinaryOperatorTypeRule
typerule TRANSPOSE ::CVC4::theory::sets::RelTransposeTypeRule
-typerule TRANSCLOSURE ::CVC4::theory::sets::RelTransClosureTypeRule
+typerule TCLOSURE ::CVC4::theory::sets::RelTransClosureTypeRule
construle UNION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule
construle INTERSECTION ::CVC4::theory::sets::SetsBinaryOperatorTypeRule
construle JOIN ::CVC4::theory::sets::RelBinaryOperatorTypeRule
construle PRODUCT ::CVC4::theory::sets::RelBinaryOperatorTypeRule
construle TRANSPOSE ::CVC4::theory::sets::RelTransposeTypeRule
-construle TRANSCLOSURE ::CVC4::theory::sets::RelTransClosureTypeRule
+construle TCLOSURE ::CVC4::theory::sets::RelTransClosureTypeRule
endtheory
Trace("rels-debug") << " ***** Done with check model for JOIN operator" << std::endl;
break;
}
- case kind::TRANSCLOSURE:
+ case kind::TCLOSURE:
break;
default:
Unhandled();
Node tp_rel_rep = getRepresentative(tp_rel);
if(d_terms_cache.find(tp_rel_rep) != d_terms_cache.end()) {
for(unsigned int i = 0; i < m_it->second.size(); i++) {
-// Node exp = tp_rel == tp_rel_rep ? d_membership_exp_cache[rel_rep][i]
-// : AND(d_membership_exp_cache[rel_rep][i], EQUAL(tp_rel, tp_rel_rep));
// Lazily apply transpose-occur rule.
// Need to eagerly apply if we don't send facts as lemmas
applyTransposeRule(d_membership_exp_cache[rel_rep][i], tp_rel_rep, true);
applyProductRule(exp, product_terms[j]);
}
}
- if(kind_terms.find(kind::TRANSCLOSURE) != kind_terms.end()) {
- std::vector<Node> tc_terms = kind_terms[kind::TRANSCLOSURE];
+ if(kind_terms.find(kind::TCLOSURE) != kind_terms.end()) {
+ std::vector<Node> tc_terms = kind_terms[kind::TCLOSURE];
for(unsigned int j = 0; j < tc_terms.size(); j++) {
applyTCRule(exp, tc_terms[j]);
}
if( n.getKind() == kind::TRANSPOSE ||
n.getKind() == kind::JOIN ||
n.getKind() == kind::PRODUCT ||
- n.getKind() == kind::TRANSCLOSURE ) {
+ n.getKind() == kind::TCLOSURE ) {
std::map<kind::Kind_t, std::vector<Node> > rel_terms;
std::vector<Node> terms;
// No r record is found
/*
*
*
- * transitive closure rule 1: y = (TRANSCLOSURE x)
+ * transitive closure rule 1: y = (TCLOSURE x)
* ---------------------------------------------
* y = x | x.x | x.x.x | ... (| is union)
*
*
*
- * transitive closure rule 2: TRANSCLOSURE(x)
+ * transitive closure rule 2: TCLOSURE(x)
* -----------------------------------------------------------
- * x <= TRANSCLOSURE(x) && (x JOIN x) <= TRANSCLOSURE(x) ....
+ * x <= TCLOSURE(x) && (x JOIN x) <= TCLOSURE(x) ....
*
* TC(x) = TC(y) => x = y ?
*
// tc_terms are transitive closure of rels and are modulo equal to tc_rep
Node TheorySetsRels::findMemExp(Node tc_rep, Node tuple) {
Trace("rels-exp") << "TheorySetsRels::findMemExp ( tc_rep = " << tc_rep << ", tuple = " << tuple << ")" << std::endl;
- std::vector<Node> tc_terms = d_terms_cache.find(tc_rep)->second[kind::TRANSCLOSURE];
+ std::vector<Node> tc_terms = d_terms_cache.find(tc_rep)->second[kind::TCLOSURE];
Assert(tc_terms.size() > 0);
for(unsigned int i = 0; i < tc_terms.size(); i++) {
Node tc_term = tc_terms[i];
return Node::null();
}
- Node TheorySetsRels::nthElementOfTuple( Node tuple, int n_th ) {
+ Node TheorySetsRels::nthElementOfTuple( Node tuple, int n_th ) {
if(tuple.isConst() || (!tuple.isVar() && !tuple.isConst()))
return tuple[n_th];
Datatype dt = tuple.getType().getDatatype();
d_eqEngine->addFunctionKind(kind::PRODUCT);
d_eqEngine->addFunctionKind(kind::JOIN);
d_eqEngine->addFunctionKind(kind::TRANSPOSE);
- d_eqEngine->addFunctionKind(kind::TRANSCLOSURE);
+ d_eqEngine->addFunctionKind(kind::TCLOSURE);
}
TheorySetsRels::~TheorySetsRels() {}
Node TupleTrie::existsTerm( std::vector< Node >& reps, int argIndex ) {
if( argIndex==(int)reps.size() ){
- if( d_data.empty() ){
+ if( d_data.empty() ){
return Node::null();
}else{
return d_data.begin()->first;
break;
}
- case kind::TRANSCLOSURE: {
+ case kind::TCLOSURE: {
if(node[0].getKind() == kind::EMPTYSET) {
return RewriteResponse(REWRITE_DONE, nm->mkConst(EmptySet(nm->toType(node.getType()))));
} else if (node[0].isConst()) {
- } else if(node[0].getKind() == kind::TRANSCLOSURE) {
+ } else if(node[0].getKind() == kind::TCLOSURE) {
return RewriteResponse(REWRITE_AGAIN, node[0]);
- } else if(node[0].getKind() != kind::TRANSCLOSURE) {
+ } else if(node[0].getKind() != kind::TCLOSURE) {
Trace("sets-postrewrite") << "Sets::postRewrite returning " << node << std::endl;
return RewriteResponse(REWRITE_DONE, node);
}
struct RelTransClosureTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
throw (TypeCheckingExceptionPrivate, AssertionException) {
- Assert(n.getKind() == kind::TRANSCLOSURE);
+ Assert(n.getKind() == kind::TCLOSURE);
TypeNode setType = n[0].getType(check);
if(check) {
if(!setType.isSet() && !setType.getSetElementType().isTuple()) {
}
inline static bool computeIsConst(NodeManager* nodeManager, TNode n) {
- Assert(n.getKind() == kind::TRANSCLOSURE);
+ Assert(n.getKind() == kind::TCLOSURE);
return false;
}
};/* struct RelTransClosureTypeRule */