diff options
author | Morgan Deters <mdeters@gmail.com> | 2012-09-08 22:31:44 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2012-09-08 22:31:44 +0000 |
commit | 480d440174c565bec9aba412c0d35221c9169ff6 (patch) | |
tree | 12048b5ba5d9717d6770b5d89de23d9c7048a981 /src/main/command_executor_portfolio.h | |
parent | cfa9e2cbbdf77a325791b5548b41093a0781311c (diff) |
Some minor changes after reviewing the portfolio "unified driver" commit.
(this commit was certified error- and warning-free by the test-and-commit script.)
Diffstat (limited to 'src/main/command_executor_portfolio.h')
-rw-r--r-- | src/main/command_executor_portfolio.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/main/command_executor_portfolio.h b/src/main/command_executor_portfolio.h new file mode 100644 index 000000000..cc0a77698 --- /dev/null +++ b/src/main/command_executor_portfolio.h @@ -0,0 +1,69 @@ +/********************* */ +/*! \file command_executor_portfolio.h + ** \verbatim + ** Original author: kshitij + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 prototype. + ** Copyright (c) 2009-2012 The Analysis of Computer Systems Group (ACSys) + ** Courant Institute of Mathematical Sciences + ** New York University + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief An additional layer between commands and invoking them. + ** + ** The portfolio executer branches check-sat queries to several + ** threads. + **/ + +#ifndef __CVC4__MAIN__COMMAND_EXECUTOR_PORTFOLIO_H +#define __CVC4__MAIN__COMMAND_EXECUTOR_PORTFOLIO_H + +#include "main/command_executor.h" +#include "main/portfolio_util.h" + +namespace CVC4 { + +class CommandSequence; + +namespace main { + +class CommandExecutorPortfolio : public CommandExecutor { + + // These shall be created/deleted during initalization + std::vector<ExprManager*> d_exprMgrs; + const unsigned d_numThreads; // Currently const, but designed so it is + // not too hard to support this changing + std::vector<SmtEngine*> d_smts; + CommandSequence* d_seq; + std::vector<Options>& d_threadOptions; + std::vector<ExprManagerMapCollection*> d_vmaps; + + int d_lastWinner; + + // These shall be reset for each check-sat + std::vector< SharedChannel<ChannelFormat>* > d_channelsOut; + std::vector< SharedChannel<ChannelFormat>* > d_channelsIn; + std::vector<std::ostringstream*> d_ostringstreams; + +public: + CommandExecutorPortfolio(ExprManager &exprMgr, + Options &options, + std::vector<Options>& tOpts); + + ~CommandExecutorPortfolio(); + + std::string getSmtEngineStatus(); +protected: + bool doCommandSingleton(Command* cmd); +private: + CommandExecutorPortfolio(); + void lemmaSharingInit(); + void lemmaSharingCleanup(); +};/* class CommandExecutorPortfolio */ + +}/* CVC4::main namespace */ +}/* CVC4 namespace */ + +#endif /* __CVC4__MAIN__COMMAND_EXECUTOR_PORTFOLIO_H */ |