svf-tools 1.0.478 → 1.0.481
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 +17 -17
- package/SVF-doxygen/html/html/SymbolTableBuilder_8h_source.html +15 -15
- 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 +54 -53
- 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/SVF-FE/SymbolTableBuilder.cpp +4 -0
- package/lib/Util/ExtAPI.cpp +34 -2
- package/lib/Util/ExtAPI.json +3268 -2585
- package/package.json +1 -1
- package/include/CFL/CFLGrammarDev.txt +0 -16
package/include/Util/ExtAPI.h
CHANGED
|
@@ -40,54 +40,66 @@
|
|
|
40
40
|
#include <map>
|
|
41
41
|
|
|
42
42
|
#define EXTAPI_JSON_PATH "/lib/Util/ExtAPI.json"
|
|
43
|
+
#define JSON_OPT_OVERWRITE "overwrite_app_function"
|
|
44
|
+
#define JSON_OPT_FUNCTIONTYPE "type"
|
|
43
45
|
|
|
44
46
|
namespace SVF
|
|
45
47
|
{
|
|
46
48
|
|
|
47
49
|
/*
|
|
48
50
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
51
|
+
** Specifications in ExtAPI.json
|
|
52
|
+
|
|
53
|
+
*** [1] Overview of the Specification Language
|
|
54
|
+
The specification language of external functions is based on the JSON format. And every function defined by the Specification Language is an object that represents the specification rules. These Specification Language objects for functions contain four parts:
|
|
55
|
+
1. the name of the function,
|
|
56
|
+
2. the switch that controls whether the specification rules defined in the ExtAPI.json overwrite the functions defined in the user code,
|
|
57
|
+
3. the type of the function,
|
|
58
|
+
4. the operations conducted by the function.
|
|
59
|
+
|
|
60
|
+
*** [2] Overwriting the user-defined functions
|
|
61
|
+
The switch *overwrite_app_function* controls whether the specification rules defined in the ExtAPI.json overwrite the functions defined in the user code (e.g., CPP files). When the switch *overwrite_app_function* is set to a value of 1, SVF will use the specification rules in ExtAPI.json to conduct the analysis and ignore the user-defined functions in the input CPP/bc files.
|
|
62
|
+
overwrite_app_function = 0: Analyze the user-defined functions.
|
|
63
|
+
overwrite_app_function = 1: Use specifications in ExtAPI.json to overwrite the user-defined functions.
|
|
64
|
+
|
|
65
|
+
*** [3] Function types
|
|
66
|
+
Function type represents the properties of the function.
|
|
67
|
+
For example,
|
|
68
|
+
"EFT_ALLOC" represents if this external function allocates a new object and assigns it to one of its arguments,
|
|
69
|
+
For the selection of function type and a more detailed explanation, please refer to the definition of enum *extf_t* in ExtAPI.h.
|
|
70
|
+
|
|
71
|
+
*** [4] Function operations
|
|
72
|
+
Function operations indicate the relationships between input and output,
|
|
73
|
+
mainly between function parameters or between parameters and return values after the execution.
|
|
74
|
+
For example,
|
|
75
|
+
"copy": ["A2", "L"] indicates that after this external function is executed, the value of the 2nd parameter is copied into the return value.
|
|
76
|
+
For the selection of function type and a more detailed explanation, please refer to the definition of enum *extType* in ExtAPI.h.
|
|
77
|
+
|
|
78
|
+
For operands of function operation, e.g., "A2", "L", there are the following options:
|
|
79
|
+
"A": represents a parameter;
|
|
80
|
+
"N": represents a number;
|
|
81
|
+
"R": represents a reference;
|
|
82
|
+
"L": represents a return value;
|
|
83
|
+
"V": represents a dummy node;
|
|
84
|
+
|
|
85
|
+
Among them, a parameter may have multiple forms because there may be various parameters, and the parameter may be a reference or complex structure,
|
|
86
|
+
|
|
87
|
+
Here we use regular expressions "(AN)(R|RN)^*" to represent parameters, for example,
|
|
88
|
+
"A0": represents the 1st parameter;
|
|
89
|
+
"A2R": represents that the 3rd parameter is a reference;
|
|
90
|
+
"A1R2": represents the 3rd substructure of the 2nd parameter "A1R", where "A1R" is a complex structure;
|
|
91
|
+
"A2R3R": represents the 4th substructure of the 3rd parameter "A2R" is a reference, where "A2R" is a complex structure;
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
** Specification format:
|
|
95
|
+
"functionName": {
|
|
96
|
+
"type": "functional type",
|
|
97
|
+
"overwrite_app_function:" 0/1,
|
|
98
|
+
"function operation_1": [ operand_1, operand_2, ... , operand_n],
|
|
99
|
+
"function operation_2": [ operand_1, operand_2, ... , operand_n],
|
|
100
|
+
...
|
|
101
|
+
"function operation_n": [ operand_1, operand_2, ... , operand_n]
|
|
102
|
+
}
|
|
91
103
|
*/
|
|
92
104
|
|
|
93
105
|
|
|
@@ -233,6 +245,11 @@ public:
|
|
|
233
245
|
// Get property of the operation, e.g. "EFT_A1R_A0R"
|
|
234
246
|
extType get_type(const SVF::SVFFunction *callee);
|
|
235
247
|
|
|
248
|
+
// Get priority of he function, return value
|
|
249
|
+
// 0: Apply user-defined functions
|
|
250
|
+
// 1: Apply function specification in ExtAPI.json
|
|
251
|
+
u32_t isOverwrittenAppFunction(const SVF::SVFFunction *callee);
|
|
252
|
+
|
|
236
253
|
// Does (F) have a static var X (unavailable to us) that its return points to?
|
|
237
254
|
bool has_static(const SVFFunction *F);
|
|
238
255
|
|
|
@@ -27,14 +27,15 @@
|
|
|
27
27
|
* Author: Pei Xu
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
+
#include "CFL/CFGNormalizer.h"
|
|
31
|
+
#include "Util/SVFUtil.h"
|
|
32
|
+
#include "Util/WorkList.h"
|
|
33
|
+
#include "Util/BasicTypes.h"
|
|
30
34
|
#include <string>
|
|
31
35
|
#include <regex>
|
|
32
36
|
#include <fstream>
|
|
33
37
|
#include <sstream>
|
|
34
38
|
#include <iostream>
|
|
35
|
-
#include "Util/BasicTypes.h"
|
|
36
|
-
#include "CFL/CFGNormalizer.h"
|
|
37
|
-
#include "Util/SVFUtil.h"
|
|
38
39
|
|
|
39
40
|
using namespace SVF;
|
|
40
41
|
|
|
@@ -48,21 +49,9 @@ CFLGrammar* CFGNormalizer::normalize(GrammarBase *generalGrammar)
|
|
|
48
49
|
grammar->setAttributeKinds(generalGrammar->getAttrSyms());
|
|
49
50
|
grammar->setKind2AttrsMap(generalGrammar->getKind2AttrsMap());
|
|
50
51
|
grammar->setRawProductions(generalGrammar->getRawProductions());
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
ebnfSignReplace('*', grammar);
|
|
53
|
+
ebnfSignReplace('?', grammar);
|
|
53
54
|
ebnf_bin(grammar);
|
|
54
|
-
|
|
55
|
-
for(auto symProdsPair: grammar->getRawProductions())
|
|
56
|
-
{
|
|
57
|
-
for(auto prod: symProdsPair.second)
|
|
58
|
-
{
|
|
59
|
-
/// rawProductions production does not include lhs
|
|
60
|
-
/// so append to the begin of the production
|
|
61
|
-
GrammarBase::Production tempP = prod;
|
|
62
|
-
tempP.insert(tempP.begin(), symProdsPair.first);
|
|
63
|
-
insertToCFLGrammar(grammar, tempP);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
55
|
fillAttribute(grammar, grammar->getKind2AttrsMap());
|
|
67
56
|
return grammar;
|
|
68
57
|
}
|
|
@@ -91,7 +80,7 @@ CFLGrammar* CFGNormalizer::fillAttribute(CFLGrammar *grammar, const Map<CFLGramm
|
|
|
91
80
|
|
|
92
81
|
void CFGNormalizer::ebnf_bin(CFLGrammar *grammar)
|
|
93
82
|
{
|
|
94
|
-
|
|
83
|
+
GrammarBase::SymbolMap<GrammarBase::Symbol, GrammarBase::Productions> new_grammar = {};
|
|
95
84
|
std::string tempStr = "";
|
|
96
85
|
|
|
97
86
|
for(auto head : grammar->getRawProductions())
|
|
@@ -107,7 +96,9 @@ void CFGNormalizer::ebnf_bin(CFLGrammar *grammar)
|
|
|
107
96
|
}
|
|
108
97
|
}
|
|
109
98
|
|
|
110
|
-
|
|
99
|
+
auto &rawProductions = grammar->getRawProductions();
|
|
100
|
+
|
|
101
|
+
for(auto head : rawProductions)
|
|
111
102
|
{
|
|
112
103
|
for(auto rule: head.second)
|
|
113
104
|
{
|
|
@@ -122,11 +113,11 @@ void CFGNormalizer::ebnf_bin(CFLGrammar *grammar)
|
|
|
122
113
|
grammar->getRawProductions()[head.first].insert(rule);
|
|
123
114
|
|
|
124
115
|
GrammarBase::Symbol X = check_head(new_grammar, long_run);
|
|
125
|
-
if (
|
|
116
|
+
if (X == -1)
|
|
126
117
|
{
|
|
127
118
|
X = check_head(grammar->getRawProductions(), long_run);
|
|
128
119
|
}
|
|
129
|
-
if (
|
|
120
|
+
if ((X == -1) == false)
|
|
130
121
|
{
|
|
131
122
|
it = grammar->getRawProductions()[head.first].find(rule);
|
|
132
123
|
grammar->getRawProductions()[head.first].erase(it);
|
|
@@ -139,15 +130,25 @@ void CFGNormalizer::ebnf_bin(CFLGrammar *grammar)
|
|
|
139
130
|
std::ostringstream ss;
|
|
140
131
|
ss << grammar->num_generator();
|
|
141
132
|
tempStr.append(ss.str());
|
|
142
|
-
|
|
133
|
+
/// Assign _attribute
|
|
134
|
+
/// if target portion of the production contain more than 1 variable then
|
|
135
|
+
/// X add no variable attribute
|
|
136
|
+
/// if target only contain one variable attribute X share the same variable attribute
|
|
137
|
+
Set<GrammarBase::VariableAttribute> variableAttributeSet = {};
|
|
138
|
+
for (unsigned i = 0; i < long_run.size(); i++)
|
|
143
139
|
{
|
|
144
|
-
|
|
140
|
+
GrammarBase::VariableAttribute variableAttribute = long_run[i].variableAttribute;
|
|
141
|
+
if ( variableAttribute != 0)
|
|
145
142
|
{
|
|
146
|
-
|
|
147
|
-
break;
|
|
143
|
+
variableAttributeSet.insert(variableAttribute);
|
|
148
144
|
}
|
|
149
145
|
}
|
|
150
|
-
|
|
146
|
+
if ( variableAttributeSet.size() == 1)
|
|
147
|
+
{
|
|
148
|
+
tempStr += "_";
|
|
149
|
+
tempStr += char(*variableAttributeSet.begin());
|
|
150
|
+
}
|
|
151
|
+
GrammarBase::Symbol tempSym = grammar->insertNonTerminalSymbol(tempStr);
|
|
151
152
|
it = grammar->getRawProductions()[head.first].find(rule);
|
|
152
153
|
grammar->getRawProductions()[head.first].erase(it);
|
|
153
154
|
rule.push_back(tempSym);
|
|
@@ -177,17 +178,31 @@ void CFGNormalizer::ebnf_bin(CFLGrammar *grammar)
|
|
|
177
178
|
temp_p = long_run;
|
|
178
179
|
|
|
179
180
|
RHX = check_head(new_grammar, long_run);
|
|
180
|
-
if (
|
|
181
|
+
if (RHX == -1)
|
|
181
182
|
{
|
|
182
183
|
RHX = check_head(grammar->getRawProductions(), long_run);
|
|
183
184
|
}
|
|
184
|
-
if(
|
|
185
|
+
if(RHX == -1)
|
|
185
186
|
{
|
|
186
187
|
tempStr = "X";
|
|
187
188
|
std::ostringstream ss;
|
|
188
189
|
ss << grammar->num_generator();
|
|
189
190
|
tempStr.append(ss.str());
|
|
190
|
-
GrammarBase::
|
|
191
|
+
Set<GrammarBase::VariableAttribute> variableAttributeSet = {};
|
|
192
|
+
for (unsigned i = 0; i < long_run.size(); i++)
|
|
193
|
+
{
|
|
194
|
+
GrammarBase::VariableAttribute variableAttribute = long_run[i].variableAttribute;
|
|
195
|
+
if ( variableAttribute != 0)
|
|
196
|
+
{
|
|
197
|
+
variableAttributeSet.insert(variableAttribute);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if ( variableAttributeSet.size() == 1)
|
|
201
|
+
{
|
|
202
|
+
tempStr += "_";
|
|
203
|
+
tempStr += char(*variableAttributeSet.begin());
|
|
204
|
+
}
|
|
205
|
+
GrammarBase::Symbol tempSym = grammar->insertNonTerminalSymbol(tempStr);
|
|
191
206
|
auto it = new_grammar[X].find(prev_rule);
|
|
192
207
|
new_grammar[X].erase(it);
|
|
193
208
|
new_grammar[X].insert({first, tempSym});
|
|
@@ -218,9 +233,9 @@ GrammarBase::Production CFGNormalizer::getFilledProd(GrammarBase::Production &pr
|
|
|
218
233
|
GrammarBase::Production tempP = prod;
|
|
219
234
|
for (int i = 0; i < int(prod.size()); i++)
|
|
220
235
|
{
|
|
221
|
-
if (grammar->getAttrSyms().find(prod[i]) != grammar->getAttrSyms().end())
|
|
236
|
+
if (grammar->getAttrSyms().find(prod[i].kind) != grammar->getAttrSyms().end())
|
|
222
237
|
{
|
|
223
|
-
tempP[i] =
|
|
238
|
+
tempP[i] = prod[i].kind;
|
|
224
239
|
}
|
|
225
240
|
}
|
|
226
241
|
return tempP;
|
|
@@ -233,31 +248,67 @@ GrammarBase::Production CFGNormalizer::getFilledProd(GrammarBase::Production &pr
|
|
|
233
248
|
GrammarBase::Productions CFGNormalizer::getFilledProductions(GrammarBase::Production &prod, const Map<CFLGrammar::Kind, Set<CFLGrammar::Attribute>>& kind2AttriMap, CFLGrammar *grammar)
|
|
234
249
|
{
|
|
235
250
|
GrammarBase::Productions filledProductioins{};
|
|
236
|
-
|
|
237
|
-
|
|
251
|
+
CFLFIFOWorkList<GrammarBase::Production> worklist;
|
|
252
|
+
worklist.push(prod);
|
|
253
|
+
while( worklist.empty() == false )
|
|
238
254
|
{
|
|
239
|
-
|
|
255
|
+
GrammarBase::Production currentProduction = worklist.pop();
|
|
256
|
+
/// Get the first encounter variable attribute to expand
|
|
257
|
+
GrammarBase::VariableAttribute currentVariableAttribute = 0;
|
|
258
|
+
// GrammarBase::Kind baseKind;
|
|
259
|
+
for ( GrammarBase::Symbol &symbol : currentProduction )
|
|
260
|
+
{
|
|
261
|
+
if ( currentVariableAttribute == 0 )
|
|
262
|
+
{
|
|
263
|
+
currentVariableAttribute = symbol.variableAttribute;
|
|
264
|
+
// baseKind = symbol.kind;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
if ( currentVariableAttribute == 0)
|
|
268
|
+
{
|
|
269
|
+
filledProductioins.insert(currentProduction);
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
auto nodeSet = {0, 1, 2, 7}; //*(kind2AttriMap.find(baseKind));
|
|
273
|
+
//for (auto attribute : nodeSet.second)
|
|
274
|
+
for (auto attribute : nodeSet)
|
|
240
275
|
{
|
|
241
|
-
|
|
242
|
-
for (
|
|
276
|
+
GrammarBase::Production fillingProduction = currentProduction;
|
|
277
|
+
for ( GrammarBase::Symbol &symbol : fillingProduction )
|
|
278
|
+
{
|
|
279
|
+
if ( symbol.variableAttribute == currentVariableAttribute)
|
|
280
|
+
{
|
|
281
|
+
symbol.attribute = attribute;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
/// Check whether all symbol expanded
|
|
285
|
+
bool continueToFill = false;
|
|
286
|
+
for ( GrammarBase::Symbol &symbol : fillingProduction )
|
|
243
287
|
{
|
|
244
|
-
|
|
245
|
-
if (filledProductioins.find(filledProd) == filledProductioins.end())
|
|
288
|
+
if ( symbol.variableAttribute != 0 )
|
|
246
289
|
{
|
|
247
|
-
|
|
290
|
+
continueToFill = true;
|
|
248
291
|
}
|
|
249
292
|
}
|
|
293
|
+
if ( continueToFill == false)
|
|
294
|
+
{
|
|
295
|
+
filledProductioins.insert(fillingProduction);
|
|
296
|
+
}
|
|
297
|
+
else
|
|
298
|
+
{
|
|
299
|
+
worklist.push(fillingProduction);
|
|
300
|
+
}
|
|
250
301
|
}
|
|
251
302
|
}
|
|
252
303
|
return filledProductioins;
|
|
253
304
|
}
|
|
254
305
|
|
|
255
|
-
int CFGNormalizer::
|
|
306
|
+
int CFGNormalizer::ebnfBracketMatch(GrammarBase::Production &prod, int i, CFLGrammar *grammar)
|
|
256
307
|
{
|
|
257
308
|
int index = i;
|
|
258
309
|
while (index >= 0)
|
|
259
310
|
{
|
|
260
|
-
if (grammar->kind2Str(prod[index]) == "(")
|
|
311
|
+
if (grammar->kind2Str(prod[index].kind) == "(")
|
|
261
312
|
{
|
|
262
313
|
return index;
|
|
263
314
|
}
|
|
@@ -266,78 +317,78 @@ int CFGNormalizer::ebnf_bracket_match(GrammarBase::Production &prod, int i, CFLG
|
|
|
266
317
|
return 0;
|
|
267
318
|
}
|
|
268
319
|
|
|
269
|
-
void CFGNormalizer::
|
|
320
|
+
void CFGNormalizer::ebnfSignReplace(char sign, CFLGrammar *grammar)
|
|
270
321
|
{
|
|
271
|
-
|
|
272
|
-
|
|
322
|
+
/// Replace Sign Group With tempNonterminal 'X'
|
|
323
|
+
/// And load the replace in newProductions
|
|
324
|
+
SVF::Map<std::string, std::string> newProductions;
|
|
325
|
+
std::string tempNonterminal = "X";
|
|
273
326
|
|
|
274
|
-
|
|
275
|
-
/// and load the replace in new_rule_checker
|
|
276
|
-
for (auto &ebnfPair : grammar->getRawProductions())
|
|
327
|
+
for (auto &symbolToProductionsPair : grammar->getRawProductions())
|
|
277
328
|
{
|
|
278
|
-
GrammarBase::Productions
|
|
279
|
-
for (auto
|
|
329
|
+
GrammarBase::Productions productions = symbolToProductionsPair.second;
|
|
330
|
+
for (auto ebnfProduction : symbolToProductionsPair.second)
|
|
280
331
|
{
|
|
281
332
|
size_t i = 1;
|
|
282
|
-
while (i <
|
|
333
|
+
while (i < ebnfProduction.size())
|
|
283
334
|
{
|
|
284
|
-
|
|
285
|
-
if (grammar->kind2Str(
|
|
335
|
+
s32_t signGroupStart = -1;
|
|
336
|
+
if (grammar->kind2Str(ebnfProduction[i].kind) == std::string(1, sign))
|
|
286
337
|
{
|
|
287
|
-
assert(i != 1 && "sign in grammar associate with no symble");
|
|
288
338
|
/// If sign assoicate wihout group e.i with single symble
|
|
289
|
-
|
|
339
|
+
assert(i != 1 && "sign in grammar associate with no symbol");
|
|
340
|
+
if (grammar->kind2Str(ebnfProduction[i - 1].kind) != std::string(1, ')'))
|
|
290
341
|
{
|
|
291
|
-
|
|
342
|
+
signGroupStart = i - 1;
|
|
292
343
|
}
|
|
293
344
|
/// sign associate with group of symble by brace pair
|
|
294
345
|
else
|
|
295
346
|
{
|
|
296
|
-
|
|
347
|
+
signGroupStart = ebnfBracketMatch(ebnfProduction, i, grammar);
|
|
297
348
|
}
|
|
298
|
-
std::string
|
|
299
|
-
for (size_t j =
|
|
349
|
+
std::string groupString = "";
|
|
350
|
+
for (size_t j = signGroupStart; j < i; j++)
|
|
300
351
|
{
|
|
301
|
-
|
|
302
|
-
|
|
352
|
+
groupString.append(grammar->kind2Str(ebnfProduction[j].kind));
|
|
353
|
+
groupString.append(" ");
|
|
303
354
|
}
|
|
304
|
-
|
|
305
|
-
if (
|
|
355
|
+
groupString.append(grammar->kind2Str(ebnfProduction[i].kind));
|
|
356
|
+
if (newProductions.find(groupString) != newProductions.end())
|
|
306
357
|
{
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
358
|
+
productions.erase(ebnfProduction);
|
|
359
|
+
ebnfProduction.erase(ebnfProduction.begin() + signGroupStart, ebnfProduction.begin() + i + 1);
|
|
360
|
+
ebnfProduction.insert(ebnfProduction.begin() + signGroupStart, grammar->str2Symbol(newProductions[groupString]));
|
|
361
|
+
productions.insert(ebnfProduction);
|
|
311
362
|
}
|
|
312
363
|
else
|
|
313
364
|
{
|
|
314
|
-
|
|
365
|
+
tempNonterminal = "X";
|
|
315
366
|
std::ostringstream ss;
|
|
316
367
|
ss << grammar->num_generator();
|
|
317
|
-
|
|
318
|
-
GrammarBase::Symbol tempSym = grammar->
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
368
|
+
tempNonterminal.append(ss.str());
|
|
369
|
+
GrammarBase::Symbol tempSym = grammar->insertNonTerminalSymbol(tempNonterminal);
|
|
370
|
+
productions.erase(ebnfProduction);
|
|
371
|
+
ebnfProduction.erase(ebnfProduction.begin() + signGroupStart, ebnfProduction.begin() + i + 1);
|
|
372
|
+
ebnfProduction.insert(ebnfProduction.begin() + signGroupStart, tempSym);
|
|
373
|
+
newProductions[groupString] = tempNonterminal;
|
|
374
|
+
productions.insert(ebnfProduction);
|
|
324
375
|
}
|
|
325
376
|
|
|
326
|
-
i =
|
|
377
|
+
i = signGroupStart;
|
|
327
378
|
}
|
|
328
379
|
i++;
|
|
329
380
|
}
|
|
330
381
|
}
|
|
331
|
-
|
|
382
|
+
symbolToProductionsPair.second = productions;
|
|
332
383
|
}
|
|
333
|
-
for(auto rep:
|
|
384
|
+
for(auto rep: newProductions)
|
|
334
385
|
{
|
|
335
386
|
/// For Both * and ? need to insert epsilon rule
|
|
336
387
|
std::string new_nonterminal = rep.second;
|
|
337
|
-
GrammarBase::Production temp_list = {grammar->
|
|
338
|
-
grammar->getRawProductions()[grammar->
|
|
388
|
+
GrammarBase::Production temp_list = {grammar->str2Symbol(new_nonterminal), grammar->str2Symbol("epsilon")};
|
|
389
|
+
grammar->getRawProductions()[grammar->str2Symbol(new_nonterminal)].insert(temp_list);
|
|
339
390
|
/// insert second rule for '*' X -> X E for '+' X -> X
|
|
340
|
-
temp_list = {grammar->
|
|
391
|
+
temp_list = {grammar->str2Symbol(new_nonterminal)};
|
|
341
392
|
if (sign == '*')
|
|
342
393
|
{
|
|
343
394
|
/// Insert Back the Group
|
|
@@ -345,14 +396,14 @@ void CFGNormalizer::ebnf_sign_replace(char sign, CFLGrammar *grammar)
|
|
|
345
396
|
GrammarBase::Production withoutSign = {};
|
|
346
397
|
for (auto &word : E)
|
|
347
398
|
{
|
|
348
|
-
if (word != grammar->
|
|
399
|
+
if (word != grammar->str2Symbol("*") && word != grammar->str2Symbol("(") && word != grammar->str2Symbol(")"))
|
|
349
400
|
{
|
|
350
401
|
withoutSign.push_back(word);
|
|
351
402
|
}
|
|
352
403
|
}
|
|
353
404
|
temp_list.insert(temp_list.end(), withoutSign.begin(), withoutSign.end());
|
|
354
405
|
}
|
|
355
|
-
grammar->getRawProductions()[grammar->
|
|
406
|
+
grammar->getRawProductions()[grammar->str2Symbol(new_nonterminal)].insert(temp_list);
|
|
356
407
|
}
|
|
357
408
|
|
|
358
409
|
}
|
|
@@ -372,13 +423,13 @@ GrammarBase::Production CFGNormalizer::strTrans(std::string LHS, CFLGrammar *gra
|
|
|
372
423
|
{
|
|
373
424
|
word = LHS.substr(0, pos);
|
|
374
425
|
LHS.erase(0, pos + delimiter.length());
|
|
375
|
-
prod.push_back(grammar->
|
|
426
|
+
prod.push_back(grammar->str2Symbol(word));
|
|
376
427
|
}
|
|
377
|
-
prod.push_back(grammar->
|
|
428
|
+
prod.push_back(grammar->str2Symbol(LHS));
|
|
378
429
|
return prod;
|
|
379
430
|
}
|
|
380
431
|
|
|
381
|
-
|
|
432
|
+
GrammarBase::Symbol CFGNormalizer::check_head(GrammarBase::SymbolMap<GrammarBase::Symbol, GrammarBase::Productions> &grammar, GrammarBase::Production &rule)
|
|
382
433
|
{
|
|
383
434
|
for(auto symProdPair: grammar)
|
|
384
435
|
{
|
|
@@ -390,7 +441,8 @@ int CFGNormalizer::check_head(Map<GrammarBase::Symbol, GrammarBase::Productions>
|
|
|
390
441
|
}
|
|
391
442
|
}
|
|
392
443
|
}
|
|
393
|
-
|
|
444
|
+
GrammarBase::Symbol symbol = u32_t(-1);
|
|
445
|
+
return symbol;
|
|
394
446
|
}
|
|
395
447
|
|
|
396
448
|
/// Based on prod size to add on suitable member field of grammar
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
//===----- CFLAlias.cpp -- CFL Alias Analysis Client--------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-> <Yulei Sui>
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// This program is free software: you can redistribute it and/or modify
|
|
9
|
+
// it under the terms of the GNU General Public License as published by
|
|
10
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
// (at your option) any later version.
|
|
12
|
+
|
|
13
|
+
// This program is distributed in the hope that it will be useful,
|
|
14
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
// GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
// You should have received a copy of the GNU General Public License
|
|
19
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
//
|
|
21
|
+
//===----------------------------------------------------------------------===//
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* CFLAlias.cpp
|
|
25
|
+
*
|
|
26
|
+
* Created on: June 27 , 2022
|
|
27
|
+
* Author: Pei Xu
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#include "CFL/CFLAlias.h"
|
|
31
|
+
|
|
32
|
+
using namespace SVF;
|
|
33
|
+
|
|
34
|
+
void CFLAlias::analyze()
|
|
35
|
+
{
|
|
36
|
+
GrammarBuilder grammarBuilder = GrammarBuilder(Options::GrammarFilename);
|
|
37
|
+
CFGNormalizer normalizer = CFGNormalizer();
|
|
38
|
+
AliasCFLGraphBuilder cflGraphBuilder = AliasCFLGraphBuilder();
|
|
39
|
+
CFLGramGraphChecker cflChecker = CFLGramGraphChecker();
|
|
40
|
+
if (Options::GraphIsFromDot == false)
|
|
41
|
+
{
|
|
42
|
+
PointerAnalysis::initialize();
|
|
43
|
+
GrammarBase *grammarBase = grammarBuilder.build();
|
|
44
|
+
ConstraintGraph *consCG = new ConstraintGraph(svfir);
|
|
45
|
+
graph = cflGraphBuilder.buildBigraph(consCG, grammarBase->getStartKind(), grammarBase);
|
|
46
|
+
cflChecker.check(grammarBase, &cflGraphBuilder, graph);
|
|
47
|
+
grammar = normalizer.normalize(grammarBase);
|
|
48
|
+
cflChecker.check(grammar, &cflGraphBuilder, graph);
|
|
49
|
+
std::string svfirName = Options::InputFilename.c_str();
|
|
50
|
+
svfir->dump(svfirName.append("_IR"));
|
|
51
|
+
std::string grammarName = Options::InputFilename.c_str();
|
|
52
|
+
grammar->dump(grammarName.append("_Grammar"));
|
|
53
|
+
delete consCG;
|
|
54
|
+
delete grammarBase;
|
|
55
|
+
}
|
|
56
|
+
else
|
|
57
|
+
{
|
|
58
|
+
GrammarBase *grammarBase = grammarBuilder.build();
|
|
59
|
+
graph = cflGraphBuilder.buildFromDot(Options::InputFilename, grammarBase);
|
|
60
|
+
cflChecker.check(grammarBase, &cflGraphBuilder, graph);
|
|
61
|
+
grammar = normalizer.normalize(grammarBase);
|
|
62
|
+
cflChecker.check(grammar, &cflGraphBuilder, graph);
|
|
63
|
+
delete grammarBase;
|
|
64
|
+
}
|
|
65
|
+
solver = new CFLSolver(graph, grammar);
|
|
66
|
+
solver->solve();
|
|
67
|
+
std::string CFLGraphFileName = Options::InputFilename.c_str();
|
|
68
|
+
graph->dump(CFLGraphFileName.append("_CFL"));
|
|
69
|
+
if (Options::GraphIsFromDot == false)
|
|
70
|
+
{
|
|
71
|
+
PointerAnalysis::finalize();
|
|
72
|
+
}
|
|
73
|
+
}
|