diff options
author | ajreynol <andrew.j.reynolds@gmail.com> | 2017-07-10 14:06:52 -0500 |
---|---|---|
committer | ajreynol <andrew.j.reynolds@gmail.com> | 2017-07-10 14:07:11 -0500 |
commit | f3590092818d9eab9d961ea602093029ff472a85 (patch) | |
tree | 1401f00df0d9659ba2321ea2088fe0c3f4de9f52 /src/parser/smt2/smt2.h | |
parent | d598a9644862d176632071bca8448765d9cc3cc1 (diff) |
Merge datatype shared selectors/sygus comp 2017 branch. Modify the datatypes decision procedure to share selectors of the same type across multiple constructors. Major rewrite of the SyGuS solver. Adds several new strategies for I/O example problems (PBE) and invariant synthesis. Major simplifications to sygus parsing and synthesis conjecture representation. Do not support check-synth in portfolio. Add sygus regressions.
Diffstat (limited to 'src/parser/smt2/smt2.h')
-rw-r--r-- | src/parser/smt2/smt2.h | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/parser/smt2/smt2.h b/src/parser/smt2/smt2.h index 8222ac3a3..3eed0e871 100644 --- a/src/parser/smt2/smt2.h +++ b/src/parser/smt2/smt2.h @@ -62,10 +62,9 @@ private: std::pair<Expr, std::string> d_lastNamedTerm; // this is a user-context stack std::stack< std::map<Expr, std::string> > d_unsatCoreNames; + // for sygus std::vector<Expr> d_sygusVars, d_sygusConstraints, d_sygusFunSymbols; - std::vector< std::pair<std::string, Expr> > d_sygusFuns; std::map< Expr, bool > d_sygusVarPrimed; - size_t d_nextSygusFun; protected: Smt2(ExprManager* exprManager, Input* input, bool strictMode = false, bool parseOnly = false); @@ -179,9 +178,6 @@ public: Expr mkSygusVar(const std::string& name, const Type& type, bool isPrimed = false); - void 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 ); - void mkSygusConstantsForType( const Type& type, std::vector<CVC4::Expr>& ops ); void processSygusGTerm( CVC4::SygusGTerm& sgt, int index, @@ -218,24 +214,11 @@ public: std::vector< CVC4::Type>& sorts, std::vector< std::vector<CVC4::Expr> >& ops ); - void addSygusFun(const std::string& fun, Expr eval) { - d_sygusFuns.push_back(std::make_pair(fun, eval)); - } - - void defineSygusFuns(); - void mkSygusDatatype( CVC4::Datatype& dt, std::vector<CVC4::Expr>& ops, std::vector<std::string>& cnames, std::vector< std::vector< CVC4::Type > >& cargs, std::vector<std::string>& unresolved_gterm_sym, std::map< CVC4::Type, CVC4::Type >& sygus_to_builtin ); - // i is index in datatypes/ops - // j is index is datatype - Expr getSygusAssertion( std::vector<DatatypeType>& datatypeTypes, std::vector< std::vector<Expr> >& ops, - std::map<DatatypeType, Expr>& evals, std::vector<Expr>& terms, - Expr eval, const Datatype& dt, size_t i, size_t j ); - - void addSygusConstraint(Expr constraint) { d_sygusConstraints.push_back(constraint); @@ -254,6 +237,7 @@ public: } const void getSygusPrimedVars( std::vector<Expr>& vars, bool isPrimed ); + const void addSygusFunSymbol( Type t, Expr synth_fun ); const std::vector<Expr>& getSygusFunSymbols() { return d_sygusFunSymbols; } @@ -327,9 +311,6 @@ private: void collectSygusLetArgs( CVC4::Expr e, std::vector< CVC4::Type >& sygusArgs, std::vector< CVC4::Expr >& builtinArgs ); - void addSygusDatatypeConstructor( CVC4::Datatype& dt, CVC4::Expr op, std::string& cname, std::vector< CVC4::Type >& cargs, - CVC4::Expr& let_body, std::vector< CVC4::Expr >& let_args, unsigned let_num_input_args ); - Type processSygusNestedGTerm( int sub_dt_index, std::string& sub_dname, std::vector< CVC4::Datatype >& datatypes, std::vector< CVC4::Type>& sorts, std::vector< std::vector<CVC4::Expr> >& ops, |