arkanalyzer 1.0.85 → 1.0.87

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 (400) hide show
  1. package/README.en.md +69 -65
  2. package/README.md +56 -70
  3. package/config/arkanalyzer.json +7 -2
  4. package/docs/cppFrontend/ArkAnalyzer-cpp_usage_guide.md +245 -0
  5. package/docs/cppFrontend/cpp_frontend_build_guide.md +126 -0
  6. package/docs/cppFrontend/cpp_frontend_user_guide.md +175 -0
  7. package/docs/cppFrontend/img.png +0 -0
  8. package/docs/cppFrontend/img_1.png +0 -0
  9. package/docs/cppFrontend/img_10.png +0 -0
  10. package/docs/cppFrontend/img_11.png +0 -0
  11. package/docs/cppFrontend/img_12.png +0 -0
  12. package/docs/cppFrontend/img_13.png +0 -0
  13. package/docs/cppFrontend/img_14.png +0 -0
  14. package/docs/cppFrontend/img_15.png +0 -0
  15. package/docs/cppFrontend/img_16.png +0 -0
  16. package/docs/cppFrontend/img_17.png +0 -0
  17. package/docs/cppFrontend/img_18.png +0 -0
  18. package/docs/cppFrontend/img_19.png +0 -0
  19. package/docs/cppFrontend/img_2.png +0 -0
  20. package/docs/cppFrontend/img_20.png +0 -0
  21. package/docs/cppFrontend/img_21.png +0 -0
  22. package/docs/cppFrontend/img_22.png +0 -0
  23. package/docs/cppFrontend/img_23.png +0 -0
  24. package/docs/cppFrontend/img_3.png +0 -0
  25. package/docs/cppFrontend/img_4.png +0 -0
  26. package/docs/cppFrontend/img_5.png +0 -0
  27. package/docs/cppFrontend/img_6.png +0 -0
  28. package/docs/cppFrontend/img_7.png +0 -0
  29. package/docs/cppFrontend/img_8.png +0 -0
  30. package/docs/cppFrontend/img_9.png +0 -0
  31. package/docs/sig_programanalysis.en.md +66 -0
  32. package/docs/sig_programanalysis.md +73 -0
  33. package/lib/Config.d.ts +32 -1
  34. package/lib/Config.d.ts.map +1 -1
  35. package/lib/Config.js +76 -2
  36. package/lib/Scene.d.ts +25 -2
  37. package/lib/Scene.d.ts.map +1 -1
  38. package/lib/Scene.js +148 -40
  39. package/lib/callgraph/algorithm/AbstractAnalysis.d.ts +4 -3
  40. package/lib/callgraph/algorithm/AbstractAnalysis.d.ts.map +1 -1
  41. package/lib/callgraph/algorithm/AbstractAnalysis.js +17 -17
  42. package/lib/callgraph/algorithm/RapidTypeAnalysis.d.ts +6 -1
  43. package/lib/callgraph/algorithm/RapidTypeAnalysis.d.ts.map +1 -1
  44. package/lib/callgraph/algorithm/RapidTypeAnalysis.js +117 -14
  45. package/lib/callgraph/common/Statistics.d.ts +4 -2
  46. package/lib/callgraph/common/Statistics.d.ts.map +1 -1
  47. package/lib/callgraph/common/Statistics.js +14 -2
  48. package/lib/callgraph/model/CallGraph.d.ts +12 -8
  49. package/lib/callgraph/model/CallGraph.d.ts.map +1 -1
  50. package/lib/callgraph/model/CallGraph.js +53 -29
  51. package/lib/callgraph/model/builder/CallGraphBuilder.d.ts +1 -0
  52. package/lib/callgraph/model/builder/CallGraphBuilder.d.ts.map +1 -1
  53. package/lib/callgraph/model/builder/CallGraphBuilder.js +5 -1
  54. package/lib/callgraph/pointerAnalysis/Pag.d.ts.map +1 -1
  55. package/lib/callgraph/pointerAnalysis/Pag.js +3 -0
  56. package/lib/callgraph/pointerAnalysis/PointerAnalysis.js +4 -2
  57. package/lib/cli/cli.d.ts +3 -0
  58. package/lib/cli/cli.d.ts.map +1 -0
  59. package/lib/cli/cli.js +82 -0
  60. package/lib/cli/commands/cg.d.ts +32 -0
  61. package/lib/cli/commands/cg.d.ts.map +1 -0
  62. package/lib/cli/commands/cg.js +401 -0
  63. package/lib/cli/commands/index.d.ts +6 -0
  64. package/lib/cli/commands/index.d.ts.map +1 -0
  65. package/lib/cli/commands/index.js +64 -0
  66. package/lib/cli/commands/ir.d.ts +26 -0
  67. package/lib/cli/commands/ir.d.ts.map +1 -0
  68. package/lib/cli/commands/ir.js +94 -0
  69. package/lib/core/base/Constant.d.ts +1 -1
  70. package/lib/core/base/Constant.d.ts.map +1 -1
  71. package/lib/core/base/Constant.js +1 -1
  72. package/lib/core/base/Expr.d.ts +29 -5
  73. package/lib/core/base/Expr.d.ts.map +1 -1
  74. package/lib/core/base/Expr.js +144 -22
  75. package/lib/core/base/Position.d.ts +14 -0
  76. package/lib/core/base/Position.d.ts.map +1 -1
  77. package/lib/core/base/Position.js +27 -0
  78. package/lib/core/base/Ref.d.ts +1 -0
  79. package/lib/core/base/Ref.d.ts.map +1 -1
  80. package/lib/core/base/Ref.js +4 -1
  81. package/lib/core/base/Type.d.ts +64 -24
  82. package/lib/core/base/Type.d.ts.map +1 -1
  83. package/lib/core/base/Type.js +144 -49
  84. package/lib/core/common/ArkError.d.ts +26 -2
  85. package/lib/core/common/ArkError.d.ts.map +1 -1
  86. package/lib/core/common/ArkError.js +56 -2
  87. package/lib/core/common/ArkIRTransformer.d.ts +11 -10
  88. package/lib/core/common/ArkIRTransformer.d.ts.map +1 -1
  89. package/lib/core/common/ArkIRTransformer.js +1 -1
  90. package/lib/core/common/ArkValueTransformer.d.ts +14 -12
  91. package/lib/core/common/ArkValueTransformer.d.ts.map +1 -1
  92. package/lib/core/common/ArkValueTransformer.js +1 -5
  93. package/lib/core/common/Const.d.ts +3 -0
  94. package/lib/core/common/Const.d.ts.map +1 -1
  95. package/lib/core/common/Const.js +4 -1
  96. package/lib/core/common/DummyMainCreater.d.ts +23 -13
  97. package/lib/core/common/DummyMainCreater.d.ts.map +1 -1
  98. package/lib/core/common/DummyMainCreater.js +66 -43
  99. package/lib/core/common/EtsConst.d.ts +11 -0
  100. package/lib/core/common/EtsConst.d.ts.map +1 -1
  101. package/lib/core/common/EtsConst.js +12 -1
  102. package/lib/core/common/IRInference.d.ts.map +1 -1
  103. package/lib/core/common/IRInference.js +5 -1
  104. package/lib/core/common/ModelUtils.d.ts +4 -7
  105. package/lib/core/common/ModelUtils.d.ts.map +1 -1
  106. package/lib/core/common/ModelUtils.js +77 -110
  107. package/lib/core/common/SdkUtils.d.ts +1 -1
  108. package/lib/core/common/SdkUtils.d.ts.map +1 -1
  109. package/lib/core/common/SdkUtils.js +14 -5
  110. package/lib/core/common/TypeInference.d.ts.map +1 -1
  111. package/lib/core/common/TypeInference.js +9 -3
  112. package/lib/core/graph/BaseExplicitGraph.d.ts +4 -4
  113. package/lib/core/graph/BaseExplicitGraph.d.ts.map +1 -1
  114. package/lib/core/graph/BaseExplicitGraph.js +15 -8
  115. package/lib/core/graph/BasicBlock.d.ts.map +1 -1
  116. package/lib/core/graph/Scc.d.ts.map +1 -1
  117. package/lib/core/graph/Scc.js +7 -2
  118. package/lib/core/graph/builder/CfgBuilder.d.ts +10 -7
  119. package/lib/core/graph/builder/CfgBuilder.d.ts.map +1 -1
  120. package/lib/core/graph/builder/CfgBuilder.js +12 -5
  121. package/lib/core/inference/Inference.d.ts.map +1 -1
  122. package/lib/core/inference/Inference.js +7 -0
  123. package/lib/core/inference/ModelInference.d.ts +1 -1
  124. package/lib/core/inference/ModelInference.d.ts.map +1 -1
  125. package/lib/core/inference/ValueInference.d.ts +3 -2
  126. package/lib/core/inference/ValueInference.d.ts.map +1 -1
  127. package/lib/core/inference/ValueInference.js +64 -12
  128. package/lib/core/inference/abc/AbcInference.d.ts +28 -2
  129. package/lib/core/inference/abc/AbcInference.d.ts.map +1 -1
  130. package/lib/core/inference/abc/AbcInference.js +105 -4
  131. package/lib/core/model/ArkBaseModel.d.ts +14 -1
  132. package/lib/core/model/ArkBaseModel.d.ts.map +1 -1
  133. package/lib/core/model/ArkBaseModel.js +61 -2
  134. package/lib/core/model/ArkBody.d.ts.map +1 -1
  135. package/lib/core/model/ArkBody.js +1 -3
  136. package/lib/core/model/ArkClass.d.ts +22 -2
  137. package/lib/core/model/ArkClass.d.ts.map +1 -1
  138. package/lib/core/model/ArkClass.js +59 -28
  139. package/lib/core/model/ArkField.d.ts.map +1 -1
  140. package/lib/core/model/ArkField.js +3 -1
  141. package/lib/core/model/ArkFile.d.ts +4 -1
  142. package/lib/core/model/ArkFile.d.ts.map +1 -1
  143. package/lib/core/model/ArkFile.js +44 -3
  144. package/lib/core/model/ArkImport.d.ts.map +1 -1
  145. package/lib/core/model/ArkImport.js +9 -1
  146. package/lib/core/model/ArkMethod.d.ts +5 -0
  147. package/lib/core/model/ArkMethod.d.ts.map +1 -1
  148. package/lib/core/model/ArkMethod.js +33 -1
  149. package/lib/core/model/ArkNamespace.d.ts +2 -0
  150. package/lib/core/model/ArkNamespace.d.ts.map +1 -1
  151. package/lib/core/model/ArkNamespace.js +11 -0
  152. package/lib/core/model/ArkSignature.d.ts +3 -3
  153. package/lib/core/model/ArkSignature.d.ts.map +1 -1
  154. package/lib/core/model/ArkSignature.js +14 -9
  155. package/lib/core/model/builder/ArkClassBuilder.d.ts +2 -0
  156. package/lib/core/model/builder/ArkClassBuilder.d.ts.map +1 -1
  157. package/lib/core/model/builder/ArkClassBuilder.js +3 -3
  158. package/lib/core/model/builder/ArkMethodBuilder.d.ts +4 -1
  159. package/lib/core/model/builder/ArkMethodBuilder.d.ts.map +1 -1
  160. package/lib/core/model/builder/ArkMethodBuilder.js +19 -6
  161. package/lib/core/model/builder/ArkNamespaceBuilder.d.ts +1 -0
  162. package/lib/core/model/builder/ArkNamespaceBuilder.d.ts.map +1 -1
  163. package/lib/core/model/builder/ArkNamespaceBuilder.js +2 -1
  164. package/lib/core/model/builder/BodyBuilder.d.ts +4 -0
  165. package/lib/core/model/builder/BodyBuilder.d.ts.map +1 -1
  166. package/lib/core/model/builder/builderUtils.d.ts +1 -0
  167. package/lib/core/model/builder/builderUtils.d.ts.map +1 -1
  168. package/lib/core/model/builder/builderUtils.js +7 -3
  169. package/lib/frontend/cppFrontend/ast/ArkCxxAstNode.d.ts +296 -0
  170. package/lib/frontend/cppFrontend/ast/ArkCxxAstNode.d.ts.map +1 -0
  171. package/lib/frontend/cppFrontend/ast/ArkCxxAstNode.js +145 -0
  172. package/lib/frontend/cppFrontend/ast/astUtils.d.ts +51 -0
  173. package/lib/frontend/cppFrontend/ast/astUtils.d.ts.map +1 -0
  174. package/lib/frontend/cppFrontend/ast/astUtils.js +470 -0
  175. package/lib/frontend/cppFrontend/ast/const.d.ts +30 -0
  176. package/lib/frontend/cppFrontend/ast/const.d.ts.map +1 -0
  177. package/lib/frontend/cppFrontend/ast/const.js +134 -0
  178. package/lib/frontend/cppFrontend/base/Constant.d.ts +9 -0
  179. package/lib/frontend/cppFrontend/base/Constant.d.ts.map +1 -0
  180. package/lib/frontend/cppFrontend/base/Constant.js +33 -0
  181. package/lib/frontend/cppFrontend/base/Expr.d.ts +174 -0
  182. package/lib/frontend/cppFrontend/base/Expr.d.ts.map +1 -0
  183. package/lib/frontend/cppFrontend/base/Expr.js +530 -0
  184. package/lib/frontend/cppFrontend/base/Ref.d.ts +25 -0
  185. package/lib/frontend/cppFrontend/base/Ref.d.ts.map +1 -0
  186. package/lib/frontend/cppFrontend/base/Ref.js +53 -0
  187. package/lib/frontend/cppFrontend/base/Trap.d.ts +8 -0
  188. package/lib/frontend/cppFrontend/base/Trap.d.ts.map +1 -0
  189. package/lib/frontend/cppFrontend/base/Trap.js +28 -0
  190. package/lib/frontend/cppFrontend/base/Type.d.ts +264 -0
  191. package/lib/frontend/cppFrontend/base/Type.d.ts.map +1 -0
  192. package/lib/frontend/cppFrontend/base/Type.js +600 -0
  193. package/lib/frontend/cppFrontend/common/ArkIRTransformer.d.ts +109 -0
  194. package/lib/frontend/cppFrontend/common/ArkIRTransformer.d.ts.map +1 -0
  195. package/lib/frontend/cppFrontend/common/ArkIRTransformer.js +925 -0
  196. package/lib/frontend/cppFrontend/common/ArkValueTransformer.d.ts +477 -0
  197. package/lib/frontend/cppFrontend/common/ArkValueTransformer.d.ts.map +1 -0
  198. package/lib/frontend/cppFrontend/common/ArkValueTransformer.js +2746 -0
  199. package/lib/frontend/cppFrontend/common/Builtin.d.ts +57 -0
  200. package/lib/frontend/cppFrontend/common/Builtin.d.ts.map +1 -0
  201. package/lib/frontend/cppFrontend/common/Builtin.js +106 -0
  202. package/lib/frontend/cppFrontend/common/IRInference.d.ts +94 -0
  203. package/lib/frontend/cppFrontend/common/IRInference.d.ts.map +1 -0
  204. package/lib/frontend/cppFrontend/common/IRInference.js +1087 -0
  205. package/lib/frontend/cppFrontend/common/IRUtils.d.ts +23 -0
  206. package/lib/frontend/cppFrontend/common/IRUtils.d.ts.map +1 -0
  207. package/lib/frontend/cppFrontend/common/IRUtils.js +168 -0
  208. package/lib/frontend/cppFrontend/common/ModelUtils.d.ts +44 -0
  209. package/lib/frontend/cppFrontend/common/ModelUtils.d.ts.map +1 -0
  210. package/lib/frontend/cppFrontend/common/ModelUtils.js +567 -0
  211. package/lib/frontend/cppFrontend/common/TypeInference.d.ts +278 -0
  212. package/lib/frontend/cppFrontend/common/TypeInference.d.ts.map +1 -0
  213. package/lib/frontend/cppFrontend/common/TypeInference.js +1354 -0
  214. package/lib/frontend/cppFrontend/common/ValueUtil.d.ts +16 -0
  215. package/lib/frontend/cppFrontend/common/ValueUtil.d.ts.map +1 -0
  216. package/lib/frontend/cppFrontend/common/ValueUtil.js +61 -0
  217. package/lib/frontend/cppFrontend/graph/builder/CfgBuilder.d.ts +182 -0
  218. package/lib/frontend/cppFrontend/graph/builder/CfgBuilder.d.ts.map +1 -0
  219. package/lib/frontend/cppFrontend/graph/builder/CfgBuilder.js +1435 -0
  220. package/lib/frontend/cppFrontend/graph/builder/ConditionBuilder.d.ts +21 -0
  221. package/lib/frontend/cppFrontend/graph/builder/ConditionBuilder.d.ts.map +1 -0
  222. package/lib/frontend/cppFrontend/graph/builder/ConditionBuilder.js +303 -0
  223. package/lib/frontend/cppFrontend/graph/builder/IfBuilder.d.ts +15 -0
  224. package/lib/frontend/cppFrontend/graph/builder/IfBuilder.d.ts.map +1 -0
  225. package/lib/frontend/cppFrontend/graph/builder/IfBuilder.js +161 -0
  226. package/lib/frontend/cppFrontend/graph/builder/LoopBuilder.d.ts +21 -0
  227. package/lib/frontend/cppFrontend/graph/builder/LoopBuilder.d.ts.map +1 -0
  228. package/lib/frontend/cppFrontend/graph/builder/LoopBuilder.js +261 -0
  229. package/lib/frontend/cppFrontend/graph/builder/SwitchBuilder.d.ts +12 -0
  230. package/lib/frontend/cppFrontend/graph/builder/SwitchBuilder.d.ts.map +1 -0
  231. package/lib/frontend/cppFrontend/graph/builder/SwitchBuilder.js +155 -0
  232. package/lib/frontend/cppFrontend/graph/builder/TrapBuilder.d.ts +29 -0
  233. package/lib/frontend/cppFrontend/graph/builder/TrapBuilder.d.ts.map +1 -0
  234. package/lib/frontend/cppFrontend/graph/builder/TrapBuilder.js +302 -0
  235. package/lib/frontend/cppFrontend/inference/CxxInference.d.ts +10 -0
  236. package/lib/frontend/cppFrontend/inference/CxxInference.d.ts.map +1 -0
  237. package/lib/frontend/cppFrontend/inference/CxxInference.js +41 -0
  238. package/lib/frontend/cppFrontend/inference/CxxModelInference.d.ts +28 -0
  239. package/lib/frontend/cppFrontend/inference/CxxModelInference.d.ts.map +1 -0
  240. package/lib/frontend/cppFrontend/inference/CxxModelInference.js +98 -0
  241. package/lib/frontend/cppFrontend/inference/CxxValueInference.d.ts +20 -0
  242. package/lib/frontend/cppFrontend/inference/CxxValueInference.d.ts.map +1 -0
  243. package/lib/frontend/cppFrontend/inference/CxxValueInference.js +128 -0
  244. package/lib/frontend/cppFrontend/model/builder/ArkClassBuilder.d.ts +11 -0
  245. package/lib/frontend/cppFrontend/model/builder/ArkClassBuilder.d.ts.map +1 -0
  246. package/lib/frontend/cppFrontend/model/builder/ArkClassBuilder.js +413 -0
  247. package/lib/frontend/cppFrontend/model/builder/ArkFieldBuilder.d.ts +5 -0
  248. package/lib/frontend/cppFrontend/model/builder/ArkFieldBuilder.d.ts.map +1 -0
  249. package/lib/frontend/cppFrontend/model/builder/ArkFieldBuilder.js +61 -0
  250. package/lib/frontend/cppFrontend/model/builder/ArkFileBuilder.d.ts +17 -0
  251. package/lib/frontend/cppFrontend/model/builder/ArkFileBuilder.d.ts.map +1 -0
  252. package/lib/frontend/cppFrontend/model/builder/ArkFileBuilder.js +285 -0
  253. package/lib/frontend/cppFrontend/model/builder/ArkImportBuilder.d.ts +6 -0
  254. package/lib/frontend/cppFrontend/model/builder/ArkImportBuilder.d.ts.map +1 -0
  255. package/lib/frontend/cppFrontend/model/builder/ArkImportBuilder.js +57 -0
  256. package/lib/frontend/cppFrontend/model/builder/ArkMethodBuilder.d.ts +14 -0
  257. package/lib/frontend/cppFrontend/model/builder/ArkMethodBuilder.d.ts.map +1 -0
  258. package/lib/frontend/cppFrontend/model/builder/ArkMethodBuilder.js +422 -0
  259. package/lib/frontend/cppFrontend/model/builder/ArkNamespaceBuilder.d.ts +8 -0
  260. package/lib/frontend/cppFrontend/model/builder/ArkNamespaceBuilder.d.ts.map +1 -0
  261. package/lib/frontend/cppFrontend/model/builder/ArkNamespaceBuilder.js +194 -0
  262. package/lib/frontend/cppFrontend/model/builder/BodyBuilder.d.ts +59 -0
  263. package/lib/frontend/cppFrontend/model/builder/BodyBuilder.d.ts.map +1 -0
  264. package/lib/frontend/cppFrontend/model/builder/BodyBuilder.js +605 -0
  265. package/lib/frontend/cppFrontend/model/builder/builderUtils.d.ts +46 -0
  266. package/lib/frontend/cppFrontend/model/builder/builderUtils.d.ts.map +1 -0
  267. package/lib/frontend/cppFrontend/model/builder/builderUtils.js +499 -0
  268. package/lib/frontend/cppFrontend/utils/cmakeUtils.d.ts +44 -0
  269. package/lib/frontend/cppFrontend/utils/cmakeUtils.d.ts.map +1 -0
  270. package/lib/frontend/cppFrontend/utils/cmakeUtils.js +240 -0
  271. package/lib/index.d.ts +1 -0
  272. package/lib/index.d.ts.map +1 -1
  273. package/lib/index.js +7 -1
  274. package/lib/node_modules/ohos-typescript/.ohos-typescript-version +1 -0
  275. package/{node_modules → lib/node_modules}/ohos-typescript/package.json +2 -1
  276. package/lib/save/CGJsonPrinter.d.ts +8 -0
  277. package/lib/save/CGJsonPrinter.d.ts.map +1 -0
  278. package/lib/save/CGJsonPrinter.js +41 -0
  279. package/lib/save/GraphPrinter.js +2 -2
  280. package/lib/save/json/JsonDto.d.ts +86 -2
  281. package/lib/save/json/JsonDto.d.ts.map +1 -1
  282. package/lib/save/json/JsonSerialization.d.ts +1 -1
  283. package/lib/save/json/JsonSerialization.d.ts.map +1 -1
  284. package/lib/save/json/JsonSerialization.js +235 -145
  285. package/lib/save/source/SourceTransformer.d.ts.map +1 -1
  286. package/lib/save/source/SourceTransformer.js +0 -3
  287. package/lib/utils/CxxSceneUtils.d.ts +11 -0
  288. package/lib/utils/CxxSceneUtils.d.ts.map +1 -0
  289. package/lib/utils/CxxSceneUtils.js +178 -0
  290. package/lib/utils/FileUtils.d.ts +7 -8
  291. package/lib/utils/FileUtils.d.ts.map +1 -1
  292. package/lib/utils/FileUtils.js +27 -45
  293. package/lib/utils/LRUCacheDecorator.d.ts +20 -0
  294. package/lib/utils/LRUCacheDecorator.d.ts.map +1 -0
  295. package/lib/utils/LRUCacheDecorator.js +89 -0
  296. package/lib/utils/ModuleUtils.d.ts +39 -0
  297. package/lib/utils/ModuleUtils.d.ts.map +1 -0
  298. package/lib/utils/ModuleUtils.js +261 -0
  299. package/package.json +15 -12
  300. /package/{node_modules → lib/node_modules}/ohos-typescript/LICENSE +0 -0
  301. /package/{node_modules → lib/node_modules}/ohos-typescript/README.OpenSource +0 -0
  302. /package/{node_modules → lib/node_modules}/ohos-typescript/README.md +0 -0
  303. /package/{node_modules → lib/node_modules}/ohos-typescript/SECURITY.md +0 -0
  304. /package/{node_modules → lib/node_modules}/ohos-typescript/ThirdPartyNoticeText.txt +0 -0
  305. /package/{node_modules → lib/node_modules}/ohos-typescript/bin/tsc +0 -0
  306. /package/{node_modules → lib/node_modules}/ohos-typescript/bin/tsserver +0 -0
  307. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/README.md +0 -0
  308. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/cancellationToken.js +0 -0
  309. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/cs/diagnosticMessages.generated.json +0 -0
  310. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/de/diagnosticMessages.generated.json +0 -0
  311. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/es/diagnosticMessages.generated.json +0 -0
  312. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/fr/diagnosticMessages.generated.json +0 -0
  313. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/it/diagnosticMessages.generated.json +0 -0
  314. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/ja/diagnosticMessages.generated.json +0 -0
  315. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/ko/diagnosticMessages.generated.json +0 -0
  316. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.d.ts +0 -0
  317. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.dom.d.ts +0 -0
  318. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.dom.iterable.d.ts +0 -0
  319. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.collection.d.ts +0 -0
  320. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.core.d.ts +0 -0
  321. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.d.ts +0 -0
  322. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.generator.d.ts +0 -0
  323. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.iterable.d.ts +0 -0
  324. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.promise.d.ts +0 -0
  325. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.proxy.d.ts +0 -0
  326. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.reflect.d.ts +0 -0
  327. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.symbol.d.ts +0 -0
  328. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -0
  329. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2016.array.include.d.ts +0 -0
  330. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2016.d.ts +0 -0
  331. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2016.full.d.ts +0 -0
  332. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.d.ts +0 -0
  333. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.full.d.ts +0 -0
  334. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.intl.d.ts +0 -0
  335. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.object.d.ts +0 -0
  336. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.sharedmemory.d.ts +0 -0
  337. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.string.d.ts +0 -0
  338. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.typedarrays.d.ts +0 -0
  339. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -0
  340. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.asynciterable.d.ts +0 -0
  341. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.d.ts +0 -0
  342. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.full.d.ts +0 -0
  343. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.intl.d.ts +0 -0
  344. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.promise.d.ts +0 -0
  345. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.regexp.d.ts +0 -0
  346. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.array.d.ts +0 -0
  347. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.d.ts +0 -0
  348. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.full.d.ts +0 -0
  349. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.intl.d.ts +0 -0
  350. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.object.d.ts +0 -0
  351. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.string.d.ts +0 -0
  352. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.symbol.d.ts +0 -0
  353. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.bigint.d.ts +0 -0
  354. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.d.ts +0 -0
  355. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.date.d.ts +0 -0
  356. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.full.d.ts +0 -0
  357. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.intl.d.ts +0 -0
  358. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.number.d.ts +0 -0
  359. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.promise.d.ts +0 -0
  360. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.sharedmemory.d.ts +0 -0
  361. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.string.d.ts +0 -0
  362. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -0
  363. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.d.ts +0 -0
  364. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.full.d.ts +0 -0
  365. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.intl.d.ts +0 -0
  366. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.promise.d.ts +0 -0
  367. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.string.d.ts +0 -0
  368. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.weakref.d.ts +0 -0
  369. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.array.d.ts +0 -0
  370. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.d.ts +0 -0
  371. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.error.d.ts +0 -0
  372. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.full.d.ts +0 -0
  373. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.intl.d.ts +0 -0
  374. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.object.d.ts +0 -0
  375. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.sharedmemory.d.ts +0 -0
  376. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.string.d.ts +0 -0
  377. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es5.d.ts +0 -0
  378. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es6.d.ts +0 -0
  379. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.esnext.d.ts +0 -0
  380. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.esnext.full.d.ts +0 -0
  381. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.esnext.intl.d.ts +0 -0
  382. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.scripthost.d.ts +0 -0
  383. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.webworker.d.ts +0 -0
  384. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.webworker.importscripts.d.ts +0 -0
  385. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.webworker.iterable.d.ts +0 -0
  386. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/pl/diagnosticMessages.generated.json +0 -0
  387. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/pt-br/diagnosticMessages.generated.json +0 -0
  388. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/ru/diagnosticMessages.generated.json +0 -0
  389. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tr/diagnosticMessages.generated.json +0 -0
  390. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tsc.js +0 -0
  391. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tsserver.js +0 -0
  392. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tsserverlibrary.d.ts +0 -0
  393. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tsserverlibrary.js +0 -0
  394. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/typesMap.json +0 -0
  395. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/typescript.d.ts +0 -0
  396. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/typescript.js +0 -0
  397. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/typingsInstaller.js +0 -0
  398. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/watchGuard.js +0 -0
  399. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -0
  400. /package/{node_modules → lib/node_modules}/ohos-typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -0
@@ -0,0 +1,126 @@
1
+ # CPP 前端构建指南
2
+
3
+ 本文说明在 **Linux / macOS / Windows** 上构建 `astJsonDumper` 之前需要安装的工具、推荐版本及环境变量。构建由仓库根目录脚本 `script/buildCpp.js` 驱动(`npm run build:cpp`)。
4
+
5
+ ## 1. 构建什么、命令是什么
6
+
7
+ 在仓库根目录执行 **`npm run build:cpp`**,于**当前操作系统**本机构建 `astJsonDumper`(Linux/macOS 下无扩展名,Windows 下为 `astJsonDumper.exe`)。不在此脚本中支持从 Linux/macOS 交叉编译 Windows PE。
8
+
9
+ 源码与 CMake 工程根目录:`src/frontend/cppFrontend/ast`。
10
+ 脚本会在配置阶段向 CMake 传入 `LLVM_DIR` / `Clang_DIR`(若已探测或已设置)。
11
+
12
+ ## 2. 通用依赖
13
+
14
+ - **CMake**:3.16+(工程 `cmake_minimum_required`),且 `cmake` 在 `PATH` 中。
15
+ - **LLVM / Clang**:需能通过 CMake `find_package(LLVM)`、`find_package(Clang)` 解析。仓库开发与 CI 以 **LLVM 19** 为主线;若使用其他主版本,需自行验证链接与头文件是否一致。
16
+ - **C++ 编译器**:支持 **C++17**(由 LLVM/Clang 或 MSVC 提供,取决于平台与生成器)。
17
+
18
+ 脚本会按顺序尝试:环境变量 **`LLVM_DIR`**(若目录存在)、**`llvm-config` / `llvm-config-19`**(`--cmakedir`)、常见安装路径(见各节)。
19
+ 若同时设置 **`LLVM_DIR`** 与 **`Clang_DIR`**,将优先直接使用二者(路径需分别指向 `lib/cmake/llvm` 与 `lib/cmake/clang`)。
20
+
21
+ ## 3. Linux(本机)
22
+
23
+ ### 3.1 推荐软件包(Debian / Ubuntu 示例)
24
+
25
+ ```bash
26
+ sudo apt-get update
27
+ sudo apt-get install -y cmake ninja-build llvm-19-dev libclang-19-dev
28
+ ```
29
+
30
+ 确保 `llvm-config-19` 在 `PATH` 中,或显式导出:
31
+
32
+ ```bash
33
+ export LLVM_DIR=$(llvm-config-19 --cmakedir)
34
+ # 可选:Clang_DIR 通常可由脚本根据 LLVM_DIR 推导;若 CMake 报错再设:
35
+ # export Clang_DIR=$(dirname "$(llvm-config-19 --cmakedir)")/clang
36
+ ```
37
+
38
+ ### 3.2 注意
39
+
40
+ - 避免混用不同主版本的 LLVM 动态库(例如系统 `libLLVM.so` 与 `LLVM_DIR` 指向 19 不一致),否则易出现链接错误或 “DSO missing” 类问题。
41
+ - 其他发行版请使用对应包名安装 **LLVM/Clang 开发包** 与 **CMake**,原则同上。
42
+
43
+ ## 4. macOS(本机)
44
+
45
+ ### 4.1 Homebrew 示例
46
+
47
+ ```bash
48
+ brew install cmake llvm@19 ninja
49
+ ```
50
+
51
+ `llvm@19` 通常不在默认 shell PATH 中,可将 `$(brew --prefix llvm@19)/bin` 加入 `PATH`,或设置:
52
+
53
+ ```bash
54
+ export LLVM_DIR="$(brew --prefix llvm@19)/lib/cmake/llvm"
55
+ export Clang_DIR="$(brew --prefix llvm@19)/lib/cmake/clang"
56
+ ```
57
+
58
+ 脚本在未设置 `LLVM_DIR` 时,也会尝试通过 `brew --prefix llvm` 或常见路径探测(以本机实际安装为准)。
59
+
60
+ ### 4.2 注意
61
+
62
+ - Apple 自带 `clang` 不等于 **LLVM CMake 包**;若未安装 Homebrew LLVM,需自行提供可用的 `LLVM_DIR` / `Clang_DIR`。
63
+
64
+ ## 5. Windows(本机,非 MSYS2)
65
+
66
+ 适用于:官方安装包 **LLVM** + **Visual Studio**(含 “使用 C++ 的桌面开发”),在 **cmd / PowerShell** 或已配置好 PATH 的终端中执行 `npm run build:cpp`。
67
+
68
+ ### 5.1 安装建议
69
+
70
+ - **CMake**:`winget install Kitware.CMake` 或从官网安装并加入 `PATH`。
71
+ - **LLVM**:`winget install LLVM.LLVM` 等,默认常见路径为 `C:\Program Files\LLVM\lib\cmake\llvm`;可将 `C:\Program Files\LLVM\bin` 加入 `PATH` 以便找到 `llvm-config.exe`。
72
+ - **Visual Studio 2022**:提供 MSVC 工具链与 Windows SDK;CMake 默认可能选用 Visual Studio 生成器。
73
+ - **Ninja(可选)**:若已安装并在 `PATH` 中,脚本会优先使用 **Ninja + Release** 单配置生成,产物路径更固定;否则使用 Visual Studio 多配置生成,构建时追加 `--config Release`,并在 `build\Release\` 等目录下查找 `astJsonDumper.exe`。
74
+
75
+ ### 5.2 环境变量(可选)
76
+
77
+ ```text
78
+ LLVM_DIR=C:\Program Files\LLVM\lib\cmake\llvm
79
+ Clang_DIR=C:\Program Files\LLVM\lib\cmake\clang
80
+ ```
81
+
82
+ 路径含空格时,在图形界面或脚本中设置即可,无需手动转义引号给 Node 脚本。
83
+
84
+ ## 6. Windows(MSYS2 本机构建)
85
+
86
+ 在 **MSYS2** 的 **MinGW x64**、**UCRT64** 或 **CLANG64** 环境中,使用 `pacman` 安装 LLVM/Clang 与构建工具,然后在**同一环境**中执行 `npm run build:cpp`(需能访问到该环境中的 `cmake`、`node`)。
87
+
88
+ ### 6.1 MinGW64 环境示例
89
+
90
+ ```bash
91
+ pacman -S mingw-w64-x86_64-llvm mingw-w64-x86_64-clang mingw-w64-x86_64-clang-tools-extra mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-nodejs
92
+ ```
93
+
94
+ ### 6.2 UCRT64 环境
95
+
96
+ 将包名前缀改为 `mingw-w64-ucrt-x86_64-*`(如 `mingw-w64-ucrt-x86_64-llvm` 等),与当前环境一致即可。
97
+
98
+ ### 6.3 路径探测说明
99
+
100
+ 脚本会结合 **`MSYS2_ROOT`**、**`MINGW_PREFIX`**(如 `/mingw64`)以及常见根目录(如 `C:\msys64` 下 `mingw64`、`ucrt64`、`clang64`)自动查找 `lib\cmake\llvm`。若 MSYS2 未安装在默认盘符路径,请设置 **`MSYS2_ROOT`** 或 **`LLVM_DIR`**。
101
+
102
+ ## 7. 环境变量一览
103
+
104
+ | 变量 | 用途 |
105
+ | ---- | ---- |
106
+ | `LLVM_DIR` | 指向 `lib/cmake/llvm`(LLVM CMake 包目录) |
107
+ | `Clang_DIR` | 指向 `lib/cmake/clang`(可选;未设时脚本常从 `LLVM_DIR` 推导) |
108
+ | `MSYS2_ROOT` | 仅 Windows:MSYS2 安装根目录,辅助解析 `mingw64` 等前缀 |
109
+
110
+ ## 8. 构建产物位置
111
+
112
+ 成功执行后,脚本会将可执行文件复制到:
113
+
114
+ - 目录:`src/frontend/cppFrontend/ast/dumper/`
115
+ - 名称:`astJsonDumper`(Unix)或 `astJsonDumper.exe`(Windows)
116
+
117
+ 中间构建目录:`src/frontend/cppFrontend/ast/build/`(若切换生成器或路径,可删除该目录后重试)。
118
+
119
+ ## 9. 常见问题
120
+
121
+ - **CMake 找不到 LLVM**:先确认 `LLVM_DIR` 目录存在且包含 `LLVMConfig.cmake`;Linux 上优先使用 `llvm-config-19 --cmakedir` 输出。
122
+ - **Windows 上找不到产物**:确认是否使用 **Release** 配置;脚本会尝试 `build\`、`build\Release\`、`build\x64\Release\` 等路径。
123
+ - **版本混链**:同一构建中 `LLVM_DIR`、系统 `libLLVM`、PATH 中的 `clang` 应来自同一 LLVM 大版本,避免 18/19 混用。
124
+
125
+ 更偏设计与链接策略的说明见:`docs/developer/cpp-ast-dumper-build-stability-design.md`。
126
+ 使用说明(含历史截图与工具链名)见:`docs/cppFrontend/ArkAnalyzer-cpp_usage_guide.md`。
@@ -0,0 +1,175 @@
1
+ # ArkAnalyzer-CPP前端
2
+
3
+ ### ArkAnalyzer-CPP前端是由 ICT BG 公共开发部的品牌-精卫 团队主导设计与开发, 基于llvm的解析能力对cpp/c的语义场景完成其到ArkAnalyzer IR的转译及分析。
4
+
5
+ ## 一、ArkAnalyzer-CPP工具使用介绍
6
+
7
+ ### 1、外部接口调用
8
+
9
+ 在本分支下,对ArkAnalyzer使用者提供统一接口调用,可以参考tests/unit/core_cpp/graph/Cfg.test.ts测试文件中的构建
10
+
11
+ ```
12
+ let config: SceneConfig = new SceneConfig();
13
+ config.buildFromProjectDir(path.join(BASE_DIR, folderName));
14
+ let scene = new Scene();
15
+ scene.buildSceneFromProjectDir(config);
16
+ return scene;
17
+ ```
18
+
19
+ 只需要调用SceneConfig和scene构建即可,其中config.buildFromProjectDir()传入的参数是需要解析的项目路径。该函数位置在src/Scene.ts中
20
+ 以一个if代码的解析做介绍,解析过程如下图所示:
21
+ ![img.png](img.png)
22
+ 在解析过程中,genArkFiles函数会区分文件类型,对于cpp文件会调用buildArkCxxFileFromFile生成对应语法树。
23
+ 在genArkFiles下的buildAllMethodBody中调用method.freeCxxBodyBuilder()进行函数内语句的解析。
24
+
25
+ ### 2、解析结果,scene展示
26
+
27
+ 如下图所示
28
+ ![img_1.png](img_1.png)
29
+ ![img_2.png](img_2.png)
30
+
31
+ 如果一个cpp接口是在ts语言中被调用的接口,会在Scene结构中添加ts2cxxFuncMap进行暴露,通过setTs2CxxFuncMapOfClass函数进行填充。
32
+ 这里以懒加载任务提供的代码示例
33
+ ![img_3.png](img_3.png)
34
+
35
+ ## 二、cpp_frontend模块介绍
36
+
37
+ #### 路径:ArkAnalyzer/src/cpp_frontend
38
+
39
+ ### 1、common模块
40
+
41
+ ArkCxxIRTransformer:继承ArkAnalyzer/src/core/common下的ArkIRTransformer,复用了ArkIRTransformer下的方法,根据c++语法重写和新增了ArkCxxIRTransformer下的方法
42
+
43
+ ArkCxxValueTransformer:继承ArkAnalyzer/src/core/common下的ArkValueTransformer,复用了ArkValueTransformer下的方法,根据c++语法重写和新增了ArkCxxValueTransformer下的方法
44
+
45
+ ModelUtils:根据c++语法编写了关于获取头文件的include信息的方法
46
+
47
+ TypeInference:根据c++语法编写了关于类型推断的方法,该文件下许多方法的函数体与ArkAnalyzer/src/core/common/TypeInference相同,因为c++和typescript使用的AST结构不同,所以不能复用
48
+
49
+ ValueUtilsCpp:继承ArkAnalyzer/src/core/common下的ValueUtils,复用了ValueUtils下的方法,根据c++语法新增了normalizeString和createStringConst两个方法
50
+
51
+ ### 2、graph模块
52
+
53
+ CfgBuilder:根据c++语法编写了关于构建cfg的方法,复用了ArkAnalyzer/src/core/graph/builder/CfgBuilder下的BlockBuilder, Case, Catch, TextError, Variable, Scope对象
54
+
55
+ ### 3、model模块
56
+
57
+ ArkClassBuilder:根据c++语法编写了关于构建cfg结构下ArkClass的方法,复用了ArkAnalyzer/src/core/model/builder/ArkClassBuilder下的方法和对象
58
+
59
+ ArkFieldBuilder:根据c++语法编写了关于构建cfg结构下ArkField的方法
60
+
61
+ ArkFileBuilder:根据c++语法编写了关于构建cfg结构下ArkFile的方法,复用了ArkAnalyzer/src/core/model/builder下ArkExportBuilder和ArkClassBuilder的方法
62
+
63
+ ArkImportBuilder:根据c++语法编写了关于构建cfg结构下ArkInclude的方法
64
+
65
+ ArkMethodBuilder:根据c++语法编写了关于构建cfg结构下ArkMethod的方法,复用了ArkAnalyzer/src/core/model/builder下ViewTreeBuilder和ArkMethodBuilder的方法和对象
66
+
67
+ ArkNamespaceBuilder:根据c++语法编写了关于构建cfg结构下ArkNamespace的方法,复用了ArkAnalyzer/src/core/model/builder/ArkNamespaceBuilder下的方法
68
+
69
+ CxxBodyBuilder:根据c++语法编写了关于构建整个cfg结构的方法,从CxxBodyBuilder开始调用cpp_frontend模块下的方法,复用了ArkAnalyzer/src/core/model/builder/ArkMethodBuilder的方法
70
+
71
+ builderUtils:根据c++语法编写了关于构建cfg的常规方法,复用了ArkAnalyzer/src/core/model/builder下ArkMethodBuilder和builderUtils的方法
72
+
73
+ ## 三、ArkAnalyzer-CPP前端暴露接口,ArkAnalyzer/src/Scene下调用
74
+
75
+ 1、ArkAnalyzer/src/cpp_frontend/model/builder/ArkFileBuilder下的buildArkFileFromFile方法,该方法获取c++的抽象语法树
76
+
77
+ 2、ArkAnalyzer/src/cpp_frontend/model/builder/ArkMethodBuilder下的addInitInConstructor方法,该方法添加默认的构造函数
78
+
79
+ 3、ArkAnalyzer/src/cpp_frontend/model/ArkMethod下的buildCxxBody和freeCxxBodyBuilder方法,作用分别是构建cfg和释放资源
80
+
81
+ ## 四、ArkAnalyzer-CPP工具开发介绍
82
+
83
+ ### 本部分介绍ArkAnalzyer解析Cpp源码生成IR的接口逻辑,主要是关键函数相关的调用逻辑,以及函数功能的介绍
84
+
85
+ #### 1、对scene数据结构的介绍,ArkAnalyzer项目的核心就是在将代码解析成scene数据结构
86
+
87
+ Scene 类为 ArkAnalyzer 的核心类,用户可以通过该类访问所分析代码(项目)的所有信息,包括文件列表、类列表、方法列表、属性列表等。Scene 类具体数据结构如下所示。
88
+
89
+ ![img_4.png](img_4.png)
90
+
91
+ ### 2.下面介绍Cpp代码解析的过程
92
+
93
+ <核心函数调用图>
94
+
95
+ ```mermaid
96
+ graph TD
97
+ buildSceneFromProjectDir --> buildBasicInfo
98
+ buildSceneFromProjectDir --> genArkFiles
99
+ genArkFiles --> buildArkCxxFileFromFile
100
+ genArkFiles --> buildAllMethodBody
101
+ genArkFiles --> addDefaultConstructors
102
+ buildArkCxxFileFromFile --> AstUtils.parse
103
+ AstUtils.parse --> getPlatformClang
104
+ AstUtils.parse --> JSON.parse
105
+ buildArkCxxFileFromFile --> genDefaultArkClass
106
+ buildArkCxxFileFromFile --> buildArkFile
107
+ genDefaultArkClass --> buildDefaultArkClassFromArkFile
108
+ genDefaultArkClass --> arkFile.setDefaultClass
109
+ genDefaultArkClass --> arkFile.addArkClass
110
+ buildArkFile --> buildNormalArkClassFromArkFile
111
+ buildArkFile --> buildArkMethodFromArkClass
112
+ buildArkFile --> buildArkNamespace
113
+ buildArkFile --> buildImportInfo
114
+ genArkFiles --> buildAllMethodBody
115
+ genArkFiles --> addDefaultConstructors
116
+ buildAllMethodBody --> method.buildCxxBody
117
+ method.buildCxxBody --> CxxBodyBuilder.build
118
+ CxxBodyBuilder.build --> cfgBuilder.buildCfgBuilder
119
+ CxxBodyBuilder.build --> cfgBuilder.buildCfg
120
+ cfgBuilder.buildCfgBuilder --> walkAST
121
+ cfgBuilder.buildCfg --> buildNormalCfg
122
+ cfgBuilder.buildCfg --> buildCfgForSimpleArrowFunction
123
+ buildNormalCfg --> processBlocks
124
+ processBlocks --> switchStatementToValueAndStmts
125
+ processBlocks --> tsNodeToStmts
126
+ tsNodeToStmts --> xxxToStmts
127
+ xxxToStmts --> cxxNodeToValueAndStmts
128
+
129
+ ```
130
+
131
+ #### 项目入口
132
+
133
+ 首先配置config结构,如
134
+ config.buildFromProjectDir(path);
135
+ 将需要解析的项目源码位置存储到config结构中。
136
+ 随后使用scene的buildSceneFromProjectDir进行scene构建。
137
+ scene.buildSceneFromProjectDir(config);
138
+
139
+ #### 下面是构建过程的详细介绍,整个过程分为两个阶段,第一阶段是生成Arkfile,ArkClass,和ArkMethod:①调用libClang工具生成ast语法树,②ArkAnalzyer对生成的语法树解析,构造scene结构。
140
+
141
+ 第二阶段,对method的语句进行解析。
142
+
143
+ ##### 第一阶段:
144
+
145
+ ```
146
+ private genArkFiles(): void {
147
+ this.projectFiles.forEach(file => {
148
+ logger.trace('=== parse file:', file);
149
+ try {
150
+ const arkFile: ArkFile = new ArkFile(FileUtils.getFileLanguage(file, this.fileLanguages));
151
+ arkFile.setScene(this);
152
+ if (arkFile.getLanguage() === Language.CXX) {
153
+ buildArkCxxFileFromFile(file, this.realProjectDir, arkFile, this.projectName, this.includeDirs);
154
+ } else {
155
+ buildArkFileFromFile(file, this.realProjectDir, arkFile, this.projectName);
156
+ }
157
+ this.filesMap.set(arkFile.getFileSignature().toMapKey(), arkFile);
158
+ } catch (error) {
159
+ logger.error('Error parsing file:', file, error);
160
+ this.unhandledFilePaths.push(file);
161
+ return;
162
+ }
163
+ });
164
+ this.buildAllMethodBody();
165
+ this.addDefaultConstructors();
166
+ }
167
+ ```
168
+
169
+ ##### 第二阶段:
170
+
171
+ 这一部分主要介绍两个处理过程:
172
+ 1、buildAllMethodBody(),在此函数中使用buildCxxBody()接口,在开发中walkAST依据语法树的结构划分出block,并构建出block的前后继关系
173
+ 2、tsNodeToStmts:在这个函数中根据不同的模块类型,进行不同的处理,比如传入节点是IfStmt时,选择对应的cxxIfStatementToStmts,构建出相应的IR表示,这里的IR就是三地址码的形式了,例如其中条件表达部分调用conditionToValueAndStmts,构造ArkConditionExpr
174
+
175
+ 当前ArkAnalzyer在解析源码生成中间IR集
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,66 @@
1
+ # sig_programanalysis
2
+
3
+ English | [简体中文](./sig_programanalysis.md)
4
+
5
+ The content of this SIG follows the conventions described in the OpenHarmony PMC charter [README](../../zh/pmc.md).
6
+
7
+ ## SIG Group Work Objectives and Scope
8
+
9
+ ### Work Objectives
10
+
11
+ * Sig_programanalysis aims to carry out program analysis technology exploration, key technology identification, and competitiveness building for OpenHarmony systems and apps, striving to become the gathering place for OpenHarmony system and app analysis capabilities and an incubation place for related engineering tools.
12
+
13
+ * Sig_programanalysis will build a basic program analysis framework for OpenHarmony apps, and subsequently based on it to provide application developers with out-of-the-box defect scanning and analysis tools, making it possible to automatically vet code for scenarios such as IDE, CI/CD pipelines, etc.
14
+
15
+ ### Work Scope
16
+
17
+ * Responsible for building and maintaining the key technology map of program analysis, as well as the decomposition of functional modules in the field, interface definition, and maintenance management.
18
+
19
+ * Responsible for the architecture design, open source development, and project maintenance of projects related to program analysis.
20
+
21
+
22
+ ### Projects
23
+
24
+ Sig_programanalysis currently incubates the following projects. Everyone is welcome to participate (you can apply to participate in the co-construction of existing projects, or you can apply to create a new program analysis project).
25
+
26
+
27
+ * ArkAnalyzer:
28
+ The Static Analysis Framework for ArkTS-based OpenHarmony Apps.
29
+
30
+ * ArkCheck:
31
+ Checking OpenHarmony Apps for Potential Code-level Defects
32
+
33
+
34
+ ## SIG Members
35
+
36
+
37
+ ### Leader
38
+
39
+ - [lilicoding](https://gitcode.com/lilicoding)
40
+
41
+
42
+ ### Committers
43
+ - [kubigao](https://gitcode.com/kubigao)
44
+ - [yifei-xue](https://gitcode.com/yifei-xue)
45
+ - [kubrick-hjh](https://gitcode.com/kubrick-hjh)
46
+ - [speed9](https://gitee.com/speeds)
47
+ - [bbsun](https://gitcode.com/bbsun)
48
+ - [chn](https://gitcode.com/chn)
49
+ - [Elouan](https://gitcode.com/Elouan)
50
+ - [Rnine](https://gitcode.com/Rnine1)
51
+ - [workspace_cb](https://gitee.com/workspace_cb)
52
+ - [longyuC](https://gitee.com/longyuC)
53
+ - [xyji95](https://gitcode.com/xyji95)
54
+ - [xulingyun](https://gitcode.com/muya318)
55
+
56
+
57
+ ### Meetings
58
+ - Meeting Time: Bi-weekly meeting, Thursday 19:30 Beijing time
59
+ - Meeting Application:[Link](https://shimo.im/forms/B1Awd60W7bU51g3m/fill)
60
+ - Meeting Link: Welink or Others
61
+ - Meeting Notification: [Subscribe to](https://lists.openatom.io/postorius/lists/dev.openharmony.io) mailing list dev@openharmony.io for the meeting link
62
+ - Meeting Summary: [Archive link address](https://gitee.com/openharmony-sig/sig-content)
63
+
64
+ ### Contact
65
+
66
+ - Mailing list: [dev@openharmony.io](https://lists.openatom.io/postorius/lists/dev@openharmony.io/)
@@ -0,0 +1,73 @@
1
+ # sig_programanalysis
2
+
3
+ 简体中文 | [English](./sig_programanalysis.en.md)
4
+
5
+ 说明:本SIG的内容遵循OpenHarmony的PMC管理章程 [README](../../zh/pmc.md)中描述的约定。
6
+
7
+
8
+ ## SIG组工作目标和范围
9
+
10
+
11
+
12
+ ### 工作目标
13
+
14
+ * 程序分析-SIG(Sig_programanalysis) 旨在面向OpenHarmony系统和原生应用开展程序分析技术洞察、关键技术识别和竞争力构建,同时成为OpenHarmony系统和应用程序分析能力的聚集地和相关工程工具的孵化地。
15
+
16
+ * 程序分析-SIG(Sig_programanalysis)将面向OpenHarmony应用构建基础程序分析框架并基于此为应用开发者提供开箱即用的缺陷扫描分析工具,面向IDE、流水线门禁、应用市场上架审核等场景,打造自动化工具看护能力。
17
+
18
+ ### 工作范围
19
+
20
+ * 负责程序分析子领域关键根技术地图梳理,以及领域内功能模块分解、接口定义与维护管理等工作。
21
+
22
+ * 负责程序分析子领域相关项目的架构设计、开源开发和项目维护等工作。
23
+
24
+
25
+ ### 项目孵化
26
+
27
+ 程序分析-SIG(Sig_programanalysis)正积极孵化如下项目,欢迎大家参与共享共建(可申请参与已有项目的共建,也可申请创建新的程序分析项目并联合社区启动开源共建)。
28
+
29
+
30
+ * 方舟分析器(ArkAnalyzer):
31
+ 面向ArkTS的OpenHarmony应用程序分析框架。
32
+
33
+ * 方舟检测器(ArkCheck):
34
+ 面向OpenHarmony应用开发提供代码级缺陷自动检测(I期聚焦高性能编码规则的自动化检测)
35
+
36
+
37
+
38
+ ## SIG组成员
39
+
40
+
41
+ ### Leader
42
+
43
+ - [lilicoding](https://gitcode.com/lilicoding)
44
+
45
+
46
+ ### Committers列表
47
+ - [kubigao](https://gitcode.com/kubigao)
48
+ - [yifei-xue](https://gitcode.com/yifei-xue)
49
+ - [kubrick-hjh](https://gitcode.com/kubrick-hjh)
50
+ - [speed9](https://gitee.com/speeds)
51
+ - [bbsun](https://gitcode.com/bbsun)
52
+ - [chn](https://gitcode.com/chn)
53
+ - [Elouan](https://gitcode.com/Elouan)
54
+ - [Rnine](https://gitcode.com/Rnine1)
55
+ - [workspace_cb](https://gitee.com/workspace_cb)
56
+ - [longyuC](https://gitee.com/longyuC)
57
+ - [xyji95](https://gitcode.com/xyji95)
58
+ - [xulingyun](https://gitcode.com/muya318)
59
+
60
+
61
+ ### 会议
62
+ - 会议时间:双周例会,周四晚上19:00, UTC+8
63
+ - 会议申报:[申报链接](https://shimo.im/forms/B1Awd60W7bU51g3m/fill)
64
+ - 会议链接:Welink或其他会议
65
+ - 会议通知:请[订阅](https://lists.openatom.io/postorius/lists/dev.openharmony.io)邮件列表 dev@openharmony.io 获取会议链接
66
+ - 会议纪要:[归档链接地址](https://gitee.com/openharmony-sig/sig-content)
67
+
68
+
69
+ ### Contact (optional)
70
+
71
+ - 邮件列表:[dev@openharmony.io](https://lists.openatom.io/postorius/lists/dev@openharmony.io/)
72
+
73
+ ***
package/lib/Config.d.ts CHANGED
@@ -13,6 +13,19 @@ export interface TsConfig {
13
13
  };
14
14
  };
15
15
  }
16
+ /**
17
+ * Build a SceneConfig from a project directory and optional OHOS SDK home.
18
+ *
19
+ * SDK resolution order:
20
+ * 1) explicit `ohosSdkHome` (must contain at least one valid SDK directory:
21
+ * `<ohosSdkHome>/openharmony/ets` or `<ohosSdkHome>/hms/ets`)
22
+ * 2) environment variable `OHOS_SDK_HOME`
23
+ *
24
+ * @param project Project root directory path.
25
+ * @param ohosSdkHome Optional OHOS SDK home path.
26
+ * @returns SceneConfig initialized with project files and discovered SDKs.
27
+ */
28
+ export declare function buildSceneConfigFromProject(project: string, ohosSdkHome?: string): SceneConfig;
16
29
  export type SceneOptionsValue = string | number | boolean | (string | number)[] | string[] | null | undefined;
17
30
  export interface SceneOptions {
18
31
  supportFileExts?: string[];
@@ -33,7 +46,10 @@ export declare class SceneConfig {
33
46
  private sdkFiles;
34
47
  private sdkFilesMap;
35
48
  private projectFiles;
49
+ private includeDirs;
36
50
  private fileLanguages;
51
+ private ccjsonPath;
52
+ private cppAstPath;
37
53
  private options;
38
54
  constructor(options?: SceneOptions);
39
55
  getOptions(): SceneOptions;
@@ -51,6 +67,7 @@ export declare class SceneConfig {
51
67
  * targetProjectDirectory property of the sceneConfig object.
52
68
  * @param targetProjectDirectory - the target project directory, such as xxx/xxx/xxx, started from project
53
69
  * directory.
70
+ * @param includeDirs - Header file directories that the CXX project depends on.
54
71
  * @example
55
72
  * 1. build a sceneConfig object.
56
73
  ```typescript
@@ -59,7 +76,7 @@ export declare class SceneConfig {
59
76
  sceneConfig.buildFromProjectDir(projectDir);
60
77
  ```
61
78
  */
62
- buildFromProjectDir(targetProjectDirectory: string): void;
79
+ buildFromProjectDir(targetProjectDirectory: string, includeDirs?: string[]): void;
63
80
  buildFromProjectFiles(projectName: string, projectDir: string, filesAndDirectorys: string[], sdks?: Sdk[], languageTags?: Map<string, Language>): void;
64
81
  private processFilePaths;
65
82
  private setLanguageTagForFiles;
@@ -67,6 +84,20 @@ export declare class SceneConfig {
67
84
  getTargetProjectName(): string;
68
85
  getTargetProjectDirectory(): string;
69
86
  getProjectFiles(): string[];
87
+ /** Obtain the header file directories of the input C++ project dependencies. */
88
+ getIncludeDirs(): string[];
89
+ setCcjsonPath(ccjsonPath: string): void;
90
+ /**
91
+ * Returns compile_commands.json path configured by the project.
92
+ *
93
+ * If ccjson is not configured, this value is empty initially. Before AST generation,
94
+ * astUtils may auto-discover a compile database near source files (for DevEco projects
95
+ * that load compilation databases). The discovered path is used directly by Scene and is
96
+ * not backfilled into this config field.
97
+ */
98
+ getCcjsonPath(): string;
99
+ setCppAstPath(cppAstPath: string): void;
100
+ getCppAstPath(): string;
70
101
  getFileLanguages(): Map<string, Language>;
71
102
  getSdkFiles(): string[];
72
103
  getSdkFilesMap(): Map<string[], string>;
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