Skip to content
/ dabasco Public

dabasco - putting the spice into DaBAS (Evaluation module for D-BAS)

License

Notifications You must be signed in to change notification settings

hhucn/dabasco

Repository files navigation

dabasco - Evaluation module for D-BAS

License: MIT

This module provides an interface between the discussion data and user data export interface of D-BAS and established data formats of abstract argumentation framework, abstract dialectical frameworks, or the ASPIC framework. As input, dabasco requires D-BAS argument graph and user data as served by the D-BAS export interface. All results are provided as a JSON string.

Setup

To install required python packages, execute:

make dependencies

To run the tests, execute:

make test

To run the service, execute:

make run

This module requires a running D-BAS instance to fetch data. Configure the D-BAS host address and the API version of that D-BAS instance in config.py (API version 1 for D-BAS v1.4.2 or older, API version 2 for D-BAS v1.17.0 or newer).

A small python web app that serves example D-BAS data (API version 1) is included. To run it, execute:

python3 dbas_export_mockup.py

Argumentation Framework Interface

The argumentation framework (AF) interface creates AF instances in ASPARTIX syntax based on a translation by Wyner et al. (2015).

To get an AF representation of the D-BAS discussion with ID <discussion_id>, use:

http://localhost:5101/evaluate/dungify/dis/<discussion_id>    

You can configure dabasco to use a single D-BAS user opinion, identified by that user's ID <user_id>, as a source for assertions by adding corresponding route elements:

http://localhost:5101/evaluate/dungify/dis/<discussion_id>/user/<user_id> 

To get a different encoding, where the user opinion is strictly enforced, use:

http://localhost:5101/evaluate/dungify/dis/<discussion_id>/user/<user_id>/opinion_strict

Example pipeline for Dung AF evaluation using the conarg solver (get preferred extensions of discussion 2, use user opinion 1):

conarg -e preferred <(curl -s 'http://localhost:5101/evaluate/dungify/dis/2/user/1' | jq -r '.af')

Web sources:

ASPIC Interface

The ASPIC interface creates ASPIC instances formatted for the TOAST web service. To get a TOAST representation of a user opinion in a discussion, use either of the following, where the user opinion is encoded with varying strength.

Normal opinion (no additional route element):

http://localhost:5101/evaluate/toastify/dis/<discussion_id>/user/<user_id>

The opinion is represented by defeasible rules with the same preference as rules representing D-BAS arguments. If a user commitment is in conflict with the conclusion of a D-BAS argument, these mutually attack each other and both will be acceptable in some extension (but not simultaneously).

Weak opinion (add "opinion_weak" to route):

http://localhost:5101/evaluate/toastify/dis/<discussion_id>/user/<user_id>/opinion_weak 

The opinion is represented by defeasible rules with a lower preference than rules representing D-BAS arguments. This allows to weakly assume each commitment in the opinion, but these commitments are overruled by the conclusions of D-BAS arguments, if in conflict.

Strict opinion (add "opinion_strict" to route):

http://localhost:5101/evaluate/toastify/dis/<discussion_id>/user/<user_id>/opinion_strict

The opinion is represented by strict rules. This enforces the user opinion and defeats all assumptions or conclusions of D-BAS arguments that are in conflict with the opinion.

Example pipeline for evaluation using the TOAST Web service (evaluate discussion 2, user ID 1, with weak user opinion):

curl -s 'http://localhost:5101/evaluate/toastify/dis/2/user/1/opinion_weak' | curl -d @- http://toast.arg-tech.org/api/evaluate

Web sources:

Abstract Dialectical Framework Interface

The ADF interface creates ADF instances based on a translation by Strass (2015) formatted for the YADF, DIAMOND, or k++ADF solvers. To get an ADF representation of a user opinion in a D-BAS discussion, use:

http://localhost:5101/evaluate/adfify/dis/<discussion_id>/user/<user_id>

You can configure dabasco to use strict ADF rules (instead of defeasible rules, as default) to represent the D-BAS user opinion by adding a corresponding route element:

http://localhost:5101/evaluate/adfify/dis/<discussion_id>/user/<user_id>/opinion_strict 

Example pipeline for ADF evaluation using YADF, lpopt, gringo and clasp (get preferred models for user 1 in discussion 2):

java -jar yadf.jar -prf <(curl -s 'http://localhost:5101/evaluate/adfify/dis/2/user/1' | jq -r '.adf') | lpopt | gringo | clasp -n 0   

Web sources: