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 分