From: trevor_hansen Date: Tue, 24 Jan 2012 00:48:40 +0000 (+0000) Subject: Refactor. Rename parserinterface to cpp_interface. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=99f6261fbf70fc4ada47ae7e3349efe7c3e6bdf2;p=francis%2Fstp.git Refactor. Rename parserinterface to cpp_interface. git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1517 e59a4935-1847-0410-ae03-e826735625c1 --- diff --git a/src/c_interface/c_interface.cpp b/src/c_interface/c_interface.cpp index 49e08dd..165c8d9 100644 --- a/src/c_interface/c_interface.cpp +++ b/src/c_interface/c_interface.cpp @@ -1549,7 +1549,7 @@ Expr vc_parseExpr(VC vc, const char* infile) { return 0; } - BEEV::ParserInterface pi(*b, b->defaultNodeFactory); + BEEV::Cpp_interface pi(*b, b->defaultNodeFactory); BEEV::parserInterface = π @@ -1787,7 +1787,7 @@ int vc_parseMemExpr(VC vc, const char* s, Expr* oquery, Expr* oasserts ) { } #endif - BEEV::ParserInterface pi(*b, b->defaultNodeFactory); + BEEV::Cpp_interface pi(*b, b->defaultNodeFactory); BEEV::parserInterface = π BEEV::ASTVec AssertsQuery; diff --git a/src/cpp_interface/cpp_interface.cpp b/src/cpp_interface/cpp_interface.cpp index 67b2486..f1ebb50 100644 --- a/src/cpp_interface/cpp_interface.cpp +++ b/src/cpp_interface/cpp_interface.cpp @@ -6,7 +6,7 @@ namespace BEEV // Does some simple caching of prior results. void - ParserInterface::checkSat(vector & assertionsSMT2) + Cpp_interface::checkSat(vector & assertionsSMT2) { bm.GetRunTimes()->stop(RunTimes::Parsing); assert(assertionsSMT2.size() == cache.size()); diff --git a/src/cpp_interface/cpp_interface.h b/src/cpp_interface/cpp_interface.h index 9b2215b..f1b80d8 100644 --- a/src/cpp_interface/cpp_interface.h +++ b/src/cpp_interface/cpp_interface.h @@ -1,8 +1,6 @@ -// Wrapper around the main beevmgr class given to the parsers. -// Over time I hope the parsers will interact entirely through this class. -#ifndef PARSERINTERFACE_H_ -#define PARSERINTERFACE_H_ +#ifndef CPP_INTERFACE_H_ +#define CPP_INTERFACE_H_ #include "../AST/AST.h" #include "../AST/NodeFactory/NodeFactory.h" @@ -19,7 +17,7 @@ using BEEV::STPMgr; // There's no BVTypeCheck() function. Use a typechecking node factory instead. -class ParserInterface +class Cpp_interface { STPMgr& bm; //boost::object_pool node_pool; @@ -29,7 +27,7 @@ public: LETMgr letMgr; NodeFactory* nf; - ParserInterface(STPMgr &bm_, NodeFactory* factory) + Cpp_interface(STPMgr &bm_, NodeFactory* factory) : bm(bm_), nf(factory), letMgr(bm.ASTUndefined) diff --git a/src/main/Globals.cpp b/src/main/Globals.cpp index 57d8c88..0b981ea 100644 --- a/src/main/Globals.cpp +++ b/src/main/Globals.cpp @@ -20,7 +20,7 @@ namespace BEEV STPMgr * ParserBM; // Used exclusively for parsing. - ParserInterface * parserInterface; + Cpp_interface * parserInterface; void (*vc_error_hdlr)(const char* err_msg) = NULL; diff --git a/src/main/Globals.h b/src/main/Globals.h index da81672..efc3143 100644 --- a/src/main/Globals.h +++ b/src/main/Globals.h @@ -30,7 +30,7 @@ namespace BEEV class ASTBVConst; class BVSolver; class STP; - class ParserInterface; + class Cpp_interface; /*************************************************************** * ENUM TYPES @@ -71,7 +71,7 @@ namespace BEEV //Useful global variables. Use for parsing only extern STP * GlobalSTP; extern STPMgr * ParserBM; - extern ParserInterface * parserInterface; + extern Cpp_interface * parserInterface; //Some constant global vars for the Main function. Once they are //set, these globals will remain constants. These vars are not used diff --git a/src/main/main.cpp b/src/main/main.cpp index 25b49cb..f043fe5 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -422,8 +422,8 @@ int main(int argc, char ** argv) { TypeChecker nfTypeCheckSimp(simpNF, *bm); TypeChecker nfTypeCheckDefault(*bm->defaultNodeFactory, *bm); - ParserInterface piTypeCheckSimp(*bm, &nfTypeCheckSimp); - ParserInterface piTypeCheckDefault(*bm, &nfTypeCheckDefault); + Cpp_interface piTypeCheckSimp(*bm, &nfTypeCheckSimp); + Cpp_interface piTypeCheckDefault(*bm, &nfTypeCheckDefault); // If you are converting formats, you probably don't want it simplifying (at least I dont). if (onePrintBack)