npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tuprolog/arg2p

v0.13.2

Published

A 2p-kt library for structured argumentation

Readme

Arg2P

Arg2P is an implementation of the ASPIC+ framework for structured argumentation. Built on top of the tuProlog engine, it supports both JVM and Node environments.

More details are available on the official wiki.


Getting Started

Arg2p is available as a 2P-Kt library.

JVM Library - Gradle

To import the Arg2p module (version ARG2P_VERSION) into your Kotlin-based Gradle project, declare the dependency in your build.gradle(.kts) file:

repositories {
   mavenCentral()
}

dependencies {
   implementation("it.unibo.tuprolog.argumentation:arg2p-jvm:ARG2P_VERSION")
}

Usage Example

import it.unibo.tuprolog.argumentation.core.Arg2pSolverFactory
import it.unibo.tuprolog.argumentation.core.libs.basic.FlagsBuilder

fun main() {
    val graph = Arg2pSolverFactory.evaluate("""
        f1 :=> d.
        f2 :=> -d.
    """.trimIndent(), FlagsBuilder()).first()

    graph.labellings.forEach {
        println("${it.label} : ${it.argument.conclusion}")
    }
}

For a complete example, check out the GitHub demo.

NPM Library

The Arg2P software is available on NPM as a JavaScript library as well. It can be found under the @tuprolog organization. To use the library, add the dependency to your package.json:

{
  "dependencies": {
    "@tuprolog/arg2p": "ARG2P_VERSION"
  }
}

Usage Example

const arg2p = require('@tuprolog/arg2p').it.unibo.tuprolog.argumentation.bridge.JsBridge

const graph = arg2p.solve('buildLabelSets', `
    f1 :=> d.
    f2 :=> -d.`, `
    graphBuildMode(standard_af).
    statementLabellingMode(statement).
    argumentLabellingMode(grounded_hash).
    orderingPrinciple(last).
    orderingComparator(elitist).
    graphExtension(standardPref).
    queryMode.`, _ => { }).i.next().graph

graph.arguments.forEach(arg => {
    console.log(`${arg.label} : ${arg.descriptor}`)
})

For a complete example, see the repository.


Arg2p IDE

The Arg2p IDE is available on the Releases section of the GitHub repository.

Java IDE

In the latest release page, download the Asset named:

arg2p-ide-ARG2P_VERSION-redist.jar

a self-contained, executable Jar containing the 2P-Kt-based Prolog interpreter (ARG2P_VERSION will vary depending on the actual release version).

After you download the arg2p-ide-ARG2P_VERSION-redist.jar, you can simply launch it by running:

java -jar arg2p-ide-ARG2P_VERSION-redist.jar

If your JVM is properly configured, you can also start the IDE by double-clicking the JAR file.

Features

  • Query Execution: Write your query in the text field and hit Enter or click >.
  • Solution Exploration: Click > for the next solution or >> to compute all solutions.
  • New Query: Click X to stop the current query, then enter a new one.

Additional Tabs

  • Graph Tab: Displays a graphical representation of the abstract argumentation graph.
  • Arg Flag Tab: Shows and allows modification of Arg2P flags. Detailed descriptions are on the official wiki.

Arg2p Playground

Try Arg2P directly in your browser using the Web Playground.

Web Playground

It functions the same as the Java IDE, offering an interactive experience without installation.


Issue tracking

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