Arg2P

io.github.tuProlog由 GitHub 账号 tuProlog 发布v0.25.1更新于 Nov 6, 2026

Structured argumentation: solve ASPIC+, ABA and abstract theories, explore their results

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

用 Prolog 求解结构化论证理论(ASPIC+、ABA、抽象框架),返回解、标记结果与论证图。

可以做什么
  • 检查理论、标志或查询能否解析,并指出出错的行、列与记号
  • 在理论上求解 Prolog 查询,返回首批解及其绑定,以及最后一个 yes 的论证图
  • 回答查询中哪些陈述被标记为 in、out 或 und,支持轻信与怀疑两种模式
  • 读取理论当前生效的 profile 与标志取值
  • 打开理论的交互式求解器视图,让用户自行浏览结果
适用场景
适合需要基于形式化论证或可废止逻辑理论进行推理、解释某主张为何被证成或驳回、查看论证图与攻击关系的场景,而不是让模型凭空猜测结论。
运行要求
以本地 stdio 进程运行,通过 uvx 从 PyPI 的 arg2p 包启动,其 wheel 内置 Java 运行时。未声明认证、环境变量或请求头。仅限桌面端。
安装前请注意
服务器会对提供的理论执行 Prolog 查询,应把理论文本视为可执行输入。理论被其 profile 拒绝或无法解析时会返回错误,此时不应猜测答案。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Arg2P,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[Arg2P logo]

Arg2P

[CI/CD] [Maven Central] [npm] [PyPI] [Kotlin coverage] [Prolog coverage] [Documentation] [License]

Arg2P is an implementation of the ASPIC+ framework for structured argumentation, which reads assumption-based and abstract frameworks as well. Built on top of the tuProlog engine, it runs on the JVM, in JavaScript (Node.js and browsers) and in Python, with the same API; its solver runs in the browser, in VS Code, and for AI assistants.

The documentation starts from Getting Started.

[The playground]


Installing

JVM (Gradle, Maven Central)implementation("it.unibo.tuprolog.argumentation:arg2p-jvm:<VERSION>")
JavaScript (npm)npm install @tuprolog/arg2p
Python (PyPI)pip install arg2p (the wheel bundles a Java runtime)
Browserthe Web Playground: nothing to install
VS Codethe extension
Claude Code/plugin install arg2p --marketplace tuProlog/arg2p-kt
Codexcodex plugin marketplace add tuProlog/arg2p-kt, then install arg2p from /plugins

<VERSION> is the latest release, shown by the Maven Central badge above. See Execution for a first program on each platform, the playground, the extension of VS Code, and the plugin and MCP server of Arg2P for AI assistants (the other clients, and the server alone).

[Arg2P in VS Code]


Issue tracking

If you encounter any issues, please report them on the GitHub Issues page.
Your feedback helps improve the project!


References

Arg2P is described in:

  • Roberta Calegari, Andrea Omicini, Giuseppe Pisano, Giovanni Sartor. Arg2P: an argumentation framework for explainable intelligent systems. Journal of Logic and Computation, 32(2):369–401, 2022. doi:10.1093/logcom/exab089
  • Giuseppe Pisano. Argumentation for legal reasoning: meta-models, technology and beyond. PhD thesis, Alma Mater Studiorum — Università di Bologna, 2024. doi:10.48676/unibo/amsdottorato/11671

Individual features — burden of persuasion, defeasible preferences, modularity, causality, distributed reasoning — have their own papers, listed on the References page of the wiki.

Cite me

If you use Arg2P in academic work, please cite:

bibtex
@article{arg2p,  author  = {Calegari, Roberta and Omicini, Andrea and Pisano, Giuseppe and Sartor, Giovanni},  title   = {{Arg2P}: an argumentation framework for explainable intelligent systems},  journal = {Journal of Logic and Computation},  volume  = {32},  number  = {2},  pages   = {369--401},  year    = {2022},  doi     = {10.1093/logcom/exab089}}
bibtex
@phdthesis{pisano2024argumentation,  author  = {Pisano, Giuseppe},  title   = {Argumentation for legal reasoning: meta-models, technology and beyond},  school  = {Alma Mater Studiorum --- Universit\`a di Bologna},  year    = {2024},  doi     = {10.48676/unibo/amsdottorato/11671}}

来源:README.md,提交 b968602

工具

5

solve

Solve a query

Solves a query on a theory of arg2p: its first solutions (yes, no, or halt with an error), with their bindings, and the argument graph of the last yes (every argument with its conclusion, top rule, sub-arguments and label in, out or und; every attack with its type); more tells whether the search has alternatives left (they may give other solutions, or no), and output is what the theory printed. The default query, arg2p::solve(In, Out, Und), gives the statements labelled in, out and und. Out of time, it gives the solutions found until then (timedOut).

输入参数flagsquerytheory必填maxSolutionstimeoutSeconds

answer

Label the statements of a query

The statements matching a query (a literal, as flies(X) or -flies(tweety)) labelled in (justified), out (rejected) and und (undecided) by the theory, under its semantics: answers, one for each labelling, or one across them all with the flag answerMode(credulous) or answerMode(skeptical).

输入参数flagsquery必填theory必填timeoutSeconds

check

Check a theory or a query

Whether a theory (or flags) or a query parses, and where it does not (line, column, token).

输入参数kindtext必填

settings

The settings in effect

The value in effect of every flag for a theory: its profile (graphBuildMode), the semantics, the graph extensions, ... as the theory, the flags and the profile set them. A theory that does not parse is refused.

输入参数flagstheory必填timeoutSeconds

explore

Show the solver of a theory

Shows the user the solver of a theory, to explore its results themselves: the query run, its solutions, the argument graph of each and the stages of its computation, the drawing of an abstract framework, the flags. Hosts of MCP Apps show it in the conversation; the result links the same theory in the web playground, for every host. Use it when the user wants to see or explore the results.

输入参数flagsquerytheory必填timeoutSeconds

版本历史

3
  1. v0.25.1最新Nov 6, 2026
  2. v0.25.0Nov 5, 2026
  3. v0.23.0Oct 29, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分