Skip to main content
Glama
tianfanxuan

ptolemy-mcp

by tianfanxuan

与智能体环路协同设计工具表面:智能体设计自动化中的效率与可行性

IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems (TCAD)

Tongyang Dai, Dimitrios Stamoulis, Hongyu Yuan, Jing Jin, and Jie Liu


本仓库包含了上述论文的工件。它包含 Ptolemy MCP 服务器、完整的评估框架、针对全部四个评估环境预采集的每次运行追踪文件,以及一个脚本,该脚本可在不需要 LLM API 密钥的情况下,根据这些追踪文件复现论文中的所有表格。

复现论文表格(无需 API 密钥)

eval/results/per_run/ 下预采集的追踪数据(以及 Verilog/RTL、SystemC 和 Simulink 对应的目录)就是重新生成 LaTeX 表格所需的全部内容。无需安装 Ptolemy II,也无需 Java。

pip install -e .
python reproduce_tables.py

输出的 .tex 和 .json 文件将写入 reproduced_tables/。其中的数字应与发表的论文完全相同。也可以使用 --out-dir 指定一个替代输出目录。

Related MCP server: AFSIM MCP Server

安装

需要 Python 3.10 之后版本。

pip install -e .

如需使用 Ptolemy II 集成功能(运行新评估时需要,而复现表格不需要),请在启动服务器之前设置两个环境变量:

export PTII=/path/to/ptII          # Ptolemy II installation root
export JAVA_HOME=/path/to/java     # JRE 11+

在 Windows 上,请使用 set 命令或 PowerShell 的 $env: 等效写法。

运行冒烟测试

冒烟测试会通过 stdio 启动 MCP 服务器,构建一个小型 SDF 模型,并端到端验证一个信号属性。它要求已设置 PTII 和 JAVA_HOME。

python demos/mcp_stdio_smoke.py

重新运行完整评估

重新运行需要一个可用的 LLM API 密钥以及一个可正常工作的 Ptolemy II 安装。有关批量测试脚本和配置详情,请参阅 eval/README.md。

基于 Claude 的智能体通过 eval/ptolemy_mcp_config.json 进行配置。GPT-5 跨模型探测将从 PTOLEMY_GPT5_BASE 环境变量读取端点(默认使用标准的 OpenAI 兼容端点)。

仓库布局

ptolemy_mcp/          MCP server and Ptolemy II bridge (Python package)
eval/
  benchmarks/         Task specifications for Benchmark A and C
  results/per_run/    Pre-collected per-run trace JSON files (1 260 runs)
  aggregate_*.py      Aggregation scripts that produce the paper's tables
  runner.py           Evaluation harness entry point
eval_eda/             Verilog/RTL cross-environment evaluation (54 runs)
eval_systemc/         SystemC cross-environment evaluation (27 runs)
eval_simulink/        Simulink cross-environment evaluation (18 runs)
agent/                System prompt and case-study notes used during evaluation
demos/                End-to-end smoke demo and reference MoML models
examples/             Example MCP client configuration
scripts/              Helper scripts for running sweeps
reproduce_tables.py   Code Ocean entry point — regenerates all tables

追踪文件格式

eval/results/per_run/ 中的每个文件都是一个 JSON 对象,包含以下顶层字段:

字段

描述

task_id

基准测试任务标识符

config

智能体配置名称(C1–C4, OPT, …)

agent

使用的模型(claude、oracle…)

run_ix

重复次数,即第几轮

passed

是否所有属性都得到满足

wall_seconds

运行所消耗的墙钟时间

grade

数值分数(违反程度,或通过时为 0)

tool_calls_total

MCP 工具调用的总数

tool_calls_by_fn

按各应用统计的单个调用次数

许可证

参见 LICENSE。

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Enables AI agents to automate COMSOL Multiphysics simulations, including model management, geometry building, physics configuration, meshing, solving, and results visualization through the MCP protocol.
    78
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to control MATLAB Simulink models through natural language, providing tools for model creation, block management, wiring, simulation, and more via a local MCP backend.
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to automate COMSOL Multiphysics simulations, including model management, geometry building, physics configuration, meshing, solving, and results visualization via the MCP protocol.
    MIT