diff options
author | Abdalrhman Mohamed <32971963+abdoo8080@users.noreply.github.com> | 2020-10-27 13:19:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 13:19:11 -0500 |
commit | 70d6e3c33571807b7bb94bf4f462de4fdf7a369c (patch) | |
tree | 7bf85c35072f7a746de947d31d5f4a79acd6f279 /src/parser/smt2/smt2.h | |
parent | 88025001599c7e5ced8d55c3769e728758434f69 (diff) |
Refactor DeclareSygusVarCommand and SynthFunCommand to use the API. (#5334)
This PR is part of migrating commands. DeclareSygusVarCommand and SynthFunCommand now call public API function instead of their corresponding SmtEngine functions. Those two commands don't fully initialize the solver anymore. Some operations in SygusInterpol::solveInterpolation, which creates an interpolation sub-solver, depend on the solver being fully initialized and were affected by this change. Those operations are now executed by the main solver instead of the sub-solver, which is not fully initialized by the time they are needed.
Diffstat (limited to 'src/parser/smt2/smt2.h')
-rw-r--r-- | src/parser/smt2/smt2.h | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/parser/smt2/smt2.h b/src/parser/smt2/smt2.h index 5fcf49637..1aa0ebac7 100644 --- a/src/parser/smt2/smt2.h +++ b/src/parser/smt2/smt2.h @@ -195,49 +195,6 @@ class Smt2 : public Parser void resetAssertions(); /** - * Class for creating instances of `SynthFunCommand`s. Creating an instance - * of this class pushes the scope, destroying it pops the scope. - */ - class SynthFunFactory - { - public: - /** - * Creates an instance of `SynthFunFactory`. - * - * @param smt2 Pointer to the parser state - * @param id Name of the function to synthesize - * @param isInv True if the goal is to synthesize an invariant, false - * otherwise - * @param range The return type of the function-to-synthesize - * @param sortedVarNames The parameters of the function-to-synthesize - */ - SynthFunFactory( - Smt2* smt2, - const std::string& id, - bool isInv, - api::Sort range, - std::vector<std::pair<std::string, api::Sort>>& sortedVarNames); - - const std::vector<api::Term>& getSygusVars() const { return d_sygusVars; } - - /** - * Create an instance of `SynthFunCommand`. - * - * @param grammar Optional grammar associated with the synth-fun command - * @return The instance of `SynthFunCommand` - */ - std::unique_ptr<Command> mkCommand(api::Grammar* grammar); - - private: - Smt2* d_smt2; - std::string d_id; - api::Term d_fun; - api::Sort d_sort; - bool d_isInv; - std::vector<api::Term> d_sygusVars; - }; - - /** * Creates a command that adds an invariant constraint. * * @param names Name of four symbols corresponding to the |