7#include "clang/Analysis/CFG.h"
8#include "llvm/Support/raw_ostream.h"
9#include "llvm/Support/Debug.h"
10#include "llvm/ADT/StringRef.h"
14#include <unordered_set>
28 clang::DiagnosticsEngine &diag_engine,
const ASTContext &ast_context,
81 return dyn_cast<BreakStmt> (S) != NULL;
85 void FindStatements(
const CFGBlock &B, std::vector<const Stmt *> &SS);
87 void MarkStatements(
const Stmt *S, llvm::SmallDenseMap<const Stmt*, bool> &Map);
94 int startix,
int num_ele,
95 int state_num,
hNodep h_switchcase);
99 int state_num,
hNodep h_switchcase);
llvm::SmallVector< SplitCFGPathPair > SplitCFGPath
void ProcessSplitGraphGroup(const SplitCFG::SplitCFGPath pt, int startix, int num_ele, int state_num, hNodep h_switchcase)
string nextwaitctr_string
string waitnextstate_string
void GenerateStateVar(string sname)
int GetFalseLength(const SplitCFG::SplitCFGPath &pt, int cond_node_ix, int state_num)
void GenerateStateUpdate(hNodep hstatemethod, hNodep hlocalvarsp)
string savewaitnextstate_string
bool isContinueorBreak(const Stmt *S)
clang::DiagnosticsEngine & diag_e
void CheckVardecls(hNodep &hp, string &cfgblockid)
const clang::ASTContext & ast_context_
hdecl_name_map_t & mod_vname_map_
const string statestringsymbol
hfunc_name_map_t allmethodecls_
void ProcessHWait(hNodep htmp, int nxtstate)
const string shadowstring
void ProcessSplitGraphBlock(const SplitCFG::SplitCFGPath &pt, int thisix, int state_num, hNodep h_switchcase)
hfunc_name_map_t methodecls
void updatepnvisited(int i)
bool isBreak(const Stmt *S)
void AddThreadMethod(const CFGBlock &BI)
std::unordered_map< std::string, int > SGVisited
overridden_method_map_t & overridden_method_map_
std::unordered_set< int > pathnodevisited
void MarkStatements(const Stmt *S, llvm::SmallDenseMap< const Stmt *, bool > &Map)
hNodep GenerateBinop(string opname, string lhs, string rhs, bool rhs_is_literal=true)
void ProcessBB(const CFGBlock &BI)
string NameNext(string &s)
void GenerateWaitCntUpdate(hNodep h_switchcase)
bool IsWaitStmt(hNodep hp)
HDLThread(EntryFunctionContainer *efc, hNodep &h_top, hNodep &h_portsigvarlist, clang::DiagnosticsEngine &diag_engine, const ASTContext &ast_context, hdecl_name_map_t &mod_vname_map, hfunc_name_map_t &allmethods, overridden_method_map_t &overridden_method_map, hNodep h_resetvarinfo)
void FindStatements(const CFGBlock &B, std::vector< const Stmt * > &SS)
EntryFunctionContainer * efc_
hdecl_name_map_t thread_vname_map
void ProcessDeclStmt(const DeclStmt *declstmt, hNodep htmp)
Clang forward declarations.
std::unordered_map< const CXXMethodDecl *, const CXXMethodDecl * > overridden_method_map_t