Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
name: GHC ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ghc: ['9.4', '9.6', '9.8', '9.10']

steps:
- uses: actions/checkout@v4

- uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}

- name: Cache cabal store
uses: actions/cache@v4
with:
path: ~/.cabal/store
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('Dung.cabal') }}
restore-keys: |
${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-

- name: Update cabal package list
run: cabal update

- name: Build
run: cabal build all

- name: Run tests
run: cabal test all --test-show-details=direct
45 changes: 0 additions & 45 deletions CHANGELOG

This file was deleted.

64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Changelog

## 1.1 → 2.0.0.0

### Breaking changes

- **Fixed `groundedF` infinite-loop bug**: `groundedF` now correctly applies
the characteristic function at each step instead of recursing with unchanged
arguments. Code relying on `groundedF'` as a workaround can switch back to
`groundedF`.

- **CLI rewritten**: The `dungell` executable now uses `optparse-applicative`
instead of `cmdargs`. Command-line flags have changed:
- Semantics are selected via `--grounded`, `--preferred`, `--stable`,
`--semi-stable`, or `--all`

### Improvements

- Upgraded to `cabal-version: 3.0` format
- Relaxed `containers` upper bound to build on GHC 9.4+
- Added `Language.Dung` convenience re-export module
- Added test suite (tasty + QuickCheck + doctest)
- Added GitHub Actions CI for GHC 9.4, 9.6, 9.8, 9.10
- Fixed all `-Wall` warnings
- Removed dependency on unmaintained `cmdargs` library
- Converted documentation to Markdown

## 1.0.0.1 → 1.1

This package version is now compatible with the command-line application for
the ICCMA competition. See: <https://github.com/nebasuke/DungICCMA> and the
competition website: <http://argumentationcompetition.org/2015/index.html>

This package has again been significantly extended and now includes:

- Strict version of the grounded fixpoint semantics.
- Definitions of what it means to be a preferred and stable extension.
- Naive implementations of complete, preferred and stable semantics using
the characteristic function. The fixpoint definitions are actually FASTER
than the fancy algorithm implementation.
- Included the fast implementations of `intersect`, `nub` and `(\\)` by
Niklas Hambuechen.
- Added some clarifying text for the "complete" labelling.

## 1.0 → 1.0.0.1

- Fixed the record declaration in Main.hs.
- Added an example file.

## 0.9 → 1.0

This package version is now compatible with the translation package
CarneadesIntoDung. See <http://hackage.haskell.org/package/CarneadesIntoDung/>

This package has furthermore been significantly extended and now includes:

- Preferred, stable and semi-stable semantics along with all definitions from
Caminada's paper "An Algorithm for Computing Semi-Stable Semantics".
- An Input module, allowing files in standard CEGARTIX/PrefSat format to be
parsed.
- An Output module, allowing AFs in this package to be outputted in standard
CEGARTIX/PrefSat format.
- A main executable, allowing input files to be read, argumentation frameworks
to be outputted and evaluated.
111 changes: 82 additions & 29 deletions Dung.cabal
Original file line number Diff line number Diff line change
@@ -1,48 +1,101 @@
cabal-version: 3.0
name: Dung
category: Argumentation, Embedded, AI
version: 1.1
license: BSD3
cabal-version: >= 1.6
version: 2.0.0.0
license: BSD-3-Clause
license-file: LICENSE
author: Bas van Gijzel
maintainer: Bas van Gijzel <bmv@cs.nott.ac.uk>
copyright: Copyright (C) 2014 Bas van Gijzel
stability: experimental
category: Argumentation, Embedded, AI
homepage: http://www.cs.nott.ac.uk/~bmv/Dung/
copyright: Copyright (C) 2014 Bas van Gijzel
synopsis: An implementation of the Dung argumentation frameworks.
description: An implementation of Dung's argumentation frameworks, an abstract argumentation model used to either directly represent conflicting information, or used as
a translation target for more complex (structured) argumentation models. For an introduction to Dung's frameworks see
<http://en.wikipedia.org/wiki/Argumentation_framework> and Dung's paper from 1995: \"On the acceptability of arguments and its fundamental role
in nonmonotonic reasoning, logic programming, and n-person games\", Artificial Intelligence 77: 321-357.
For the papers accompanying this library see \"Towards a framework for the implementation and verification of translations between argumentation
models\" and \"A principled approach to the implementation of argumentation models\", available at <http://www.cs.nott.ac.uk/~bmv/Dung/>.
description:
An implementation of Dung's argumentation frameworks, an abstract
argumentation model used to either directly represent conflicting
information, or used as a translation target for more complex (structured)
argumentation models. For an introduction to Dung's frameworks see
<http://en.wikipedia.org/wiki/Argumentation_framework> and Dung's paper
from 1995: \"On the acceptability of arguments and its fundamental role
in nonmonotonic reasoning, logic programming, and n-person games\",
Artificial Intelligence 77: 321-357.
For the papers accompanying this library see \"Towards a framework for
the implementation and verification of translations between argumentation
models\" and \"A principled approach to the implementation of argumentation
models\", available at <http://www.cs.nott.ac.uk/~bmv/Dung/>.

build-type: Simple
tested-with: GHC == 9.4.8, GHC == 9.6.6, GHC == 9.8.4, GHC == 9.10.1

Extra-Source-Files:
CHANGELOG
exampleaf.txt
extra-doc-files:
README.md
CHANGELOG.md

Library
build-depends:
base >= 4 && < 5,
containers >= 0.3 && < 0.6,
cmdargs >= 0.10.2,
parsec >= 3
extra-source-files:
exampleaf.txt
dungex.txt

source-repository head
type: git
location: https://github.com/nebasuke/Dung

hs-source-dirs:
src
common warnings
ghc-options:
-Wall
-Wcompat
-Widentities
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wredundant-constraints
default-language: Haskell2010

library
import: warnings
hs-source-dirs: src
build-depends:
base >= 4.16 && < 5,
containers >= 0.6 && < 0.8,
parsec >= 3.1 && < 3.2
exposed-modules:
Language.Dung
Language.Dung.AF
Language.Dung.Examples
Language.Dung.Output
Language.Dung.Input
Language.Dung.Output

Executable dungell
main-Is: Main.hs
hs-source-dirs: src
executable dungell
import: warnings
main-is: Main.hs
hs-source-dirs: app
build-depends:
base >= 4.16 && < 5,
Dung,
optparse-applicative >= 0.17 && < 0.19
ghc-options: -threaded

source-repository head
Type: git
Location: https://github.com/nebasuke/Dung
test-suite dung-tests
import: warnings
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: test
build-depends:
base >= 4.16 && < 5,
Dung,
containers >= 0.6 && < 0.8,
tasty >= 1.4 && < 1.6,
tasty-hunit >= 0.10 && < 0.11,
tasty-quickcheck >= 0.10 && < 0.11,
QuickCheck >= 2.14 && < 2.16
other-modules:
Test.Language.Dung.AF
Test.Language.Dung.Input
Test.Language.Dung.Properties

test-suite dung-doctest
import: warnings
type: exitcode-stdio-1.0
main-is: Doctest.hs
hs-source-dirs: test
build-depends:
base >= 4.16 && < 5,
doctest >= 0.20 && < 0.23
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Dung

An implementation of Dung's argumentation frameworks, an abstract argumentation
model used to either directly represent conflicting information, or used as
a translation target for more complex (structured) argumentation models.

For an introduction to Dung's frameworks see the
[Wikipedia article on argumentation frameworks](http://en.wikipedia.org/wiki/Argumentation_framework)
and Dung's paper from 1995:

> "On the acceptability of arguments and its fundamental role in nonmonotonic
> reasoning, logic programming, and n-person games", Artificial Intelligence
> 77: 321-357.

For the papers accompanying this library see:

- "Towards a framework for the implementation and verification of translations
between argumentation models"
- "A principled approach to the implementation of argumentation models"

Available at <http://www.cs.nott.ac.uk/~bmv/Dung/>.

## Usage

```haskell
import Language.Dung

-- Define an argumentation framework: A -> B -> C
let af = AF ["A", "B", "C"] [("A", "B"), ("B", "C")]

-- Compute the grounded extension
groundedExt af
-- ["A", "C"]

-- Compute preferred extensions
preferredExt af
-- [["A","C"]]
```

## Executable

The `dungell` executable reads argumentation frameworks from files in
CEGARTIX/PrefSat format:

```
dungell --file exampleaf.txt --grounded
dungell --file exampleaf.txt --preferred
dungell --file exampleaf.txt --all
```

## License

BSD-3-Clause. See [LICENSE](LICENSE) for details.
8 changes: 0 additions & 8 deletions README.txt

This file was deleted.

2 changes: 0 additions & 2 deletions Setup.hs

This file was deleted.

Loading
Loading