arkanalyzer 1.0.86 → 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.
- package/README.en.md +69 -65
- package/README.md +56 -70
- package/config/arkanalyzer.json +7 -2
- package/docs/cppFrontend/ArkAnalyzer-cpp_usage_guide.md +245 -0
- package/docs/cppFrontend/cpp_frontend_build_guide.md +126 -0
- package/docs/cppFrontend/cpp_frontend_user_guide.md +175 -0
- package/docs/cppFrontend/img.png +0 -0
- package/docs/cppFrontend/img_1.png +0 -0
- package/docs/cppFrontend/img_10.png +0 -0
- package/docs/cppFrontend/img_11.png +0 -0
- package/docs/cppFrontend/img_12.png +0 -0
- package/docs/cppFrontend/img_13.png +0 -0
- package/docs/cppFrontend/img_14.png +0 -0
- package/docs/cppFrontend/img_15.png +0 -0
- package/docs/cppFrontend/img_16.png +0 -0
- package/docs/cppFrontend/img_17.png +0 -0
- package/docs/cppFrontend/img_18.png +0 -0
- package/docs/cppFrontend/img_19.png +0 -0
- package/docs/cppFrontend/img_2.png +0 -0
- package/docs/cppFrontend/img_20.png +0 -0
- package/docs/cppFrontend/img_21.png +0 -0
- package/docs/cppFrontend/img_22.png +0 -0
- package/docs/cppFrontend/img_23.png +0 -0
- package/docs/cppFrontend/img_3.png +0 -0
- package/docs/cppFrontend/img_4.png +0 -0
- package/docs/cppFrontend/img_5.png +0 -0
- package/docs/cppFrontend/img_6.png +0 -0
- package/docs/cppFrontend/img_7.png +0 -0
- package/docs/cppFrontend/img_8.png +0 -0
- package/docs/cppFrontend/img_9.png +0 -0
- package/docs/sig_programanalysis.en.md +66 -0
- package/docs/sig_programanalysis.md +73 -0
- package/lib/Config.d.ts +32 -1
- package/lib/Config.d.ts.map +1 -1
- package/lib/Config.js +76 -2
- package/lib/Scene.d.ts +25 -2
- package/lib/Scene.d.ts.map +1 -1
- package/lib/Scene.js +148 -40
- package/lib/callgraph/algorithm/AbstractAnalysis.d.ts +4 -3
- package/lib/callgraph/algorithm/AbstractAnalysis.d.ts.map +1 -1
- package/lib/callgraph/algorithm/AbstractAnalysis.js +17 -17
- package/lib/callgraph/algorithm/RapidTypeAnalysis.d.ts +6 -1
- package/lib/callgraph/algorithm/RapidTypeAnalysis.d.ts.map +1 -1
- package/lib/callgraph/algorithm/RapidTypeAnalysis.js +117 -14
- package/lib/callgraph/common/Statistics.d.ts +4 -2
- package/lib/callgraph/common/Statistics.d.ts.map +1 -1
- package/lib/callgraph/common/Statistics.js +14 -2
- package/lib/callgraph/model/CallGraph.d.ts +12 -8
- package/lib/callgraph/model/CallGraph.d.ts.map +1 -1
- package/lib/callgraph/model/CallGraph.js +53 -29
- package/lib/callgraph/model/builder/CallGraphBuilder.d.ts +1 -0
- package/lib/callgraph/model/builder/CallGraphBuilder.d.ts.map +1 -1
- package/lib/callgraph/model/builder/CallGraphBuilder.js +5 -1
- package/lib/callgraph/pointerAnalysis/Pag.d.ts.map +1 -1
- package/lib/callgraph/pointerAnalysis/Pag.js +3 -0
- package/lib/callgraph/pointerAnalysis/PointerAnalysis.js +4 -2
- package/lib/cli/cli.d.ts +3 -0
- package/lib/cli/cli.d.ts.map +1 -0
- package/lib/cli/cli.js +82 -0
- package/lib/cli/commands/cg.d.ts +32 -0
- package/lib/cli/commands/cg.d.ts.map +1 -0
- package/lib/cli/commands/cg.js +401 -0
- package/lib/cli/commands/index.d.ts +6 -0
- package/lib/cli/commands/index.d.ts.map +1 -0
- package/lib/cli/commands/index.js +64 -0
- package/lib/cli/commands/ir.d.ts +26 -0
- package/lib/cli/commands/ir.d.ts.map +1 -0
- package/lib/cli/commands/ir.js +94 -0
- package/lib/core/base/Constant.d.ts +1 -1
- package/lib/core/base/Constant.d.ts.map +1 -1
- package/lib/core/base/Constant.js +1 -1
- package/lib/core/base/Expr.d.ts +29 -5
- package/lib/core/base/Expr.d.ts.map +1 -1
- package/lib/core/base/Expr.js +144 -22
- package/lib/core/base/Position.d.ts +14 -0
- package/lib/core/base/Position.d.ts.map +1 -1
- package/lib/core/base/Position.js +27 -0
- package/lib/core/base/Ref.d.ts +1 -0
- package/lib/core/base/Ref.d.ts.map +1 -1
- package/lib/core/base/Ref.js +4 -1
- package/lib/core/base/Type.d.ts +64 -24
- package/lib/core/base/Type.d.ts.map +1 -1
- package/lib/core/base/Type.js +144 -49
- package/lib/core/common/ArkError.d.ts +26 -2
- package/lib/core/common/ArkError.d.ts.map +1 -1
- package/lib/core/common/ArkError.js +56 -2
- package/lib/core/common/ArkIRTransformer.d.ts +11 -10
- package/lib/core/common/ArkIRTransformer.d.ts.map +1 -1
- package/lib/core/common/ArkIRTransformer.js +1 -1
- package/lib/core/common/ArkValueTransformer.d.ts +14 -12
- package/lib/core/common/ArkValueTransformer.d.ts.map +1 -1
- package/lib/core/common/ArkValueTransformer.js +1 -5
- package/lib/core/common/Const.d.ts +3 -0
- package/lib/core/common/Const.d.ts.map +1 -1
- package/lib/core/common/Const.js +4 -1
- package/lib/core/common/DummyMainCreater.d.ts +23 -13
- package/lib/core/common/DummyMainCreater.d.ts.map +1 -1
- package/lib/core/common/DummyMainCreater.js +66 -43
- package/lib/core/common/EtsConst.d.ts +11 -0
- package/lib/core/common/EtsConst.d.ts.map +1 -1
- package/lib/core/common/EtsConst.js +12 -1
- package/lib/core/common/IRInference.d.ts.map +1 -1
- package/lib/core/common/IRInference.js +5 -1
- package/lib/core/common/ModelUtils.d.ts +4 -7
- package/lib/core/common/ModelUtils.d.ts.map +1 -1
- package/lib/core/common/ModelUtils.js +77 -110
- package/lib/core/common/SdkUtils.d.ts +1 -1
- package/lib/core/common/SdkUtils.d.ts.map +1 -1
- package/lib/core/common/SdkUtils.js +14 -5
- package/lib/core/common/TypeInference.d.ts.map +1 -1
- package/lib/core/common/TypeInference.js +9 -3
- package/lib/core/graph/BaseExplicitGraph.d.ts +4 -4
- package/lib/core/graph/BaseExplicitGraph.d.ts.map +1 -1
- package/lib/core/graph/BaseExplicitGraph.js +15 -8
- package/lib/core/graph/BasicBlock.d.ts.map +1 -1
- package/lib/core/graph/Scc.d.ts.map +1 -1
- package/lib/core/graph/Scc.js +7 -2
- package/lib/core/graph/builder/CfgBuilder.d.ts +10 -7
- package/lib/core/graph/builder/CfgBuilder.d.ts.map +1 -1
- package/lib/core/graph/builder/CfgBuilder.js +12 -5
- package/lib/core/inference/Inference.d.ts.map +1 -1
- package/lib/core/inference/Inference.js +7 -0
- package/lib/core/inference/ModelInference.d.ts +1 -1
- package/lib/core/inference/ModelInference.d.ts.map +1 -1
- package/lib/core/inference/ValueInference.d.ts +3 -2
- package/lib/core/inference/ValueInference.d.ts.map +1 -1
- package/lib/core/inference/ValueInference.js +64 -12
- package/lib/core/inference/abc/AbcInference.d.ts +28 -2
- package/lib/core/inference/abc/AbcInference.d.ts.map +1 -1
- package/lib/core/inference/abc/AbcInference.js +105 -4
- package/lib/core/model/ArkBaseModel.d.ts +14 -1
- package/lib/core/model/ArkBaseModel.d.ts.map +1 -1
- package/lib/core/model/ArkBaseModel.js +61 -2
- package/lib/core/model/ArkBody.d.ts.map +1 -1
- package/lib/core/model/ArkBody.js +1 -3
- package/lib/core/model/ArkClass.d.ts +22 -2
- package/lib/core/model/ArkClass.d.ts.map +1 -1
- package/lib/core/model/ArkClass.js +59 -28
- package/lib/core/model/ArkField.d.ts.map +1 -1
- package/lib/core/model/ArkField.js +3 -1
- package/lib/core/model/ArkFile.d.ts +4 -1
- package/lib/core/model/ArkFile.d.ts.map +1 -1
- package/lib/core/model/ArkFile.js +44 -3
- package/lib/core/model/ArkImport.d.ts.map +1 -1
- package/lib/core/model/ArkImport.js +9 -1
- package/lib/core/model/ArkMethod.d.ts +5 -0
- package/lib/core/model/ArkMethod.d.ts.map +1 -1
- package/lib/core/model/ArkMethod.js +33 -1
- package/lib/core/model/ArkNamespace.d.ts +2 -0
- package/lib/core/model/ArkNamespace.d.ts.map +1 -1
- package/lib/core/model/ArkNamespace.js +11 -0
- package/lib/core/model/ArkSignature.d.ts +3 -3
- package/lib/core/model/ArkSignature.d.ts.map +1 -1
- package/lib/core/model/ArkSignature.js +14 -9
- package/lib/core/model/builder/ArkClassBuilder.d.ts +2 -0
- package/lib/core/model/builder/ArkClassBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/ArkClassBuilder.js +3 -3
- package/lib/core/model/builder/ArkMethodBuilder.d.ts +4 -1
- package/lib/core/model/builder/ArkMethodBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/ArkMethodBuilder.js +19 -6
- package/lib/core/model/builder/ArkNamespaceBuilder.d.ts +1 -0
- package/lib/core/model/builder/ArkNamespaceBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/ArkNamespaceBuilder.js +2 -1
- package/lib/core/model/builder/BodyBuilder.d.ts +4 -0
- package/lib/core/model/builder/BodyBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/builderUtils.d.ts +1 -0
- package/lib/core/model/builder/builderUtils.d.ts.map +1 -1
- package/lib/core/model/builder/builderUtils.js +7 -3
- package/lib/frontend/cppFrontend/ast/ArkCxxAstNode.d.ts +296 -0
- package/lib/frontend/cppFrontend/ast/ArkCxxAstNode.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/ast/ArkCxxAstNode.js +145 -0
- package/lib/frontend/cppFrontend/ast/astUtils.d.ts +51 -0
- package/lib/frontend/cppFrontend/ast/astUtils.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/ast/astUtils.js +470 -0
- package/lib/frontend/cppFrontend/ast/const.d.ts +30 -0
- package/lib/frontend/cppFrontend/ast/const.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/ast/const.js +134 -0
- package/lib/frontend/cppFrontend/base/Constant.d.ts +9 -0
- package/lib/frontend/cppFrontend/base/Constant.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/base/Constant.js +33 -0
- package/lib/frontend/cppFrontend/base/Expr.d.ts +174 -0
- package/lib/frontend/cppFrontend/base/Expr.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/base/Expr.js +530 -0
- package/lib/frontend/cppFrontend/base/Ref.d.ts +25 -0
- package/lib/frontend/cppFrontend/base/Ref.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/base/Ref.js +53 -0
- package/lib/frontend/cppFrontend/base/Trap.d.ts +8 -0
- package/lib/frontend/cppFrontend/base/Trap.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/base/Trap.js +28 -0
- package/lib/frontend/cppFrontend/base/Type.d.ts +264 -0
- package/lib/frontend/cppFrontend/base/Type.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/base/Type.js +600 -0
- package/lib/frontend/cppFrontend/common/ArkIRTransformer.d.ts +109 -0
- package/lib/frontend/cppFrontend/common/ArkIRTransformer.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/ArkIRTransformer.js +925 -0
- package/lib/frontend/cppFrontend/common/ArkValueTransformer.d.ts +477 -0
- package/lib/frontend/cppFrontend/common/ArkValueTransformer.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/ArkValueTransformer.js +2746 -0
- package/lib/frontend/cppFrontend/common/Builtin.d.ts +57 -0
- package/lib/frontend/cppFrontend/common/Builtin.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/Builtin.js +106 -0
- package/lib/frontend/cppFrontend/common/IRInference.d.ts +94 -0
- package/lib/frontend/cppFrontend/common/IRInference.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/IRInference.js +1087 -0
- package/lib/frontend/cppFrontend/common/IRUtils.d.ts +23 -0
- package/lib/frontend/cppFrontend/common/IRUtils.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/IRUtils.js +168 -0
- package/lib/frontend/cppFrontend/common/ModelUtils.d.ts +44 -0
- package/lib/frontend/cppFrontend/common/ModelUtils.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/ModelUtils.js +567 -0
- package/lib/frontend/cppFrontend/common/TypeInference.d.ts +278 -0
- package/lib/frontend/cppFrontend/common/TypeInference.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/TypeInference.js +1354 -0
- package/lib/frontend/cppFrontend/common/ValueUtil.d.ts +16 -0
- package/lib/frontend/cppFrontend/common/ValueUtil.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/ValueUtil.js +61 -0
- package/lib/frontend/cppFrontend/graph/builder/CfgBuilder.d.ts +182 -0
- package/lib/frontend/cppFrontend/graph/builder/CfgBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/graph/builder/CfgBuilder.js +1435 -0
- package/lib/frontend/cppFrontend/graph/builder/ConditionBuilder.d.ts +21 -0
- package/lib/frontend/cppFrontend/graph/builder/ConditionBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/graph/builder/ConditionBuilder.js +303 -0
- package/lib/frontend/cppFrontend/graph/builder/IfBuilder.d.ts +15 -0
- package/lib/frontend/cppFrontend/graph/builder/IfBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/graph/builder/IfBuilder.js +161 -0
- package/lib/frontend/cppFrontend/graph/builder/LoopBuilder.d.ts +21 -0
- package/lib/frontend/cppFrontend/graph/builder/LoopBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/graph/builder/LoopBuilder.js +261 -0
- package/lib/frontend/cppFrontend/graph/builder/SwitchBuilder.d.ts +12 -0
- package/lib/frontend/cppFrontend/graph/builder/SwitchBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/graph/builder/SwitchBuilder.js +155 -0
- package/lib/frontend/cppFrontend/graph/builder/TrapBuilder.d.ts +29 -0
- package/lib/frontend/cppFrontend/graph/builder/TrapBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/graph/builder/TrapBuilder.js +302 -0
- package/lib/frontend/cppFrontend/inference/CxxInference.d.ts +10 -0
- package/lib/frontend/cppFrontend/inference/CxxInference.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/inference/CxxInference.js +41 -0
- package/lib/frontend/cppFrontend/inference/CxxModelInference.d.ts +28 -0
- package/lib/frontend/cppFrontend/inference/CxxModelInference.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/inference/CxxModelInference.js +98 -0
- package/lib/frontend/cppFrontend/inference/CxxValueInference.d.ts +20 -0
- package/lib/frontend/cppFrontend/inference/CxxValueInference.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/inference/CxxValueInference.js +128 -0
- package/lib/frontend/cppFrontend/model/builder/ArkClassBuilder.d.ts +11 -0
- package/lib/frontend/cppFrontend/model/builder/ArkClassBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/ArkClassBuilder.js +413 -0
- package/lib/frontend/cppFrontend/model/builder/ArkFieldBuilder.d.ts +5 -0
- package/lib/frontend/cppFrontend/model/builder/ArkFieldBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/ArkFieldBuilder.js +61 -0
- package/lib/frontend/cppFrontend/model/builder/ArkFileBuilder.d.ts +17 -0
- package/lib/frontend/cppFrontend/model/builder/ArkFileBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/ArkFileBuilder.js +285 -0
- package/lib/frontend/cppFrontend/model/builder/ArkImportBuilder.d.ts +6 -0
- package/lib/frontend/cppFrontend/model/builder/ArkImportBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/ArkImportBuilder.js +57 -0
- package/lib/frontend/cppFrontend/model/builder/ArkMethodBuilder.d.ts +14 -0
- package/lib/frontend/cppFrontend/model/builder/ArkMethodBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/ArkMethodBuilder.js +422 -0
- package/lib/frontend/cppFrontend/model/builder/ArkNamespaceBuilder.d.ts +8 -0
- package/lib/frontend/cppFrontend/model/builder/ArkNamespaceBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/ArkNamespaceBuilder.js +194 -0
- package/lib/frontend/cppFrontend/model/builder/BodyBuilder.d.ts +59 -0
- package/lib/frontend/cppFrontend/model/builder/BodyBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/BodyBuilder.js +605 -0
- package/lib/frontend/cppFrontend/model/builder/builderUtils.d.ts +46 -0
- package/lib/frontend/cppFrontend/model/builder/builderUtils.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/builderUtils.js +499 -0
- package/lib/frontend/cppFrontend/utils/cmakeUtils.d.ts +44 -0
- package/lib/frontend/cppFrontend/utils/cmakeUtils.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/utils/cmakeUtils.js +240 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -1
- package/lib/node_modules/ohos-typescript/.ohos-typescript-version +1 -0
- package/{node_modules → lib/node_modules}/ohos-typescript/package.json +2 -1
- package/lib/save/CGJsonPrinter.d.ts +8 -0
- package/lib/save/CGJsonPrinter.d.ts.map +1 -0
- package/lib/save/CGJsonPrinter.js +41 -0
- package/lib/save/GraphPrinter.js +2 -2
- package/lib/save/json/JsonDto.d.ts +86 -2
- package/lib/save/json/JsonDto.d.ts.map +1 -1
- package/lib/save/json/JsonSerialization.d.ts +1 -1
- package/lib/save/json/JsonSerialization.d.ts.map +1 -1
- package/lib/save/json/JsonSerialization.js +235 -145
- package/lib/save/source/SourceTransformer.d.ts.map +1 -1
- package/lib/save/source/SourceTransformer.js +0 -3
- package/lib/utils/CxxSceneUtils.d.ts +11 -0
- package/lib/utils/CxxSceneUtils.d.ts.map +1 -0
- package/lib/utils/CxxSceneUtils.js +178 -0
- package/lib/utils/FileUtils.d.ts +7 -8
- package/lib/utils/FileUtils.d.ts.map +1 -1
- package/lib/utils/FileUtils.js +27 -45
- package/lib/utils/LRUCacheDecorator.d.ts +20 -0
- package/lib/utils/LRUCacheDecorator.d.ts.map +1 -0
- package/lib/utils/LRUCacheDecorator.js +89 -0
- package/lib/utils/ModuleUtils.d.ts +39 -0
- package/lib/utils/ModuleUtils.d.ts.map +1 -0
- package/lib/utils/ModuleUtils.js +261 -0
- package/package.json +10 -7
- /package/{node_modules → lib/node_modules}/ohos-typescript/LICENSE +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/README.OpenSource +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/README.md +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/SECURITY.md +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/ThirdPartyNoticeText.txt +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/bin/tsc +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/bin/tsserver +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/README.md +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/cancellationToken.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/cs/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/de/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/es/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/fr/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/it/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/ja/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/ko/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.dom.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.dom.iterable.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.collection.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.core.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.generator.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.iterable.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.promise.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.proxy.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.reflect.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.symbol.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2016.array.include.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2016.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2016.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.object.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.sharedmemory.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.string.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.typedarrays.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.asynciterable.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.promise.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.regexp.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.array.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.object.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.string.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.symbol.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.bigint.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.date.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.number.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.promise.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.sharedmemory.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.string.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.promise.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.string.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.weakref.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.array.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.error.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.object.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.sharedmemory.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.string.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es5.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es6.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.esnext.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.esnext.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.esnext.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.scripthost.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.webworker.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.webworker.importscripts.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.webworker.iterable.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/pl/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/pt-br/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/ru/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tr/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tsc.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tsserver.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tsserverlibrary.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tsserverlibrary.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/typesMap.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/typescript.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/typescript.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/typingsInstaller.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/watchGuard.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pag.d.ts","sourceRoot":"","sources":["../../../src/callgraph/pointerAnalysis/Pag.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AACzG,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MA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CAAC,EAAE,WAAW,GAAG,OAAO;CAmBvE;AAED,qBAAa,YAAY;IACrB,OAAO,CAAC,cAAc,CAA2B;;IAM1C,uBAAuB,IAAI,GAAG,CAAC,mBAAmB,CAAC;IAInD,2BAA2B,CAAC,CAAC,EAAE,mBAAmB,GAAG,IAAI;CAGnE"}
|
|
@@ -338,6 +338,9 @@ class PagNode extends BaseExplicitGraph_1.BaseNode {
|
|
|
338
338
|
getFunctionNameFromThisRefNode() {
|
|
339
339
|
var _a;
|
|
340
340
|
const outgoingEdges = this.getOutgoingEdges();
|
|
341
|
+
if (!outgoingEdges) {
|
|
342
|
+
return undefined;
|
|
343
|
+
}
|
|
341
344
|
for (const edge of outgoingEdges) {
|
|
342
345
|
const dstNode = edge.getDstNode();
|
|
343
346
|
if (!dstNode) {
|
|
@@ -263,7 +263,8 @@ class PointerAnalysis extends AbstractAnalysis_1.AbstractAnalysis {
|
|
|
263
263
|
return true;
|
|
264
264
|
}
|
|
265
265
|
handleFieldInEdges(fieldNode, diffPts) {
|
|
266
|
-
|
|
266
|
+
var _a;
|
|
267
|
+
(_a = fieldNode.getIncomingEdge()) === null || _a === void 0 ? void 0 : _a.forEach(edge => {
|
|
267
268
|
if (edge.getKind() !== Pag_1.PagEdgeKind.Write) {
|
|
268
269
|
return;
|
|
269
270
|
}
|
|
@@ -291,7 +292,8 @@ class PointerAnalysis extends AbstractAnalysis_1.AbstractAnalysis {
|
|
|
291
292
|
});
|
|
292
293
|
}
|
|
293
294
|
handleFieldOutEdges(fieldNode, diffPts) {
|
|
294
|
-
|
|
295
|
+
var _a;
|
|
296
|
+
(_a = fieldNode.getOutgoingEdges()) === null || _a === void 0 ? void 0 : _a.forEach(edge => {
|
|
295
297
|
if (edge.getKind() !== Pag_1.PagEdgeKind.Load) {
|
|
296
298
|
return;
|
|
297
299
|
}
|
package/lib/cli/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli/cli.ts"],"names":[],"mappings":""}
|
package/lib/cli/cli.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2026 Huawei Device Co., Ltd.
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
41
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
42
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
43
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
44
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
45
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
46
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
+
const fs_1 = require("fs");
|
|
51
|
+
const path_1 = require("path");
|
|
52
|
+
const commander_1 = require("commander");
|
|
53
|
+
const logger_1 = __importStar(require("../utils/logger"));
|
|
54
|
+
const ArkError_1 = require("../core/common/ArkError");
|
|
55
|
+
const commands_1 = require("./commands");
|
|
56
|
+
logger_1.default.configure('', logger_1.LOG_LEVEL.ERROR, logger_1.LOG_LEVEL.INFO, false);
|
|
57
|
+
function getPackageVersion() {
|
|
58
|
+
const pkgPath = (0, path_1.join)(__dirname, '../../package.json');
|
|
59
|
+
return JSON.parse((0, fs_1.readFileSync)(pkgPath, 'utf8')).version;
|
|
60
|
+
}
|
|
61
|
+
function main() {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const program = new commander_1.Command();
|
|
64
|
+
program
|
|
65
|
+
.name('arkanalyzer')
|
|
66
|
+
.description('ArkAnalyzer command-line tools (call graph and future utilities)')
|
|
67
|
+
.version(getPackageVersion(), '-V, --version');
|
|
68
|
+
yield (0, commands_1.registerCommands)(program);
|
|
69
|
+
program.parse();
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
void main().catch((err) => {
|
|
73
|
+
let errCode = 1;
|
|
74
|
+
if (err instanceof ArkError_1.ArkAnalyzerError) {
|
|
75
|
+
errCode = err.getErrCode();
|
|
76
|
+
console.error(err.toString());
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
console.error(err);
|
|
80
|
+
}
|
|
81
|
+
process.exit(errCode);
|
|
82
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { Scene } from '../../Scene';
|
|
3
|
+
import { ArkMethod } from '../../core/model/ArkMethod';
|
|
4
|
+
export type CgAlgorithm = 'cha' | 'rta';
|
|
5
|
+
export type CgFormat = 'json' | 'text' | 'dot' | 'csv';
|
|
6
|
+
export type CgDirection = 'forward' | 'backward';
|
|
7
|
+
export type CgEdgeFilter = 'call' | 'virtual' | 'interface' | 'all';
|
|
8
|
+
export interface RawCgCommandOptions {
|
|
9
|
+
algorithm: string;
|
|
10
|
+
output: string;
|
|
11
|
+
format: string;
|
|
12
|
+
entry: string[];
|
|
13
|
+
reachableFrom: string[];
|
|
14
|
+
direction: string;
|
|
15
|
+
edges: string;
|
|
16
|
+
ohosSdkHome?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function resolveMethodRef(scene: Scene, spec: string): ArkMethod | null;
|
|
19
|
+
export declare function runCgCommand(input: string, raw: RawCgCommandOptions): void;
|
|
20
|
+
/**
|
|
21
|
+
* Register call-graph command.
|
|
22
|
+
*
|
|
23
|
+
* Usage:
|
|
24
|
+
* arkanalyzer cg <input> [options]
|
|
25
|
+
*
|
|
26
|
+
* Examples:
|
|
27
|
+
* arkanalyzer cg ./my_project -a rta -f json
|
|
28
|
+
* arkanalyzer cg ./my_project -e "@dummyMain" -r "Dog.sound" --direction backward -f text
|
|
29
|
+
* arkanalyzer cg ./my_project -f dot -o ./out/cg.dot --edges all
|
|
30
|
+
*/
|
|
31
|
+
export declare function register(program: Command): void;
|
|
32
|
+
//# sourceMappingURL=cg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cg.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/cg.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIpC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAMvD,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,CAAC;AACxC,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;AACvD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC;AACjD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,KAAK,CAAC;AAapE,MAAM,WAAW,mBAAmB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAuBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CA+C7E;AA4SD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,mBAAmB,GAAG,IAAI,CA8B1E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqB/C"}
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2026 Huawei Device Co., Ltd.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.register = exports.runCgCommand = exports.resolveMethodRef = void 0;
|
|
21
|
+
const fs_1 = __importDefault(require("fs"));
|
|
22
|
+
const path_1 = __importDefault(require("path"));
|
|
23
|
+
const Scene_1 = require("../../Scene");
|
|
24
|
+
const Config_1 = require("../../Config");
|
|
25
|
+
const CallGraph_1 = require("../../callgraph/model/CallGraph");
|
|
26
|
+
const CallGraphBuilder_1 = require("../../callgraph/model/builder/CallGraphBuilder");
|
|
27
|
+
const ArkClass_1 = require("../../core/model/ArkClass");
|
|
28
|
+
const DummyMainCreater_1 = require("../../core/common/DummyMainCreater");
|
|
29
|
+
const ArkError_1 = require("../../core/common/ArkError");
|
|
30
|
+
function resolveMethodRef(scene, spec) {
|
|
31
|
+
const trimmed = spec.trim();
|
|
32
|
+
const methods = scene.getMethods();
|
|
33
|
+
const exact = methods.find((m) => m.getSignature().toString() === trimmed);
|
|
34
|
+
if (exact) {
|
|
35
|
+
return exact;
|
|
36
|
+
}
|
|
37
|
+
const dotted = /^([^.]+)\.([^.\s]+)$/.exec(trimmed);
|
|
38
|
+
if (dotted) {
|
|
39
|
+
const className = dotted[1];
|
|
40
|
+
const methodName = dotted[2];
|
|
41
|
+
const hits = methods.filter((m) => m.getDeclaringArkClass().getName() === className && m.getName() === methodName);
|
|
42
|
+
if (hits.length === 1) {
|
|
43
|
+
return hits[0];
|
|
44
|
+
}
|
|
45
|
+
if (hits.length > 1) {
|
|
46
|
+
throw new ArkError_1.ArkAnalyzerError({
|
|
47
|
+
errCode: ArkError_1.ArkErrorCode.CLI_AMBIGUOUS_METHOD_REF,
|
|
48
|
+
errMsg: `Ambiguous method ref "${trimmed}": ${hits.length} matches. Use a full signature string.\n` +
|
|
49
|
+
hits.map((h) => h.getSignature().toString()).join('\n'),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const substrHits = methods.filter((m) => m.getSignature().toString().includes(trimmed));
|
|
54
|
+
if (substrHits.length === 1) {
|
|
55
|
+
return substrHits[0];
|
|
56
|
+
}
|
|
57
|
+
if (substrHits.length > 1) {
|
|
58
|
+
throw new ArkError_1.ArkAnalyzerError({
|
|
59
|
+
errCode: ArkError_1.ArkErrorCode.CLI_AMBIGUOUS_METHOD_REF,
|
|
60
|
+
errMsg: `Ambiguous method ref "${trimmed}": ${substrHits.length} substring matches. Use ClassName.methodName or full signature.\n` +
|
|
61
|
+
substrHits
|
|
62
|
+
.slice(0, 15)
|
|
63
|
+
.map((h) => h.getSignature().toString())
|
|
64
|
+
.join('\n') +
|
|
65
|
+
(substrHits.length > 15 ? '\n...' : ''),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
exports.resolveMethodRef = resolveMethodRef;
|
|
71
|
+
function pickEntries(scene, refs) {
|
|
72
|
+
if (refs.length > 0) {
|
|
73
|
+
return refs.map((r) => {
|
|
74
|
+
const m = resolveMethodRef(scene, r);
|
|
75
|
+
if (!m) {
|
|
76
|
+
throw new ArkError_1.ArkAnalyzerError({
|
|
77
|
+
errCode: ArkError_1.ArkErrorCode.CLI_ENTRY_METHOD_NOT_FOUND,
|
|
78
|
+
errMsg: `Entry method not found: ${r}`,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return m.getSignature();
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
const mains = scene.getMethods().filter((m) => m.getName() === 'main');
|
|
85
|
+
if (mains.length > 0) {
|
|
86
|
+
return mains.map((m) => m.getSignature());
|
|
87
|
+
}
|
|
88
|
+
return scene.getMethods().filter((m) => m.getCfg() !== undefined).map((m) => m.getSignature());
|
|
89
|
+
}
|
|
90
|
+
function buildGraphForCg(scene, algorithm, entryRefs) {
|
|
91
|
+
// default create dummy main method is @dummyMain
|
|
92
|
+
const dummyMainCreator = new DummyMainCreater_1.DummyMainCreater(scene);
|
|
93
|
+
dummyMainCreator.createDummyMain();
|
|
94
|
+
const entries = pickEntries(scene, entryRefs);
|
|
95
|
+
const cg = new CallGraph_1.CallGraph(scene);
|
|
96
|
+
const builder = new CallGraphBuilder_1.CallGraphBuilder(cg, scene);
|
|
97
|
+
let algorithmUsed = 'rta';
|
|
98
|
+
if (algorithm === 'cha') {
|
|
99
|
+
algorithmUsed = 'cha';
|
|
100
|
+
if (entries.length === 0) {
|
|
101
|
+
builder.buildCHA4WholeProject(false);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
builder.buildClassHierarchyCallGraph(entries, false);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
algorithmUsed = 'rta';
|
|
109
|
+
if (entries.length === 0) {
|
|
110
|
+
builder.buildRTA4WholeProject(false);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
builder.buildRapidTypeCallGraph(entries, false);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return { cg, algorithmUsed, entry: entries.map((e) => e.toString()) };
|
|
117
|
+
}
|
|
118
|
+
function classifyEdge(scene, edge) {
|
|
119
|
+
if (edge.hasIndirectCall()) {
|
|
120
|
+
const dst = edge.getDstNode().getMethod();
|
|
121
|
+
const dstMethod = scene.getMethod(dst);
|
|
122
|
+
if (dstMethod && dstMethod.getDeclaringArkClass().getCategory() === ArkClass_1.ClassCategory.INTERFACE) {
|
|
123
|
+
return 'interface';
|
|
124
|
+
}
|
|
125
|
+
return 'virtual';
|
|
126
|
+
}
|
|
127
|
+
return 'call';
|
|
128
|
+
}
|
|
129
|
+
function edgeMatchesFilter(kind, filter) {
|
|
130
|
+
if (filter === 'all') {
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
return kind === filter;
|
|
134
|
+
}
|
|
135
|
+
function reachableNodeIds(cg, starts, direction, edges) {
|
|
136
|
+
var _a, _b;
|
|
137
|
+
const bySrc = new Map();
|
|
138
|
+
const byDst = new Map();
|
|
139
|
+
const sigToId = new Map();
|
|
140
|
+
for (const n of cg.getNodesIter()) {
|
|
141
|
+
const cn = n;
|
|
142
|
+
sigToId.set(cn.getMethod().toString(), cn.getID());
|
|
143
|
+
}
|
|
144
|
+
for (const e of edges) {
|
|
145
|
+
const s = sigToId.get(e.src);
|
|
146
|
+
const d = sigToId.get(e.dst);
|
|
147
|
+
if (s === undefined || d === undefined) {
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
if (!bySrc.has(s)) {
|
|
151
|
+
bySrc.set(s, []);
|
|
152
|
+
}
|
|
153
|
+
if (!byDst.has(d)) {
|
|
154
|
+
byDst.set(d, []);
|
|
155
|
+
}
|
|
156
|
+
bySrc.get(s).push(d);
|
|
157
|
+
byDst.get(d).push(s);
|
|
158
|
+
}
|
|
159
|
+
const q = [...starts];
|
|
160
|
+
const seen = new Set(q);
|
|
161
|
+
while (q.length > 0) {
|
|
162
|
+
const x = q.shift();
|
|
163
|
+
const next = direction === 'forward' ? ((_a = bySrc.get(x)) !== null && _a !== void 0 ? _a : []) : ((_b = byDst.get(x)) !== null && _b !== void 0 ? _b : []);
|
|
164
|
+
for (const y of next) {
|
|
165
|
+
if (!seen.has(y)) {
|
|
166
|
+
seen.add(y);
|
|
167
|
+
q.push(y);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return seen;
|
|
172
|
+
}
|
|
173
|
+
function formatDot(edges) {
|
|
174
|
+
const lines = ['digraph CG {'];
|
|
175
|
+
for (const e of edges) {
|
|
176
|
+
lines.push(` "${e.src}" -> "${e.dst}" [label="${e.type}"];`);
|
|
177
|
+
}
|
|
178
|
+
lines.push('}');
|
|
179
|
+
return lines.join('\n');
|
|
180
|
+
}
|
|
181
|
+
function formatCsv(edges) {
|
|
182
|
+
const rows = ['src,dst,type'];
|
|
183
|
+
for (const e of edges) {
|
|
184
|
+
rows.push(`"${e.src.replace(/"/g, '""')}","${e.dst.replace(/"/g, '""')}",${e.type}`);
|
|
185
|
+
}
|
|
186
|
+
return rows.join('\n');
|
|
187
|
+
}
|
|
188
|
+
function formatText(result) {
|
|
189
|
+
const lines = [];
|
|
190
|
+
lines.push(`algorithm: ${result.algorithm} (used: ${result.algorithmUsed})`);
|
|
191
|
+
lines.push(`edges-filter: ${result.edges}`);
|
|
192
|
+
lines.push(`nodes: ${result.nodes.length}, edges: ${result.edgeCount}`);
|
|
193
|
+
if (result.reachableFrom.length > 0) {
|
|
194
|
+
lines.push(`reachable-from (${result.direction}):`);
|
|
195
|
+
for (const r of result.reachableFrom) {
|
|
196
|
+
lines.push(` - ${r}`);
|
|
197
|
+
}
|
|
198
|
+
lines.push('reachable-set:');
|
|
199
|
+
for (const r of result.reachable) {
|
|
200
|
+
lines.push(` - ${r}`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
lines.push('edges:');
|
|
204
|
+
for (const e of result.edgesData) {
|
|
205
|
+
lines.push(` ${e.src} -> ${e.dst} [${e.type}]`);
|
|
206
|
+
}
|
|
207
|
+
return lines.join('\n');
|
|
208
|
+
}
|
|
209
|
+
function parseAndValidate(raw) {
|
|
210
|
+
var _a, _b;
|
|
211
|
+
const algorithm = raw.algorithm;
|
|
212
|
+
const format = raw.format;
|
|
213
|
+
const direction = raw.direction;
|
|
214
|
+
const edges = raw.edges;
|
|
215
|
+
if (!['cha', 'rta'].includes(algorithm)) {
|
|
216
|
+
throw new ArkError_1.ArkAnalyzerError({
|
|
217
|
+
errCode: ArkError_1.ArkErrorCode.CLI_INVALID_OPTION,
|
|
218
|
+
errMsg: `Invalid --algorithm: ${raw.algorithm} (expected cha | rta)`,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
if (!['json', 'text', 'dot', 'csv'].includes(format)) {
|
|
222
|
+
throw new ArkError_1.ArkAnalyzerError({
|
|
223
|
+
errCode: ArkError_1.ArkErrorCode.CLI_INVALID_OPTION,
|
|
224
|
+
errMsg: `Invalid --format: ${raw.format} (expected json | text | dot | csv)`,
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
if (!['forward', 'backward'].includes(direction)) {
|
|
228
|
+
throw new ArkError_1.ArkAnalyzerError({
|
|
229
|
+
errCode: ArkError_1.ArkErrorCode.CLI_INVALID_OPTION,
|
|
230
|
+
errMsg: `Invalid --direction: ${raw.direction} (expected forward | backward)`,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
if (!['call', 'virtual', 'interface', 'all'].includes(edges)) {
|
|
234
|
+
throw new ArkError_1.ArkAnalyzerError({
|
|
235
|
+
errCode: ArkError_1.ArkErrorCode.CLI_INVALID_OPTION,
|
|
236
|
+
errMsg: `Invalid --edges: ${raw.edges} (expected call | virtual | interface | all)`,
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
return {
|
|
240
|
+
algorithm,
|
|
241
|
+
output: raw.output,
|
|
242
|
+
format,
|
|
243
|
+
entry: (_a = raw.entry) !== null && _a !== void 0 ? _a : [],
|
|
244
|
+
reachableFrom: (_b = raw.reachableFrom) !== null && _b !== void 0 ? _b : [],
|
|
245
|
+
direction,
|
|
246
|
+
edges,
|
|
247
|
+
ohosSdkHome: raw.ohosSdkHome,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
function formatOutput(result, filteredEdges) {
|
|
251
|
+
if (result.format === 'json') {
|
|
252
|
+
return JSON.stringify(result);
|
|
253
|
+
}
|
|
254
|
+
if (result.format === 'text') {
|
|
255
|
+
return formatText(result);
|
|
256
|
+
}
|
|
257
|
+
if (result.format === 'dot') {
|
|
258
|
+
return formatDot(filteredEdges);
|
|
259
|
+
}
|
|
260
|
+
return formatCsv(filteredEdges);
|
|
261
|
+
}
|
|
262
|
+
function writeOutput(outputPath, content) {
|
|
263
|
+
if (outputPath === 'stdout') {
|
|
264
|
+
process.stdout.write(`${content}\n`);
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
fs_1.default.mkdirSync(path_1.default.dirname(outputPath), { recursive: true });
|
|
268
|
+
fs_1.default.writeFileSync(outputPath, `${content}\n`);
|
|
269
|
+
}
|
|
270
|
+
function buildSceneForCg(input, ohosSdkHome) {
|
|
271
|
+
const config = (0, Config_1.buildSceneConfigFromProject)(input, ohosSdkHome);
|
|
272
|
+
const scene = new Scene_1.Scene();
|
|
273
|
+
scene.buildSceneFromProjectDir(config);
|
|
274
|
+
scene.inferTypes();
|
|
275
|
+
return scene;
|
|
276
|
+
}
|
|
277
|
+
function collectFilteredEdgeRows(scene, cg, edgeFilter) {
|
|
278
|
+
const edgeRows = [];
|
|
279
|
+
for (const edge of cg.getCallEdges()) {
|
|
280
|
+
const type = classifyEdge(scene, edge);
|
|
281
|
+
if (!edgeMatchesFilter(type, edgeFilter)) {
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
edgeRows.push({
|
|
285
|
+
src: edge.getSrcNode().getMethod().toString(),
|
|
286
|
+
dst: edge.getDstNode().getMethod().toString(),
|
|
287
|
+
type,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
return edgeRows;
|
|
291
|
+
}
|
|
292
|
+
function buildNodeSignatureIndex(cg) {
|
|
293
|
+
const sigToId = new Map();
|
|
294
|
+
const idToSig = new Map();
|
|
295
|
+
for (const n of cg.getNodesIter()) {
|
|
296
|
+
const cn = n;
|
|
297
|
+
const sig = cn.getMethod().toString();
|
|
298
|
+
sigToId.set(sig, cn.getID());
|
|
299
|
+
idToSig.set(cn.getID(), sig);
|
|
300
|
+
}
|
|
301
|
+
return { sigToId, idToSig };
|
|
302
|
+
}
|
|
303
|
+
function resolveReachabilityRoots(scene, specs) {
|
|
304
|
+
return specs
|
|
305
|
+
.map((r) => resolveMethodRef(scene, r))
|
|
306
|
+
.filter((m) => m !== null)
|
|
307
|
+
.map((m) => m.getSignature().toString());
|
|
308
|
+
}
|
|
309
|
+
function collectReachableIds(cg, roots, sigToId, direction, edges) {
|
|
310
|
+
if (roots.length === 0) {
|
|
311
|
+
return new Set();
|
|
312
|
+
}
|
|
313
|
+
const starts = roots.map((s) => sigToId.get(s)).filter((x) => x !== undefined);
|
|
314
|
+
return reachableNodeIds(cg, starts, direction, edges);
|
|
315
|
+
}
|
|
316
|
+
function filterEdgesByReachability(edgeRows, reachableIds, sigToId) {
|
|
317
|
+
if (reachableIds.size === 0) {
|
|
318
|
+
return edgeRows;
|
|
319
|
+
}
|
|
320
|
+
// Keep only subgraph edges whose both endpoints are in the reachable node set.
|
|
321
|
+
return edgeRows.filter((e) => {
|
|
322
|
+
const sid = sigToId.get(e.src);
|
|
323
|
+
const did = sigToId.get(e.dst);
|
|
324
|
+
return sid !== undefined && did !== undefined && reachableIds.has(sid) && reachableIds.has(did);
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
function idsToSortedSignatures(ids, idToSig) {
|
|
328
|
+
return Array.from(ids)
|
|
329
|
+
.map((id) => idToSig.get(id))
|
|
330
|
+
.filter((s) => s !== undefined)
|
|
331
|
+
.sort();
|
|
332
|
+
}
|
|
333
|
+
function collectOutputNodes(reachableIds, idToSig) {
|
|
334
|
+
if (reachableIds.size === 0) {
|
|
335
|
+
return Array.from(idToSig.values()).sort();
|
|
336
|
+
}
|
|
337
|
+
return idsToSortedSignatures(reachableIds, idToSig);
|
|
338
|
+
}
|
|
339
|
+
function runCgCommand(input, raw) {
|
|
340
|
+
const options = parseAndValidate(raw);
|
|
341
|
+
const scene = buildSceneForCg(input, options.ohosSdkHome);
|
|
342
|
+
const { cg, algorithmUsed, entry } = buildGraphForCg(scene, options.algorithm, options.entry);
|
|
343
|
+
const edgeRows = collectFilteredEdgeRows(scene, cg, options.edges);
|
|
344
|
+
const reachableFrom = resolveReachabilityRoots(scene, options.reachableFrom);
|
|
345
|
+
const { sigToId, idToSig } = buildNodeSignatureIndex(cg);
|
|
346
|
+
const reachableIds = collectReachableIds(cg, reachableFrom, sigToId, options.direction, edgeRows);
|
|
347
|
+
const filteredEdges = filterEdgesByReachability(edgeRows, reachableIds, sigToId);
|
|
348
|
+
const reachable = idsToSortedSignatures(reachableIds, idToSig);
|
|
349
|
+
const nodes = collectOutputNodes(reachableIds, idToSig);
|
|
350
|
+
const result = {
|
|
351
|
+
input,
|
|
352
|
+
algorithm: options.algorithm,
|
|
353
|
+
algorithmUsed,
|
|
354
|
+
format: options.format,
|
|
355
|
+
direction: options.direction,
|
|
356
|
+
edges: options.edges,
|
|
357
|
+
entry,
|
|
358
|
+
reachableFrom,
|
|
359
|
+
reachable,
|
|
360
|
+
nodes,
|
|
361
|
+
edgeCount: filteredEdges.length,
|
|
362
|
+
edgesData: filteredEdges,
|
|
363
|
+
};
|
|
364
|
+
const outputText = formatOutput(result, filteredEdges);
|
|
365
|
+
writeOutput(options.output, outputText);
|
|
366
|
+
}
|
|
367
|
+
exports.runCgCommand = runCgCommand;
|
|
368
|
+
/**
|
|
369
|
+
* Register call-graph command.
|
|
370
|
+
*
|
|
371
|
+
* Usage:
|
|
372
|
+
* arkanalyzer cg <input> [options]
|
|
373
|
+
*
|
|
374
|
+
* Examples:
|
|
375
|
+
* arkanalyzer cg ./my_project -a rta -f json
|
|
376
|
+
* arkanalyzer cg ./my_project -e "@dummyMain" -r "Dog.sound" --direction backward -f text
|
|
377
|
+
* arkanalyzer cg ./my_project -f dot -o ./out/cg.dot --edges all
|
|
378
|
+
*/
|
|
379
|
+
function register(program) {
|
|
380
|
+
program
|
|
381
|
+
.command('cg <input>')
|
|
382
|
+
.description('Build call graph and export/query analysis results for a project')
|
|
383
|
+
.option('-a, --algorithm <name>', 'Build algorithm: cha | rta', 'rta')
|
|
384
|
+
.option('-o, --output <file>', 'Output file path', 'stdout')
|
|
385
|
+
.option('-f, --format <type>', 'Output format: json | text | dot | csv', 'json')
|
|
386
|
+
.option('-e, --entry <method>', 'Specify entry method (repeatable)', (v, prev) => {
|
|
387
|
+
prev.push(v);
|
|
388
|
+
return prev;
|
|
389
|
+
}, [])
|
|
390
|
+
.option('-r, --reachable-from <method>', 'Reachability roots (repeatable)', (v, prev) => {
|
|
391
|
+
prev.push(v);
|
|
392
|
+
return prev;
|
|
393
|
+
}, [])
|
|
394
|
+
.option('--direction <dir>', 'Reachability direction: forward | backward', 'forward')
|
|
395
|
+
.option('--edges <type>', 'Edge filter: call | virtual | interface | all', 'all')
|
|
396
|
+
.option('--ohos-sdk-home <path>', 'OHOS SDK home. Fallback to env OHOS_SDK_HOME')
|
|
397
|
+
.action((input, opts) => {
|
|
398
|
+
runCgCommand(input, opts);
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
exports.register = register;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACpC;AAeD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBtE"}
|