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.
Files changed (322) hide show
  1. package/SVF-doxygen/html/html/Andersen_8cpp_source.html +1 -1
  2. package/SVF-doxygen/html/html/Andersen_8h_source.html +1 -1
  3. package/SVF-doxygen/html/html/BreakConstantExpr_8cpp_source.html +1 -1
  4. package/SVF-doxygen/html/html/CFGNormalizer_8cpp.html +5 -4
  5. package/SVF-doxygen/html/html/CFGNormalizer_8cpp_source.html +50 -40
  6. package/SVF-doxygen/html/html/CFGNormalizer_8h_source.html +20 -18
  7. package/SVF-doxygen/html/html/CFLAlias_8cpp.html +80 -0
  8. package/SVF-doxygen/html/html/CFLAlias_8cpp_source.html +107 -0
  9. package/SVF-doxygen/html/html/CFLAlias_8h_source.html +14 -35
  10. package/SVF-doxygen/html/html/CFLGramGraphChecker_8h_source.html +10 -10
  11. package/SVF-doxygen/html/html/CFLGrammar_8cpp.html +1 -0
  12. package/SVF-doxygen/html/html/CFLGrammar_8cpp_source.html +34 -23
  13. package/SVF-doxygen/html/html/CFLGrammar_8h.html +9 -1
  14. package/SVF-doxygen/html/html/CFLGrammar_8h_source.html +106 -62
  15. package/SVF-doxygen/html/html/CFLGrammar_8txt.html +58 -151
  16. package/SVF-doxygen/html/html/CFLGraphBuilder_8cpp_source.html +24 -11
  17. package/SVF-doxygen/html/html/CFLGraphBuilder_8h.html +2 -0
  18. package/SVF-doxygen/html/html/CFLGraphBuilder_8h_source.html +18 -19
  19. package/SVF-doxygen/html/html/CFLGraph_8cpp_source.html +27 -16
  20. package/SVF-doxygen/html/html/CFLGraph_8h_source.html +20 -16
  21. package/SVF-doxygen/html/html/CFLSolver_8cpp_source.html +14 -14
  22. package/SVF-doxygen/html/html/CFLSolver_8h_source.html +5 -5
  23. package/SVF-doxygen/html/html/CHGBuilder_8cpp_source.html +1 -1
  24. package/SVF-doxygen/html/html/CHGBuilder_8h_source.html +1 -1
  25. package/SVF-doxygen/html/html/CHG_8cpp_source.html +1 -1
  26. package/SVF-doxygen/html/html/CHG_8h_source.html +1 -1
  27. package/SVF-doxygen/html/html/CPPUtil_8cpp_source.html +1 -1
  28. package/SVF-doxygen/html/html/CPPUtil_8h.html +4 -4
  29. package/SVF-doxygen/html/html/CallGraphBuilder_8cpp_source.html +1 -1
  30. package/SVF-doxygen/html/html/CallGraphBuilder_8h_source.html +1 -1
  31. package/SVF-doxygen/html/html/ConsGEdge_8h_source.html +7 -7
  32. package/SVF-doxygen/html/html/ConsGNode_8h_source.html +5 -5
  33. package/SVF-doxygen/html/html/ConsG_8cpp_source.html +4 -4
  34. package/SVF-doxygen/html/html/ConsG_8h_source.html +2 -2
  35. package/SVF-doxygen/html/html/DCHG_8h_source.html +1 -1
  36. package/SVF-doxygen/html/html/DataFlowUtil_8cpp_source.html +1 -1
  37. package/SVF-doxygen/html/html/ExtAPI_8cpp_source.html +36 -32
  38. package/SVF-doxygen/html/html/ExtAPI_8h.html +36 -0
  39. package/SVF-doxygen/html/html/ExtAPI_8h_source.html +66 -64
  40. package/SVF-doxygen/html/html/GEPTypeBridgeIterator_8h_source.html +1 -1
  41. package/SVF-doxygen/html/html/GenericGraph_8h_source.html +1 -1
  42. package/SVF-doxygen/html/html/GrammarBuilder_8cpp_source.html +14 -17
  43. package/SVF-doxygen/html/html/GrammarBuilder_8h.html +0 -1
  44. package/SVF-doxygen/html/html/GrammarBuilder_8h_source.html +9 -11
  45. package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +5 -3
  46. package/SVF-doxygen/html/html/GraphPrinter_8h_source.html +2 -2
  47. package/SVF-doxygen/html/html/ICFG_8cpp_source.html +1 -1
  48. package/SVF-doxygen/html/html/ICFG_8h_source.html +1 -1
  49. package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +1 -1
  50. package/SVF-doxygen/html/html/IRGraph_8h_source.html +1 -1
  51. package/SVF-doxygen/html/html/LLVMModule_8cpp_source.html +1 -1
  52. package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +1 -1
  53. package/SVF-doxygen/html/html/LockResultValidator_8cpp_source.html +1 -1
  54. package/SVF-doxygen/html/html/MHP_8cpp_source.html +1 -1
  55. package/SVF-doxygen/html/html/MTAAnnotator_8cpp_source.html +1 -1
  56. package/SVF-doxygen/html/html/MTAAnnotator_8h_source.html +1 -1
  57. package/SVF-doxygen/html/html/MTAResultValidator_8cpp_source.html +1 -1
  58. package/SVF-doxygen/html/html/MTAResultValidator_8h_source.html +1 -1
  59. package/SVF-doxygen/html/html/MTAStat_8cpp_source.html +1 -1
  60. package/SVF-doxygen/html/html/MTA_8cpp_source.html +1 -1
  61. package/SVF-doxygen/html/html/MTA_8h_source.html +1 -1
  62. package/SVF-doxygen/html/html/OfflineConsG_8cpp_source.html +1 -1
  63. package/SVF-doxygen/html/html/OfflineConsG_8h_source.html +1 -1
  64. package/SVF-doxygen/html/html/PCG_8cpp_source.html +1 -1
  65. package/SVF-doxygen/html/html/PTACallGraph_8cpp_source.html +1 -1
  66. package/SVF-doxygen/html/html/PTACallGraph_8h_source.html +1 -1
  67. package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +1 -1
  68. package/SVF-doxygen/html/html/SVFBasicTypes_8h_source.html +1 -1
  69. package/SVF-doxygen/html/html/SVFGReadWrite_8cpp_source.html +1 -1
  70. package/SVF-doxygen/html/html/SVFG_8cpp_source.html +1 -1
  71. package/SVF-doxygen/html/html/SVFG_8h_source.html +1 -1
  72. package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +3 -3
  73. package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +1 -1
  74. package/SVF-doxygen/html/html/SVFUtil_8cpp_source.html +1 -1
  75. package/SVF-doxygen/html/html/SVFUtil_8h.html +1 -1
  76. package/SVF-doxygen/html/html/SVFUtil_8h_source.html +8 -8
  77. package/SVF-doxygen/html/html/SaberCheckerAPI_8h_source.html +1 -1
  78. package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +17 -17
  79. package/SVF-doxygen/html/html/SymbolTableBuilder_8h_source.html +15 -15
  80. package/SVF-doxygen/html/html/TCT_8cpp_source.html +1 -1
  81. package/SVF-doxygen/html/html/TCT_8h_source.html +1 -1
  82. package/SVF-doxygen/html/html/ThreadAPI_8h_source.html +1 -1
  83. package/SVF-doxygen/html/html/Util_2BasicTypes_8h.html +1 -1
  84. package/SVF-doxygen/html/html/VFG_8cpp_source.html +1 -1
  85. package/SVF-doxygen/html/html/VFG_8h_source.html +1 -1
  86. package/SVF-doxygen/html/html/annotated.html +298 -293
  87. package/SVF-doxygen/html/html/cfl_8cpp.html +2 -2
  88. package/SVF-doxygen/html/html/cfl_8cpp_source.html +3 -3
  89. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder-members.html +96 -0
  90. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.html +197 -0
  91. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.png +0 -0
  92. package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +1 -1
  93. package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD.html +1 -1
  94. package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD.html +1 -1
  95. package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD.html +1 -1
  96. package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +1 -1
  97. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +1 -1
  98. package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +1 -1
  99. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +1 -1
  100. package/SVF-doxygen/html/html/classSVF_1_1BreakConstantGEPs.html +1 -1
  101. package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer-members.html +3 -3
  102. package/SVF-doxygen/html/html/classSVF_1_1CFGNormalizer.html +108 -99
  103. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias-members.html +1 -1
  104. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +52 -39
  105. package/SVF-doxygen/html/html/classSVF_1_1CFLEdge-members.html +3 -1
  106. package/SVF-doxygen/html/html/classSVF_1_1CFLEdge.html +62 -0
  107. package/SVF-doxygen/html/html/classSVF_1_1CFLFIFOWorkList-members.html +91 -0
  108. package/SVF-doxygen/html/html/classSVF_1_1CFLFIFOWorkList.html +459 -0
  109. package/SVF-doxygen/html/html/classSVF_1_1CFLGrammar-members.html +47 -38
  110. package/SVF-doxygen/html/html/classSVF_1_1CFLGrammar.html +180 -137
  111. package/SVF-doxygen/html/html/classSVF_1_1CFLGraph-members.html +21 -20
  112. package/SVF-doxygen/html/html/classSVF_1_1CFLGraph.html +44 -22
  113. package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder-members.html +8 -8
  114. package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder.html +53 -43
  115. package/SVF-doxygen/html/html/classSVF_1_1CFLGraphBuilder.png +0 -0
  116. package/SVF-doxygen/html/html/classSVF_1_1CFLNode.html +3 -3
  117. package/SVF-doxygen/html/html/classSVF_1_1CFLSolver.html +14 -14
  118. package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +3 -3
  119. package/SVF-doxygen/html/html/classSVF_1_1CallGraphBuilder.html +1 -1
  120. package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +4 -4
  121. package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode-members.html +26 -26
  122. package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode.html +43 -43
  123. package/SVF-doxygen/html/html/classSVF_1_1ExtAPI-members.html +5 -4
  124. package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +158 -125
  125. package/SVF-doxygen/html/html/classSVF_1_1GenericNode.html +20 -21
  126. package/SVF-doxygen/html/html/classSVF_1_1GenericNode.png +0 -0
  127. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase-members.html +29 -21
  128. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase.html +397 -179
  129. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase_1_1SymbolHash-members.html +81 -0
  130. package/SVF-doxygen/html/html/classSVF_1_1GrammarBase_1_1SymbolHash.html +124 -0
  131. package/SVF-doxygen/html/html/classSVF_1_1GrammarBuilder-members.html +6 -7
  132. package/SVF-doxygen/html/html/classSVF_1_1GrammarBuilder.html +73 -91
  133. package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +1 -1
  134. package/SVF-doxygen/html/html/classSVF_1_1LLVMModuleSet.html +1 -1
  135. package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +1 -1
  136. package/SVF-doxygen/html/html/classSVF_1_1LockAnalysis.html +1 -1
  137. package/SVF-doxygen/html/html/classSVF_1_1LockResultValidator.html +2 -2
  138. package/SVF-doxygen/html/html/classSVF_1_1MHP.html +1 -1
  139. package/SVF-doxygen/html/html/classSVF_1_1MTA.html +3 -3
  140. package/SVF-doxygen/html/html/classSVF_1_1MTAAnnotator.html +3 -3
  141. package/SVF-doxygen/html/html/classSVF_1_1MTAResultValidator.html +3 -3
  142. package/SVF-doxygen/html/html/classSVF_1_1MTAStat.html +1 -1
  143. package/SVF-doxygen/html/html/classSVF_1_1PCG.html +1 -1
  144. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +3 -3
  145. package/SVF-doxygen/html/html/classSVF_1_1RaceResultValidator.html +1 -1
  146. package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +1 -1
  147. package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +14 -14
  148. package/SVF-doxygen/html/html/classSVF_1_1SaberCheckerAPI.html +2 -2
  149. package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +54 -53
  150. package/SVF-doxygen/html/html/classSVF_1_1ThreadAPI.html +2 -2
  151. package/SVF-doxygen/html/html/classSVF_1_1VariantGepCGEdge.html +11 -11
  152. package/SVF-doxygen/html/html/classes.html +105 -106
  153. package/SVF-doxygen/html/html/classllvm_1_1GraphPrinter.html +1 -1
  154. package/SVF-doxygen/html/html/cuddInt_8c.html +17 -17
  155. package/SVF-doxygen/html/html/cuddInt_8c_source.html +3 -3
  156. package/SVF-doxygen/html/html/cuddInt_8h.html +5 -5
  157. package/SVF-doxygen/html/html/cudd_8h.html +9 -9
  158. package/SVF-doxygen/html/html/cudd_8h_source.html +1 -1
  159. package/SVF-doxygen/html/html/dda_8cpp_source.html +1 -1
  160. package/SVF-doxygen/html/html/dir_98f9a352f241e0e917d4efaa4086f6e8.html +2 -0
  161. package/SVF-doxygen/html/html/files.html +5 -4
  162. package/SVF-doxygen/html/html/functions_0x7e.html +3 -0
  163. package/SVF-doxygen/html/html/functions_a.html +14 -8
  164. package/SVF-doxygen/html/html/functions_b.html +4 -3
  165. package/SVF-doxygen/html/html/functions_c.html +37 -35
  166. package/SVF-doxygen/html/html/functions_d.html +8 -4
  167. package/SVF-doxygen/html/html/functions_e.html +15 -8
  168. package/SVF-doxygen/html/html/functions_f.html +16 -17
  169. package/SVF-doxygen/html/html/functions_func.html +1 -1
  170. package/SVF-doxygen/html/html/functions_func_0x7e.html +3 -0
  171. package/SVF-doxygen/html/html/functions_func_b.html +3 -2
  172. package/SVF-doxygen/html/html/functions_func_c.html +32 -28
  173. package/SVF-doxygen/html/html/functions_func_e.html +14 -7
  174. package/SVF-doxygen/html/html/functions_func_f.html +3 -2
  175. package/SVF-doxygen/html/html/functions_func_g.html +22 -18
  176. package/SVF-doxygen/html/html/functions_func_i.html +18 -9
  177. package/SVF-doxygen/html/html/functions_func_l.html +2 -5
  178. package/SVF-doxygen/html/html/functions_func_o.html +20 -5
  179. package/SVF-doxygen/html/html/functions_func_p.html +9 -7
  180. package/SVF-doxygen/html/html/functions_func_s.html +12 -6
  181. package/SVF-doxygen/html/html/functions_g.html +25 -21
  182. package/SVF-doxygen/html/html/functions_i.html +29 -20
  183. package/SVF-doxygen/html/html/functions_k.html +2 -1
  184. package/SVF-doxygen/html/html/functions_l.html +1 -4
  185. package/SVF-doxygen/html/html/functions_n.html +1 -1
  186. package/SVF-doxygen/html/html/functions_o.html +24 -15
  187. package/SVF-doxygen/html/html/functions_p.html +18 -18
  188. package/SVF-doxygen/html/html/functions_r.html +5 -5
  189. package/SVF-doxygen/html/html/functions_s.html +24 -16
  190. package/SVF-doxygen/html/html/functions_t.html +5 -7
  191. package/SVF-doxygen/html/html/functions_type_d.html +4 -2
  192. package/SVF-doxygen/html/html/functions_type_p.html +1 -1
  193. package/SVF-doxygen/html/html/functions_type_s.html +7 -1
  194. package/SVF-doxygen/html/html/functions_type_v.html +3 -0
  195. package/SVF-doxygen/html/html/functions_v.html +7 -1
  196. package/SVF-doxygen/html/html/functions_vars_a.html +6 -0
  197. package/SVF-doxygen/html/html/functions_vars_c.html +1 -1
  198. package/SVF-doxygen/html/html/functions_vars_d.html +4 -2
  199. package/SVF-doxygen/html/html/functions_vars_e.html +1 -1
  200. package/SVF-doxygen/html/html/functions_vars_f.html +1 -1
  201. package/SVF-doxygen/html/html/functions_vars_k.html +1 -0
  202. package/SVF-doxygen/html/html/functions_vars_n.html +1 -1
  203. package/SVF-doxygen/html/html/functions_vars_r.html +1 -1
  204. package/SVF-doxygen/html/html/functions_vars_s.html +2 -2
  205. package/SVF-doxygen/html/html/functions_vars_t.html +1 -1
  206. package/SVF-doxygen/html/html/functions_vars_v.html +3 -0
  207. package/SVF-doxygen/html/html/functions_w.html +6 -10
  208. package/SVF-doxygen/html/html/globals.html +1 -2
  209. package/SVF-doxygen/html/html/globals_a.html +1 -6
  210. package/SVF-doxygen/html/html/globals_c.html +129 -126
  211. package/SVF-doxygen/html/html/globals_defs_j.html +6 -0
  212. package/SVF-doxygen/html/html/globals_e.html +7 -8
  213. package/SVF-doxygen/html/html/globals_f.html +6 -12
  214. package/SVF-doxygen/html/html/globals_func.html +0 -6
  215. package/SVF-doxygen/html/html/globals_func_f.html +0 -8
  216. package/SVF-doxygen/html/html/globals_g.html +4 -2
  217. package/SVF-doxygen/html/html/globals_j.html +6 -0
  218. package/SVF-doxygen/html/html/globals_l.html +3 -0
  219. package/SVF-doxygen/html/html/globals_s.html +7 -9
  220. package/SVF-doxygen/html/html/globals_v.html +3 -0
  221. package/SVF-doxygen/html/html/globals_vars.html +17 -13
  222. package/SVF-doxygen/html/html/hierarchy.html +449 -444
  223. package/SVF-doxygen/html/html/mta_8cpp_source.html +1 -1
  224. package/SVF-doxygen/html/html/namespaceSVF.html +8 -4
  225. package/SVF-doxygen/html/html/namespaceSVF_1_1SVFUtil.html +2 -2
  226. package/SVF-doxygen/html/html/namespaceSVF_1_1cppUtil.html +8 -8
  227. package/SVF-doxygen/html/html/saber_8cpp_source.html +1 -1
  228. package/SVF-doxygen/html/html/search/all_0.js +1 -1
  229. package/SVF-doxygen/html/html/search/all_1.js +5 -4
  230. package/SVF-doxygen/html/html/search/all_10.js +12 -12
  231. package/SVF-doxygen/html/html/search/all_12.js +3 -3
  232. package/SVF-doxygen/html/html/search/all_13.js +22 -17
  233. package/SVF-doxygen/html/html/search/all_14.js +5 -5
  234. package/SVF-doxygen/html/html/search/all_15.js +1 -1
  235. package/SVF-doxygen/html/html/search/all_16.js +2 -0
  236. package/SVF-doxygen/html/html/search/all_17.js +1 -1
  237. package/SVF-doxygen/html/html/search/all_1b.js +1 -0
  238. package/SVF-doxygen/html/html/search/all_2.js +2 -2
  239. package/SVF-doxygen/html/html/search/all_3.js +7 -6
  240. package/SVF-doxygen/html/html/search/all_4.js +5 -5
  241. package/SVF-doxygen/html/html/search/all_5.js +7 -5
  242. package/SVF-doxygen/html/html/search/all_6.js +4 -4
  243. package/SVF-doxygen/html/html/search/all_7.js +11 -9
  244. package/SVF-doxygen/html/html/search/all_9.js +8 -5
  245. package/SVF-doxygen/html/html/search/all_a.js +2 -0
  246. package/SVF-doxygen/html/html/search/all_b.js +1 -1
  247. package/SVF-doxygen/html/html/search/all_c.js +1 -2
  248. package/SVF-doxygen/html/html/search/all_d.js +1 -1
  249. package/SVF-doxygen/html/html/search/all_e.js +4 -4
  250. package/SVF-doxygen/html/html/search/all_f.js +9 -6
  251. package/SVF-doxygen/html/html/search/classes_0.js +1 -0
  252. package/SVF-doxygen/html/html/search/classes_2.js +1 -0
  253. package/SVF-doxygen/html/html/search/classes_f.js +3 -0
  254. package/SVF-doxygen/html/html/search/defines_8.js +2 -0
  255. package/SVF-doxygen/html/html/search/files_2.js +1 -1
  256. package/SVF-doxygen/html/html/search/functions_0.js +1 -3
  257. package/SVF-doxygen/html/html/search/functions_1.js +2 -2
  258. package/SVF-doxygen/html/html/search/functions_11.js +4 -2
  259. package/SVF-doxygen/html/html/search/functions_17.js +1 -0
  260. package/SVF-doxygen/html/html/search/functions_2.js +3 -2
  261. package/SVF-doxygen/html/html/search/functions_3.js +1 -1
  262. package/SVF-doxygen/html/html/search/functions_4.js +5 -3
  263. package/SVF-doxygen/html/html/search/functions_5.js +1 -3
  264. package/SVF-doxygen/html/html/search/functions_6.js +9 -8
  265. package/SVF-doxygen/html/html/search/functions_8.js +4 -1
  266. package/SVF-doxygen/html/html/search/functions_b.js +0 -1
  267. package/SVF-doxygen/html/html/search/functions_e.js +8 -5
  268. package/SVF-doxygen/html/html/search/functions_f.js +4 -4
  269. package/SVF-doxygen/html/html/search/typedefs_11.js +3 -1
  270. package/SVF-doxygen/html/html/search/typedefs_14.js +1 -0
  271. package/SVF-doxygen/html/html/search/typedefs_3.js +2 -2
  272. package/SVF-doxygen/html/html/search/typedefs_f.js +1 -1
  273. package/SVF-doxygen/html/html/search/variables_0.js +1 -1
  274. package/SVF-doxygen/html/html/search/variables_1.js +3 -2
  275. package/SVF-doxygen/html/html/search/variables_12.js +1 -1
  276. package/SVF-doxygen/html/html/search/variables_13.js +2 -2
  277. package/SVF-doxygen/html/html/search/variables_14.js +2 -2
  278. package/SVF-doxygen/html/html/search/variables_15.js +1 -1
  279. package/SVF-doxygen/html/html/search/variables_16.js +2 -0
  280. package/SVF-doxygen/html/html/search/variables_3.js +2 -2
  281. package/SVF-doxygen/html/html/search/variables_4.js +2 -2
  282. package/SVF-doxygen/html/html/search/variables_5.js +2 -2
  283. package/SVF-doxygen/html/html/search/variables_6.js +3 -3
  284. package/SVF-doxygen/html/html/search/variables_7.js +2 -1
  285. package/SVF-doxygen/html/html/search/variables_b.js +1 -1
  286. package/SVF-doxygen/html/html/search/variables_c.js +1 -0
  287. package/SVF-doxygen/html/html/search/variables_e.js +3 -3
  288. package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1Symbol-members.html +98 -0
  289. package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1Symbol.html +652 -0
  290. package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1SymbolVectorHash-members.html +81 -0
  291. package/SVF-doxygen/html/html/structSVF_1_1GrammarBase_1_1SymbolVectorHash.html +124 -0
  292. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01CFLGraph_01_5_01_4.html +22 -15
  293. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ConstraintGraph_01_5_01_4.html +4 -2
  294. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01OfflineConsG_01_5_01_4.html +4 -2
  295. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1CFLNode_01_5_01_4_01_4.html +1 -1
  296. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLGraph_01_5_01_4.html +2 -2
  297. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLNode_01_5_01_4.html +1 -1
  298. package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
  299. package/SVF-doxygen/html/html/wpa_8cpp_source.html +1 -1
  300. package/include/CFL/CFGNormalizer.h +14 -9
  301. package/include/CFL/CFLAlias.h +1 -40
  302. package/include/CFL/CFLGrammar.h +246 -31
  303. package/include/CFL/CFLGrammar.txt +13 -15
  304. package/include/CFL/CFLGraphBuilder.h +27 -29
  305. package/include/CFL/GrammarBuilder.h +34 -14
  306. package/include/Graphs/CFLGraph.h +12 -0
  307. package/include/Graphs/ConsGEdge.h +1 -0
  308. package/include/SVF-FE/CallGraphBuilder.h +2 -2
  309. package/include/Util/ExtAPI.h +59 -42
  310. package/lib/CFL/CFGNormalizer.cpp +138 -86
  311. package/lib/CFL/CFLAlias.cpp +73 -0
  312. package/lib/CFL/CFLGrammar.cpp +115 -16
  313. package/lib/CFL/CFLGraphBuilder.cpp +64 -1
  314. package/lib/CFL/GrammarBuilder.cpp +42 -60
  315. package/lib/Graphs/CFLGraph.cpp +41 -1
  316. package/lib/MemoryModel/LocationSet.cpp +1 -1
  317. package/lib/SVF-FE/SVFIRBuilder.cpp +2 -2
  318. package/lib/SVF-FE/SymbolTableBuilder.cpp +4 -0
  319. package/lib/Util/ExtAPI.cpp +34 -2
  320. package/lib/Util/ExtAPI.json +3268 -2585
  321. package/package.json +1 -1
  322. package/include/CFL/CFLGrammarDev.txt +0 -16
@@ -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
- void GrammarBase::setRawProductions(Map<Symbol, Productions>& rawProductions)
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 = getSymKind(sym);
97
- Attribute attribute = getSymAttribute(sym);
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(this->attributeKinds.find(kind) != this->attributeKinds.end())
136
+ if(attribute != 0)
106
137
  {
107
- key.pop_back();
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(this->attributeKinds.find(kind) != this->attributeKinds.end())
151
+ if(attribute != 0)
121
152
  {
122
- nkey.pop_back();
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
- GrammarBase::Kind GrammarBase::insertNonTerminalKind(std::string kindStr)
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
- if(kindStr.size() >= 3)
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
- if (kindStr.compare(kindStr.size()-2, 2, "_i")==0)
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
- insertAttribute(kind, 0);
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 kind;
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
- std::ofstream gramFile("Normailized_Grammar.txt");
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::loadFileString() const
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
- const inline std::string GrammarBuilder::parseProduction() const
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(2);
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
- grammar->insertNonTerminalKind(startS);
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 = parseProduction();
81
+ std::string lines = parseProductionsString();
75
82
  std::string word = "";
76
- std::vector<std::string> wordProd;
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
- wordProd.push_back(word);
88
+ wordProds.push_back(word);
82
89
  lines.erase(0, pos + delimiter.length());
83
90
  }
84
- return wordProd;
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
- size_t pos = 0;
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> wordProd = loadWordProductions();
105
- std::string delimiter1 = "->";
112
+ std::vector<std::string> wordProdVec = loadWordProductions();
106
113
 
107
- for (auto it : wordProd)
114
+ for (auto wordProd : wordProdVec)
108
115
  {
109
- if ((pos = it.find(delimiter1)) != std::string::npos)
116
+ if ((pos = wordProd.find(delimiter1)) != std::string::npos)
110
117
  {
111
- std::string head = it.substr(0, pos);
112
- std::string LHS = it.substr(pos + delimiter1.size(), it.size() - 1);
113
- head = stripSpace(head);
114
- prod.push_back(grammar->insertNonTerminalKind(head));
115
- if (grammar->getRawProductions().find(grammar->str2Kind(head)) == grammar->getRawProductions().end())
116
- {
117
- grammar->getRawProductions().insert({grammar->str2Kind(head), {}});
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
- if (isupper(word[0]))
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
- if (isupper(LHS[0]))
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
  }
@@ -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 value flow graph into dot file for debugging
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(type2,type2) + flattenOffset(type3,type3)
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
- obj = obj -> next;
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;
@@ -114,6 +114,10 @@ void SymbolTableBuilder::buildMemModel(SVFModule* svfModule)
114
114
  {
115
115
  collectSym(ld->getPointerOperand());
116
116
  }
117
+ else if (const AllocaInst *alloc = SVFUtil::dyn_cast<AllocaInst>(inst))
118
+ {
119
+ collectSym(alloc->getArraySize());
120
+ }
117
121
  else if (const PHINode *phi = SVFUtil::dyn_cast<PHINode>(inst))
118
122
  {
119
123
  for (u32_t i = 0; i < phi->getNumIncomingValues(); ++i)
@@ -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, "type") == 0)
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
- res = t == EFT_ALLOC || t == EFT_REALLOC || t == EFT_NOSTRUCT_ALLOC || t == EFT_NOOP || t == EFT_FREE;
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
  }