Skip to main content

Move language parser and function call graph analyzer

Project description

Move FCG Analyzer

一个用于分析 Move 项目的静态分析工具,支持函数调用图(Function Call Graph)分析,可以提取函数信息、调用关系、参数等。

功能

  • 提取函数签名、参数、返回类型
  • 提取函数源代码和位置信息
  • 准确提取函数调用关系(calls)
  • 支持模块限定的函数查询
  • 输出标准 JSON 格式

构建

1. 安装依赖

npm install

2. 构建 TypeScript Indexer

npm run build:indexer

使用

Python API

from move_fcg_analyzer import MoveFunctionAnalyzer

analyzer = MoveFunctionAnalyzer()
result = analyzer.analyze_raw("./project_path", "function_name")

# result 包含 contract, function, source, location, parameter, calls 等字段
print(result["calls"])  # 查看函数调用关系

命令行

python3 -m move_fcg_analyzer <project_path> <function_name>

示例:

python3 -m move_fcg_analyzer ./test/caas-framework grant_read_authorization

输出格式

{
  "contract": "module_name",
  "function": "function_signature",
  "source": "function_source_code",
  "location": {
    "file": "/path/to/file.move",
    "start_line": 134,
    "end_line": 204
  },
  "parameter": [
    {"name": "param_name", "type": "param_type"}
  ],
  "calls": [
    {
      "file": "/path/to/called/function.move",
      "function": "called_function_name",
      "module": "called_module_name"
    }
  ]
}

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

move_fcg_analyzer-1.0.4.tar.gz (271.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

move_fcg_analyzer-1.0.4-cp312-cp312-win_amd64.whl (184.0 kB view details)

Uploaded CPython 3.12Windows x86-64

move_fcg_analyzer-1.0.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (207.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

move_fcg_analyzer-1.0.4-cp312-cp312-macosx_11_0_arm64.whl (187.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

move_fcg_analyzer-1.0.4-cp311-cp311-win_amd64.whl (184.0 kB view details)

Uploaded CPython 3.11Windows x86-64

move_fcg_analyzer-1.0.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (207.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

move_fcg_analyzer-1.0.4-cp311-cp311-macosx_11_0_arm64.whl (187.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

move_fcg_analyzer-1.0.4-cp310-cp310-win_amd64.whl (184.0 kB view details)

Uploaded CPython 3.10Windows x86-64

move_fcg_analyzer-1.0.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (207.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

move_fcg_analyzer-1.0.4-cp310-cp310-macosx_11_0_arm64.whl (187.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

move_fcg_analyzer-1.0.4-cp39-cp39-win_amd64.whl (184.0 kB view details)

Uploaded CPython 3.9Windows x86-64

move_fcg_analyzer-1.0.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (207.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

move_fcg_analyzer-1.0.4-cp39-cp39-macosx_11_0_arm64.whl (187.9 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

move_fcg_analyzer-1.0.4-cp38-cp38-win_amd64.whl (184.0 kB view details)

Uploaded CPython 3.8Windows x86-64

move_fcg_analyzer-1.0.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (207.5 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

move_fcg_analyzer-1.0.4-cp38-cp38-macosx_11_0_arm64.whl (187.9 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

File details

Details for the file move_fcg_analyzer-1.0.4.tar.gz.

File metadata

  • Download URL: move_fcg_analyzer-1.0.4.tar.gz
  • Upload date:
  • Size: 271.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for move_fcg_analyzer-1.0.4.tar.gz
Algorithm Hash digest
SHA256 b06131d6900ece9b5e0ea654b003650533f178c1312918b5fbbab98e1a067d2d
MD5 e21c6f57cc1939be657b0b481eb27f40
BLAKE2b-256 f9c86cd6245e184c1df0b0f36a851a5c3815ed7458182dfc15fe0f561592066a

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fc49277558ab056c3d247bdc3a8a009bf32ba932310b90f1c211a0a50c513a8e
MD5 788e0ae346b7e7fcf68a29acb9f2a1b3
BLAKE2b-256 05839350737a00936e08f467b859ca5755c9b98c8b9ad6e36dad91866d688ca0

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6d295f96b287e067b7faba3a110803ab96b55aacb6e405c1f2ef2127fc2ccd7
MD5 8ba674a4004c26994da61fd9424db627
BLAKE2b-256 1d888e543cb0e2149ddb19cd2ef03570f8607ef7c9301bd8da75a508aafcb99b

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2fd257165e6ecdf04fde20814e3f45d0b7a473a5025d5fa573d99c9c2f3db735
MD5 62731c93db6be4e4a7887aac6a1fc3c8
BLAKE2b-256 e9eb7e89f2273bff5aaf407c854c664fd38b6dbc534b46a0ce00abec8e663f10

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9691c82ff5aed44ebf22d837870abc8b7fbc36c04b3e99eb36908271b64178fa
MD5 9a50ef6c56ff5f74d77adc2e50e7ccb9
BLAKE2b-256 efcb684c2fb09139c9dc8232a793dcf33c141b93ce4164ae9769f022c9988e0d

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aac958680396c83dc73d2364f9d1eb30d528a991c6da06af0ba5cf6baf0a9fcb
MD5 db09f78cd752124a08970f341abe9b86
BLAKE2b-256 ae0fe97e77654e13986490902ca452400cdb15a8b593f83d59e007b43fcd58f2

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d39fa02b81296499a499287b714bf29362e19aaf1567a1bf4546dac416854931
MD5 bf76022fa6efac0d337e0a5da8f89844
BLAKE2b-256 319cfb023dbf1da0359d769abea78a68cd268236ca2e87e11410388af65dd877

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 45ece675bd2b02848e843f163697176a35294b8a664c680ae3cc849c544bd229
MD5 95b5ac14698c83d57d5e84403d29138b
BLAKE2b-256 b1faa0d10b571e1258638c98717d3cfaad05ee710538db4c327113affb1f027f

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 681a8862b82dcce315a54ca7a2f9e92e180bca85090c23690e83884cd7d9b435
MD5 cf43fa8b4ddeffab428ca993add2ebd8
BLAKE2b-256 e008a13c36475dbcf4194f0c6a04589b2466803d8637a8c05f69314bedd52bef

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d50b0b5c09122f1016a871a942ebb971dc727dfff0730375c31d3c6777eb6258
MD5 15fe2ff0527e7ddd40d73e0d6461ba44
BLAKE2b-256 3c5f65c7d75b8aa791b03b4be0f4ca77f3fe853635108519274593155a9ca182

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8b57f2341e1120a0af097085973555e13dfa11f2edd3a4c87c898ef70a9dcf1c
MD5 17e452724a79993482d29e0f75f4f678
BLAKE2b-256 5b4df4034ae6574f980aedb5d826223d74200d59a8467dddeb79447a9f9fce1c

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5e250a85af02f43ad4f6d5925a65bf35903a09c009f60dec8bd02cfd412a12b7
MD5 b986a2eadb4a251ce0ddfdb8318fe87d
BLAKE2b-256 05f4e824124967d362e2c944c501a02bac0b5c0a5e279edebcb95a0a0cb5dd9f

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa1528c9dad6af81e9837c2e6efde063b2eff5c1cb4f6bdcd31d57dbb42a8ac7
MD5 19fa6e403dfa0cfb954fcb22095cb72a
BLAKE2b-256 999bf454607ac5a760e83ac17c8ed3b4f49d73090aeab8edae015e09ee1ccc81

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 08bcc612a5920224b5263225e4ea9eec83b14c652e9b711a5cf22127da50ea3f
MD5 0e819922ba3b7c3b7ecd4d5c6331a762
BLAKE2b-256 3b8c62b88ae0b373a95e97ada89d9d2d8b90b7f64948bbd41c5cbb2fcf50780d

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b89666713a12ca919deba91ec495195d02b42f4e70141e745236cd8c4f6bcc06
MD5 1468418abebcd0fa6306fc645c25dcd7
BLAKE2b-256 b339df64b3729e4f6765478216fe50da5cbd5d16429704cfe3259b6446642cf7

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.4-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.4-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 44deb9310e9940e40f48e39aa341089561876f71ff56eb33218b56c19739cbf3
MD5 b93bb3ad189db1c91e0a6be2b6c22be1
BLAKE2b-256 00fd35dfb57cda50eacb9d4eacdaa5daecad34e925645fe18d2d5cba7bf9c9a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page