svf-tools 1.0.558 → 1.0.561

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 (327) hide show
  1. package/README.md +1 -1
  2. package/SVF-doxygen/html/html/AbstractPointsToDS_8h_source.html +43 -43
  3. package/SVF-doxygen/html/html/AndersenPWC_8h_source.html +2 -2
  4. package/SVF-doxygen/html/html/AndersenSCD_8cpp_source.html +1 -1
  5. package/SVF-doxygen/html/html/AndersenStat_8cpp_source.html +16 -16
  6. package/SVF-doxygen/html/html/AndersenWaveDiff_8cpp_source.html +2 -2
  7. package/SVF-doxygen/html/html/Andersen_8cpp_source.html +18 -18
  8. package/SVF-doxygen/html/html/Andersen_8h_source.html +56 -56
  9. package/SVF-doxygen/html/html/CFLGrammar_8txt.html +8 -8
  10. package/SVF-doxygen/html/html/CFLGraphBuilder_8cpp_source.html +10 -1
  11. package/SVF-doxygen/html/html/CFLGraphBuilder_8h_source.html +3 -1
  12. package/SVF-doxygen/html/html/ConditionalPT_8h_source.html +1 -1
  13. package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +44 -44
  14. package/SVF-doxygen/html/html/ContextDDA_8h_source.html +43 -43
  15. package/SVF-doxygen/html/html/DDAClient_8cpp_source.html +12 -12
  16. package/SVF-doxygen/html/html/DDAClient_8h_source.html +36 -36
  17. package/SVF-doxygen/html/html/DDAPass_8cpp_source.html +19 -19
  18. package/SVF-doxygen/html/html/DDAPass_8h_source.html +21 -21
  19. package/SVF-doxygen/html/html/DDAStat_8cpp_source.html +51 -51
  20. package/SVF-doxygen/html/html/DDAStat_8h_source.html +51 -51
  21. package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +111 -111
  22. package/SVF-doxygen/html/html/DoubleFreeChecker_8cpp_source.html +2 -2
  23. package/SVF-doxygen/html/html/DoubleFreeChecker_8h_source.html +2 -2
  24. package/SVF-doxygen/html/html/ExtAPI_8cpp_source.html +5 -2
  25. package/SVF-doxygen/html/html/ExtAPI_8h_source.html +3 -2
  26. package/SVF-doxygen/html/html/FSMPTA_8cpp_source.html +40 -40
  27. package/SVF-doxygen/html/html/FSMPTA_8h_source.html +52 -52
  28. package/SVF-doxygen/html/html/FileChecker_8cpp_source.html +2 -2
  29. package/SVF-doxygen/html/html/FileChecker_8h_source.html +2 -2
  30. package/SVF-doxygen/html/html/FlowDDA_8cpp_source.html +2 -2
  31. package/SVF-doxygen/html/html/FlowDDA_8h_source.html +42 -42
  32. package/SVF-doxygen/html/html/FlowSensitive_8cpp_source.html +3 -3
  33. package/SVF-doxygen/html/html/FlowSensitive_8h_source.html +6 -6
  34. package/SVF-doxygen/html/html/LeakChecker_8cpp_source.html +4 -4
  35. package/SVF-doxygen/html/html/LeakChecker_8h_source.html +3 -3
  36. package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +1 -1
  37. package/SVF-doxygen/html/html/LocationSet_8h_source.html +1 -1
  38. package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +34 -34
  39. package/SVF-doxygen/html/html/LockAnalysis_8h_source.html +114 -114
  40. package/SVF-doxygen/html/html/LockResultValidator_8cpp_source.html +2 -2
  41. package/SVF-doxygen/html/html/LockResultValidator_8h_source.html +7 -7
  42. package/SVF-doxygen/html/html/MHP_8cpp.html +2 -2
  43. package/SVF-doxygen/html/html/MHP_8cpp_source.html +94 -94
  44. package/SVF-doxygen/html/html/MHP_8h_source.html +135 -135
  45. package/SVF-doxygen/html/html/MSSAMuChi_8h_source.html +6 -6
  46. package/SVF-doxygen/html/html/MTAAnnotator_8cpp_source.html +2 -2
  47. package/SVF-doxygen/html/html/MTAAnnotator_8h_source.html +2 -2
  48. package/SVF-doxygen/html/html/MTAResultValidator_8cpp_source.html +10 -10
  49. package/SVF-doxygen/html/html/MTAResultValidator_8h_source.html +6 -6
  50. package/SVF-doxygen/html/html/MTAStat_8cpp_source.html +33 -33
  51. package/SVF-doxygen/html/html/MTAStat_8h_source.html +14 -14
  52. package/SVF-doxygen/html/html/MTA_8cpp_source.html +28 -28
  53. package/SVF-doxygen/html/html/MTA_8h_source.html +24 -24
  54. package/SVF-doxygen/html/html/MemPartition_8cpp_source.html +6 -6
  55. package/SVF-doxygen/html/html/MemPartition_8h_source.html +4 -4
  56. package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +50 -50
  57. package/SVF-doxygen/html/html/MemRegion_8h_source.html +93 -93
  58. package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +59 -59
  59. package/SVF-doxygen/html/html/MemSSA_8h_source.html +103 -103
  60. package/SVF-doxygen/html/html/MutablePointsToDS_8h_source.html +185 -185
  61. package/SVF-doxygen/html/html/PAGBuilderFromFile_8cpp_source.html +1 -1
  62. package/SVF-doxygen/html/html/PAGBuilderFromFile_8h_source.html +1 -1
  63. package/SVF-doxygen/html/html/PCG_8cpp_source.html +14 -14
  64. package/SVF-doxygen/html/html/PCG_8h_source.html +52 -52
  65. package/SVF-doxygen/html/html/PEGGrammar_8txt.html +14 -32
  66. package/SVF-doxygen/html/html/PersistentPointsToCache_8h_source.html +40 -40
  67. package/SVF-doxygen/html/html/PersistentPointsToDS_8h_source.html +181 -181
  68. package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +15 -15
  69. package/SVF-doxygen/html/html/PointerAnalysisImpl_8h_source.html +30 -30
  70. package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +1 -1
  71. package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +1 -1
  72. package/SVF-doxygen/html/html/ProgSlice_8cpp_source.html +2 -2
  73. package/SVF-doxygen/html/html/ProgSlice_8h_source.html +60 -60
  74. package/SVF-doxygen/html/html/SVFGBuilder_8cpp_source.html +2 -2
  75. package/SVF-doxygen/html/html/SVFGBuilder_8h_source.html +2 -2
  76. package/SVF-doxygen/html/html/SVFGNode_8h_source.html +1 -1
  77. package/SVF-doxygen/html/html/SVFGOPT_8h_source.html +1 -1
  78. package/SVF-doxygen/html/html/SVFGReadWrite_8cpp_source.html +2 -2
  79. package/SVF-doxygen/html/html/SVFGStat_8cpp_source.html +19 -19
  80. package/SVF-doxygen/html/html/SVFGStat_8h_source.html +1 -1
  81. package/SVF-doxygen/html/html/SVFG_8cpp_source.html +12 -12
  82. package/SVF-doxygen/html/html/SVFG_8h_source.html +5 -5
  83. package/SVF-doxygen/html/html/SVFStatements_8h_source.html +1 -1
  84. package/SVF-doxygen/html/html/SVFUtil_8h_source.html +1 -1
  85. package/SVF-doxygen/html/html/SaberAnnotator_8cpp_source.html +3 -3
  86. package/SVF-doxygen/html/html/SaberAnnotator_8h_source.html +2 -2
  87. package/SVF-doxygen/html/html/SaberCheckerAPI_8cpp_source.html +1 -1
  88. package/SVF-doxygen/html/html/SaberCheckerAPI_8h_source.html +1 -1
  89. package/SVF-doxygen/html/html/SaberCondAllocator_8cpp_source.html +1 -1
  90. package/SVF-doxygen/html/html/SaberCondAllocator_8h_source.html +1 -1
  91. package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +3 -3
  92. package/SVF-doxygen/html/html/SaberSVFGBuilder_8h_source.html +1 -1
  93. package/SVF-doxygen/html/html/SrcSnkDDA_8cpp_source.html +13 -13
  94. package/SVF-doxygen/html/html/SrcSnkDDA_8h_source.html +66 -66
  95. package/SVF-doxygen/html/html/SrcSnkSolver_8h_source.html +1 -1
  96. package/SVF-doxygen/html/html/Steensgaard_8cpp_source.html +4 -4
  97. package/SVF-doxygen/html/html/Steensgaard_8h_source.html +6 -6
  98. package/SVF-doxygen/html/html/TCT_8cpp_source.html +44 -44
  99. package/SVF-doxygen/html/html/TCT_8h_source.html +93 -93
  100. package/SVF-doxygen/html/html/TypeAnalysis_8cpp_source.html +1 -1
  101. package/SVF-doxygen/html/html/TypeAnalysis_8h_source.html +2 -2
  102. package/SVF-doxygen/html/html/VersionedFlowSensitiveStat_8cpp_source.html +2 -2
  103. package/SVF-doxygen/html/html/VersionedFlowSensitive_8cpp_source.html +25 -25
  104. package/SVF-doxygen/html/html/VersionedFlowSensitive_8h_source.html +38 -38
  105. package/SVF-doxygen/html/html/WPAPass_8cpp_source.html +5 -5
  106. package/SVF-doxygen/html/html/WPAStat_8h_source.html +2 -2
  107. package/SVF-doxygen/html/html/classSVF_1_1ActualINSVFGNode.html +2 -2
  108. package/SVF-doxygen/html/html/classSVF_1_1ActualOUTSVFGNode.html +2 -2
  109. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder-members.html +13 -10
  110. package/SVF-doxygen/html/html/classSVF_1_1AliasCFLGraphBuilder.html +190 -2
  111. package/SVF-doxygen/html/html/classSVF_1_1AliasDDAClient.html +22 -22
  112. package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +102 -102
  113. package/SVF-doxygen/html/html/classSVF_1_1AndersenBase.html +43 -43
  114. package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +20 -20
  115. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +6 -6
  116. package/SVF-doxygen/html/html/classSVF_1_1AndersenStat.html +16 -16
  117. package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +19 -19
  118. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +39 -39
  119. package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +1 -1
  120. package/SVF-doxygen/html/html/classSVF_1_1CallCHI.html +2 -2
  121. package/SVF-doxygen/html/html/classSVF_1_1CallMU.html +2 -2
  122. package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl.html +1 -1
  123. package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +100 -100
  124. package/SVF-doxygen/html/html/classSVF_1_1DDAClient.html +51 -51
  125. package/SVF-doxygen/html/html/classSVF_1_1DDAPass.html +58 -58
  126. package/SVF-doxygen/html/html/classSVF_1_1DDAStat.html +165 -165
  127. package/SVF-doxygen/html/html/classSVF_1_1DDAVFSolver.html +286 -286
  128. package/SVF-doxygen/html/html/classSVF_1_1DFPTData.html +26 -26
  129. package/SVF-doxygen/html/html/classSVF_1_1DiffPTData.html +11 -11
  130. package/SVF-doxygen/html/html/classSVF_1_1DistinctMRG.html +4 -4
  131. package/SVF-doxygen/html/html/classSVF_1_1DoubleFreeChecker.html +4 -4
  132. package/SVF-doxygen/html/html/classSVF_1_1EntryCHI.html +2 -2
  133. package/SVF-doxygen/html/html/classSVF_1_1ExtAPI-members.html +5 -4
  134. package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +40 -5
  135. package/SVF-doxygen/html/html/classSVF_1_1FSMPTA.html +30 -30
  136. package/SVF-doxygen/html/html/classSVF_1_1FileChecker.html +3 -3
  137. package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +71 -71
  138. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +7 -7
  139. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +1 -1
  140. package/SVF-doxygen/html/html/classSVF_1_1ForkJoinAnalysis.html +218 -218
  141. package/SVF-doxygen/html/html/classSVF_1_1FormalINSVFGNode.html +2 -2
  142. package/SVF-doxygen/html/html/classSVF_1_1FormalOUTSVFGNode.html +2 -2
  143. package/SVF-doxygen/html/html/classSVF_1_1FunptrDDAClient.html +19 -19
  144. package/SVF-doxygen/html/html/classSVF_1_1InterDisjointMRG.html +1 -1
  145. package/SVF-doxygen/html/html/classSVF_1_1IntraDisjointMRG.html +7 -7
  146. package/SVF-doxygen/html/html/classSVF_1_1LeakChecker.html +17 -17
  147. package/SVF-doxygen/html/html/classSVF_1_1LoadMU.html +2 -2
  148. package/SVF-doxygen/html/html/classSVF_1_1LockAnalysis.html +334 -334
  149. package/SVF-doxygen/html/html/classSVF_1_1LockResultValidator.html +9 -9
  150. package/SVF-doxygen/html/html/classSVF_1_1MHP.html +246 -246
  151. package/SVF-doxygen/html/html/classSVF_1_1MHPValidator.html +7 -7
  152. package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +200 -200
  153. package/SVF-doxygen/html/html/classSVF_1_1MSSACHI.html +2 -2
  154. package/SVF-doxygen/html/html/classSVF_1_1MSSADEF.html +1 -1
  155. package/SVF-doxygen/html/html/classSVF_1_1MSSAMU.html +2 -2
  156. package/SVF-doxygen/html/html/classSVF_1_1MSSAPHI.html +1 -1
  157. package/SVF-doxygen/html/html/classSVF_1_1MSSAPHISVFGNode.html +2 -2
  158. package/SVF-doxygen/html/html/classSVF_1_1MTA.html +53 -53
  159. package/SVF-doxygen/html/html/classSVF_1_1MTAAnnotator.html +4 -4
  160. package/SVF-doxygen/html/html/classSVF_1_1MTAResultValidator.html +22 -22
  161. package/SVF-doxygen/html/html/classSVF_1_1MTASVFGBuilder.html +181 -181
  162. package/SVF-doxygen/html/html/classSVF_1_1MTAStat.html +44 -44
  163. package/SVF-doxygen/html/html/classSVF_1_1MemRegion.html +23 -23
  164. package/SVF-doxygen/html/html/classSVF_1_1MemSSA.html +267 -267
  165. package/SVF-doxygen/html/html/classSVF_1_1MemSSAStat.html +18 -18
  166. package/SVF-doxygen/html/html/classSVF_1_1MutableDFPTData.html +128 -128
  167. package/SVF-doxygen/html/html/classSVF_1_1MutableDiffPTData.html +55 -55
  168. package/SVF-doxygen/html/html/classSVF_1_1MutableIncDFPTData.html +88 -88
  169. package/SVF-doxygen/html/html/classSVF_1_1MutablePTData.html +78 -78
  170. package/SVF-doxygen/html/html/classSVF_1_1MutableVersionedPTData.html +77 -77
  171. package/SVF-doxygen/html/html/classSVF_1_1PCG.html +131 -131
  172. package/SVF-doxygen/html/html/classSVF_1_1PTData.html +32 -32
  173. package/SVF-doxygen/html/html/classSVF_1_1PersistentDFPTData.html +107 -107
  174. package/SVF-doxygen/html/html/classSVF_1_1PersistentDiffPTData.html +66 -66
  175. package/SVF-doxygen/html/html/classSVF_1_1PersistentIncDFPTData.html +84 -84
  176. package/SVF-doxygen/html/html/classSVF_1_1PersistentPTData.html +77 -77
  177. package/SVF-doxygen/html/html/classSVF_1_1PersistentPointsToCache.html +134 -134
  178. package/SVF-doxygen/html/html/classSVF_1_1PersistentVersionedPTData.html +77 -77
  179. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +3 -3
  180. package/SVF-doxygen/html/html/classSVF_1_1ProgSlice.html +161 -161
  181. package/SVF-doxygen/html/html/classSVF_1_1RaceValidator.html +7 -7
  182. package/SVF-doxygen/html/html/classSVF_1_1RetMU.html +2 -2
  183. package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +22 -22
  184. package/SVF-doxygen/html/html/classSVF_1_1SVFGBuilder.html +4 -4
  185. package/SVF-doxygen/html/html/classSVF_1_1SVFGNodeLockSpan.html +23 -23
  186. package/SVF-doxygen/html/html/classSVF_1_1SaberAnnotator.html +5 -5
  187. package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +2 -2
  188. package/SVF-doxygen/html/html/classSVF_1_1SrcSnkDDA.html +157 -157
  189. package/SVF-doxygen/html/html/classSVF_1_1Steensgaard.html +15 -15
  190. package/SVF-doxygen/html/html/classSVF_1_1StoreCHI.html +2 -2
  191. package/SVF-doxygen/html/html/classSVF_1_1TCT.html +264 -264
  192. package/SVF-doxygen/html/html/classSVF_1_1TCTEdge.html +13 -13
  193. package/SVF-doxygen/html/html/classSVF_1_1TCTNode.html +20 -20
  194. package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis.html +1 -1
  195. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive.html +100 -100
  196. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat.html +8 -8
  197. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive_1_1SCC.html +1 -1
  198. package/SVF-doxygen/html/html/classSVF_1_1VersionedPTData.html +11 -11
  199. package/SVF-doxygen/html/html/classSVF_1_1WPAPass.html +6 -6
  200. package/SVF-doxygen/html/html/dda_8cpp.html +2 -2
  201. package/SVF-doxygen/html/html/dda_8cpp_source.html +2 -2
  202. package/SVF-doxygen/html/html/functions_a.html +11 -5
  203. package/SVF-doxygen/html/html/functions_c.html +21 -18
  204. package/SVF-doxygen/html/html/functions_f.html +6 -6
  205. package/SVF-doxygen/html/html/functions_func.html +16 -10
  206. package/SVF-doxygen/html/html/functions_func_c.html +19 -16
  207. package/SVF-doxygen/html/html/functions_func_i.html +11 -8
  208. package/SVF-doxygen/html/html/functions_i.html +11 -8
  209. package/SVF-doxygen/html/html/functions_l.html +5 -5
  210. package/SVF-doxygen/html/html/functions_p.html +6 -6
  211. package/SVF-doxygen/html/html/functions_r.html +3 -7
  212. package/SVF-doxygen/html/html/functions_s.html +16 -14
  213. package/SVF-doxygen/html/html/functions_v.html +6 -6
  214. package/SVF-doxygen/html/html/functions_w.html +11 -11
  215. package/SVF-doxygen/html/html/globals_g.html +3 -3
  216. package/SVF-doxygen/html/html/globals_v.html +1 -2
  217. package/SVF-doxygen/html/html/globals_vars.html +3 -4
  218. package/SVF-doxygen/html/html/mta_8cpp.html +2 -2
  219. package/SVF-doxygen/html/html/mta_8cpp_source.html +2 -2
  220. package/SVF-doxygen/html/html/namespaceSVF.html +11 -11
  221. package/SVF-doxygen/html/html/search/all_1.js +2 -0
  222. package/SVF-doxygen/html/html/search/all_10.js +5 -5
  223. package/SVF-doxygen/html/html/search/all_11.js +2 -2
  224. package/SVF-doxygen/html/html/search/all_12.js +8 -8
  225. package/SVF-doxygen/html/html/search/all_13.js +2 -2
  226. package/SVF-doxygen/html/html/search/all_14.js +1 -1
  227. package/SVF-doxygen/html/html/search/all_15.js +4 -4
  228. package/SVF-doxygen/html/html/search/all_16.js +2 -2
  229. package/SVF-doxygen/html/html/search/all_3.js +1 -0
  230. package/SVF-doxygen/html/html/search/all_6.js +2 -2
  231. package/SVF-doxygen/html/html/search/all_7.js +2 -2
  232. package/SVF-doxygen/html/html/search/all_9.js +2 -1
  233. package/SVF-doxygen/html/html/search/all_c.js +3 -3
  234. package/SVF-doxygen/html/html/search/all_e.js +2 -2
  235. package/SVF-doxygen/html/html/search/functions_0.js +2 -0
  236. package/SVF-doxygen/html/html/search/functions_2.js +1 -0
  237. package/SVF-doxygen/html/html/search/functions_8.js +1 -0
  238. package/SVF-doxygen/html/html/search/variables_13.js +1 -1
  239. package/SVF-doxygen/html/html/search/variables_14.js +1 -1
  240. package/SVF-doxygen/html/html/search/variables_15.js +1 -1
  241. package/SVF-doxygen/html/html/search/variables_7.js +2 -2
  242. package/SVF-doxygen/html/html/search/variables_e.js +1 -1
  243. package/SVF-doxygen/html/html/structSVF_1_1MemRegion_1_1equalMemRegion.html +3 -3
  244. package/SVF-doxygen/html/html/structSVF_1_1VersionedFlowSensitive_1_1SCC_1_1NodeData.html +4 -4
  245. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01TCT_01_5_01_4.html +15 -15
  246. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1TCTNode_01_5_01_4_01_4.html +1 -1
  247. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1TCTNode_01_5_01_4.html +1 -1
  248. package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1TCT_01_5_01_4.html +2 -2
  249. package/SVF-doxygen/html/html/structstd_1_1hash_3_01SVF_1_1SVFGNodeLockSpan_01_4.html +3 -3
  250. package/SVF-doxygen/html/html/svf-ex_8cpp.html +1 -1
  251. package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
  252. package/include/CFL/CFLGraphBuilder.h +9 -0
  253. package/include/CFL/PEGGrammar.txt +4 -8
  254. package/include/DDA/ContextDDA.h +29 -0
  255. package/include/DDA/DDAClient.h +23 -0
  256. package/include/DDA/DDAPass.h +22 -0
  257. package/include/DDA/DDAStat.h +22 -0
  258. package/include/DDA/DDAVFSolver.h +22 -0
  259. package/include/DDA/FlowDDA.h +29 -0
  260. package/include/MSSA/MSSAMuChi.h +1 -1
  261. package/include/MSSA/MemPartition.h +1 -1
  262. package/include/MSSA/MemRegion.h +5 -1
  263. package/include/MSSA/MemSSA.h +7 -1
  264. package/include/MSSA/SVFGBuilder.h +1 -1
  265. package/include/MTA/FSMPTA.h +26 -0
  266. package/include/MTA/LockAnalysis.h +22 -0
  267. package/include/MTA/MHP.h +22 -0
  268. package/include/MTA/MTA.h +27 -1
  269. package/include/MTA/MTAStat.h +22 -0
  270. package/include/MTA/PCG.h +22 -0
  271. package/include/MTA/TCT.h +22 -0
  272. package/include/MemoryModel/AbstractPointsToDS.h +34 -0
  273. package/include/MemoryModel/ConditionalPT.h +1 -1
  274. package/include/MemoryModel/LocationSet.h +1 -1
  275. package/include/MemoryModel/MutablePointsToDS.h +32 -0
  276. package/include/MemoryModel/PAGBuilderFromFile.h +2 -2
  277. package/include/MemoryModel/PersistentPointsToCache.h +3 -1
  278. package/include/MemoryModel/PersistentPointsToDS.h +10 -0
  279. package/include/MemoryModel/PointerAnalysis.h +1 -1
  280. package/include/MemoryModel/PointerAnalysisImpl.h +1 -1
  281. package/include/MemoryModel/SVFStatements.h +1 -1
  282. package/include/SABER/DoubleFreeChecker.h +1 -1
  283. package/include/SABER/FileChecker.h +1 -1
  284. package/include/SABER/LeakChecker.h +1 -1
  285. package/include/SABER/ProgSlice.h +8 -1
  286. package/include/SABER/SaberAnnotator.h +1 -1
  287. package/include/SABER/SaberCheckerAPI.h +1 -1
  288. package/include/SABER/SaberCondAllocator.h +1 -1
  289. package/include/SABER/SaberSVFGBuilder.h +1 -1
  290. package/include/SABER/SrcSnkDDA.h +8 -1
  291. package/include/SABER/SrcSnkSolver.h +1 -1
  292. package/include/Util/ExtAPI.h +3 -0
  293. package/include/Util/ExtAPI.json +1456 -44
  294. package/include/WPA/Andersen.h +5 -0
  295. package/include/WPA/TypeAnalysis.h +1 -1
  296. package/include/WPA/VersionedFlowSensitive.h +4 -0
  297. package/lib/CFL/CFLGraphBuilder.cpp +44 -0
  298. package/lib/DDA/ContextDDA.cpp +22 -0
  299. package/lib/DDA/DDAClient.cpp +22 -0
  300. package/lib/DDA/DDAPass.cpp +23 -0
  301. package/lib/DDA/DDAStat.cpp +22 -0
  302. package/lib/DDA/FlowDDA.cpp +22 -0
  303. package/lib/MTA/FSMPTA.cpp +22 -0
  304. package/lib/MTA/LockAnalysis.cpp +22 -0
  305. package/lib/MTA/MHP.cpp +23 -1
  306. package/lib/MTA/MTA.cpp +23 -0
  307. package/lib/MTA/MTAStat.cpp +22 -0
  308. package/lib/MTA/PCG.cpp +22 -0
  309. package/lib/MTA/TCT.cpp +23 -0
  310. package/lib/MemoryModel/LocationSet.cpp +1 -1
  311. package/lib/MemoryModel/PAGBuilderFromFile.cpp +1 -1
  312. package/lib/MemoryModel/PointerAnalysis.cpp +1 -1
  313. package/lib/MemoryModel/PointerAnalysisImpl.cpp +23 -0
  314. package/lib/SABER/DoubleFreeChecker.cpp +1 -1
  315. package/lib/SABER/FileChecker.cpp +1 -1
  316. package/lib/SABER/LeakChecker.cpp +1 -1
  317. package/lib/SABER/ProgSlice.cpp +1 -1
  318. package/lib/SABER/SaberAnnotator.cpp +1 -1
  319. package/lib/SABER/SaberCheckerAPI.cpp +1 -1
  320. package/lib/SABER/SaberCondAllocator.cpp +1 -1
  321. package/lib/SABER/SaberSVFGBuilder.cpp +1 -1
  322. package/lib/SABER/SrcSnkDDA.cpp +1 -1
  323. package/lib/Util/ExtAPI.cpp +42 -4
  324. package/lib/WPA/Steensgaard.cpp +22 -0
  325. package/lib/WPA/TypeAnalysis.cpp +1 -1
  326. package/lib/WPA/WPAPass.cpp +1 -1
  327. package/package.json +1 -1
@@ -186,7 +186,7 @@ $(function() {
186
186
  <div class="ttc" id="classSVF_1_1SparseBitVector_html"><div class="ttname"><a href="classSVF_1_1SparseBitVector.html">SVF::SparseBitVector</a></div><div class="ttdef"><b>Definition:</b> <a href="SparseBitVector_8h_source.html#l00460">SparseBitVector.h:460</a></div></div>
187
187
  <div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a9e85d445e8b7b205134acd3874bba388"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a9e85d445e8b7b205134acd3874bba388">SVF::SVFUtil::isConstantData</a></div><div class="ttdeci">bool isConstantData(const Value *val)</div><div class="ttdoc">Return true if the value refers to constant data, e.g., i32 0. </div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8h_source.html#l00439">SVFUtil.h:439</a></div></div>
188
188
  <div class="ttc" id="namespaceSVF_html"><div class="ttname"><a href="namespaceSVF.html">SVF</a></div><div class="ttdoc">for isBitcode </div><div class="ttdef"><b>Definition:</b> <a href="CFGNormalizer_8h_source.html#l00035">CFGNormalizer.h:35</a></div></div>
189
- <div class="ttc" id="classSVF_1_1ExtAPI_html_a21f45c806672255c044d39490990eae2"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#a21f45c806672255c044d39490990eae2">SVF::ExtAPI::is_ext</a></div><div class="ttdeci">bool is_ext(const SVFFunction *F)</div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8cpp_source.html#l00478">ExtAPI.cpp:478</a></div></div>
189
+ <div class="ttc" id="classSVF_1_1ExtAPI_html_a21f45c806672255c044d39490990eae2"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#a21f45c806672255c044d39490990eae2">SVF::ExtAPI::is_ext</a></div><div class="ttdeci">bool is_ext(const SVFFunction *F)</div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8cpp_source.html#l00514">ExtAPI.cpp:514</a></div></div>
190
190
  <div class="ttc" id="classSVF_1_1CallSite_html"><div class="ttname"><a href="classSVF_1_1CallSite.html">SVF::CallSite</a></div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00250">BasicTypes.h:250</a></div></div>
191
191
  <div class="ttc" id="fastcluster_8h_html"><div class="ttname"><a href="fastcluster_8h.html">fastcluster.h</a></div></div>
192
192
  <div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a3af5073a1cdc000678f7e4bbc943f5d5"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a3af5073a1cdc000678f7e4bbc943f5d5">SVF::SVFUtil::isThreadExitCall</a></div><div class="ttdeci">bool isThreadExitCall(const CallSite cs)</div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8h_source.html#l00617">SVFUtil.h:617</a></div></div>
@@ -66,8 +66,8 @@ $(function() {
66
66
  <div class="title">SaberAnnotator.cpp</div> </div>
67
67
  </div><!--header-->
68
68
  <div class="contents">
69
- <a href="SaberAnnotator_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">//===- SaberAnnotator.cpp -- Annotation---------------------------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// Copyright (C) &lt;2013-2017&gt; &lt;Yulei Sui&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">// along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">//===----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> * SaberAnnotator.cpp</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> * Created on: May 4, 2014</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> * Author: Yulei Sui</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="SaberAnnotator_8h.html">SABER/SaberAnnotator.h</a>&quot;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="ProgSlice_8h.html">SABER/ProgSlice.h</a>&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#aa9446af29edf126ad30bbada51478c13"> 38</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#aa9446af29edf126ad30bbada51478c13">SaberAnnotator::annotateSource</a>()</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;{</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; rawstr &lt;&lt; <a class="code" href="classSVF_1_1Annotator.html#a01900f5ada5948361cc18857aee26744">SB_SLICESOURCE</a> ; <span class="comment">//&lt;&lt; _curSlice-&gt;getSource()-&gt;getId();</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* sourceinst = SVFUtil::dyn_cast&lt;Instruction&gt;(<a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>-&gt;<a class="code" href="classSVF_1_1ProgSlice.html#ac1dc48ea64a89ce37394a22e609a0cd0">getSource</a>()-&gt;<a class="code" href="classSVF_1_1VFGNode.html#a5ac80149696c243f77e4b4d25ad44898">getValue</a>()))</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; {</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <a class="code" href="classSVF_1_1Annotator.html#ad1424270d91f70dee1461b6301ce8091">addMDTag</a>(const_cast&lt;Instruction*&gt;(sourceinst),rawstr.str());</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; }</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; assert(<span class="keyword">false</span> &amp;&amp; <span class="stringliteral">&quot;instruction of source node not found&quot;</span>);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;}</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#abec0f249cc64d3588e83a68ed12271bf"> 55</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#abec0f249cc64d3588e83a68ed12271bf">SaberAnnotator::annotateSinks</a>()</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;{</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="keywordflow">for</span>(ProgSlice::SVFGNodeSet::const_iterator it = <a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>-&gt;<a class="code" href="classSVF_1_1ProgSlice.html#a03a1ef4d56958fa4a0c3a3a95806203d">getSinks</a>().begin(),</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; eit = <a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>-&gt;<a class="code" href="classSVF_1_1ProgSlice.html#a03a1ef4d56958fa4a0c3a3a95806203d">getSinks</a>().end(); it!=eit; ++it)</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; {</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1ActualParmVFGNode.html">ActualParmSVFGNode</a>* ap = SVFUtil::dyn_cast&lt;ActualParmSVFGNode&gt;(*it))</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* sinkinst = ap-&gt;getCallSite()-&gt;getCallSite();</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; assert(SVFUtil::isa&lt;CallInst&gt;(sinkinst) &amp;&amp; <span class="stringliteral">&quot;not a call instruction?&quot;</span>);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#adc8b60ca7d60cf6c81feae20e4a04c63">CallInst</a>* sink = SVFUtil::cast&lt;CallInst&gt;(sinkinst);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; rawstr &lt;&lt; <a class="code" href="classSVF_1_1Annotator.html#a3edacb8703c74abf42c4a29761a3437f">SB_SLICESINK</a> &lt;&lt; <a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>-&gt;<a class="code" href="classSVF_1_1ProgSlice.html#ac1dc48ea64a89ce37394a22e609a0cd0">getSource</a>()-&gt;<a class="code" href="classSVF_1_1GenericNode.html#ac3e55ef37aefb411ea4c87b1aa3b1895">getId</a>();</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <a class="code" href="classSVF_1_1Annotator.html#ad1424270d91f70dee1461b6301ce8091">addMDTag</a>(const_cast&lt;CallInst*&gt;(sink),sink-&gt;getArgOperand(0),rawstr.str());</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; }</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; assert(<span class="keyword">false</span> &amp;&amp; <span class="stringliteral">&quot;sink node is not a actual parameter?&quot;</span>);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; }</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;}</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#a60b66e1cb775c175c88f514e202c7611"> 78</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#a60b66e1cb775c175c88f514e202c7611">SaberAnnotator::annotateFeasibleBranch</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1BranchStmt.html">BranchStmt</a> *branchStmt, <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succPos)</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;{</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; assert((succPos == 0 || succPos == 1) &amp;&amp; <span class="stringliteral">&quot;branch instruction should only have two successors&quot;</span>);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; rawstr &lt;&lt; <a class="code" href="classSVF_1_1Annotator.html#ac58473072d90baa6dc377b45f18d0da5">SB_FESIBLE</a> &lt;&lt; <a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>-&gt;<a class="code" href="classSVF_1_1ProgSlice.html#ac1dc48ea64a89ce37394a22e609a0cd0">getSource</a>()-&gt;<a class="code" href="classSVF_1_1GenericNode.html#ac3e55ef37aefb411ea4c87b1aa3b1895">getId</a>();</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <a class="code" href="classSVF_1_1Annotator.html#ad1424270d91f70dee1461b6301ce8091">addMDTag</a>(const_cast&lt;Instruction *&gt;(branchStmt-&gt;<a class="code" href="classSVF_1_1SVFStmt.html#a86628ea173dec4934322f5d1caf2e1db">getInst</a>()),</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; const_cast&lt;Value *&gt;(branchStmt-&gt;<a class="code" href="classSVF_1_1BranchStmt.html#a915384027ae53e99311f05a08edf99f0">getCondition</a>()-&gt;<a class="code" href="classSVF_1_1SVFVar.html#afaa33caa8d2a306f6741d9d066243e40">getValue</a>()), rawstr.str());</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;}</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#a7982caf8a058f805ae6e777ce2366246"> 93</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#a7982caf8a058f805ae6e777ce2366246">SaberAnnotator::annotateInfeasibleBranch</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1BranchStmt.html">BranchStmt</a> *branchStmt, <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succPos)</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;{</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; assert((succPos == 0 || succPos == 1) &amp;&amp; <span class="stringliteral">&quot;branch instruction should only have two successors&quot;</span>);</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; rawstr &lt;&lt; <a class="code" href="classSVF_1_1Annotator.html#a556138c152d52921d6f0a709a826a93a">SB_INFESIBLE</a> &lt;&lt; <a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>-&gt;<a class="code" href="classSVF_1_1ProgSlice.html#ac1dc48ea64a89ce37394a22e609a0cd0">getSource</a>()-&gt;<a class="code" href="classSVF_1_1GenericNode.html#ac3e55ef37aefb411ea4c87b1aa3b1895">getId</a>();</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <a class="code" href="classSVF_1_1Annotator.html#ad1424270d91f70dee1461b6301ce8091">addMDTag</a>(const_cast&lt;Instruction *&gt;(branchStmt-&gt;<a class="code" href="classSVF_1_1SVFStmt.html#a86628ea173dec4934322f5d1caf2e1db">getInst</a>()),</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; const_cast&lt;Value *&gt;(branchStmt-&gt;<a class="code" href="classSVF_1_1BranchStmt.html#a915384027ae53e99311f05a08edf99f0">getCondition</a>()-&gt;<a class="code" href="classSVF_1_1SVFVar.html#afaa33caa8d2a306f6741d9d066243e40">getValue</a>()), rawstr.str());</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;}</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#aebed471b55aa459a007d6a2cf668d886"> 109</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#aebed471b55aa459a007d6a2cf668d886">SaberAnnotator::annotateSwitch</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1BranchStmt.html">BranchStmt</a> *swithStmt, <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succPos)</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;{</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; assert(succPos &lt; swithStmt-&gt;getNumSuccessors() &amp;&amp; <span class="stringliteral">&quot;successor position not correct!&quot;</span>);</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;}</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;</div><div class="ttc" id="SaberAnnotator_8h_html"><div class="ttname"><a href="SaberAnnotator_8h.html">SaberAnnotator.h</a></div></div>
70
- <div class="ttc" id="classSVF_1_1ProgSlice_html_ac1dc48ea64a89ce37394a22e609a0cd0"><div class="ttname"><a href="classSVF_1_1ProgSlice.html#ac1dc48ea64a89ce37394a22e609a0cd0">SVF::ProgSlice::getSource</a></div><div class="ttdeci">const SVFGNode * getSource() const</div><div class="ttdoc">root and sink operations </div><div class="ttdef"><b>Definition:</b> <a href="ProgSlice_8h_source.html#l00112">ProgSlice.h:112</a></div></div>
69
+ <a href="SaberAnnotator_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">//===- SaberAnnotator.cpp -- Annotation---------------------------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// Copyright (C) &lt;2013-&gt; &lt;Yulei Sui&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">// along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">//===----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> * SaberAnnotator.cpp</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> * Created on: May 4, 2014</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> * Author: Yulei Sui</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="SaberAnnotator_8h.html">SABER/SaberAnnotator.h</a>&quot;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="ProgSlice_8h.html">SABER/ProgSlice.h</a>&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#aa9446af29edf126ad30bbada51478c13"> 38</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#aa9446af29edf126ad30bbada51478c13">SaberAnnotator::annotateSource</a>()</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;{</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; rawstr &lt;&lt; <a class="code" href="classSVF_1_1Annotator.html#a01900f5ada5948361cc18857aee26744">SB_SLICESOURCE</a> ; <span class="comment">//&lt;&lt; _curSlice-&gt;getSource()-&gt;getId();</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* sourceinst = SVFUtil::dyn_cast&lt;Instruction&gt;(<a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>-&gt;<a class="code" href="classSVF_1_1ProgSlice.html#ac1dc48ea64a89ce37394a22e609a0cd0">getSource</a>()-&gt;<a class="code" href="classSVF_1_1VFGNode.html#a5ac80149696c243f77e4b4d25ad44898">getValue</a>()))</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; {</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <a class="code" href="classSVF_1_1Annotator.html#ad1424270d91f70dee1461b6301ce8091">addMDTag</a>(const_cast&lt;Instruction*&gt;(sourceinst),rawstr.str());</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; }</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; assert(<span class="keyword">false</span> &amp;&amp; <span class="stringliteral">&quot;instruction of source node not found&quot;</span>);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;}</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#abec0f249cc64d3588e83a68ed12271bf"> 55</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#abec0f249cc64d3588e83a68ed12271bf">SaberAnnotator::annotateSinks</a>()</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;{</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="keywordflow">for</span>(ProgSlice::SVFGNodeSet::const_iterator it = <a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>-&gt;<a class="code" href="classSVF_1_1ProgSlice.html#a03a1ef4d56958fa4a0c3a3a95806203d">getSinks</a>().begin(),</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; eit = <a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>-&gt;<a class="code" href="classSVF_1_1ProgSlice.html#a03a1ef4d56958fa4a0c3a3a95806203d">getSinks</a>().end(); it!=eit; ++it)</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; {</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1ActualParmVFGNode.html">ActualParmSVFGNode</a>* ap = SVFUtil::dyn_cast&lt;ActualParmSVFGNode&gt;(*it))</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* sinkinst = ap-&gt;getCallSite()-&gt;getCallSite();</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; assert(SVFUtil::isa&lt;CallInst&gt;(sinkinst) &amp;&amp; <span class="stringliteral">&quot;not a call instruction?&quot;</span>);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#adc8b60ca7d60cf6c81feae20e4a04c63">CallInst</a>* sink = SVFUtil::cast&lt;CallInst&gt;(sinkinst);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; rawstr &lt;&lt; <a class="code" href="classSVF_1_1Annotator.html#a3edacb8703c74abf42c4a29761a3437f">SB_SLICESINK</a> &lt;&lt; <a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>-&gt;<a class="code" href="classSVF_1_1ProgSlice.html#ac1dc48ea64a89ce37394a22e609a0cd0">getSource</a>()-&gt;<a class="code" href="classSVF_1_1GenericNode.html#ac3e55ef37aefb411ea4c87b1aa3b1895">getId</a>();</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <a class="code" href="classSVF_1_1Annotator.html#ad1424270d91f70dee1461b6301ce8091">addMDTag</a>(const_cast&lt;CallInst*&gt;(sink),sink-&gt;getArgOperand(0),rawstr.str());</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; }</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; assert(<span class="keyword">false</span> &amp;&amp; <span class="stringliteral">&quot;sink node is not a actual parameter?&quot;</span>);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; }</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;}</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#a60b66e1cb775c175c88f514e202c7611"> 78</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#a60b66e1cb775c175c88f514e202c7611">SaberAnnotator::annotateFeasibleBranch</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1BranchStmt.html">BranchStmt</a> *branchStmt, <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succPos)</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;{</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; assert((succPos == 0 || succPos == 1) &amp;&amp; <span class="stringliteral">&quot;branch instruction should only have two successors&quot;</span>);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; rawstr &lt;&lt; <a class="code" href="classSVF_1_1Annotator.html#ac58473072d90baa6dc377b45f18d0da5">SB_FESIBLE</a> &lt;&lt; <a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>-&gt;<a class="code" href="classSVF_1_1ProgSlice.html#ac1dc48ea64a89ce37394a22e609a0cd0">getSource</a>()-&gt;<a class="code" href="classSVF_1_1GenericNode.html#ac3e55ef37aefb411ea4c87b1aa3b1895">getId</a>();</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <a class="code" href="classSVF_1_1Annotator.html#ad1424270d91f70dee1461b6301ce8091">addMDTag</a>(const_cast&lt;Instruction *&gt;(branchStmt-&gt;<a class="code" href="classSVF_1_1SVFStmt.html#a86628ea173dec4934322f5d1caf2e1db">getInst</a>()),</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; const_cast&lt;Value *&gt;(branchStmt-&gt;<a class="code" href="classSVF_1_1BranchStmt.html#a915384027ae53e99311f05a08edf99f0">getCondition</a>()-&gt;<a class="code" href="classSVF_1_1SVFVar.html#afaa33caa8d2a306f6741d9d066243e40">getValue</a>()), rawstr.str());</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;}</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#a7982caf8a058f805ae6e777ce2366246"> 93</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#a7982caf8a058f805ae6e777ce2366246">SaberAnnotator::annotateInfeasibleBranch</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1BranchStmt.html">BranchStmt</a> *branchStmt, <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succPos)</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;{</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; assert((succPos == 0 || succPos == 1) &amp;&amp; <span class="stringliteral">&quot;branch instruction should only have two successors&quot;</span>);</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; rawstr &lt;&lt; <a class="code" href="classSVF_1_1Annotator.html#a556138c152d52921d6f0a709a826a93a">SB_INFESIBLE</a> &lt;&lt; <a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>-&gt;<a class="code" href="classSVF_1_1ProgSlice.html#ac1dc48ea64a89ce37394a22e609a0cd0">getSource</a>()-&gt;<a class="code" href="classSVF_1_1GenericNode.html#ac3e55ef37aefb411ea4c87b1aa3b1895">getId</a>();</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <a class="code" href="classSVF_1_1Annotator.html#ad1424270d91f70dee1461b6301ce8091">addMDTag</a>(const_cast&lt;Instruction *&gt;(branchStmt-&gt;<a class="code" href="classSVF_1_1SVFStmt.html#a86628ea173dec4934322f5d1caf2e1db">getInst</a>()),</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; const_cast&lt;Value *&gt;(branchStmt-&gt;<a class="code" href="classSVF_1_1BranchStmt.html#a915384027ae53e99311f05a08edf99f0">getCondition</a>()-&gt;<a class="code" href="classSVF_1_1SVFVar.html#afaa33caa8d2a306f6741d9d066243e40">getValue</a>()), rawstr.str());</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;}</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#aebed471b55aa459a007d6a2cf668d886"> 109</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#aebed471b55aa459a007d6a2cf668d886">SaberAnnotator::annotateSwitch</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1BranchStmt.html">BranchStmt</a> *swithStmt, <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succPos)</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;{</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; assert(succPos &lt; swithStmt-&gt;getNumSuccessors() &amp;&amp; <span class="stringliteral">&quot;successor position not correct!&quot;</span>);</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;}</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;</div><div class="ttc" id="SaberAnnotator_8h_html"><div class="ttname"><a href="SaberAnnotator_8h.html">SaberAnnotator.h</a></div></div>
70
+ <div class="ttc" id="classSVF_1_1ProgSlice_html_ac1dc48ea64a89ce37394a22e609a0cd0"><div class="ttname"><a href="classSVF_1_1ProgSlice.html#ac1dc48ea64a89ce37394a22e609a0cd0">SVF::ProgSlice::getSource</a></div><div class="ttdeci">const SVFGNode * getSource() const</div><div class="ttdoc">root and sink operations </div><div class="ttdef"><b>Definition:</b> <a href="ProgSlice_8h_source.html#l00119">ProgSlice.h:119</a></div></div>
71
71
  <div class="ttc" id="classSVF_1_1ActualParmVFGNode_html"><div class="ttname"><a href="classSVF_1_1ActualParmVFGNode.html">SVF::ActualParmVFGNode</a></div><div class="ttdef"><b>Definition:</b> <a href="VFGNode_8h_source.html#l00846">VFGNode.h:846</a></div></div>
72
72
  <div class="ttc" id="classSVF_1_1Annotator_html_ac58473072d90baa6dc377b45f18d0da5"><div class="ttname"><a href="classSVF_1_1Annotator.html#ac58473072d90baa6dc377b45f18d0da5">SVF::Annotator::SB_FESIBLE</a></div><div class="ttdeci">const char * SB_FESIBLE</div><div class="ttdef"><b>Definition:</b> <a href="Annotator_8h_source.html#l00176">Annotator.h:176</a></div></div>
73
73
  <div class="ttc" id="classSVF_1_1SaberAnnotator_html_a7982caf8a058f805ae6e777ce2366246"><div class="ttname"><a href="classSVF_1_1SaberAnnotator.html#a7982caf8a058f805ae6e777ce2366246">SVF::SaberAnnotator::annotateInfeasibleBranch</a></div><div class="ttdeci">void annotateInfeasibleBranch(const BranchStmt *branchStmt, u32_t succPos)</div><div class="ttdef"><b>Definition:</b> <a href="SaberAnnotator_8cpp_source.html#l00093">SaberAnnotator.cpp:93</a></div></div>
@@ -90,7 +90,7 @@ $(function() {
90
90
  <div class="ttc" id="classSVF_1_1GenericNode_html_ac3e55ef37aefb411ea4c87b1aa3b1895"><div class="ttname"><a href="classSVF_1_1GenericNode.html#ac3e55ef37aefb411ea4c87b1aa3b1895">SVF::GenericNode::getId</a></div><div class="ttdeci">NodeID getId() const</div><div class="ttdoc">Get ID. </div><div class="ttdef"><b>Definition:</b> <a href="GenericGraph_8h_source.html#l00169">GenericGraph.h:169</a></div></div>
91
91
  <div class="ttc" id="classSVF_1_1Annotator_html_a3edacb8703c74abf42c4a29761a3437f"><div class="ttname"><a href="classSVF_1_1Annotator.html#a3edacb8703c74abf42c4a29761a3437f">SVF::Annotator::SB_SLICESINK</a></div><div class="ttdeci">const char * SB_SLICESINK</div><div class="ttdef"><b>Definition:</b> <a href="Annotator_8h_source.html#l00175">Annotator.h:175</a></div></div>
92
92
  <div class="ttc" id="classSVF_1_1SaberAnnotator_html_abec0f249cc64d3588e83a68ed12271bf"><div class="ttname"><a href="classSVF_1_1SaberAnnotator.html#abec0f249cc64d3588e83a68ed12271bf">SVF::SaberAnnotator::annotateSinks</a></div><div class="ttdeci">void annotateSinks()</div><div class="ttdef"><b>Definition:</b> <a href="SaberAnnotator_8cpp_source.html#l00055">SaberAnnotator.cpp:55</a></div></div>
93
- <div class="ttc" id="classSVF_1_1ProgSlice_html_a03a1ef4d56958fa4a0c3a3a95806203d"><div class="ttname"><a href="classSVF_1_1ProgSlice.html#a03a1ef4d56958fa4a0c3a3a95806203d">SVF::ProgSlice::getSinks</a></div><div class="ttdeci">const SVFGNodeSet &amp; getSinks() const</div><div class="ttdef"><b>Definition:</b> <a href="ProgSlice_8h_source.html#l00120">ProgSlice.h:120</a></div></div>
93
+ <div class="ttc" id="classSVF_1_1ProgSlice_html_a03a1ef4d56958fa4a0c3a3a95806203d"><div class="ttname"><a href="classSVF_1_1ProgSlice.html#a03a1ef4d56958fa4a0c3a3a95806203d">SVF::ProgSlice::getSinks</a></div><div class="ttdeci">const SVFGNodeSet &amp; getSinks() const</div><div class="ttdef"><b>Definition:</b> <a href="ProgSlice_8h_source.html#l00127">ProgSlice.h:127</a></div></div>
94
94
  <div class="ttc" id="cJSON_8h_html_ad4c68ea99a26b0a98ad9a79982960458"><div class="ttname"><a href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">string</a></div><div class="ttdeci">const char *const string</div><div class="ttdef"><b>Definition:</b> <a href="cJSON_8h_source.html#l00172">cJSON.h:172</a></div></div>
95
95
  <div class="ttc" id="classSVF_1_1SVFStmt_html_a86628ea173dec4934322f5d1caf2e1db"><div class="ttname"><a href="classSVF_1_1SVFStmt.html#a86628ea173dec4934322f5d1caf2e1db">SVF::SVFStmt::getInst</a></div><div class="ttdeci">const Instruction * getInst() const</div><div class="ttdoc">Get/set methods for llvm instruction. </div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8h_source.html#l00107">SVFStatements.h:107</a></div></div>
96
96
  <div class="ttc" id="ProgSlice_8h_html"><div class="ttname"><a href="ProgSlice_8h.html">ProgSlice.h</a></div></div>
@@ -66,7 +66,7 @@ $(function() {
66
66
  <div class="title">SaberAnnotator.h</div> </div>
67
67
  </div><!--header-->
68
68
  <div class="contents">
69
- <a href="SaberAnnotator_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">//===- SaberAnnotator.h -- Annotating LLVM IR---------------------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// Copyright (C) &lt;2013-2017&gt; &lt;Yulei Sui&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">// along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">//===----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> * SaberAnnotator.h</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> * Created on: May 4, 2014</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> * Author: Yulei Sui</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#ifndef SABERANNOTATOR_H_</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#define SABERANNOTATOR_H_</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="SVFStatements_8h.html">MemoryModel/SVFStatements.h</a>&gt;</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Annotator_8h.html">Util/Annotator.h</a>&quot;</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceSVF.html">SVF</a></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;{</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="keyword">class </span>ProgSlice;</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html"> 43</a></span>&#160;<span class="keyword">class </span><a class="code" href="classSVF_1_1SaberAnnotator.html">SaberAnnotator</a> : <span class="keyword">public</span> <a class="code" href="classSVF_1_1Annotator.html">Annotator</a></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;{</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d"> 47</a></span>&#160; <span class="keyword">const</span> <a class="code" href="classSVF_1_1ProgSlice.html">ProgSlice</a>* <a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#a76cef1b7443870816e4f31877702380f"> 50</a></span>&#160; <a class="code" href="classSVF_1_1SaberAnnotator.html#a76cef1b7443870816e4f31877702380f">SaberAnnotator</a>(<a class="code" href="classSVF_1_1ProgSlice.html">ProgSlice</a>* slice): _curSlice(slice)</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; {</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; }</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#a6a42eb94fe1604eba729c9f7b449b93c"> 55</a></span>&#160; <span class="keyword">virtual</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#a6a42eb94fe1604eba729c9f7b449b93c">~SaberAnnotator</a>()</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; {</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; }</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#aa9446af29edf126ad30bbada51478c13">annotateSource</a>();</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#abec0f249cc64d3588e83a68ed12271bf">annotateSinks</a>();</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#a60b66e1cb775c175c88f514e202c7611">annotateFeasibleBranch</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1BranchStmt.html">BranchStmt</a> *branchStmt, <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succPos);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#a7982caf8a058f805ae6e777ce2366246">annotateInfeasibleBranch</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1BranchStmt.html">BranchStmt</a> *branchStmt, <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succPos);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#aebed471b55aa459a007d6a2cf668d886">annotateSwitch</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1BranchStmt.html">BranchStmt</a> *swithStmt, <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succPos);</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;};</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;} <span class="comment">// End namespace SVF</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* SABERANNOTATOR_H_ */</span><span class="preprocessor"></span></div><div class="ttc" id="classSVF_1_1SaberAnnotator_html_a76cef1b7443870816e4f31877702380f"><div class="ttname"><a href="classSVF_1_1SaberAnnotator.html#a76cef1b7443870816e4f31877702380f">SVF::SaberAnnotator::SaberAnnotator</a></div><div class="ttdeci">SaberAnnotator(ProgSlice *slice)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> <a href="SaberAnnotator_8h_source.html#l00050">SaberAnnotator.h:50</a></div></div>
69
+ <a href="SaberAnnotator_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">//===- SaberAnnotator.h -- Annotating LLVM IR---------------------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// Copyright (C) &lt;2013-&gt; &lt;Yulei Sui&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">// along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">//===----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> * SaberAnnotator.h</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> * Created on: May 4, 2014</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> * Author: Yulei Sui</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#ifndef SABERANNOTATOR_H_</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#define SABERANNOTATOR_H_</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="SVFStatements_8h.html">MemoryModel/SVFStatements.h</a>&gt;</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Annotator_8h.html">Util/Annotator.h</a>&quot;</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceSVF.html">SVF</a></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;{</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="keyword">class </span>ProgSlice;</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html"> 43</a></span>&#160;<span class="keyword">class </span><a class="code" href="classSVF_1_1SaberAnnotator.html">SaberAnnotator</a> : <span class="keyword">public</span> <a class="code" href="classSVF_1_1Annotator.html">Annotator</a></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;{</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d"> 47</a></span>&#160; <span class="keyword">const</span> <a class="code" href="classSVF_1_1ProgSlice.html">ProgSlice</a>* <a class="code" href="classSVF_1_1SaberAnnotator.html#adceb8a459b44c289413401b57d8aeb4d">_curSlice</a>;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#a76cef1b7443870816e4f31877702380f"> 50</a></span>&#160; <a class="code" href="classSVF_1_1SaberAnnotator.html#a76cef1b7443870816e4f31877702380f">SaberAnnotator</a>(<a class="code" href="classSVF_1_1ProgSlice.html">ProgSlice</a>* slice): _curSlice(slice)</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; {</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; }</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberAnnotator.html#a6a42eb94fe1604eba729c9f7b449b93c"> 55</a></span>&#160; <span class="keyword">virtual</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#a6a42eb94fe1604eba729c9f7b449b93c">~SaberAnnotator</a>()</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; {</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; }</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#aa9446af29edf126ad30bbada51478c13">annotateSource</a>();</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#abec0f249cc64d3588e83a68ed12271bf">annotateSinks</a>();</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#a60b66e1cb775c175c88f514e202c7611">annotateFeasibleBranch</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1BranchStmt.html">BranchStmt</a> *branchStmt, <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succPos);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#a7982caf8a058f805ae6e777ce2366246">annotateInfeasibleBranch</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1BranchStmt.html">BranchStmt</a> *branchStmt, <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succPos);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1SaberAnnotator.html#aebed471b55aa459a007d6a2cf668d886">annotateSwitch</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1BranchStmt.html">BranchStmt</a> *swithStmt, <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succPos);</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;};</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;} <span class="comment">// End namespace SVF</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* SABERANNOTATOR_H_ */</span><span class="preprocessor"></span></div><div class="ttc" id="classSVF_1_1SaberAnnotator_html_a76cef1b7443870816e4f31877702380f"><div class="ttname"><a href="classSVF_1_1SaberAnnotator.html#a76cef1b7443870816e4f31877702380f">SVF::SaberAnnotator::SaberAnnotator</a></div><div class="ttdeci">SaberAnnotator(ProgSlice *slice)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> <a href="SaberAnnotator_8h_source.html#l00050">SaberAnnotator.h:50</a></div></div>
70
70
  <div class="ttc" id="SVFStatements_8h_html"><div class="ttname"><a href="SVFStatements_8h.html">SVFStatements.h</a></div></div>
71
71
  <div class="ttc" id="classSVF_1_1Annotator_html"><div class="ttname"><a href="classSVF_1_1Annotator.html">SVF::Annotator</a></div><div class="ttdef"><b>Definition:</b> <a href="Annotator_8h_source.html#l00020">Annotator.h:20</a></div></div>
72
72
  <div class="ttc" id="classSVF_1_1SaberAnnotator_html_a7982caf8a058f805ae6e777ce2366246"><div class="ttname"><a href="classSVF_1_1SaberAnnotator.html#a7982caf8a058f805ae6e777ce2366246">SVF::SaberAnnotator::annotateInfeasibleBranch</a></div><div class="ttdeci">void annotateInfeasibleBranch(const BranchStmt *branchStmt, u32_t succPos)</div><div class="ttdef"><b>Definition:</b> <a href="SaberAnnotator_8cpp_source.html#l00093">SaberAnnotator.cpp:93</a></div></div>
@@ -79,7 +79,7 @@ $(function() {
79
79
  <div class="ttc" id="classSVF_1_1SaberAnnotator_html_a60b66e1cb775c175c88f514e202c7611"><div class="ttname"><a href="classSVF_1_1SaberAnnotator.html#a60b66e1cb775c175c88f514e202c7611">SVF::SaberAnnotator::annotateFeasibleBranch</a></div><div class="ttdeci">void annotateFeasibleBranch(const BranchStmt *branchStmt, u32_t succPos)</div><div class="ttdef"><b>Definition:</b> <a href="SaberAnnotator_8cpp_source.html#l00078">SaberAnnotator.cpp:78</a></div></div>
80
80
  <div class="ttc" id="namespaceSVF_html"><div class="ttname"><a href="namespaceSVF.html">SVF</a></div><div class="ttdoc">for isBitcode </div><div class="ttdef"><b>Definition:</b> <a href="CFGNormalizer_8h_source.html#l00035">CFGNormalizer.h:35</a></div></div>
81
81
  <div class="ttc" id="classSVF_1_1SaberAnnotator_html_abec0f249cc64d3588e83a68ed12271bf"><div class="ttname"><a href="classSVF_1_1SaberAnnotator.html#abec0f249cc64d3588e83a68ed12271bf">SVF::SaberAnnotator::annotateSinks</a></div><div class="ttdeci">void annotateSinks()</div><div class="ttdef"><b>Definition:</b> <a href="SaberAnnotator_8cpp_source.html#l00055">SaberAnnotator.cpp:55</a></div></div>
82
- <div class="ttc" id="classSVF_1_1ProgSlice_html"><div class="ttname"><a href="classSVF_1_1ProgSlice.html">SVF::ProgSlice</a></div><div class="ttdef"><b>Definition:</b> <a href="ProgSlice_8h_source.html#l00041">ProgSlice.h:41</a></div></div>
82
+ <div class="ttc" id="classSVF_1_1ProgSlice_html"><div class="ttname"><a href="classSVF_1_1ProgSlice.html">SVF::ProgSlice</a></div><div class="ttdef"><b>Definition:</b> <a href="ProgSlice_8h_source.html#l00048">ProgSlice.h:48</a></div></div>
83
83
  <div class="ttc" id="classSVF_1_1SaberAnnotator_html_a6a42eb94fe1604eba729c9f7b449b93c"><div class="ttname"><a href="classSVF_1_1SaberAnnotator.html#a6a42eb94fe1604eba729c9f7b449b93c">SVF::SaberAnnotator::~SaberAnnotator</a></div><div class="ttdeci">virtual ~SaberAnnotator()</div><div class="ttdoc">Destructor. </div><div class="ttdef"><b>Definition:</b> <a href="SaberAnnotator_8h_source.html#l00055">SaberAnnotator.h:55</a></div></div>
84
84
  <div class="ttc" id="classSVF_1_1SaberAnnotator_html"><div class="ttname"><a href="classSVF_1_1SaberAnnotator.html">SVF::SaberAnnotator</a></div><div class="ttdef"><b>Definition:</b> <a href="SaberAnnotator_8h_source.html#l00043">SaberAnnotator.h:43</a></div></div>
85
85
  </div><!-- fragment --></div><!-- contents -->
@@ -66,7 +66,7 @@ $(function() {
66
66
  <div class="title">SaberCheckerAPI.cpp</div> </div>
67
67
  </div><!--header-->
68
68
  <div class="contents">
69
- <a href="SaberCheckerAPI_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">//===- SaberCheckerAPI.cpp -- API for checkers-------------------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// Copyright (C) &lt;2013-2017&gt; &lt;Yulei Sui&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">// along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">//===----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> * SaberCheckerAPI.cpp</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> * Created on: Apr 23, 2014</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> * Author: Yulei Sui</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="SaberCheckerAPI_8h.html">SABER/SaberCheckerAPI.h</a>&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<a class="code" href="classSVF_1_1SaberCheckerAPI.html">SaberCheckerAPI</a>* SaberCheckerAPI::ckAPI = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">namespace</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;{</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="keyword">struct </span>ei_pair</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;{</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="cJSON_8cpp.html#ab6e2ea6dc7bd57d1483413449998230a">n</a>;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <a class="code" href="classSVF_1_1SaberCheckerAPI.html#a32f3c37a5957dc7533f7e82617d5d056">SaberCheckerAPI::CHECKER_TYPE</a> t;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;};</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;} <span class="comment">// End anonymous namespace</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="comment">//Each (name, type) pair will be inserted into the map.</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="comment">//All entries of the same type must occur together (for error detection).</span></div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="SaberCheckerAPI_8cpp.html#aa5c38361a7f02befa83ea45388056ea1"> 51</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> ei_pair <a class="code" href="SaberCheckerAPI_8cpp.html#aa5c38361a7f02befa83ea45388056ea1">ei_pairs</a>[]=</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;{</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; {<span class="stringliteral">&quot;alloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; {<span class="stringliteral">&quot;alloc_check&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; {<span class="stringliteral">&quot;alloc_clear&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; {<span class="stringliteral">&quot;calloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; {<span class="stringliteral">&quot;jpeg_alloc_huff_table&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; {<span class="stringliteral">&quot;jpeg_alloc_quant_table&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; {<span class="stringliteral">&quot;lalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; {<span class="stringliteral">&quot;lalloc_clear&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; {<span class="stringliteral">&quot;malloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; {<span class="stringliteral">&quot;nhalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; {<span class="stringliteral">&quot;oballoc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; {<span class="stringliteral">&quot;permalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; {<span class="stringliteral">&quot;png_create_info_struct&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; {<span class="stringliteral">&quot;png_create_write_struct&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; {<span class="stringliteral">&quot;safe_calloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; {<span class="stringliteral">&quot;safe_malloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; {<span class="stringliteral">&quot;safecalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; {<span class="stringliteral">&quot;safemalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; {<span class="stringliteral">&quot;safexcalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; {<span class="stringliteral">&quot;safexmalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; {<span class="stringliteral">&quot;savealloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; {<span class="stringliteral">&quot;xalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; {<span class="stringliteral">&quot;xcalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; {<span class="stringliteral">&quot;xmalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; {<span class="stringliteral">&quot;SSL_CTX_new&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; {<span class="stringliteral">&quot;SSL_new&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; {<span class="stringliteral">&quot;VOS_MemAlloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; {<span class="stringliteral">&quot;VOS_MemFree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; {<span class="stringliteral">&quot;cfree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; {<span class="stringliteral">&quot;free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; {<span class="stringliteral">&quot;free_all_mem&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; {<span class="stringliteral">&quot;freeaddrinfo&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; {<span class="stringliteral">&quot;gcry_mpi_release&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; {<span class="stringliteral">&quot;gcry_sexp_release&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; {<span class="stringliteral">&quot;globfree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; {<span class="stringliteral">&quot;nhfree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; {<span class="stringliteral">&quot;obstack_free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; {<span class="stringliteral">&quot;safe_cfree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; {<span class="stringliteral">&quot;safe_free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; {<span class="stringliteral">&quot;safefree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; {<span class="stringliteral">&quot;safexfree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; {<span class="stringliteral">&quot;sm_free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; {<span class="stringliteral">&quot;vim_free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; {<span class="stringliteral">&quot;xfree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; {<span class="stringliteral">&quot;SSL_CTX_free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; {<span class="stringliteral">&quot;SSL_free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; {<span class="stringliteral">&quot;XFree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; {<span class="stringliteral">&quot;fopen&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; {<span class="stringliteral">&quot;\01_fopen&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; {<span class="stringliteral">&quot;\01fopen64&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; {<span class="stringliteral">&quot;\01readdir64&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; {<span class="stringliteral">&quot;\01tmpfile64&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; {<span class="stringliteral">&quot;fopen64&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; {<span class="stringliteral">&quot;XOpenDisplay&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; {<span class="stringliteral">&quot;XtOpenDisplay&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; {<span class="stringliteral">&quot;fopencookie&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; {<span class="stringliteral">&quot;popen&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; {<span class="stringliteral">&quot;readdir&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; {<span class="stringliteral">&quot;readdir64&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; {<span class="stringliteral">&quot;gzdopen&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; {<span class="stringliteral">&quot;iconv_open&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; {<span class="stringliteral">&quot;tmpfile&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; {<span class="stringliteral">&quot;tmpfile64&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; {<span class="stringliteral">&quot;BIO_new_socket&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; {<span class="stringliteral">&quot;gcry_md_open&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; {<span class="stringliteral">&quot;gcry_cipher_open&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; {<span class="stringliteral">&quot;fclose&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; {<span class="stringliteral">&quot;XCloseDisplay&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; {<span class="stringliteral">&quot;XtCloseDisplay&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; {<span class="stringliteral">&quot;__res_nclose&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; {<span class="stringliteral">&quot;pclose&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; {<span class="stringliteral">&quot;closedir&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; {<span class="stringliteral">&quot;dlclose&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; {<span class="stringliteral">&quot;gzclose&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; {<span class="stringliteral">&quot;iconv_close&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; {<span class="stringliteral">&quot;gcry_md_close&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; {<span class="stringliteral">&quot;gcry_cipher_close&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="comment">//This must be the last entry.</span></div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; {0, SaberCheckerAPI::CK_DUMMY}</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;};</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberCheckerAPI.html#a5771df69ffa75b6103a32c8bd48ef488"> 144</a></span>&#160;<span class="keywordtype">void</span> SaberCheckerAPI::init()</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;{</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; set&lt;CHECKER_TYPE&gt; t_seen;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <a class="code" href="classSVF_1_1SaberCheckerAPI.html#a32f3c37a5957dc7533f7e82617d5d056">CHECKER_TYPE</a> prev_t= CK_DUMMY;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; t_seen.insert(CK_DUMMY);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keywordflow">for</span>(<span class="keyword">const</span> ei_pair *<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>= ei_pairs; <a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;n; ++<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>)</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; {</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="keywordflow">if</span>(<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;t != prev_t)</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; {</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="comment">//This will detect if you move an entry to another block</span></div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <span class="comment">// but forget to change the type.</span></div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordflow">if</span>(t_seen.count(<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;t))</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; {</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; fputs(<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;n, stderr);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; putc(<span class="charliteral">&#39;\n&#39;</span>, stderr);</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; assert(!<span class="stringliteral">&quot;ei_pairs not grouped by type&quot;</span>);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; }</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; t_seen.insert(<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;t);</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; prev_t= <a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;t;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; }</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="keywordflow">if</span>(tdAPIMap.count(<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;n))</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; {</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; fputs(<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;n, stderr);</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; putc(<span class="charliteral">&#39;\n&#39;</span>, stderr);</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; assert(!<span class="stringliteral">&quot;duplicate name in ei_pairs&quot;</span>);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; }</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; tdAPIMap[<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;n]= <a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;t;</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; }</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160;}</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div><div class="ttc" id="cJSON_8cpp_html_a009ef1d888ab6dbe77e6b42b0b39f1ae"><div class="ttname"><a href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a></div><div class="ttdeci">cJSON * p</div><div class="ttdef"><b>Definition:</b> <a href="cJSON_8cpp_source.html#l02559">cJSON.cpp:2559</a></div></div>
69
+ <a href="SaberCheckerAPI_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">//===- SaberCheckerAPI.cpp -- API for checkers-------------------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// Copyright (C) &lt;2013-&gt; &lt;Yulei Sui&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">// along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">//===----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> * SaberCheckerAPI.cpp</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> * Created on: Apr 23, 2014</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> * Author: Yulei Sui</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="SaberCheckerAPI_8h.html">SABER/SaberCheckerAPI.h</a>&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<a class="code" href="classSVF_1_1SaberCheckerAPI.html">SaberCheckerAPI</a>* SaberCheckerAPI::ckAPI = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">namespace</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;{</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="keyword">struct </span>ei_pair</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;{</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="cJSON_8cpp.html#ab6e2ea6dc7bd57d1483413449998230a">n</a>;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <a class="code" href="classSVF_1_1SaberCheckerAPI.html#a32f3c37a5957dc7533f7e82617d5d056">SaberCheckerAPI::CHECKER_TYPE</a> t;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;};</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;} <span class="comment">// End anonymous namespace</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="comment">//Each (name, type) pair will be inserted into the map.</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="comment">//All entries of the same type must occur together (for error detection).</span></div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="SaberCheckerAPI_8cpp.html#aa5c38361a7f02befa83ea45388056ea1"> 51</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> ei_pair <a class="code" href="SaberCheckerAPI_8cpp.html#aa5c38361a7f02befa83ea45388056ea1">ei_pairs</a>[]=</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;{</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; {<span class="stringliteral">&quot;alloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; {<span class="stringliteral">&quot;alloc_check&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; {<span class="stringliteral">&quot;alloc_clear&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; {<span class="stringliteral">&quot;calloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; {<span class="stringliteral">&quot;jpeg_alloc_huff_table&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; {<span class="stringliteral">&quot;jpeg_alloc_quant_table&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; {<span class="stringliteral">&quot;lalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; {<span class="stringliteral">&quot;lalloc_clear&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; {<span class="stringliteral">&quot;malloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; {<span class="stringliteral">&quot;nhalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; {<span class="stringliteral">&quot;oballoc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; {<span class="stringliteral">&quot;permalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; {<span class="stringliteral">&quot;png_create_info_struct&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; {<span class="stringliteral">&quot;png_create_write_struct&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; {<span class="stringliteral">&quot;safe_calloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; {<span class="stringliteral">&quot;safe_malloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; {<span class="stringliteral">&quot;safecalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; {<span class="stringliteral">&quot;safemalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; {<span class="stringliteral">&quot;safexcalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; {<span class="stringliteral">&quot;safexmalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; {<span class="stringliteral">&quot;savealloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; {<span class="stringliteral">&quot;xalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; {<span class="stringliteral">&quot;xcalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; {<span class="stringliteral">&quot;xmalloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; {<span class="stringliteral">&quot;SSL_CTX_new&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; {<span class="stringliteral">&quot;SSL_new&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; {<span class="stringliteral">&quot;VOS_MemAlloc&quot;</span>, SaberCheckerAPI::CK_ALLOC},</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; {<span class="stringliteral">&quot;VOS_MemFree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; {<span class="stringliteral">&quot;cfree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; {<span class="stringliteral">&quot;free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; {<span class="stringliteral">&quot;free_all_mem&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; {<span class="stringliteral">&quot;freeaddrinfo&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; {<span class="stringliteral">&quot;gcry_mpi_release&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; {<span class="stringliteral">&quot;gcry_sexp_release&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; {<span class="stringliteral">&quot;globfree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; {<span class="stringliteral">&quot;nhfree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; {<span class="stringliteral">&quot;obstack_free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; {<span class="stringliteral">&quot;safe_cfree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; {<span class="stringliteral">&quot;safe_free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; {<span class="stringliteral">&quot;safefree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; {<span class="stringliteral">&quot;safexfree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; {<span class="stringliteral">&quot;sm_free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; {<span class="stringliteral">&quot;vim_free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; {<span class="stringliteral">&quot;xfree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; {<span class="stringliteral">&quot;SSL_CTX_free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; {<span class="stringliteral">&quot;SSL_free&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; {<span class="stringliteral">&quot;XFree&quot;</span>, SaberCheckerAPI::CK_FREE},</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; {<span class="stringliteral">&quot;fopen&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; {<span class="stringliteral">&quot;\01_fopen&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; {<span class="stringliteral">&quot;\01fopen64&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; {<span class="stringliteral">&quot;\01readdir64&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; {<span class="stringliteral">&quot;\01tmpfile64&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; {<span class="stringliteral">&quot;fopen64&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; {<span class="stringliteral">&quot;XOpenDisplay&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; {<span class="stringliteral">&quot;XtOpenDisplay&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; {<span class="stringliteral">&quot;fopencookie&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; {<span class="stringliteral">&quot;popen&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; {<span class="stringliteral">&quot;readdir&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; {<span class="stringliteral">&quot;readdir64&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; {<span class="stringliteral">&quot;gzdopen&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; {<span class="stringliteral">&quot;iconv_open&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; {<span class="stringliteral">&quot;tmpfile&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; {<span class="stringliteral">&quot;tmpfile64&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; {<span class="stringliteral">&quot;BIO_new_socket&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; {<span class="stringliteral">&quot;gcry_md_open&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; {<span class="stringliteral">&quot;gcry_cipher_open&quot;</span>, SaberCheckerAPI::CK_FOPEN},</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; {<span class="stringliteral">&quot;fclose&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; {<span class="stringliteral">&quot;XCloseDisplay&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; {<span class="stringliteral">&quot;XtCloseDisplay&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; {<span class="stringliteral">&quot;__res_nclose&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; {<span class="stringliteral">&quot;pclose&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; {<span class="stringliteral">&quot;closedir&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; {<span class="stringliteral">&quot;dlclose&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; {<span class="stringliteral">&quot;gzclose&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; {<span class="stringliteral">&quot;iconv_close&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; {<span class="stringliteral">&quot;gcry_md_close&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; {<span class="stringliteral">&quot;gcry_cipher_close&quot;</span>, SaberCheckerAPI::CK_FCLOSE},</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="comment">//This must be the last entry.</span></div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; {0, SaberCheckerAPI::CK_DUMMY}</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;};</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="classSVF_1_1SaberCheckerAPI.html#a5771df69ffa75b6103a32c8bd48ef488"> 144</a></span>&#160;<span class="keywordtype">void</span> SaberCheckerAPI::init()</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;{</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; set&lt;CHECKER_TYPE&gt; t_seen;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <a class="code" href="classSVF_1_1SaberCheckerAPI.html#a32f3c37a5957dc7533f7e82617d5d056">CHECKER_TYPE</a> prev_t= CK_DUMMY;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; t_seen.insert(CK_DUMMY);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keywordflow">for</span>(<span class="keyword">const</span> ei_pair *<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>= ei_pairs; <a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;n; ++<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>)</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; {</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="keywordflow">if</span>(<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;t != prev_t)</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; {</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="comment">//This will detect if you move an entry to another block</span></div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <span class="comment">// but forget to change the type.</span></div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordflow">if</span>(t_seen.count(<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;t))</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; {</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; fputs(<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;n, stderr);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; putc(<span class="charliteral">&#39;\n&#39;</span>, stderr);</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; assert(!<span class="stringliteral">&quot;ei_pairs not grouped by type&quot;</span>);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; }</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; t_seen.insert(<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;t);</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; prev_t= <a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;t;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; }</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="keywordflow">if</span>(tdAPIMap.count(<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;n))</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; {</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; fputs(<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;n, stderr);</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; putc(<span class="charliteral">&#39;\n&#39;</span>, stderr);</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; assert(!<span class="stringliteral">&quot;duplicate name in ei_pairs&quot;</span>);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; }</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; tdAPIMap[<a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;n]= <a class="code" href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a>-&gt;t;</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; }</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160;}</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div><div class="ttc" id="cJSON_8cpp_html_a009ef1d888ab6dbe77e6b42b0b39f1ae"><div class="ttname"><a href="cJSON_8cpp.html#a009ef1d888ab6dbe77e6b42b0b39f1ae">p</a></div><div class="ttdeci">cJSON * p</div><div class="ttdef"><b>Definition:</b> <a href="cJSON_8cpp_source.html#l02559">cJSON.cpp:2559</a></div></div>
70
70
  <div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div></div>
71
71
  <div class="ttc" id="cJSON_8cpp_html_ab6e2ea6dc7bd57d1483413449998230a"><div class="ttname"><a href="cJSON_8cpp.html#ab6e2ea6dc7bd57d1483413449998230a">n</a></div><div class="ttdeci">cJSON * n</div><div class="ttdef"><b>Definition:</b> <a href="cJSON_8cpp_source.html#l02558">cJSON.cpp:2558</a></div></div>
72
72
  <div class="ttc" id="classSVF_1_1SaberCheckerAPI_html"><div class="ttname"><a href="classSVF_1_1SaberCheckerAPI.html">SVF::SaberCheckerAPI</a></div><div class="ttdef"><b>Definition:</b> <a href="SaberCheckerAPI_8h_source.html#l00044">SaberCheckerAPI.h:44</a></div></div>