{"id":20783589,"url":"https://github.com/tuprolog/arg2p-kt","last_synced_at":"2025-05-01T02:25:45.901Z","repository":{"id":37246588,"uuid":"333103830","full_name":"tuProlog/arg2p-kt","owner":"tuProlog","description":"A lightweight implementation of the ASPIC+ framework for structured argumentation.","archived":false,"fork":false,"pushed_at":"2025-04-23T12:58:24.000Z","size":2950,"stargazers_count":7,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-23T14:01:41.630Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://arg2p.apice.unibo.it","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tuProlog.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-01-26T14:05:53.000Z","updated_at":"2025-04-23T12:55:04.000Z","dependencies_parsed_at":"2025-04-23T13:56:33.295Z","dependency_job_id":"133c1382-f2b4-42d4-8cd2-836a9c5026ac","html_url":"https://github.com/tuProlog/arg2p-kt","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuProlog%2Farg2p-kt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuProlog%2Farg2p-kt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuProlog%2Farg2p-kt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuProlog%2Farg2p-kt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuProlog","download_url":"https://codeload.github.com/tuProlog/arg2p-kt/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251811771,"owners_count":21647767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T14:21:13.941Z","updated_at":"2025-05-01T02:25:45.885Z","avatar_url":"https://github.com/tuProlog.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arg2P\n\nArg2P is a lightweight implementation of the ASPIC\u003csup\u003e+\u003c/sup\u003e framework for structured argumentation.\nBuilt on top of the [tuProlog](http://pika-lab.gitlab.io/tuprolog/2p-kt/) engine, it supports both JVM and Node environments.\n\nMore details are available on the [official wiki](https://pika-lab.gitlab.io/argumentation/arg2p-kt/).\n\n---\n\n## Getting Started\n\nArg2p is available as a [2P-Kt](http://pika-lab.gitlab.io/tuprolog/2p-kt/) library.\n\n#### JVM Library - Gradle\n\nTo import the Arg2p module (version `ARG2P_VERSION`) into your Kotlin-based Gradle project, declare the dependency in your `build.gradle(.kts)` file:\n ```kotlin\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation(\"it.unibo.tuprolog.argumentation:arg2p-jvm:ARG2P_VERSION\")\n}\n ```\n\n#### Usage Example\n\n```kotlin\nimport it.unibo.tuprolog.argumentation.core.Arg2pSolverFactory\nimport it.unibo.tuprolog.argumentation.core.libs.basic.FlagsBuilder\n\nfun main() {\n    val graph = Arg2pSolverFactory.evaluate(\"\"\"\n        f1 :=\u003e d.\n        f2 :=\u003e -d.\n    \"\"\".trimIndent(), FlagsBuilder()).first()\n\n    graph.labellings.forEach {\n        println(\"${it.label} : ${it.argument.conclusion}\")\n    }\n}\n``` \n\nFor a complete example, check out the [GitHub demo](https://github.com/Gilbocc/arg2p-kt-demo).\n\n#### NPM Library\n\nThe Arg2P software is available on NPM as a JavaScript library as well. It can be found under the [`@tuprolog` organization](https://www.npmjs.com/org/tuprolog).\nTo use the library, add the dependency to your `package.json`:\n\n```json\n{\n  \"dependencies\": {\n    \"@tuprolog/arg2p\": \"ARG2P_VERSION\"\n  }\n}\n```\n\n#### Usage Example\n\n```js\nconst arg2p = require('@tuprolog/arg2p').it.unibo.tuprolog.argumentation.bridge.JsBridge\n\nconst graph = arg2p.solve('buildLabelSets', `\n    f1 :=\u003e d.\n    f2 :=\u003e -d.`, `\n    graphBuildMode(standard_af).\n    statementLabellingMode(statement).\n    argumentLabellingMode(grounded_hash).\n    orderingPrinciple(last).\n    orderingComparator(elitist).\n    graphExtension(standardPref).\n    queryMode.`, _ =\u003e { }).i.next().graph\n\ngraph.arguments.forEach(arg =\u003e {\n    console.log(`${arg.label} : ${arg.descriptor}`)\n})\n```\n\nFor a complete example, see the [repository](https://github.com/tuProlog/arg2p-kt-web).\n\n---\n\n## Arg2p IDE\n\nThe Arg2p IDE is available on the [Releases section of the\nGitHub repository](https://github.com/tuProlog/arg2p-kt/releases/latest).\n\n![Java IDE](./imgs/javaide.png)\n\nIn the [latest release](https://github.com/tuProlog/arg2p-kt/releases/latest) page, download the _Asset_ named:\n```\narg2p-ide-ARG2P_VERSION-redist.jar\n```\na self-contained, executable Jar containing the 2P-Kt-based Prolog interpreter (`ARG2P_VERSION` will vary depending on the\nactual release version).\n\nAfter you download the `arg2p-ide-ARG2P_VERSION-redist.jar`, you can simply launch it by running:\n```bash\njava -jar arg2p-ide-ARG2P_VERSION-redist.jar\n```\nIf your JVM is properly configured, you can also start the IDE by double-clicking the JAR file.\n\n### Features\n\n- **Query Execution:** Write your query in the text field and hit \u003ckbd\u003eEnter\u003c/kbd\u003e or click \u003ckbd\u003e\u0026gt;\u003c/kbd\u003e.\n- **Solution Exploration:** Click \u003ckbd\u003e\u0026gt;\u003c/kbd\u003e for the next solution or \u003ckbd\u003e\u0026gt;\u0026gt;\u003c/kbd\u003e to compute all solutions.\n- **New Query:** Click \u003ckbd\u003eX\u003c/kbd\u003e to stop the current query, then enter a new one.\n\n### Additional Tabs\n\n- **Graph Tab:** Displays a graphical representation of the abstract argumentation graph.\n- **Arg Flag Tab:** Shows and allows modification of Arg2P flags. Detailed descriptions are on the [official wiki](https://pika-lab.gitlab.io/argumentation/arg2p-kt/wiki/predicate).\n\n---\n\n## Arg2p Playground\n\nTry Arg2P directly in your browser using the [Web Playground](https://legalmachinelab.unibo.it/arg2p).\n\n![Web Playground](./imgs/playground.png)\n\nIt functions the same as the Java IDE, offering an interactive experience without installation.\n\n---\n\n## Issue tracking\n\nIf you encounter any issues, please report them on the [GitHub Issues](https://github.com/tuProlog/arg2p-kt/issues) page.  \nYour feedback helps improve the project!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuprolog%2Farg2p-kt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuprolog%2Farg2p-kt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuprolog%2Farg2p-kt/lists"}