CID 1362904: Initializing GetInstantiationsCommand::d_smtEngine to nullptr. (#1135)
authorTim King <taking@cs.nyu.edu>
Tue, 26 Sep 2017 09:28:57 +0000 (02:28 -0700)
committerAndres Noetzli <andres.noetzli@gmail.com>
Tue, 26 Sep 2017 09:28:57 +0000 (02:28 -0700)
src/smt/command.cpp
src/smt/command.h

index c10b2c4eaf7d6f84891744a62b704bd40b6a85d8..86fb5cdde2e4020dc8fecdb368500b60c05647f9 100644 (file)
@@ -1214,8 +1214,8 @@ std::string GetProofCommand::getCommandName() const throw() {
 
 /* class GetInstantiationsCommand */
 
-GetInstantiationsCommand::GetInstantiationsCommand() throw() {
-}
+GetInstantiationsCommand::GetInstantiationsCommand() throw()
+    : d_smtEngine(nullptr) {}
 
 void GetInstantiationsCommand::invoke(SmtEngine* smtEngine) {
   try {
index 2091028eb9a09b85eaef476b3cf91f4ebaf1ad2d..1db414cde86b471c56ad46be9f3211901b16593c 100644 (file)
@@ -633,19 +633,20 @@ public:
 };/* class GetProofCommand */
 
 class CVC4_PUBLIC GetInstantiationsCommand : public Command {
-protected:
-  //Instantiations* d_result;
-  SmtEngine* d_smtEngine;
-public:
+ public:
   GetInstantiationsCommand() throw();
   ~GetInstantiationsCommand() throw() {}
   void invoke(SmtEngine* smtEngine);
-  //Instantiations* getResult() const throw();
+  // Instantiations* getResult() const throw();
   void printResult(std::ostream& out, uint32_t verbosity = 2) const;
-  Command* exportTo(ExprManager* exprManager, ExprManagerMapCollection& variableMap);
+  Command* exportTo(ExprManager* exprManager,
+                    ExprManagerMapCollection& variableMap);
   Command* clone() const;
   std::string getCommandName() const throw();
-};/* class GetInstantiationsCommand */
+
+ protected:
+  SmtEngine* d_smtEngine;
+}; /* class GetInstantiationsCommand */
 
 class CVC4_PUBLIC GetSynthSolutionCommand : public Command {
  public: