Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SVF::CFLGramGraphChecker Class Reference

#include <CFLGramGraphChecker.h>

Public Member Functions

void check (GrammarBase *grammar, CFLGraphBuilder *graphBuilder, CFLGraph *graph)
 

Detailed Description

Definition at line 37 of file CFLGramGraphChecker.h.

Member Function Documentation

◆ check()

void SVF::CFLGramGraphChecker::check ( GrammarBase grammar,
CFLGraphBuilder graphBuilder,
CFLGraph graph 
)
inline

Check all kinds in grammar in graphBuilder with the same label

Get KindToAttrs Map from Graph to Grammar

Definition at line 40 of file CFLGramGraphChecker.h.

41 {
43 for(auto pairV : grammar->getTerminals())
44 {
45 if (graphBuilder->getLabelToKindMap().find(pairV.first) != graphBuilder->getLabelToKindMap().end())
46 {
47 assert(graphBuilder->getLabelToKindMap()[pairV.first] == pairV.second);
48 assert(graphBuilder->getKindToLabelMap()[pairV.second] == pairV.first);
49 }
50 }
51
52 for(auto pairV : grammar->getNonterminals())
53 {
54 if (graphBuilder->getLabelToKindMap().find(pairV.first) != graphBuilder->getLabelToKindMap().end())
55 {
56 assert(graphBuilder->getLabelToKindMap()[pairV.first] == pairV.second);
57 assert(graphBuilder->getKindToLabelMap()[pairV.second] == pairV.first);
58 }
59 else
60 {
61 graphBuilder->getLabelToKindMap().insert(std::make_pair (pairV.first,pairV.second));
62 graphBuilder->getKindToLabelMap().insert(std::make_pair (pairV.second, pairV.first));
63 }
64 }
65
67 grammar->setKindToAttrsMap(graphBuilder->getKindToAttrsMap());
68 graph->startKind = grammar->getStartKind();
69 }
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

The documentation for this class was generated from the following file: