Commit d905b5bd authored by Anirudh Kaushik's avatar Anirudh Kaushik
Browse files

Revamp of path enumeration logic

parent 61065098
This diff is collapsed.
......@@ -112,6 +112,12 @@ namespace scpar {
typedef vector < SusCFG * >susCFGVectorType;
typedef vector <Transition *> transitionVectorType;
typedef pair<SusCFG*, int> susCFGSuccIDPairType;
typedef map<SusCFG*, int> susCFGSuccIDMapType;
typedef pair < SusCFG *, State * >susCFGStatePairType;
typedef map < SusCFG *, State * >susCFGStateMapType;
SuspensionAutomata(FindWait::waitListType, CXXMethodDecl *, ASTContext *,
raw_ostream &);
......@@ -119,9 +125,10 @@ namespace scpar {
bool isFound(vector < SusCFG * >, SusCFG *);
bool isFound(vector < Transition * >, Transition *);
void initialize();
bool initialize();
void genSusCFG();
void genSauto();
vector<SusCFG*> modifDFS(SusCFG*, State*);
bool isWaitCall(const CFGStmt * cs);
bool isTimedWait(Stmt * stmt);
bool isDeltaWait(Stmt * stmt);
......@@ -139,12 +146,13 @@ namespace scpar {
private:
CXXMethodDecl *_d;
FindWait::waitListType _waitCalls;
susCFGSuccIDMapType susCFGSuccIDMap;
susCFGStateMapType susCFGStateMap;
CFG *_cfg;
ASTContext *_a;
raw_ostream & _os;
susCFGVectorType _susCFGVector;
transitionVectorType _transitionVector;
}; // End class SplitWaitBlocks
} // End namespace scpar
#endif
......@@ -79,15 +79,20 @@ bool SystemCConsumer::fire()
FindNotify findNotify(ef->_entryMethodDecl, _os);
ef->addNotifys(findNotify);
SuspensionAutomata suspensionAutomata(findWaits.getWaitCalls(), ef->getEntryMethod(), &_context, llvm::errs());
suspensionAutomata.initialize();
suspensionAutomata.genSusCFG();
suspensionAutomata.genSauto();
if (suspensionAutomata.initialize()) {
suspensionAutomata.genSusCFG();
suspensionAutomata.dumpSusCFG();
suspensionAutomata.genSauto();
suspensionAutomata.dumpSauto();
ef->addSusCFGAuto(suspensionAutomata);
}
ef->addSusCFGAuto(suspensionAutomata);
_entryFunctionContainerVector.push_back(ef);
}
}
_systemcModel->addModuleDecl(md);
}
......
......@@ -55,8 +55,7 @@ using namespace clang;
namespace scpar
{
class SystemCConsumer:public ASTConsumer,
public RecursiveASTVisitor < SystemCConsumer >
class SystemCConsumer:public ASTConsumer, public RecursiveASTVisitor < SystemCConsumer >
{
private:
......@@ -65,8 +64,6 @@ namespace scpar
llvm::raw_ostream & _os;
SourceManager & _sm;
SystemCConsumer(CompilerInstance &);
~SystemCConsumer();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment