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.3.tar.gz (178.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.3-cp312-cp312-win_amd64.whl (81.4 kB view details)

Uploaded CPython 3.12Windows x86-64

move_fcg_analyzer-1.0.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (104.3 kB view details)

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

move_fcg_analyzer-1.0.3-cp312-cp312-macosx_11_0_arm64.whl (85.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

move_fcg_analyzer-1.0.3-cp311-cp311-win_amd64.whl (81.4 kB view details)

Uploaded CPython 3.11Windows x86-64

move_fcg_analyzer-1.0.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (104.1 kB view details)

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

move_fcg_analyzer-1.0.3-cp311-cp311-macosx_11_0_arm64.whl (85.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

move_fcg_analyzer-1.0.3-cp310-cp310-win_amd64.whl (81.4 kB view details)

Uploaded CPython 3.10Windows x86-64

move_fcg_analyzer-1.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (104.1 kB view details)

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

move_fcg_analyzer-1.0.3-cp310-cp310-macosx_11_0_arm64.whl (85.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

move_fcg_analyzer-1.0.3-cp39-cp39-win_amd64.whl (81.4 kB view details)

Uploaded CPython 3.9Windows x86-64

move_fcg_analyzer-1.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (104.0 kB view details)

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

move_fcg_analyzer-1.0.3-cp39-cp39-macosx_11_0_arm64.whl (85.3 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

move_fcg_analyzer-1.0.3-cp38-cp38-win_amd64.whl (81.4 kB view details)

Uploaded CPython 3.8Windows x86-64

move_fcg_analyzer-1.0.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (104.3 kB view details)

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

move_fcg_analyzer-1.0.3-cp38-cp38-macosx_11_0_arm64.whl (85.3 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: move_fcg_analyzer-1.0.3.tar.gz
  • Upload date:
  • Size: 178.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.3.tar.gz
Algorithm Hash digest
SHA256 875af2453389024ec93fee6659e2800ef4ff2bd7b6d5eb7ef1af5bcc163c7c50
MD5 8e27341dd37fb1158052920b81fa108a
BLAKE2b-256 cc19ca05060886e5d76072fb3cb30d1b3232d947288b4df13e09fcd3a47ff4ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d8a091de33d5d5b1c77906cd92cdb16de744e1fbaf40e931daf249fcf86dd9bf
MD5 e45aeb5b33c9f5b22c8e91eae168808f
BLAKE2b-256 b3cea1e23d6872447c1a7ca25955944b6f82c393ae2145970923cf8050f177a2

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.3-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.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 90e3b67a217a3b24666fd45f81857cc5deb944895312254aa117d1cb4ad15fc1
MD5 191e37f5ece894050877f5b46b435909
BLAKE2b-256 7235e128243c8e436ae09b547606daa424338f81464a9e27b37c42005af602a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ca06fb0ff0bd64af1f29486cdc8454df662417534c6dacde9f59d109828faf37
MD5 d474ad269fa741ee8ac3b0f3e5f9dded
BLAKE2b-256 a63ed21db62af86b73b92897b59195354891b6aec3f819c81501a40ac504d01c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b3d78a5b14c8da81f71695e015b4175bbafa0cc949fb0a391ce39f2e61c20bad
MD5 e0928c90e915ff5dd66d031c4b639b10
BLAKE2b-256 6a7e2dbe96943cdb76b80a437c24d55a79d59201dcfc8b60a470cdee8159b568

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.3-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.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a3801bcbe84c848eac77c1947ffccf393ed6d99ea4c799630562b5dced6d526a
MD5 973404f791573e00c4dfeeaebfe453db
BLAKE2b-256 53bc3346057397e40333323a621fc783a425c658ad87d158dc5597a90d3cdede

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ccfd4557458d4dbf18c8b5b4ce1cc5433ec2a7cac510a5c2505169bdadd381d8
MD5 031307f74c0fdc8eac8b3ec269d38ac8
BLAKE2b-256 8a9f0e1713ae9dce9a758f77859151f03699531f07b4820b2204e5bd0ed4c166

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c9145747a17f57997947defa5f2a4f01ef1e0d773f67340d0a3826e66a563298
MD5 6ac226c32cda927a9a5ca0db86656f93
BLAKE2b-256 5cb3425796dab47c08477be990b7b49b1a7b47b64302383eeff33d47f253d798

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.3-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.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f63ab8fd94b210e73c9b434e37bf07570284c37d6af22ff55e15d65c883a500
MD5 81cbdc6184157e888ff9a87a0d13bcb1
BLAKE2b-256 50549cd5d6a4901ec80458c47a5c1ea614896d8e2a4148b3d7ff1efe19c3cff0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 66ee8ba55b6d84712934243d1b90ec12ca90e92d8fe58965f86c4d4be889ffbd
MD5 bb6c6f08fec0db660ff965bebffa78e9
BLAKE2b-256 06b2da09302254ba1a65c9ab0e94c6413541b6e68f04405cd9108fce49c1a2b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f7ca7f1b81beae4e5828dca253c2045ce07ab0c237c228f67eca601f262b9b60
MD5 43d75a0e22615b0009361ad2f150883c
BLAKE2b-256 d5163ec44cbb33f76ad19a53a4fd6118254390dd196689da4793a4b1ead3595f

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.3-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.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0ce6c1eb8a14f4914a10f49f9fce61cbd420b721877093e500756f9906f3817b
MD5 6026be9ea1b7dee65e4d4f490404c272
BLAKE2b-256 7fa62e9ac5bb645e47f718bf361cbc0d8bf5ccc2cdb94b89707595e97affdfcf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5720d82eead4b8c2052de839de09e89461bc1bb7c3e7ad9840122f8f6d7082cb
MD5 9ce1609712bc7765bbdd4192e5eef17d
BLAKE2b-256 32fc5a1304b7bdbadfdea885d3849459ac3217fe43922c79acc9f02eed8a4beb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 291f2225c8f0981c6f07fca756af638d69c51dc4753fc5c4d4310c566d959c1e
MD5 52720dccac40811b3197d3142d36ff0e
BLAKE2b-256 05ee04a21feba4b3fef9496d06b9f7686d953dd30c4340e515bb97614ceac715

See more details on using hashes here.

File details

Details for the file move_fcg_analyzer-1.0.3-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.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 72ad4a51fb0780bea1905aac5ba419af66eb049b3bb4049380654d32077f7c49
MD5 a9d74110444a6b44fd6b97fadf93e09f
BLAKE2b-256 5ef043801f0387bfd525aa004b08fa78d4af0c07ae7a7244a5546f0d221804d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for move_fcg_analyzer-1.0.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 137034eedca3a3daac4916ad5f51d60c9778e2000441b09c1e32219d64a1f06a
MD5 4d68e27be5f1f0946975297287e761e8
BLAKE2b-256 e18d150dac70b9bae40d3a81a70824c63df9d8f62e53c4edfd9ebbc302a13227

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