ss << "tuple is of length " << length << "; cannot update index " << k;
PARSER_STATE->parseError(ss.str());
}
- const Datatype & dt = ((DatatypeType)t.getType()).getDatatype();
+ const api::Datatype& dt = t.getDatatype();
f2 = SOLVER->mkTerm(
- api::APPLY_SELECTOR, api::Term(SOLVER, dt[0][k].getSelector()), f);
+ api::APPLY_SELECTOR, dt[0][k].getSelectorTerm(), f);
}
( ( arrayStore[f2]
| DOT ( tupleStore[f2]
<< "its type: " << t;
PARSER_STATE->parseError(ss.str());
}
- const Record& rec = ((DatatypeType)t.getType()).getRecord();
- if(! rec.contains(id)) {
- PARSER_STATE->parseError(std::string("no such field `") + id + "' in record");
- }
- const Datatype & dt = ((DatatypeType)t.getType()).getDatatype();
+ const api::Datatype& dt = t.getDatatype();
f2 = SOLVER->mkTerm(
- api::APPLY_SELECTOR, api::Term(SOLVER, dt[0][id].getSelector()), f);
+ api::APPLY_SELECTOR, dt[0][id].getSelectorTerm(), f);
}
( ( arrayStore[f2]
| DOT ( tupleStore[f2]
if(! type.isRecord()) {
PARSER_STATE->parseError("record-select applied to non-record");
}
- const Record& rec = ((DatatypeType)type.getType()).getRecord();
- if(!rec.contains(id)){
- PARSER_STATE->parseError(std::string("no such field `") + id + "' in record");
- }
- const Datatype & dt = ((DatatypeType)type.getType()).getDatatype();
+ const api::Datatype& dt = type.getDatatype();
f = SOLVER->mkTerm(api::APPLY_SELECTOR,
- api::Term(SOLVER, dt[0][id].getSelector()),
+ dt[0][id].getSelectorTerm(),
f);
}
| k=numeral
ss << "tuple is of length " << length << "; cannot access index " << k;
PARSER_STATE->parseError(ss.str());
}
- const Datatype & dt = ((DatatypeType)type.getType()).getDatatype();
+ const api::Datatype& dt = type.getDatatype();
f = SOLVER->mkTerm(api::APPLY_SELECTOR,
- api::Term(SOLVER, dt[0][k].getSelector()),
+ dt[0][k].getSelectorTerm(),
f);
}
)
args.push_back(f);
types.push_back(f.getSort());
api::Sort t = SOLVER->mkTupleSort(types);
- const Datatype& dt = Datatype(((DatatypeType)t.getType()).getDatatype());
- args.insert(args.begin(), api::Term(SOLVER, dt[0].getConstructor()));
+ const api::Datatype& dt = t.getDatatype();
+ args.insert(args.begin(), dt[0].getConstructorTerm());
f = MK_TERM(api::APPLY_CONSTRUCTOR, args);
}
| IDEN_TOK LPAREN formula[f] RPAREN
types.push_back((*i).getSort());
}
api::Sort dtype = SOLVER->mkTupleSort(types);
- const Datatype& dt = ((DatatypeType)dtype.getType()).getDatatype();
- args.insert(args.begin(), api::Term(SOLVER, dt[0].getConstructor()));
+ const api::Datatype& dt = dtype.getDatatype();
+ args.insert(args.begin(), dt[0].getConstructorTerm());
f = MK_TERM(api::APPLY_CONSTRUCTOR, args);
}
}
| LPAREN RPAREN
{ std::vector<api::Sort> types;
api::Sort dtype = SOLVER->mkTupleSort(types);
- const Datatype& dt = ((DatatypeType)dtype.getType()).getDatatype();
- f = MK_TERM(api::APPLY_CONSTRUCTOR,
- api::Term(SOLVER, dt[0].getConstructor()));
+ const api::Datatype& dt = dtype.getDatatype();
+ f = MK_TERM(api::APPLY_CONSTRUCTOR, dt[0].getConstructorTerm());
}
/* empty record literal */
{
api::Sort dtype = SOLVER->mkRecordSort(
std::vector<std::pair<std::string, api::Sort>>());
- const Datatype& dt = ((DatatypeType)dtype.getType()).getDatatype();
- f = MK_TERM(api::APPLY_CONSTRUCTOR,
- api::Term(SOLVER, dt[0].getConstructor()));
+ const api::Datatype& dt = dtype.getDatatype();
+ f = MK_TERM(api::APPLY_CONSTRUCTOR, dt[0].getConstructorTerm());
}
/* empty set literal */
| LBRACE RBRACE
typeIds.push_back(std::make_pair(names[i], args[i].getSort()));
}
api::Sort dtype = SOLVER->mkRecordSort(typeIds);
- const Datatype& dt = ((DatatypeType)dtype.getType()).getDatatype();
- args.insert(args.begin(), api::Term(SOLVER, dt[0].getConstructor()));
+ const api::Datatype& dt = dtype.getDatatype();
+ args.insert(args.begin(), dt[0].getConstructorTerm());
f = MK_TERM(api::APPLY_CONSTRUCTOR, args);
}