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/lib/CFL/CFLGrammar.cpp
CHANGED
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
#include "CFL/CFLGrammar.h"
|
|
31
|
+
#include "Util/SVFUtil.h"
|
|
31
32
|
#include <string>
|
|
32
33
|
#include <iostream>
|
|
33
34
|
#include <fstream>
|
|
@@ -35,7 +36,8 @@
|
|
|
35
36
|
|
|
36
37
|
using namespace SVF;
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
|
|
40
|
+
void GrammarBase::setRawProductions(SymbolMap<Symbol, Productions>& rawProductions)
|
|
39
41
|
{
|
|
40
42
|
this->rawProductions = rawProductions;
|
|
41
43
|
}
|
|
@@ -65,6 +67,35 @@ GrammarBase::Kind GrammarBase::str2Kind(std::string str) const
|
|
|
65
67
|
abort();
|
|
66
68
|
}
|
|
67
69
|
|
|
70
|
+
GrammarBase::Symbol GrammarBase::str2Symbol(const std::string str) const
|
|
71
|
+
{
|
|
72
|
+
Symbol symbol;
|
|
73
|
+
std::string attributeStr = extractAttributeStrFromSymbolStr(str);
|
|
74
|
+
std::string kindStr = extractKindStrFromSymbolStr(str);
|
|
75
|
+
symbol.kind = str2Kind(kindStr);
|
|
76
|
+
|
|
77
|
+
if ( attributeStr == "") return symbol;
|
|
78
|
+
|
|
79
|
+
if ( (attributeStr.size() == 1) && (std::isalpha(attributeStr[attributeStr.size()-1])) )
|
|
80
|
+
{
|
|
81
|
+
symbol.variableAttribute = (u32_t)attributeStr[attributeStr.size()-1];
|
|
82
|
+
}
|
|
83
|
+
else
|
|
84
|
+
{
|
|
85
|
+
for( char &c : attributeStr)
|
|
86
|
+
{
|
|
87
|
+
if ( std::isdigit(c) == false )
|
|
88
|
+
{
|
|
89
|
+
SVFUtil::errs() << SVFUtil::errMsg("\t Symbol Attribute Parse Failure :") << str
|
|
90
|
+
<< " Attribute:" << attributeStr << " (only number or single alphabet.)";
|
|
91
|
+
assert(false && "grammar loading failed!");
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
symbol.attribute = std::stoi(attributeStr);
|
|
95
|
+
}
|
|
96
|
+
return symbol;
|
|
97
|
+
}
|
|
98
|
+
|
|
68
99
|
std::string GrammarBase::kind2Str(Kind kind) const
|
|
69
100
|
{
|
|
70
101
|
|
|
@@ -93,8 +124,8 @@ std::string GrammarBase::kind2Str(Kind kind) const
|
|
|
93
124
|
|
|
94
125
|
std::string GrammarBase::sym2StrDump(Symbol sym) const
|
|
95
126
|
{
|
|
96
|
-
Kind kind =
|
|
97
|
-
Attribute attribute =
|
|
127
|
+
Kind kind = sym.kind;
|
|
128
|
+
Attribute attribute = sym.attribute;
|
|
98
129
|
|
|
99
130
|
std::string key = "";
|
|
100
131
|
for (auto &i : terminals)
|
|
@@ -102,9 +133,9 @@ std::string GrammarBase::sym2StrDump(Symbol sym) const
|
|
|
102
133
|
if (i.second == kind)
|
|
103
134
|
{
|
|
104
135
|
key = i.first;
|
|
105
|
-
if(
|
|
136
|
+
if(attribute != 0)
|
|
106
137
|
{
|
|
107
|
-
key.
|
|
138
|
+
key.append("_");
|
|
108
139
|
key.append(std::to_string(attribute));
|
|
109
140
|
}
|
|
110
141
|
return key;
|
|
@@ -117,9 +148,9 @@ std::string GrammarBase::sym2StrDump(Symbol sym) const
|
|
|
117
148
|
if (ni.second == kind)
|
|
118
149
|
{
|
|
119
150
|
nkey = ni.first;
|
|
120
|
-
if(
|
|
151
|
+
if(attribute != 0)
|
|
121
152
|
{
|
|
122
|
-
nkey.
|
|
153
|
+
nkey.append("_");
|
|
123
154
|
nkey.append(std::to_string(attribute));
|
|
124
155
|
}
|
|
125
156
|
return nkey;
|
|
@@ -143,7 +174,8 @@ GrammarBase::Kind GrammarBase::insertTerminalKind(std::string kindStr)
|
|
|
143
174
|
}
|
|
144
175
|
return kind;
|
|
145
176
|
}
|
|
146
|
-
|
|
177
|
+
|
|
178
|
+
inline GrammarBase::Kind GrammarBase::insertNonterminalKind(std::string const kindStr)
|
|
147
179
|
{
|
|
148
180
|
Kind kind;
|
|
149
181
|
if (nonterminals.find(kindStr) == nonterminals.end())
|
|
@@ -155,14 +187,76 @@ GrammarBase::Kind GrammarBase::insertNonTerminalKind(std::string kindStr)
|
|
|
155
187
|
{
|
|
156
188
|
kind = str2Kind(kindStr);
|
|
157
189
|
}
|
|
158
|
-
|
|
190
|
+
return kind;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
std::string GrammarBase::extractKindStrFromSymbolStr(const std::string symbolStr) const
|
|
194
|
+
{
|
|
195
|
+
std::string kindStr;
|
|
196
|
+
// symbolStr end with '_', the whole symbolStr treat as kind, not with attribute.
|
|
197
|
+
auto underscorePosition = symbolStr.find_last_of("_", symbolStr.size()-1);
|
|
198
|
+
if (underscorePosition == std::string::npos)
|
|
199
|
+
{
|
|
200
|
+
return symbolStr;
|
|
201
|
+
}
|
|
202
|
+
return symbolStr.substr(0, underscorePosition);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
std::string GrammarBase::extractAttributeStrFromSymbolStr(const std::string symbolStr) const
|
|
206
|
+
{
|
|
207
|
+
std::string attributeStr;
|
|
208
|
+
// symbolStr end with '_', the whole symbolStr treat as kind, not with attribute.
|
|
209
|
+
auto underscorePosition = symbolStr.find_last_of("_", symbolStr.size()-1);
|
|
210
|
+
if (underscorePosition == std::string::npos)
|
|
159
211
|
{
|
|
160
|
-
|
|
212
|
+
return "";
|
|
213
|
+
}
|
|
214
|
+
return symbolStr.substr(underscorePosition+1);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
GrammarBase::Symbol GrammarBase::insertSymbol(std::string symbolStr)
|
|
218
|
+
{
|
|
219
|
+
Symbol symbol;
|
|
220
|
+
if (isupper(symbolStr[0]))
|
|
221
|
+
{
|
|
222
|
+
symbol = insertNonTerminalSymbol(symbolStr);
|
|
223
|
+
}
|
|
224
|
+
else
|
|
225
|
+
{
|
|
226
|
+
symbol.kind = insertTerminalKind(symbolStr);
|
|
227
|
+
}
|
|
228
|
+
return symbol;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
GrammarBase::Symbol GrammarBase::insertNonTerminalSymbol(std::string symbolStr)
|
|
232
|
+
{
|
|
233
|
+
Symbol symbol;
|
|
234
|
+
std::string kindStr = extractKindStrFromSymbolStr(symbolStr);
|
|
235
|
+
std::string attributeStr = extractAttributeStrFromSymbolStr(symbolStr);
|
|
236
|
+
symbol.kind = insertNonterminalKind(kindStr);
|
|
237
|
+
|
|
238
|
+
if ( attributeStr == "") return symbol;
|
|
239
|
+
|
|
240
|
+
if ( (attributeStr.size() == 1) && (std::isalpha(attributeStr[attributeStr.size()-1])) )
|
|
241
|
+
{
|
|
242
|
+
attributeKinds.insert(symbol.kind);
|
|
243
|
+
symbol.variableAttribute = (u32_t)attributeStr[attributeStr.size()-1];
|
|
244
|
+
}
|
|
245
|
+
else
|
|
246
|
+
{
|
|
247
|
+
for( char &c : attributeStr)
|
|
161
248
|
{
|
|
162
|
-
|
|
249
|
+
if ( std::isdigit(c) == false )
|
|
250
|
+
{
|
|
251
|
+
SVFUtil::errs() << SVFUtil::errMsg("\t Symbol Attribute Parse Failure :") << symbolStr
|
|
252
|
+
<< " Attribute:" << attributeStr << " (only number or single alphabet.)";
|
|
253
|
+
assert(false && "grammar loading failed!");
|
|
254
|
+
}
|
|
163
255
|
}
|
|
256
|
+
attributeKinds.insert(symbol.kind);
|
|
257
|
+
symbol.attribute = std::stoi(attributeStr);
|
|
164
258
|
}
|
|
165
|
-
return
|
|
259
|
+
return symbol;
|
|
166
260
|
}
|
|
167
261
|
|
|
168
262
|
void GrammarBase::insertAttribute(Kind kind, Attribute attribute)
|
|
@@ -186,7 +280,12 @@ CFLGrammar::CFLGrammar()
|
|
|
186
280
|
|
|
187
281
|
void CFLGrammar::dump() const
|
|
188
282
|
{
|
|
189
|
-
|
|
283
|
+
dump("Normailized_Grammar.txt");
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
void CFLGrammar::dump(std::string fileName) const
|
|
287
|
+
{
|
|
288
|
+
std::ofstream gramFile(fileName);
|
|
190
289
|
gramFile << "Start Kind:\n";
|
|
191
290
|
gramFile << '\t' << kind2Str(startKind) << '(' << startKind << ')' << ' ' << "\n\n";
|
|
192
291
|
|
|
@@ -201,7 +300,7 @@ void CFLGrammar::dump() const
|
|
|
201
300
|
{
|
|
202
301
|
ss << "-> ";
|
|
203
302
|
}
|
|
204
|
-
ss << sym2StrDump(sym) << '(' << sym << ')' << ' ';
|
|
303
|
+
ss << sym2StrDump(sym) << '(' << sym.kind << ')' << ' ';
|
|
205
304
|
}
|
|
206
305
|
strV.insert(strV.begin(), ss.str());
|
|
207
306
|
}
|
|
@@ -229,7 +328,7 @@ void CFLGrammar::dump() const
|
|
|
229
328
|
{
|
|
230
329
|
ss << "-> ";
|
|
231
330
|
}
|
|
232
|
-
ss << sym2StrDump(sym) << '(' << sym << ')' << ' ';
|
|
331
|
+
ss << sym2StrDump(sym) << '(' << sym.kind << ')' << ' ';
|
|
233
332
|
}
|
|
234
333
|
strV.insert(strV.begin(), ss.str());
|
|
235
334
|
}
|
|
@@ -259,7 +358,7 @@ void CFLGrammar::dump() const
|
|
|
259
358
|
{
|
|
260
359
|
ss << "-> ";
|
|
261
360
|
}
|
|
262
|
-
ss << sym2StrDump(sym) << '(' << sym << ')' << ' ';
|
|
361
|
+
ss << sym2StrDump(sym) << '(' << sym.kind << ')' << ' ';
|
|
263
362
|
}
|
|
264
363
|
strV.insert(strV.begin(), ss.str());
|
|
265
364
|
}
|
|
@@ -159,4 +159,67 @@ CFLGraph * CFLGraphBuilder::buildFromDot(std::string fileName, GrammarBase *gram
|
|
|
159
159
|
return cflGraph;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
CFLGraph* AliasCFLGraphBuilder::buildBigraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar)
|
|
163
|
+
{
|
|
164
|
+
CFLGraph *cflGraph = new CFLGraph(startKind);
|
|
165
|
+
externMap = true;
|
|
166
|
+
for(auto pairV : grammar->getTerminals())
|
|
167
|
+
{
|
|
168
|
+
if(label2KindMap.find(pairV.first) == label2KindMap.end())
|
|
169
|
+
{
|
|
170
|
+
label2KindMap.insert(pairV);
|
|
171
|
+
}
|
|
172
|
+
if(kind2LabelMap.find(pairV.second) == kind2LabelMap.end())
|
|
173
|
+
{
|
|
174
|
+
kind2LabelMap.insert(make_pair(pairV.second, pairV.first));
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
for(auto pairV : grammar->getNonterminals())
|
|
178
|
+
{
|
|
179
|
+
if(label2KindMap.find(pairV.first) == label2KindMap.end())
|
|
180
|
+
{
|
|
181
|
+
label2KindMap.insert(pairV);
|
|
182
|
+
}
|
|
183
|
+
if(kind2LabelMap.find(pairV.second) == kind2LabelMap.end())
|
|
184
|
+
{
|
|
185
|
+
kind2LabelMap.insert(make_pair(pairV.second, pairV.first));
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
for(auto it = graph->begin(); it!= graph->end(); it++)
|
|
189
|
+
{
|
|
190
|
+
CFLNode* node = new CFLNode((*it).first);
|
|
191
|
+
cflGraph->addCFLNode((*it).first, node);
|
|
192
|
+
}
|
|
193
|
+
for(auto it = graph->begin(); it!= graph->end(); it++)
|
|
194
|
+
{
|
|
195
|
+
ConstraintNode* node = (*it).second;
|
|
196
|
+
for(ConstraintEdge* edge : node->getOutEdges())
|
|
197
|
+
{
|
|
198
|
+
CFLGrammar::Kind edgeLabel = edge->getEdgeKind();
|
|
199
|
+
// Need to get the offset from the Const Edge
|
|
200
|
+
// The offset present edge is only from Normal Gep CG at moment
|
|
201
|
+
if(NormalGepCGEdge::classof(edge))
|
|
202
|
+
{
|
|
203
|
+
NormalGepCGEdge *nGepEdge = SVFUtil::dyn_cast<NormalGepCGEdge>(edge);
|
|
204
|
+
CFLGrammar::Attribute attr = nGepEdge->getConstantFieldIdx();
|
|
205
|
+
addAttribute(edgeLabel, attr);
|
|
206
|
+
edgeLabel = CFLGrammar::getAttributedKind(attr, edgeLabel);
|
|
207
|
+
cflGraph->addCFLEdge(cflGraph->getGNode(edge->getSrcID()), cflGraph->getGNode(edge->getDstID()), edgeLabel);
|
|
208
|
+
std::string key = kind2LabelMap[edge->getEdgeKind()];
|
|
209
|
+
key.append("bar"); // for example Gep_i should be Gepbar_i, not Gep_ibar
|
|
210
|
+
cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(edge->getSrcID()), CFLGrammar::getAttributedKind(attr, label2KindMap[key]));
|
|
211
|
+
addAttribute(label2KindMap[key], attr);
|
|
212
|
+
}
|
|
213
|
+
else
|
|
214
|
+
{
|
|
215
|
+
cflGraph->addCFLEdge(cflGraph->getGNode(edge->getSrcID()), cflGraph->getGNode(edge->getDstID()), edgeLabel);
|
|
216
|
+
std::string key = kind2LabelMap[edge->getEdgeKind()];
|
|
217
|
+
key.append("bar");
|
|
218
|
+
cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(edge->getSrcID()), label2KindMap[key]);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return cflGraph;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
} // end of SVF namespace
|
|
@@ -36,52 +36,59 @@
|
|
|
36
36
|
|
|
37
37
|
namespace SVF
|
|
38
38
|
{
|
|
39
|
-
const inline std::string GrammarBuilder::
|
|
39
|
+
const inline std::string GrammarBuilder::parseProductionsString() const
|
|
40
40
|
{
|
|
41
41
|
std::ifstream textFile(fileName);
|
|
42
42
|
std::string lineString;
|
|
43
43
|
std::string lines = "";
|
|
44
|
+
std::string startString;
|
|
45
|
+
int lineNum = 0;
|
|
44
46
|
while (getline(textFile, lineString))
|
|
45
47
|
{
|
|
48
|
+
if(lineNum == 1)
|
|
49
|
+
{
|
|
50
|
+
startString = stripSpace(lineString);
|
|
51
|
+
}
|
|
46
52
|
lines.append(lineString);
|
|
53
|
+
lineNum++;
|
|
47
54
|
}
|
|
48
|
-
textFile.close();
|
|
49
|
-
return lines;
|
|
50
|
-
}
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
std::regex reg("Start:([\\s\\S]*)Productions:([\\s\\S]*)");
|
|
56
|
+
std::regex reg("Start:([\\s\\S]*)Terminal:[\\s]*([\\s\\S]*)Productions:([\\s\\S]*)");
|
|
55
57
|
std::smatch matches;
|
|
56
|
-
std::string startS = "";
|
|
57
|
-
std::string lines = loadFileString();
|
|
58
|
-
|
|
59
58
|
if (std::regex_search(lines, matches, reg))
|
|
60
59
|
{
|
|
61
|
-
lines = matches.str(
|
|
62
|
-
startS = matches.str(1);
|
|
63
|
-
startS = stripSpace(startS);
|
|
60
|
+
lines = matches.str(3);
|
|
64
61
|
}
|
|
62
|
+
std::string terminalString = matches.str(2);
|
|
63
|
+
std::string symbolString;
|
|
64
|
+
size_t pos;
|
|
65
|
+
while ((pos = terminalString.find(" ")) != std::string::npos)
|
|
66
|
+
{
|
|
67
|
+
symbolString = stripSpace(terminalString.substr(0, pos));
|
|
68
|
+
terminalString.erase(0, pos + 1); //Capital is Nonterminal, Otherwise is terminal
|
|
69
|
+
grammar->insertSymbol(symbolString);
|
|
70
|
+
}
|
|
71
|
+
grammar->insertSymbol(symbolString);
|
|
72
|
+
grammar->setStartKind(grammar->insertSymbol(startString));
|
|
65
73
|
grammar->insertTerminalKind("epsilon");
|
|
66
|
-
|
|
67
|
-
grammar->setStartKind(grammar->str2Kind(startS));
|
|
74
|
+
|
|
68
75
|
return lines;
|
|
69
76
|
}
|
|
70
77
|
|
|
71
78
|
const inline std::vector<std::string> GrammarBuilder::loadWordProductions() const
|
|
72
79
|
{
|
|
73
80
|
size_t pos = 0;
|
|
74
|
-
std::string lines =
|
|
81
|
+
std::string lines = parseProductionsString();
|
|
75
82
|
std::string word = "";
|
|
76
|
-
std::vector<std::string>
|
|
83
|
+
std::vector<std::string> wordProds;
|
|
77
84
|
std::string delimiter = ";";
|
|
78
85
|
while ((pos = lines.find(";")) != std::string::npos)
|
|
79
86
|
{
|
|
80
87
|
word = lines.substr(0, pos);
|
|
81
|
-
|
|
88
|
+
wordProds.push_back(word);
|
|
82
89
|
lines.erase(0, pos + delimiter.length());
|
|
83
90
|
}
|
|
84
|
-
return
|
|
91
|
+
return wordProds;
|
|
85
92
|
}
|
|
86
93
|
|
|
87
94
|
const inline std::string GrammarBuilder::stripSpace(std::string s) const
|
|
@@ -97,52 +104,33 @@ const inline std::string GrammarBuilder::stripSpace(std::string s) const
|
|
|
97
104
|
GrammarBase* GrammarBuilder::build() const
|
|
98
105
|
{
|
|
99
106
|
std::smatch matches;
|
|
100
|
-
std::string delimiter = "
|
|
101
|
-
|
|
107
|
+
std::string delimiter = " ";
|
|
108
|
+
std::string delimiter1 = "->";
|
|
102
109
|
std::string word = "";
|
|
110
|
+
size_t pos;
|
|
103
111
|
GrammarBase::Production prod;
|
|
104
|
-
std::vector<std::string>
|
|
105
|
-
std::string delimiter1 = "->";
|
|
112
|
+
std::vector<std::string> wordProdVec = loadWordProductions();
|
|
106
113
|
|
|
107
|
-
for (auto
|
|
114
|
+
for (auto wordProd : wordProdVec)
|
|
108
115
|
{
|
|
109
|
-
if ((pos =
|
|
116
|
+
if ((pos = wordProd.find(delimiter1)) != std::string::npos)
|
|
110
117
|
{
|
|
111
|
-
std::string
|
|
112
|
-
std::string LHS =
|
|
113
|
-
|
|
114
|
-
prod.push_back(
|
|
115
|
-
if (grammar->getRawProductions().find(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
std::regex LHSReg("\\s*(.*)");
|
|
121
|
-
std::regex_search(LHS, matches, LHSReg);
|
|
118
|
+
std::string RHS = stripSpace(wordProd.substr(0, pos));
|
|
119
|
+
std::string LHS = wordProd.substr(pos + delimiter1.size(), wordProd.size() - 1);
|
|
120
|
+
GrammarBase::Symbol RHSSymbol = grammar->insertNonTerminalSymbol(RHS);
|
|
121
|
+
prod.push_back(RHSSymbol);
|
|
122
|
+
if (grammar->getRawProductions().find(RHSSymbol) == grammar->getRawProductions().end()) grammar->getRawProductions().insert({RHSSymbol, {}});
|
|
123
|
+
std::regex LHSRegEx("\\s*(.*)");
|
|
124
|
+
std::regex_search(LHS, matches, LHSRegEx);
|
|
122
125
|
LHS = matches.str(1);
|
|
123
|
-
delimiter = " ";
|
|
124
126
|
while ((pos = LHS.find(delimiter)) != std::string::npos)
|
|
125
127
|
{
|
|
126
128
|
word = LHS.substr(0, pos);
|
|
127
129
|
LHS.erase(0, pos + delimiter.length()); //Capital is Nonterminal, Otherwise is terminal
|
|
128
|
-
|
|
129
|
-
{
|
|
130
|
-
prod.push_back(grammar->insertNonTerminalKind(word));
|
|
131
|
-
}
|
|
132
|
-
else
|
|
133
|
-
{
|
|
134
|
-
prod.push_back(grammar->insertTerminalKind(word));
|
|
135
|
-
}
|
|
130
|
+
prod.push_back(grammar->insertSymbol(word));
|
|
136
131
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
prod.push_back(grammar->insertNonTerminalKind(LHS));
|
|
140
|
-
}
|
|
141
|
-
else
|
|
142
|
-
{
|
|
143
|
-
prod.push_back(grammar->insertTerminalKind(LHS));
|
|
144
|
-
}
|
|
145
|
-
grammar->getRawProductions().at(grammar->str2Kind(head)).insert(prod);
|
|
132
|
+
prod.push_back(grammar->insertSymbol(LHS));
|
|
133
|
+
grammar->getRawProductions().at(RHSSymbol).insert(prod);
|
|
146
134
|
prod = {};
|
|
147
135
|
}
|
|
148
136
|
}
|
|
@@ -150,10 +138,4 @@ GrammarBase* GrammarBuilder::build() const
|
|
|
150
138
|
return grammar;
|
|
151
139
|
};
|
|
152
140
|
|
|
153
|
-
GrammarBase* GrammarBuilder::build(Map<std::string, SVF::CFLGraph::Symbol> &preMap) const
|
|
154
|
-
{
|
|
155
|
-
grammar->setNonterminals(preMap);
|
|
156
|
-
grammar->setTotalKind(preMap.size());
|
|
157
|
-
return build();
|
|
158
|
-
};
|
|
159
141
|
}
|
package/lib/Graphs/CFLGraph.cpp
CHANGED
|
@@ -34,6 +34,10 @@
|
|
|
34
34
|
|
|
35
35
|
using namespace SVF;
|
|
36
36
|
|
|
37
|
+
CFLGraph::Kind CFLGraph::getStartKind() const
|
|
38
|
+
{
|
|
39
|
+
return this->startKind;
|
|
40
|
+
}
|
|
37
41
|
|
|
38
42
|
void CFLGraph::addCFLNode(NodeID id, CFLNode* node)
|
|
39
43
|
{
|
|
@@ -76,7 +80,7 @@ void CFLGraph::view()
|
|
|
76
80
|
namespace llvm
|
|
77
81
|
{
|
|
78
82
|
/*!
|
|
79
|
-
* Write
|
|
83
|
+
* Write CFL graph into dot file for debugging
|
|
80
84
|
*/
|
|
81
85
|
template<>
|
|
82
86
|
struct DOTGraphTraits<CFLGraph*> : public DefaultDOTGraphTraits
|
|
@@ -114,6 +118,42 @@ struct DOTGraphTraits<CFLGraph*> : public DefaultDOTGraphTraits
|
|
|
114
118
|
assert(edge && "No edge found!!");
|
|
115
119
|
std::string str;
|
|
116
120
|
raw_string_ostream rawstr(str);
|
|
121
|
+
if (edge->getEdgeKind() == ConstraintEdge::Addr)
|
|
122
|
+
{
|
|
123
|
+
rawstr << "color=green";
|
|
124
|
+
}
|
|
125
|
+
else if (edge->getEdgeKind() == ConstraintEdge::Copy)
|
|
126
|
+
{
|
|
127
|
+
rawstr << "color=black";
|
|
128
|
+
}
|
|
129
|
+
else if (edge->getEdgeKindWithMask() == ConstraintEdge::NormalGep)
|
|
130
|
+
{
|
|
131
|
+
rawstr << "color=purple,label=" << '"' << "Gep_" << edge->getEdgeAttri() << '"';
|
|
132
|
+
}
|
|
133
|
+
else if (edge->getEdgeKindWithMask() == ConstraintEdge::VariantGep)
|
|
134
|
+
{
|
|
135
|
+
rawstr << "color=purple,label=" << '"' << "VGep" << '"';
|
|
136
|
+
}
|
|
137
|
+
else if (edge->getEdgeKind() == ConstraintEdge::Store)
|
|
138
|
+
{
|
|
139
|
+
rawstr << "color=blue";
|
|
140
|
+
}
|
|
141
|
+
else if (edge->getEdgeKind() == ConstraintEdge::Load)
|
|
142
|
+
{
|
|
143
|
+
rawstr << "color=red";
|
|
144
|
+
}
|
|
145
|
+
else if (edge->getEdgeKind() == graph->getStartKind())
|
|
146
|
+
{
|
|
147
|
+
rawstr << "color=Turquoise";
|
|
148
|
+
}
|
|
149
|
+
else if (edge->getEdgeKind() == 14)
|
|
150
|
+
{
|
|
151
|
+
rawstr << "color=Sienna";
|
|
152
|
+
}
|
|
153
|
+
else
|
|
154
|
+
{
|
|
155
|
+
rawstr << "style=invis";
|
|
156
|
+
}
|
|
117
157
|
return rawstr.str();
|
|
118
158
|
}
|
|
119
159
|
|
|
@@ -90,7 +90,7 @@ u32_t LocationSet::getElementNum(const Type* type) const
|
|
|
90
90
|
/// "value" is the offset variable (must be a constant)
|
|
91
91
|
/// "type" is the location where we want to compute offset
|
|
92
92
|
/// Given a vector: [(value1,type1), (value2,type2), (value3,type3)]
|
|
93
|
-
/// totalConstOffset = flattenOffset(value1,type1) * flattenOffset(
|
|
93
|
+
/// totalConstOffset = flattenOffset(value1,type1) * flattenOffset(value2,type2) + flattenOffset(value3,type3)
|
|
94
94
|
/// For a pointer type (e.g., t1 is PointerType), we will retrieve the pointee type and times the offset, i.e., getElementNum(t1) X off1
|
|
95
95
|
|
|
96
96
|
/// For example,
|
|
@@ -1207,9 +1207,9 @@ void SVFIRBuilder::handleExtCall(CallSite cs, const SVFFunction *callee)
|
|
|
1207
1207
|
// The external function exists in ExtAPI.json
|
|
1208
1208
|
if (item != nullptr)
|
|
1209
1209
|
{
|
|
1210
|
-
// Get the first operation of the function
|
|
1211
1210
|
cJSON *obj = item->child;
|
|
1212
|
-
|
|
1211
|
+
// Get the first operation of the function
|
|
1212
|
+
obj = obj -> next -> next;
|
|
1213
1213
|
while (obj)
|
|
1214
1214
|
{
|
|
1215
1215
|
std::string op = obj->string;
|
package/lib/Util/ExtAPI.cpp
CHANGED
|
@@ -138,7 +138,7 @@ ExtAPI::extType ExtAPI::get_type(const SVF::SVFFunction *F)
|
|
|
138
138
|
{
|
|
139
139
|
// Get the first operation of the function
|
|
140
140
|
cJSON *obj = item->child;
|
|
141
|
-
if (strcmp(obj->string,
|
|
141
|
+
if (strcmp(obj->string, JSON_OPT_FUNCTIONTYPE) == 0)
|
|
142
142
|
type = obj->valuestring;
|
|
143
143
|
else
|
|
144
144
|
assert(false && "The function operation format is illegal!");
|
|
@@ -150,6 +150,25 @@ ExtAPI::extType ExtAPI::get_type(const SVF::SVFFunction *F)
|
|
|
150
150
|
return it->second;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
// Get priority of he function, return value
|
|
154
|
+
// 0: Apply user-defined functions
|
|
155
|
+
// 1: Apply function specification in ExtAPI.json
|
|
156
|
+
u32_t ExtAPI::isOverwrittenAppFunction(const SVF::SVFFunction *callee)
|
|
157
|
+
{
|
|
158
|
+
std::string funName = get_name(callee);
|
|
159
|
+
cJSON *item = get_FunJson(funName);
|
|
160
|
+
if (item != nullptr)
|
|
161
|
+
{
|
|
162
|
+
cJSON *obj = item->child;
|
|
163
|
+
obj = obj->next;
|
|
164
|
+
if (strcmp(obj->string, JSON_OPT_OVERWRITE) == 0)
|
|
165
|
+
return obj->valueint;
|
|
166
|
+
else
|
|
167
|
+
assert(false && "The function operation format is illegal!");
|
|
168
|
+
}
|
|
169
|
+
return 0;
|
|
170
|
+
}
|
|
171
|
+
|
|
153
172
|
// Does (F) have a static var X (unavailable to us) that its return points to?
|
|
154
173
|
bool ExtAPI::has_static(const SVFFunction *F)
|
|
155
174
|
{
|
|
@@ -240,7 +259,20 @@ bool ExtAPI::is_ext(const SVFFunction *F)
|
|
|
240
259
|
else
|
|
241
260
|
{
|
|
242
261
|
ExtAPI::extType t = get_type(F);
|
|
243
|
-
|
|
262
|
+
if (t != EFT_NULL)
|
|
263
|
+
{
|
|
264
|
+
u32_t overwrittenAppFunction = isOverwrittenAppFunction(F);
|
|
265
|
+
// overwrittenAppFunction = 1: Execute function specification in ExtAPI.json
|
|
266
|
+
// F is considered as external function
|
|
267
|
+
if (overwrittenAppFunction == 1)
|
|
268
|
+
res = 1;
|
|
269
|
+
// overwrittenAppFunction = 0: Execute user-defined functions
|
|
270
|
+
// F is not considered as external function
|
|
271
|
+
else
|
|
272
|
+
res = 0;
|
|
273
|
+
}
|
|
274
|
+
else
|
|
275
|
+
res = 0;
|
|
244
276
|
}
|
|
245
277
|
return res;
|
|
246
278
|
}
|