-
Notifications
You must be signed in to change notification settings - Fork 0
Modernize v2 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Modernize v2 #1
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
deda441
Convert docs to markdown and remove Setup.hs
nebasuke 7b5e467
Fix groundedF infinite loop — apply f at each step
nebasuke 985b481
Modernize to cabal 3.0, rewrite CLI with optparse-applicative, fix -W…
nebasuke 4a6c842
Add tasty test suite, QuickCheck properties, and GitHub Actions CI
nebasuke 3b1ce0e
Fix README: update --file to --filename to match CLI
nebasuke 227f9c8
Fix doctests and clean up warnings
nebasuke 5eea181
Update maintainer email, copyright year, and homepage URL
nebasuke 1bf14ac
Add LICENSE to extra-source-files and update copyright year
nebasuke f7455c8
Replace stale university URL with Google Scholar profile
nebasuke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.