diff options
author | Aina Niemetz <aina.niemetz@gmail.com> | 2018-08-08 19:21:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-08 19:21:47 -0700 |
commit | 91d85704313de6be9fd382833f5cedd39e24a6fa (patch) | |
tree | 057adfdad9d586428482d9bd58e9c8124bddc47b /src/parser/parser_builder.h | |
parent | b4d4006d08a32b107257b0edaba95679d0b0c65b (diff) |
Plug solver API object into parser. (#2240)
Diffstat (limited to 'src/parser/parser_builder.h')
-rw-r--r-- | src/parser/parser_builder.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/parser/parser_builder.h b/src/parser/parser_builder.h index c4c75aae5..3e14d715a 100644 --- a/src/parser/parser_builder.h +++ b/src/parser/parser_builder.h @@ -2,7 +2,7 @@ /*! \file parser_builder.h ** \verbatim ** Top contributors (to current version): - ** Christopher L. Conway, Morgan Deters, Tim King + ** Christopher L. Conway, Morgan Deters, Aina Niemetz ** This file is part of the CVC4 project. ** Copyright (c) 2009-2018 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. @@ -26,9 +26,12 @@ namespace CVC4 { -class ExprManager; class Options; +namespace api { +class Solver; +} + namespace parser { class Parser; @@ -61,8 +64,8 @@ class CVC4_PUBLIC ParserBuilder { /** The stream input, if any. */ std::istream* d_streamInput; - /** The expression manager */ - ExprManager* d_exprManager; + /** The API Solver object. */ + api::Solver* d_solver; /** Should semantic checks be enabled during parsing? */ bool d_checksEnabled; @@ -86,14 +89,14 @@ class CVC4_PUBLIC ParserBuilder { std::string d_forcedLogic; /** Initialize this parser builder */ - void init(ExprManager* exprManager, const std::string& filename); - -public: + void init(api::Solver* solver, const std::string& filename); - /** Create a parser builder using the given ExprManager and filename. */ - ParserBuilder(ExprManager* exprManager, const std::string& filename); + public: + /** Create a parser builder using the given Solver and filename. */ + ParserBuilder(api::Solver* solver, const std::string& filename); - ParserBuilder(ExprManager* exprManager, const std::string& filename, + ParserBuilder(api::Solver* solver, + const std::string& filename, const Options& options); /** Build the parser, using the current settings. */ @@ -102,8 +105,8 @@ public: /** Should semantic checks be enabled in the parser? (Default: yes) */ ParserBuilder& withChecks(bool flag = true); - /** Set the ExprManager to use with the parser. */ - ParserBuilder& withExprManager(ExprManager* exprManager); + /** Set the Solver to use with the parser. */ + ParserBuilder& withSolver(api::Solver* solver); /** Set the parser to read a file for its input. (Default) */ ParserBuilder& withFileInput(); |