{ cmd = new GetUnsatCoreCommand(PARSER_STATE->getUnsatCoreNames()); }
| /* push */
PUSH_TOK { PARSER_STATE->checkThatLogicIsSet(); }
+ { if( PARSER_STATE->sygus() ){ PARSER_STATE->parseError("Sygus does not support push command."); } }
( k=INTEGER_LITERAL
{ unsigned n = AntlrInput::tokenToUnsigned(k);
if(n == 0) {
}
} )
| POP_TOK { PARSER_STATE->checkThatLogicIsSet(); }
+ { if( PARSER_STATE->sygus() ){ PARSER_STATE->parseError("Sygus does not support pop command."); } }
( k=INTEGER_LITERAL
{ unsigned n = AntlrInput::tokenToUnsigned(k);
if(n > PARSER_STATE->scopeLevel()) {
name = "UFLIRA";
} else if(name == "BV") {
name = "UFBV";
+ } else if(name == "ALL_SUPPORTED") {
+ //no change
} else {
std::stringstream ss;
ss << "Unknown SyGuS background logic `" << name << "'";
}
void collectSygusGrammarTypesFor( Type range, std::vector< Type >& types, std::map< Type, std::vector< DatatypeConstructorArg > >& sels ){
- if( range.isInteger() || range.isBitVector() || range.isDatatype() ){
+ if( !range.isBoolean() ){
if( std::find( types.begin(), types.end(), range )==types.end() ){
Debug("parser-sygus") << "...will make grammar for " << range << std::endl;
types.push_back( range );
void Smt2::mkSygusDefaultGrammar( const Type& range, Expr& bvl, const std::string& fun, std::vector<CVC4::Datatype>& datatypes,
std::vector<Type>& sorts, std::vector< std::vector<Expr> >& ops, std::vector<Expr> sygus_vars, int& startIndex ) {
- if( !range.isBoolean() && !range.isInteger() && !range.isBitVector() && !range.isDatatype() ){
- parseError("No default grammar for type.");
- }
+ //if( !range.isBoolean() && !range.isInteger() && !range.isBitVector() && !range.isDatatype() ){
+ // parseError("No default grammar for type.");
+ //}
startIndex = -1;
Debug("parser-sygus") << "Construct default grammar for " << fun << " " << range << std::endl;
std::map< CVC4::Type, CVC4::Type > sygus_to_builtin;
cargs.push_back( std::vector< CVC4::Type >() );
for( unsigned j=0; j<dt[k].getNumArgs(); j++ ){
Type crange = ((SelectorType)dt[k][j].getType()).getRangeType();
+ //Assert( type_to_unres.find(crange)!=type_to_unres.end() );
cargs.back().push_back( type_to_unres[crange] );
}
}
ops[i].push_back( sels[types[i]][j].getSelector() );
cnames.push_back( sels[types[i]][j].getName() );
cargs.push_back( std::vector< CVC4::Type >() );
+ //Assert( type_to_unres.find(arg_type)!=type_to_unres.end() );
cargs.back().push_back( type_to_unres[arg_type] );
}
}
CVC4::DatatypeConstructor c(name, testerId );
c.setSygus( op, let_body, let_args, let_num_input_args );
for( unsigned j=0; j<cargs.size(); j++ ){
+ Debug("parser-sygus-debug") << " arg " << j << " : " << cargs[j] << std::endl;
std::stringstream sname;
sname << name << "_" << j;
c.addArg(sname.str(), cargs[j]);
# then we do not rewrite such a selector term to an arbitrary ground term.
# For example, by default cvc4 considers cdr( nil ) = nil. If this option is set, then
# cdr( nil ) has no set value.
-expert-option dtRewriteErrorSel --dt-rewrite-error-sel bool :default false
+expert-option dtRewriteErrorSel --dt-rewrite-error-sel bool :default false :read-write
rewrite incorrectly applied selectors to arbitrary ground term
option dtForceAssignment --dt-force-assignment bool :default false :read-write
force the datatypes solver to give specific values to all datatypes terms before answering sat