svf-tools 1.0.477 → 1.0.480
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-doxygen/html/html/Andersen_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/Andersen_8h_source.html +1 -1
- package/SVF-doxygen/html/html/BreakConstantExpr_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/CFGNormalizer_8cpp.html +5 -4
- package/SVF-doxygen/html/html/CFGNormalizer_8cpp_source.html +50 -40
- package/SVF-doxygen/html/html/CFGNormalizer_8h_source.html +20 -18
- package/SVF-doxygen/html/html/CFLAlias_8cpp.html +80 -0
- package/SVF-doxygen/html/html/CFLAlias_8cpp_source.html +107 -0
- package/SVF-doxygen/html/html/CFLAlias_8h_source.html +14 -35
- package/SVF-doxygen/html/html/CFLGramGraphChecker_8h_source.html +10 -10
- package/SVF-doxygen/html/html/CFLGrammar_8cpp.html +1 -0
- package/SVF-doxygen/html/html/CFLGrammar_8cpp_source.html +34 -23
- package/SVF-doxygen/html/html/CFLGrammar_8h.html +9 -1
- package/SVF-doxygen/html/html/CFLGrammar_8h_source.html +106 -62
- package/SVF-doxygen/html/html/CFLGrammar_8txt.html +58 -151
- package/SVF-doxygen/html/html/CFLGraphBuilder_8cpp_source.html +24 -11
- package/SVF-doxygen/html/html/CFLGraphBuilder_8h.html +2 -0
- package/SVF-doxygen/html/html/CFLGraphBuilder_8h_source.html +18 -19
- package/SVF-doxygen/html/html/CFLGraph_8cpp_source.html +27 -16
- package/SVF-doxygen/html/html/CFLGraph_8h_source.html +20 -16
- package/SVF-doxygen/html/html/CFLSolver_8cpp_source.html +14 -14
- package/SVF-doxygen/html/html/CFLSolver_8h_source.html +5 -5
- package/SVF-doxygen/html/html/CHGBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/CHGBuilder_8h_source.html +1 -1
- package/SVF-doxygen/html/html/CHG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/CHG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/CPPUtil_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/CPPUtil_8h.html +4 -4
- package/SVF-doxygen/html/html/CallGraphBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/CallGraphBuilder_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ConsGEdge_8h_source.html +7 -7
- package/SVF-doxygen/html/html/ConsGNode_8h_source.html +5 -5
- package/SVF-doxygen/html/html/ConsG_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/ConsG_8h_source.html +2 -2
- package/SVF-doxygen/html/html/DCHG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/DataFlowUtil_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ExtAPI_8cpp_source.html +36 -32
- package/SVF-doxygen/html/html/ExtAPI_8h.html +36 -0
- package/SVF-doxygen/html/html/ExtAPI_8h_source.html +66 -64
- package/SVF-doxygen/html/html/GEPTypeBridgeIterator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/GenericGraph_8h_source.html +1 -1
- package/SVF-doxygen/html/html/GrammarBuilder_8cpp_source.html +14 -17
- package/SVF-doxygen/html/html/GrammarBuilder_8h.html +0 -1
- package/SVF-doxygen/html/html/GrammarBuilder_8h_source.html +9 -11
- package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +5 -3
- package/SVF-doxygen/html/html/GraphPrinter_8h_source.html +2 -2
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ICFG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/IRGraph_8h_source.html +1 -1
- package/SVF-doxygen/html/html/LLVMModule_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/LockResultValidator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MHP_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MTAAnnotator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MTAAnnotator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/MTAResultValidator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MTAResultValidator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/MTAStat_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MTA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MTA_8h_source.html +1 -1
- package/SVF-doxygen/html/html/OfflineConsG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/OfflineConsG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/PCG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PTACallGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PTACallGraph_8h_source.html +1 -1
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFBasicTypes_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFGReadWrite_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFUtil_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFUtil_8h.html +1 -1
- package/SVF-doxygen/html/html/SVFUtil_8h_source.html +8 -8
- package/SVF-doxygen/html/html/SaberCheckerAPI_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/TCT_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/TCT_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ThreadAPI_8h_source.html +1 -1
- package/SVF-doxygen/html/html/Util_2BasicTypes_8h.html +1 -1
- package/SVF-doxygen/html/html/VFG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/VFG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/annotated.html +298 -293
- package/SVF-doxygen/html/html/cfl_8cpp.html +2 -2
- package/SVF-doxygen/html/html/cfl_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder-members.html +96 -0
- package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.html +197 -0
- package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BreakConstantGEPs.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer-members.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer.html +108 -99
- package/SVF-doxygen/html/html/classSVF_1_1CFLAlias-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +52 -39
- package/SVF-doxygen/html/html/classSVF_1_1CFLEdge-members.html +3 -1
- package/SVF-doxygen/html/html/classSVF_1_1CFLEdge.html +62 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLFIFOWorkList-members.html +91 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLFIFOWorkList.html +459 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLGrammar-members.html +47 -38
- package/SVF-doxygen/html/html/classSVF_1_1CFLGrammar.html +180 -137
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraph-members.html +21 -20
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraph.html +44 -22
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder-members.html +8 -8
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder.html +53 -43
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLNode.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CFLSolver.html +14 -14
- package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CallGraphBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode-members.html +26 -26
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode.html +43 -43
- package/SVF-doxygen/html/html/classSVF_1_1ExtAPI-members.html +5 -4
- package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +158 -125
- package/SVF-doxygen/html/html/classSVF_1_1GenericNode.html +20 -21
- package/SVF-doxygen/html/html/classSVF_1_1GenericNode.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1GrammarBase-members.html +29 -21
- package/SVF-doxygen/html/html/classSVF_1_1GrammarBase.html +397 -179
- package/SVF-doxygen/html/html/classSVF_1_1GrammarBase_1_1SymbolHash-members.html +81 -0
- package/SVF-doxygen/html/html/classSVF_1_1GrammarBase_1_1SymbolHash.html +124 -0
- package/SVF-doxygen/html/html/classSVF_1_1GrammarBuilder-members.html +6 -7
- package/SVF-doxygen/html/html/classSVF_1_1GrammarBuilder.html +73 -91
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LLVMModuleSet.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LockAnalysis.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LockResultValidator.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1MHP.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MTA.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1MTAAnnotator.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1MTAResultValidator.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1MTAStat.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PCG.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1RaceResultValidator.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +14 -14
- package/SVF-doxygen/html/html/classSVF_1_1SaberCheckerAPI.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ThreadAPI.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1VariantGepCGEdge.html +11 -11
- package/SVF-doxygen/html/html/classes.html +105 -106
- package/SVF-doxygen/html/html/classllvm_1_1GraphPrinter.html +1 -1
- package/SVF-doxygen/html/html/cuddInt_8c.html +17 -17
- package/SVF-doxygen/html/html/cuddInt_8c_source.html +3 -3
- package/SVF-doxygen/html/html/cuddInt_8h.html +5 -5
- package/SVF-doxygen/html/html/cudd_8h.html +9 -9
- package/SVF-doxygen/html/html/cudd_8h_source.html +1 -1
- package/SVF-doxygen/html/html/dda_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/dir_98f9a352f241e0e917d4efaa4086f6e8.html +2 -0
- package/SVF-doxygen/html/html/files.html +5 -4
- package/SVF-doxygen/html/html/functions_0x7e.html +3 -0
- package/SVF-doxygen/html/html/functions_a.html +14 -8
- package/SVF-doxygen/html/html/functions_b.html +4 -3
- package/SVF-doxygen/html/html/functions_c.html +37 -35
- package/SVF-doxygen/html/html/functions_d.html +8 -4
- package/SVF-doxygen/html/html/functions_e.html +15 -8
- package/SVF-doxygen/html/html/functions_f.html +16 -17
- package/SVF-doxygen/html/html/functions_func.html +1 -1
- package/SVF-doxygen/html/html/functions_func_0x7e.html +3 -0
- package/SVF-doxygen/html/html/functions_func_b.html +3 -2
- package/SVF-doxygen/html/html/functions_func_c.html +32 -28
- package/SVF-doxygen/html/html/functions_func_e.html +14 -7
- package/SVF-doxygen/html/html/functions_func_f.html +3 -2
- package/SVF-doxygen/html/html/functions_func_g.html +22 -18
- package/SVF-doxygen/html/html/functions_func_i.html +18 -9
- package/SVF-doxygen/html/html/functions_func_l.html +2 -5
- package/SVF-doxygen/html/html/functions_func_o.html +20 -5
- package/SVF-doxygen/html/html/functions_func_p.html +9 -7
- package/SVF-doxygen/html/html/functions_func_s.html +12 -6
- package/SVF-doxygen/html/html/functions_g.html +25 -21
- package/SVF-doxygen/html/html/functions_i.html +29 -20
- package/SVF-doxygen/html/html/functions_k.html +2 -1
- package/SVF-doxygen/html/html/functions_l.html +1 -4
- package/SVF-doxygen/html/html/functions_n.html +1 -1
- package/SVF-doxygen/html/html/functions_o.html +24 -15
- package/SVF-doxygen/html/html/functions_p.html +18 -18
- package/SVF-doxygen/html/html/functions_r.html +5 -5
- package/SVF-doxygen/html/html/functions_s.html +24 -16
- package/SVF-doxygen/html/html/functions_t.html +5 -7
- package/SVF-doxygen/html/html/functions_type_d.html +4 -2
- package/SVF-doxygen/html/html/functions_type_p.html +1 -1
- package/SVF-doxygen/html/html/functions_type_s.html +7 -1
- package/SVF-doxygen/html/html/functions_type_v.html +3 -0
- package/SVF-doxygen/html/html/functions_v.html +7 -1
- package/SVF-doxygen/html/html/functions_vars_a.html +6 -0
- package/SVF-doxygen/html/html/functions_vars_c.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_d.html +4 -2
- package/SVF-doxygen/html/html/functions_vars_e.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_f.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_k.html +1 -0
- package/SVF-doxygen/html/html/functions_vars_n.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_r.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_s.html +2 -2
- package/SVF-doxygen/html/html/functions_vars_t.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_v.html +3 -0
- package/SVF-doxygen/html/html/functions_w.html +6 -10
- package/SVF-doxygen/html/html/globals.html +1 -2
- package/SVF-doxygen/html/html/globals_a.html +1 -6
- package/SVF-doxygen/html/html/globals_c.html +129 -126
- package/SVF-doxygen/html/html/globals_defs_j.html +6 -0
- package/SVF-doxygen/html/html/globals_e.html +7 -8
- package/SVF-doxygen/html/html/globals_f.html +6 -12
- package/SVF-doxygen/html/html/globals_func.html +0 -6
- package/SVF-doxygen/html/html/globals_func_f.html +0 -8
- package/SVF-doxygen/html/html/globals_g.html +4 -2
- package/SVF-doxygen/html/html/globals_j.html +6 -0
- package/SVF-doxygen/html/html/globals_l.html +3 -0
- package/SVF-doxygen/html/html/globals_s.html +7 -9
- package/SVF-doxygen/html/html/globals_v.html +3 -0
- package/SVF-doxygen/html/html/globals_vars.html +17 -13
- package/SVF-doxygen/html/html/hierarchy.html +449 -444
- package/SVF-doxygen/html/html/mta_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/namespaceSVF.html +8 -4
- package/SVF-doxygen/html/html/namespaceSVF_1_1SVFUtil.html +2 -2
- package/SVF-doxygen/html/html/namespaceSVF_1_1cppUtil.html +8 -8
- package/SVF-doxygen/html/html/saber_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/search/all_0.js +1 -1
- package/SVF-doxygen/html/html/search/all_1.js +5 -4
- package/SVF-doxygen/html/html/search/all_10.js +12 -12
- package/SVF-doxygen/html/html/search/all_12.js +3 -3
- package/SVF-doxygen/html/html/search/all_13.js +22 -17
- package/SVF-doxygen/html/html/search/all_14.js +5 -5
- package/SVF-doxygen/html/html/search/all_15.js +1 -1
- package/SVF-doxygen/html/html/search/all_16.js +2 -0
- package/SVF-doxygen/html/html/search/all_17.js +1 -1
- package/SVF-doxygen/html/html/search/all_1b.js +1 -0
- package/SVF-doxygen/html/html/search/all_2.js +2 -2
- package/SVF-doxygen/html/html/search/all_3.js +7 -6
- package/SVF-doxygen/html/html/search/all_4.js +5 -5
- package/SVF-doxygen/html/html/search/all_5.js +7 -5
- package/SVF-doxygen/html/html/search/all_6.js +4 -4
- package/SVF-doxygen/html/html/search/all_7.js +11 -9
- package/SVF-doxygen/html/html/search/all_9.js +8 -5
- package/SVF-doxygen/html/html/search/all_a.js +2 -0
- package/SVF-doxygen/html/html/search/all_b.js +1 -1
- package/SVF-doxygen/html/html/search/all_c.js +1 -2
- package/SVF-doxygen/html/html/search/all_d.js +1 -1
- package/SVF-doxygen/html/html/search/all_e.js +4 -4
- package/SVF-doxygen/html/html/search/all_f.js +9 -6
- package/SVF-doxygen/html/html/search/classes_0.js +1 -0
- package/SVF-doxygen/html/html/search/classes_2.js +1 -0
- package/SVF-doxygen/html/html/search/classes_f.js +3 -0
- package/SVF-doxygen/html/html/search/defines_8.js +2 -0
- package/SVF-doxygen/html/html/search/files_2.js +1 -1
- package/SVF-doxygen/html/html/search/functions_0.js +1 -3
- package/SVF-doxygen/html/html/search/functions_1.js +2 -2
- package/SVF-doxygen/html/html/search/functions_11.js +4 -2
- package/SVF-doxygen/html/html/search/functions_17.js +1 -0
- package/SVF-doxygen/html/html/search/functions_2.js +3 -2
- package/SVF-doxygen/html/html/search/functions_3.js +1 -1
- package/SVF-doxygen/html/html/search/functions_4.js +5 -3
- package/SVF-doxygen/html/html/search/functions_5.js +1 -3
- package/SVF-doxygen/html/html/search/functions_6.js +9 -8
- package/SVF-doxygen/html/html/search/functions_8.js +4 -1
- package/SVF-doxygen/html/html/search/functions_b.js +0 -1
- package/SVF-doxygen/html/html/search/functions_e.js +8 -5
- package/SVF-doxygen/html/html/search/functions_f.js +4 -4
- package/SVF-doxygen/html/html/search/typedefs_11.js +3 -1
- package/SVF-doxygen/html/html/search/typedefs_14.js +1 -0
- package/SVF-doxygen/html/html/search/typedefs_3.js +2 -2
- package/SVF-doxygen/html/html/search/typedefs_f.js +1 -1
- package/SVF-doxygen/html/html/search/variables_0.js +1 -1
- package/SVF-doxygen/html/html/search/variables_1.js +3 -2
- package/SVF-doxygen/html/html/search/variables_12.js +1 -1
- package/SVF-doxygen/html/html/search/variables_13.js +2 -2
- package/SVF-doxygen/html/html/search/variables_14.js +2 -2
- package/SVF-doxygen/html/html/search/variables_15.js +1 -1
- package/SVF-doxygen/html/html/search/variables_16.js +2 -0
- package/SVF-doxygen/html/html/search/variables_3.js +2 -2
- package/SVF-doxygen/html/html/search/variables_4.js +2 -2
- package/SVF-doxygen/html/html/search/variables_5.js +2 -2
- package/SVF-doxygen/html/html/search/variables_6.js +3 -3
- package/SVF-doxygen/html/html/search/variables_7.js +2 -1
- package/SVF-doxygen/html/html/search/variables_b.js +1 -1
- package/SVF-doxygen/html/html/search/variables_c.js +1 -0
- package/SVF-doxygen/html/html/search/variables_e.js +3 -3
- package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1Symbol-members.html +98 -0
- package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1Symbol.html +652 -0
- package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1SymbolVectorHash-members.html +81 -0
- package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1SymbolVectorHash.html +124 -0
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01CFLGraph_01_5_01_4.html +22 -15
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ConstraintGraph_01_5_01_4.html +4 -2
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01OfflineConsG_01_5_01_4.html +4 -2
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1CFLNode_01_5_01_4_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLGraph_01_5_01_4.html +2 -2
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLNode_01_5_01_4.html +1 -1
- package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/wpa_8cpp_source.html +1 -1
- package/include/CFL/CFGNormalizer.h +14 -9
- package/include/CFL/CFLAlias.h +1 -40
- package/include/CFL/CFLGrammar.h +246 -31
- package/include/CFL/CFLGrammar.txt +13 -15
- package/include/CFL/CFLGraphBuilder.h +27 -29
- package/include/CFL/GrammarBuilder.h +34 -14
- package/include/Graphs/CFLGraph.h +12 -0
- package/include/Graphs/ConsGEdge.h +1 -0
- package/include/SVF-FE/CallGraphBuilder.h +2 -2
- package/include/Util/ExtAPI.h +59 -42
- package/lib/CFL/CFGNormalizer.cpp +138 -86
- package/lib/CFL/CFLAlias.cpp +73 -0
- package/lib/CFL/CFLGrammar.cpp +115 -16
- package/lib/CFL/CFLGraphBuilder.cpp +64 -1
- package/lib/CFL/GrammarBuilder.cpp +42 -60
- package/lib/Graphs/CFLGraph.cpp +41 -1
- package/lib/MemoryModel/LocationSet.cpp +1 -1
- package/lib/SVF-FE/SVFIRBuilder.cpp +2 -2
- package/lib/Util/ExtAPI.cpp +34 -2
- package/lib/Util/ExtAPI.json +3268 -2585
- package/package.json +1 -1
- package/clean.sh +0 -10
- package/include/CFL/CFLGrammarDev.txt +0 -16
package/include/CFL/CFLGrammar.h
CHANGED
|
@@ -28,20 +28,155 @@
|
|
|
28
28
|
*/
|
|
29
29
|
#ifndef CFLGrammar_H_
|
|
30
30
|
#define CFLGrammar_H_
|
|
31
|
-
#include "Util/
|
|
31
|
+
#include "Util/SVFBasicTypes.h"
|
|
32
32
|
|
|
33
33
|
namespace SVF
|
|
34
34
|
{
|
|
35
|
+
|
|
35
36
|
class GrammarBase
|
|
36
37
|
{
|
|
37
38
|
public:
|
|
38
|
-
typedef u32_t Symbol;
|
|
39
|
-
typedef std::vector<Symbol> Production;
|
|
40
|
-
typedef Set<Production> Productions;
|
|
41
|
-
typedef u32_t Attribute;
|
|
42
39
|
typedef u32_t Kind;
|
|
40
|
+
typedef u32_t Attribute;
|
|
41
|
+
typedef u32_t VariableAttribute;
|
|
42
|
+
typedef struct Symbol
|
|
43
|
+
{
|
|
44
|
+
Kind kind: 8;
|
|
45
|
+
Attribute attribute: 16;
|
|
46
|
+
VariableAttribute variableAttribute: 8;
|
|
47
|
+
|
|
48
|
+
/// Default Value for Symbol is 0.
|
|
49
|
+
Symbol() : kind(0), attribute(0), variableAttribute(0) {}
|
|
50
|
+
|
|
51
|
+
/// Contruct from u32_t move the bit to right field
|
|
52
|
+
Symbol(const u32_t& num) : kind(num & 0xFF), attribute((num >> 8 ) & 0xFFFF), variableAttribute((num >> 24)) {}
|
|
53
|
+
|
|
54
|
+
/// Conversion of u32_t
|
|
55
|
+
operator u32_t()
|
|
56
|
+
{
|
|
57
|
+
u32_t num = 0;
|
|
58
|
+
num += this->variableAttribute << 24;
|
|
59
|
+
num += this->attribute << 8;
|
|
60
|
+
num += this->kind;
|
|
61
|
+
return num;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/// Conversion of u64_t
|
|
65
|
+
operator u64_t()
|
|
66
|
+
{
|
|
67
|
+
u64_t num = 0;
|
|
68
|
+
num += this->variableAttribute << 24;
|
|
69
|
+
num += this->attribute << 8;
|
|
70
|
+
num += this->kind;
|
|
71
|
+
return num;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
operator s64_t() const
|
|
75
|
+
{
|
|
76
|
+
s64_t num = 0;
|
|
77
|
+
num += this->variableAttribute << 24;
|
|
78
|
+
num += this->attribute << 8;
|
|
79
|
+
num += this->kind;
|
|
80
|
+
return num;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
bool operator<(const Symbol& rhs)
|
|
84
|
+
{
|
|
85
|
+
return this->kind < rhs.kind;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
void operator=(const int& i)
|
|
89
|
+
{
|
|
90
|
+
this->kind = EdgeKindMask & i;
|
|
91
|
+
this->attribute = i >> EdgeKindMaskBits;
|
|
92
|
+
this->variableAttribute = i >> AttributedKindMaskBits;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
void operator=(unsigned long long num)
|
|
96
|
+
{
|
|
97
|
+
this->kind = num & 0xFF;
|
|
98
|
+
this->attribute = (num >> 8 ) & 0xFFFF;
|
|
99
|
+
this->variableAttribute = num >> 24;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
void operator=(const Kind& kind)
|
|
103
|
+
{
|
|
104
|
+
this->kind = kind;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
bool operator==(const Symbol& s)
|
|
108
|
+
{
|
|
109
|
+
return ((this->kind == s.kind) && (this->attribute == s.attribute) && (this->variableAttribute == s.variableAttribute));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
bool operator==(const Symbol& s) const
|
|
113
|
+
{
|
|
114
|
+
return ((kind == s.kind) && (attribute == s.attribute) && (variableAttribute == s.variableAttribute));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
bool operator!=(const Symbol& s) const
|
|
118
|
+
{
|
|
119
|
+
return ! (*this == s) ;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
bool operator==(const int& i)
|
|
124
|
+
{
|
|
125
|
+
return ((this->kind == (EdgeKindMask & i)) && (this->attribute == (i >> EdgeKindMaskBits)) && (this->variableAttribute == (i >> AttributedKindMaskBits)));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
bool operator==(const Kind& k) const
|
|
129
|
+
{
|
|
130
|
+
return (this->kind == k);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
bool operator==(const Kind& k)
|
|
134
|
+
{
|
|
135
|
+
return (this->kind == k);
|
|
136
|
+
}
|
|
137
|
+
} Symbol;
|
|
138
|
+
|
|
139
|
+
class SymbolHash
|
|
140
|
+
{
|
|
141
|
+
public:
|
|
142
|
+
size_t operator()(const Symbol &s) const
|
|
143
|
+
{
|
|
144
|
+
std::hash<u32_t> h;
|
|
145
|
+
return h(u32_t(s));
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
43
149
|
|
|
44
|
-
|
|
150
|
+
struct SymbolVectorHash
|
|
151
|
+
{
|
|
152
|
+
size_t operator()(const std::vector<Symbol> &v) const
|
|
153
|
+
{
|
|
154
|
+
size_t h = v.size();
|
|
155
|
+
|
|
156
|
+
SymbolHash hf;
|
|
157
|
+
for (const Symbol &t : v)
|
|
158
|
+
{
|
|
159
|
+
h ^= hf(t) + 0x9e3779b9 + (h << 6) + (h >> 2);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return h;
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
template<typename Key, typename Value, typename Hash = SymbolHash,
|
|
167
|
+
typename KeyEqual = std::equal_to<Key>,
|
|
168
|
+
typename Allocator = std::allocator<std::pair<const Key, Value>>>
|
|
169
|
+
using SymbolMap = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>;
|
|
170
|
+
|
|
171
|
+
template <typename Key, typename Hash = SymbolVectorHash, typename KeyEqual = std::equal_to<Key>,
|
|
172
|
+
typename Allocator = std::allocator<Key>>
|
|
173
|
+
using SymbolSet = std::unordered_set<Key, Hash, KeyEqual, Allocator>;
|
|
174
|
+
|
|
175
|
+
typedef std::vector<Symbol> Production;
|
|
176
|
+
typedef SymbolSet<Production> Productions;
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
inline Map<std::string, Kind>& getNonterminals()
|
|
45
180
|
{
|
|
46
181
|
return this->nonterminals;
|
|
47
182
|
}
|
|
@@ -61,7 +196,7 @@ public:
|
|
|
61
196
|
this->terminals = terminals;
|
|
62
197
|
}
|
|
63
198
|
|
|
64
|
-
inline
|
|
199
|
+
inline SymbolMap<Symbol, Productions>& getRawProductions()
|
|
65
200
|
{
|
|
66
201
|
return this->rawProductions;
|
|
67
202
|
}
|
|
@@ -91,7 +226,11 @@ public:
|
|
|
91
226
|
this->totalKind = totalKind;
|
|
92
227
|
}
|
|
93
228
|
|
|
94
|
-
|
|
229
|
+
std::string extractKindStrFromSymbolStr(const std::string symbolStr) const;
|
|
230
|
+
|
|
231
|
+
std::string extractAttributeStrFromSymbolStr(const std::string symbolStr) const;
|
|
232
|
+
|
|
233
|
+
void setRawProductions(SymbolMap<Symbol, Productions>& rawProductions);
|
|
95
234
|
|
|
96
235
|
void setKind2AttrsMap(const Map<Kind, Set<Attribute>>& kind2AttrsMap);
|
|
97
236
|
|
|
@@ -99,6 +238,8 @@ public:
|
|
|
99
238
|
|
|
100
239
|
Kind str2Kind(std::string str) const;
|
|
101
240
|
|
|
241
|
+
Symbol str2Symbol(const std::string str) const;
|
|
242
|
+
|
|
102
243
|
std::string kind2Str(Kind kind) const;
|
|
103
244
|
|
|
104
245
|
std::string sym2StrDump(Symbol sym) const;
|
|
@@ -108,41 +249,46 @@ public:
|
|
|
108
249
|
return prod.at(pos);
|
|
109
250
|
}
|
|
110
251
|
|
|
111
|
-
inline const Set<
|
|
252
|
+
inline const Set<Kind>& getAttrSyms() const
|
|
112
253
|
{
|
|
113
254
|
return this->attributeKinds;
|
|
114
255
|
}
|
|
115
256
|
|
|
257
|
+
/// Insert kind to nonterminal and return kind.
|
|
258
|
+
Kind insertNonterminalKind(std::string const kindStr);
|
|
259
|
+
|
|
260
|
+
/// From SymbolStr extract kind to inserted in nonterminal
|
|
261
|
+
/// symbolStr = <kindStr> [_] [ attributeStr | variableattributeStr ]
|
|
116
262
|
Kind insertTerminalKind(std::string strLit);
|
|
117
|
-
Kind insertNonTerminalKind(std::string strLit);
|
|
118
|
-
void insertAttribute(Kind kind, Attribute a);
|
|
119
263
|
|
|
120
|
-
|
|
121
|
-
{
|
|
122
|
-
return (EdgeKindMask & sym);
|
|
123
|
-
}
|
|
264
|
+
Symbol insertSymbol(std::string strLit);
|
|
124
265
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
266
|
+
Symbol insertNonTerminalSymbol(std::string strLit);
|
|
267
|
+
|
|
268
|
+
void insertAttribute(Kind kind, Attribute a);
|
|
129
269
|
|
|
130
270
|
inline static Kind getAttributedKind(Attribute attribute, Kind kind)
|
|
131
271
|
{
|
|
132
272
|
return ((attribute << EdgeKindMaskBits)| kind );
|
|
133
273
|
}
|
|
134
274
|
|
|
275
|
+
inline static Kind getVariabledKind(VariableAttribute variableAttribute, Kind kind)
|
|
276
|
+
{
|
|
277
|
+
return ((variableAttribute << AttributedKindMaskBits) | kind);
|
|
278
|
+
}
|
|
279
|
+
|
|
135
280
|
protected:
|
|
136
281
|
static constexpr unsigned char EdgeKindMaskBits = 8; ///< We use the lower 8 bits to denote edge kind
|
|
282
|
+
static constexpr unsigned char AttributedKindMaskBits = 24; ///< We use the lower 24 bits to denote attributed kind
|
|
137
283
|
static constexpr u64_t EdgeKindMask = (~0ULL) >> (64 - EdgeKindMaskBits);
|
|
138
284
|
Kind startKind;
|
|
139
285
|
private:
|
|
140
|
-
Set<Kind> attributeKinds;
|
|
141
|
-
Map<Kind, Set<Attribute>> kind2AttrsMap;
|
|
142
|
-
Map<Symbol, Productions> rawProductions;
|
|
143
|
-
Kind totalKind;
|
|
144
286
|
Map<std::string, Kind> nonterminals;
|
|
145
287
|
Map<std::string, Kind> terminals;
|
|
288
|
+
Set<Kind> attributeKinds;
|
|
289
|
+
Map<Kind, Set<Attribute>> kind2AttrsMap;
|
|
290
|
+
SymbolMap<Symbol, Productions> rawProductions;
|
|
291
|
+
u32_t totalKind;
|
|
146
292
|
};
|
|
147
293
|
|
|
148
294
|
class CFLGrammar : public GrammarBase
|
|
@@ -168,17 +314,17 @@ public:
|
|
|
168
314
|
return epsilonProds;
|
|
169
315
|
}
|
|
170
316
|
|
|
171
|
-
|
|
317
|
+
SymbolMap<Symbol, Productions>& getSingleRHS2Prods()
|
|
172
318
|
{
|
|
173
319
|
return singleRHS2Prods;
|
|
174
320
|
}
|
|
175
321
|
|
|
176
|
-
|
|
322
|
+
SymbolMap<Symbol, Productions>& getFirstRHS2Prods()
|
|
177
323
|
{
|
|
178
324
|
return firstRHS2Prods;
|
|
179
325
|
}
|
|
180
326
|
|
|
181
|
-
|
|
327
|
+
SymbolMap<Symbol, Productions>& getSecondRHS2Prods()
|
|
182
328
|
{
|
|
183
329
|
return secondRHS2Prods;
|
|
184
330
|
}
|
|
@@ -240,17 +386,86 @@ public:
|
|
|
240
386
|
|
|
241
387
|
void dump() const;
|
|
242
388
|
|
|
389
|
+
void dump(std::string fileName) const;
|
|
390
|
+
|
|
391
|
+
|
|
243
392
|
const inline int num_generator()
|
|
244
393
|
{
|
|
245
394
|
return newTerminalSubscript++;
|
|
246
395
|
}
|
|
247
396
|
|
|
248
397
|
private:
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
398
|
+
SymbolSet<Production> epsilonProds;
|
|
399
|
+
SymbolMap<Symbol, Productions> singleRHS2Prods;
|
|
400
|
+
SymbolMap<Symbol, Productions> firstRHS2Prods;
|
|
401
|
+
SymbolMap<Symbol, Productions> secondRHS2Prods;
|
|
402
|
+
u32_t newTerminalSubscript;
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Worklist with "first in first out" order.
|
|
407
|
+
* New nodes will be pushed at back and popped from front.
|
|
408
|
+
* Elements in the list are unique as they're recorded by Set.
|
|
409
|
+
*/
|
|
410
|
+
template<class Data>
|
|
411
|
+
class CFLFIFOWorkList
|
|
412
|
+
{
|
|
413
|
+
typedef GrammarBase::SymbolSet<Data> DataSet;
|
|
414
|
+
typedef std::deque<Data> DataDeque;
|
|
415
|
+
public:
|
|
416
|
+
CFLFIFOWorkList() {}
|
|
417
|
+
|
|
418
|
+
~CFLFIFOWorkList() {}
|
|
419
|
+
|
|
420
|
+
inline bool empty() const
|
|
421
|
+
{
|
|
422
|
+
return data_list.empty();
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
inline bool find(Data data) const
|
|
426
|
+
{
|
|
427
|
+
return (data_set.find(data) == data_set.end() ? false : true);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Push a data into the work list.
|
|
432
|
+
*/
|
|
433
|
+
inline bool push(Data data)
|
|
434
|
+
{
|
|
435
|
+
if (data_set.find(data) == data_set.end())
|
|
436
|
+
{
|
|
437
|
+
data_list.push_back(data);
|
|
438
|
+
data_set.insert(data);
|
|
439
|
+
return true;
|
|
440
|
+
}
|
|
441
|
+
else
|
|
442
|
+
return false;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Pop a data from the END of work list.
|
|
447
|
+
*/
|
|
448
|
+
inline Data pop()
|
|
449
|
+
{
|
|
450
|
+
assert(!empty() && "work list is empty");
|
|
451
|
+
Data data = data_list.front();
|
|
452
|
+
data_list.pop_front();
|
|
453
|
+
data_set.erase(data);
|
|
454
|
+
return data;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/*!
|
|
458
|
+
* Clear all the data
|
|
459
|
+
*/
|
|
460
|
+
inline void clear()
|
|
461
|
+
{
|
|
462
|
+
data_list.clear();
|
|
463
|
+
data_set.clear();
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
private:
|
|
467
|
+
DataSet data_set; ///< store all data in the work list.
|
|
468
|
+
DataDeque data_list; ///< work list using std::vector.
|
|
254
469
|
};
|
|
255
470
|
|
|
256
471
|
}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
Start:
|
|
2
|
-
V
|
|
2
|
+
V
|
|
3
|
+
Terminal:
|
|
4
|
+
Addr Copy Store Load Gep Vgep
|
|
3
5
|
Productions:
|
|
4
|
-
F ->
|
|
5
|
-
F ->
|
|
6
|
-
F ->
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Fbar ->
|
|
10
|
-
Fbar ->
|
|
11
|
-
Fbar -> Addrbar ( Loadbar V Storebar ) *;
|
|
12
|
-
Fbar -> ( Copybar ) *;
|
|
13
|
-
Fbar -> ( Loadbar V Storebar ) *;
|
|
6
|
+
F -> epsilon;
|
|
7
|
+
F -> F Copy;
|
|
8
|
+
F -> F Store V Load;
|
|
9
|
+
Gepbar_j -> Vgepbar Fbar Gepbar_i;
|
|
10
|
+
Fbar -> epsilon;
|
|
11
|
+
Fbar -> Copybar Fbar;
|
|
12
|
+
Fbar -> Loadbar V Storebar Fbar;
|
|
14
13
|
V -> Fbar V F;
|
|
15
|
-
V -> Gepbar_i V Gep_i;
|
|
16
14
|
V -> Addrbar Addr;
|
|
17
|
-
V ->
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
V -> Gepbar_i V Gep_i;
|
|
16
|
+
Gep_j -> Gep_i F Vgep;
|
|
17
|
+
|
|
@@ -39,14 +39,14 @@ namespace SVF
|
|
|
39
39
|
|
|
40
40
|
class CFLGraphBuilder
|
|
41
41
|
{
|
|
42
|
-
|
|
42
|
+
protected:
|
|
43
43
|
typedef CFLGrammar::Kind Kind;
|
|
44
44
|
typedef CFLGrammar::Symbol Symbol;
|
|
45
45
|
Map<std::string, Kind> label2KindMap;
|
|
46
46
|
Map<Kind, std::string> kind2LabelMap;
|
|
47
47
|
Map<CFLGrammar::Kind, Set<CFLGrammar::Attribute>> kind2AttrsMap;
|
|
48
48
|
bool externMap;
|
|
49
|
-
|
|
49
|
+
Kind current;
|
|
50
50
|
|
|
51
51
|
public:
|
|
52
52
|
/// add attribute to kind2Attribute Map
|
|
@@ -73,12 +73,22 @@ public:
|
|
|
73
73
|
|
|
74
74
|
/// Build Bidirectional graph by copying nodes and edges from any graph inherited from GenericGraph
|
|
75
75
|
template<class N, class E>
|
|
76
|
-
CFLGraph* buildBigraph(GenericGraph<N,E>* graph, Kind startKind)
|
|
76
|
+
CFLGraph* buildBigraph(GenericGraph<N,E>* graph, Kind startKind, GrammarBase *grammar)
|
|
77
77
|
{
|
|
78
78
|
CFLGraph *cflGraph = new CFLGraph(startKind);
|
|
79
|
-
Map<std::string, SVF::CFLGraph::Symbol> ConstMap = {{"Addr",0}, {"Copy", 1},{"Store", 2},{"Load", 3},{"Gep_i", 4},{"Vgep", 5},{"Addrbar",6}, {"Copybar", 7},{"Storebar", 8},{"Loadbar", 9},{"Gepbar_i", 10},{"Vgepbar", 11}};
|
|
80
79
|
externMap = true;
|
|
81
|
-
for(auto pairV :
|
|
80
|
+
for(auto pairV : grammar->getTerminals())
|
|
81
|
+
{
|
|
82
|
+
if(label2KindMap.find(pairV.first) == label2KindMap.end())
|
|
83
|
+
{
|
|
84
|
+
label2KindMap.insert(pairV);
|
|
85
|
+
}
|
|
86
|
+
if(kind2LabelMap.find(pairV.second) == kind2LabelMap.end())
|
|
87
|
+
{
|
|
88
|
+
kind2LabelMap.insert(make_pair(pairV.second, pairV.first));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
for(auto pairV : grammar->getNonterminals())
|
|
82
92
|
{
|
|
83
93
|
if(label2KindMap.find(pairV.first) == label2KindMap.end())
|
|
84
94
|
{
|
|
@@ -100,29 +110,10 @@ public:
|
|
|
100
110
|
for(E* edge : node->getOutEdges())
|
|
101
111
|
{
|
|
102
112
|
CFLGrammar::Kind edgeLabel = edge->getEdgeKind();
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
NormalGepCGEdge *nGepEdge = SVFUtil::dyn_cast<NormalGepCGEdge>(edge);
|
|
108
|
-
CFLGrammar::Attribute attr = nGepEdge->getConstantFieldIdx();
|
|
109
|
-
addAttribute(edgeLabel, attr);
|
|
110
|
-
edgeLabel = CFLGrammar::getAttributedKind(attr, edgeLabel);
|
|
111
|
-
cflGraph->addCFLEdge(cflGraph->getGNode(edge->getSrcID()), cflGraph->getGNode(edge->getDstID()), edgeLabel);
|
|
112
|
-
std::string key = kind2LabelMap[edge->getEdgeKind()];
|
|
113
|
-
key.pop_back();
|
|
114
|
-
key.pop_back(); // _i standsfor attribute variable should place at last
|
|
115
|
-
key.append("bar_i"); // for example Gep_i should be Gepbar_i, not Gep_ibar
|
|
116
|
-
cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(edge->getSrcID()), CFLGrammar::getAttributedKind(attr, label2KindMap[key]));
|
|
117
|
-
addAttribute(label2KindMap[key], attr);
|
|
118
|
-
}
|
|
119
|
-
else
|
|
120
|
-
{
|
|
121
|
-
cflGraph->addCFLEdge(cflGraph->getGNode(edge->getSrcID()), cflGraph->getGNode(edge->getDstID()), edgeLabel);
|
|
122
|
-
std::string key = kind2LabelMap[edge->getEdgeKind()];
|
|
123
|
-
key.append("bar");
|
|
124
|
-
cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(edge->getSrcID()), label2KindMap[key]);
|
|
125
|
-
}
|
|
113
|
+
cflGraph->addCFLEdge(cflGraph->getGNode(edge->getSrcID()), cflGraph->getGNode(edge->getDstID()), edgeLabel);
|
|
114
|
+
std::string key = kind2LabelMap[edge->getEdgeKind()];
|
|
115
|
+
key.append("bar");
|
|
116
|
+
cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(edge->getSrcID()), label2KindMap[key]);
|
|
126
117
|
}
|
|
127
118
|
}
|
|
128
119
|
return cflGraph;
|
|
@@ -147,8 +138,15 @@ public:
|
|
|
147
138
|
{
|
|
148
139
|
return this->kind2AttrsMap;
|
|
149
140
|
}
|
|
141
|
+
};
|
|
150
142
|
|
|
151
|
-
|
|
143
|
+
class AliasCFLGraphBuilder : public CFLGraphBuilder
|
|
144
|
+
{
|
|
145
|
+
public:
|
|
146
|
+
/// Build Bidirectional graph by copying nodes and edges from const graph inherited from GenericGraph
|
|
147
|
+
CFLGraph* buildBigraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar);
|
|
152
148
|
};
|
|
149
|
+
|
|
153
150
|
}// SVF
|
|
154
151
|
|
|
152
|
+
|
|
@@ -27,54 +27,74 @@
|
|
|
27
27
|
* Author: Pei Xu
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
+
#ifndef INCLUDE_CFL_GRAMMARBUILDER_H_
|
|
31
|
+
#define INCLUDE_CFL_GRAMMARBUILDER_H_
|
|
30
32
|
|
|
31
33
|
#include "CFL/CFLGrammar.h"
|
|
32
|
-
|
|
34
|
+
|
|
33
35
|
namespace SVF
|
|
34
36
|
{
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
/**
|
|
37
39
|
* Build Grammar from a user specified grammar text
|
|
40
|
+
*
|
|
41
|
+
* Symbol Format:
|
|
42
|
+
* <kind> [bar] [ _alpha | _number ]
|
|
43
|
+
* kind: any nonspace string start with alphabet, epsilon stand for empty string
|
|
44
|
+
* bar: stand for reverse edge
|
|
45
|
+
* alpha: any single alpha
|
|
46
|
+
* number: any number
|
|
47
|
+
* start with capital: nonterminal
|
|
48
|
+
* start with noncapital: terminal
|
|
49
|
+
*
|
|
50
|
+
* Production Format:
|
|
51
|
+
* <symbol> -> <symbol> *;
|
|
52
|
+
* LHS and RHS, Seperate by '->', symbol seperate by ' ', end by ';'
|
|
53
|
+
* support '*', '?', '(', ')'
|
|
54
|
+
*
|
|
38
55
|
* Input Format:
|
|
39
|
-
* Start:
|
|
56
|
+
* Start:
|
|
40
57
|
* M // Specify Start Symbol in Second Line
|
|
58
|
+
* Terminal:
|
|
59
|
+
* Addr Copy Store Load Gep Vgep // Specify the order of terminal Addr->0, Copy->1 ..
|
|
41
60
|
* Productions: // Each Symbol seperate by 'Space', production end with ';'
|
|
42
61
|
* M -> V d; // Terminal in NonCapital
|
|
43
62
|
* M -> dbar V d; // NonTerminal in Capital
|
|
44
63
|
* V -> M abar M a M; // LHS and RHS, Seperate by '->'
|
|
45
64
|
* V -> ( M ? abar ) * M ? ( a M ? ) *; // Support '(' ')' '?' '*' four regular expression sign
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
65
|
+
* Gep_j -> Gep_i F vgep; // Support variable attribute with variable attribute
|
|
66
|
+
* Gep_1 -> Gep_2; // Support fix number attribute
|
|
67
|
+
*
|
|
49
68
|
*/
|
|
50
69
|
|
|
51
70
|
class GrammarBuilder
|
|
52
71
|
{
|
|
53
72
|
private:
|
|
54
|
-
|
|
55
|
-
|
|
73
|
+
std::string fileName;
|
|
74
|
+
GrammarBase *grammar;
|
|
56
75
|
|
|
57
76
|
/// Parse start symbol and production from file string
|
|
58
|
-
const inline std::string
|
|
77
|
+
const inline std::string parseProductionsString() const;
|
|
59
78
|
|
|
60
79
|
/// Parse whole production string to production vector
|
|
61
80
|
const inline std::vector<std::string> loadWordProductions() const;
|
|
62
81
|
|
|
63
|
-
/// Strip
|
|
82
|
+
/// Strip front and tail space
|
|
64
83
|
const inline std::string stripSpace(std::string s) const;
|
|
65
84
|
|
|
66
85
|
public:
|
|
67
|
-
std::string fileName;
|
|
68
|
-
GrammarBase *grammar;
|
|
69
|
-
|
|
70
86
|
GrammarBuilder(std::string fileName): fileName(fileName), grammar(nullptr)
|
|
71
87
|
{
|
|
72
88
|
grammar = new GrammarBase();
|
|
73
89
|
};
|
|
74
90
|
|
|
91
|
+
/// Build grammarBase from fileName
|
|
75
92
|
GrammarBase* build() const;
|
|
76
93
|
|
|
77
|
-
|
|
94
|
+
/// Build grammarBase from fileName with preset str2KindMap
|
|
95
|
+
GrammarBase* build(Map<std::string, SVF::GrammarBase::Symbol> &preMap) const;
|
|
78
96
|
};
|
|
79
97
|
|
|
80
98
|
} // SVF
|
|
99
|
+
|
|
100
|
+
#endif /* INCLUDE_CFL_GRAMMARBUILDER_H_ */
|
|
@@ -57,6 +57,16 @@ public:
|
|
|
57
57
|
{
|
|
58
58
|
return this->getEdgeKindWithoutMask();
|
|
59
59
|
}
|
|
60
|
+
|
|
61
|
+
inline GEdgeKind getEdgeKindWithMask() const
|
|
62
|
+
{
|
|
63
|
+
return (EdgeKindMask & this->getEdgeKindWithoutMask());
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
inline GEdgeKind getEdgeAttri() const
|
|
67
|
+
{
|
|
68
|
+
return (getEdgeKind() >> this->EdgeKindMaskBits);
|
|
69
|
+
}
|
|
60
70
|
};
|
|
61
71
|
|
|
62
72
|
|
|
@@ -87,6 +97,8 @@ public:
|
|
|
87
97
|
}
|
|
88
98
|
~CFLGraph() override = default;
|
|
89
99
|
|
|
100
|
+
Kind getStartKind() const;
|
|
101
|
+
|
|
90
102
|
virtual void addCFLNode(NodeID id, CFLNode* node);
|
|
91
103
|
|
|
92
104
|
virtual const CFLEdge* addCFLEdge(CFLNode* src, CFLNode* dst, CFLEdge::GEdgeFlag label);
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
* Author: Yulei Sui
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
-
#ifndef
|
|
32
|
-
#define
|
|
31
|
+
#ifndef INCLUDE_SVF_FE_CALLGRAPHBUILDER_H_
|
|
32
|
+
#define INCLUDE_SVF_FE_CALLGRAPHBUILDER_H_
|
|
33
33
|
|
|
34
34
|
#include "Graphs/PTACallGraph.h"
|
|
35
35
|
#include "Graphs/ThreadCallGraph.h"
|