mirror of
https://github.com/ellmau/adf-obdd.git
synced 2025-12-19 09:29:36 +01:00
* Add NoGood and NoGoodStore (#65) * Update Flake to nix 22.05 * Add nogood-algorithm to the ADF * Add public api for the nogood-learner * Add direnv to gitignore * Avoid a Box, support custom heuristics functions * Add ng option with heu to binary * Introduce a new flag to handle big instances (modelcount vs adhoccount) Note that adhoccount without modelcount will not produce correct modelcounts if memoization is used * Add new heuristic * Add crossbeam-channel to represent an output-stream of stable models Uses a crossbeam-channel to fill a Queue, which can be used safely from outside the function. This rework is done to also allow ad-hoc output of results in a potentially multi-threaded setup. * Added documentation on this new feature on the module-page * Fix broken links in rust-doc * Update Readme for lib to reflect the new NoGood API * Add metadata to bin/Cargo.toml, add features * added a benchmark feature, to easily compile benchmark-releases * Fix facet count tests * Add multithread-safe functionality for the dictionary/ordering * Streamline a couple of API calls * Expose more structs and methods to the public API * Breaking some API (though nothing which is currently used in the binary) * Simple version of gh pages * Added more links and information to the landing page * Fix badges in the app-doc * Add two valued interpretation Parameterised the stable-nogood algorithm to allow a variable stability check function. * Refactor nogood-algorithm name * Update README.md and documentation (`docu` folder) `README.md` on the `/` level is now presenting the same information which is provided in `docs/index.md` * Update main - Update main functionality - Update naming * Fix cli-test * Update Version to 0.3.0 Due to braking API changes and reaching a milestone, the version is incremented to 0.3.0 (beta) * Update Documentation navigation (#81) * flake.lock: Update Flake lock file updates: • Updated input 'flake-utils': 'github:numtide/flake-utils/1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1' (2022-05-30) → 'github:numtide/flake-utils/7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249' (2022-07-04) • Updated input 'gitignoresrc': 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) → 'github:hercules-ci/gitignore.nix/f2ea0f8ff1bce948ccb6b893d15d5ea3efaf1364' (2022-07-21) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/8b538fcb329a7bc3d153962f17c509ee49166973' (2022-06-15) → 'github:NixOS/nixpkgs/e43cf1748462c81202a32b26294e9f8eefcc3462' (2022-08-01) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/b1957596ff1c7aa8c55c4512b7ad1c9672502e8e' (2022-06-15) → 'github:NixOS/nixpkgs/7b9be38c7250b22d829ab6effdee90d5e40c6e5c' (2022-07-30) • Updated input 'rust-overlay': 'github:oxalica/rust-overlay/9eea93067eff400846c36f57b7499df9ef428ba0' (2022-06-17) → 'github:oxalica/rust-overlay/9055cb4f33f062c0dd33aa7e3c89140da8f70057' (2022-08-02) * Add type alias for NoGood Add a type alias `Interpretation` for NoGood to reflect the duality where an Interpretation might become a NoGood. * Add documentation information about later revisions on VarContainer Co-authored-by: Maximilian Marx <mmarx@wh2.tu-dresden.de>
140 lines
7.1 KiB
Markdown
140 lines
7.1 KiB
Markdown
[](https://crates.io/crates/adf_bdd)
|
|
[](https://docs.rs/adf_bdd/latest/adf_bdd/)
|
|

|
|
[](https://coveralls.io/github/ellmau/adf-obdd)
|
|

|
|
 
|
|
[](https://github.com/ellmau/adf-obdd/releases)
|
|

|
|
[](https://github.com/ellmau/adf-obdd/discussions) 
|
|
|
|
| [Home](index.md) | [Binary](adf-bdd.md) | [Library](adf_bdd.md)| [Repository](https://github.com/ellmau/adf-obdd) |
|
|
|--- | --- | --- | --- |
|
|
|
|
# Abstract Dialectical Frameworks solved by Binary Decision Diagrams; developed in Dresden (ADF-BDD)
|
|
This is the readme for the executable solver.
|
|
|
|
## Usage
|
|
```
|
|
USAGE:
|
|
adf-bdd [OPTIONS] <INPUT>
|
|
|
|
ARGS:
|
|
<INPUT> Input filename
|
|
|
|
OPTIONS:
|
|
--an Sorts variables in an alphanumeric manner
|
|
--com Compute the complete models
|
|
--counter <COUNTER> Set if the (counter-)models shall be computed and printed,
|
|
possible values are 'nai' and 'mem' for naive and memoization
|
|
repectively (only works in hybrid and naive mode)
|
|
--export <EXPORT> Export the adf-bdd state after parsing and BDD instantiation to
|
|
the given filename
|
|
--grd Compute the grounded model
|
|
-h, --help Print help information
|
|
--heu <HEU> Choose which heuristics shall be used by the nogood-learning
|
|
approach [possible values: Simple, MinModMinPathsMaxVarImp,
|
|
MinModMaxVarImpMinPaths]
|
|
--import Import an adf- bdd state instead of an adf
|
|
--lib <IMPLEMENTATION> Choose the bdd implementation of either 'biodivine', 'naive', or
|
|
hybrid [default: hybrid]
|
|
--lx Sorts variables in an lexicographic manner
|
|
-q Sets log verbosity to only errors
|
|
--rust_log <RUST_LOG> Sets the verbosity to 'warn', 'info', 'debug' or 'trace' if -v and
|
|
-q are not use [env: RUST_LOG=debug]
|
|
--stm Compute the stable models
|
|
--stmca Compute the stable models with the help of modelcounting using
|
|
heuristics a
|
|
--stmcb Compute the stable models with the help of modelcounting using
|
|
heuristics b
|
|
--stmng Compute the stable models with the nogood-learning based approach
|
|
--stmpre Compute the stable models with a pre-filter (only hybrid lib-mode)
|
|
--stmrew Compute the stable models with a single-formula rewriting (only
|
|
hybrid lib-mode)
|
|
--stmrew2 Compute the stable models with a single-formula rewriting on
|
|
internal representation(only hybrid lib-mode)
|
|
--twoval Compute the two valued models with the nogood-learning based
|
|
approach
|
|
-v Sets log verbosity (multiple times means more verbose)
|
|
-V, --version Print version information
|
|
```
|
|
|
|
Note that import and export only works if the naive library is chosen
|
|
|
|
Right now there is no additional information to the computed models, so if you use --com --grd --stm the borders between the results are not obviously communicated.
|
|
They can be easily identified though:
|
|
- The computation is always in the same order
|
|
- grd
|
|
- com
|
|
- stm
|
|
- We know that there is always exactly one grounded model
|
|
- We know that there always exist at least one complete model (i.e. the grounded one)
|
|
- We know that there does not need to exist a stable model
|
|
- We know that every stable model is a complete model too
|
|
|
|
|
|
## Input-file format:
|
|
Each statement is defined by an ASP-style unary predicate s, where the enclosed term represents the label of the statement.
|
|
The binary predicate ac relates each statement to one propositional formula in prefix notation, with the logical operations and constants as follows:
|
|
- and(x,y): conjunction
|
|
- or(x,y): disjunctin
|
|
- iff(x,Y): if and only if
|
|
- xor(x,y): exclusive or
|
|
- neg(x): classical negation
|
|
- c(v): constant symbol "verum" - tautology/top
|
|
- c(f): constant symbol "falsum" - inconsistency/bot
|
|
|
|
# Development notes
|
|
To build the binary, you need to run
|
|
```bash
|
|
$> cargo build --workspace --release
|
|
```
|
|
|
|
To build the binary with debug-symbols, run
|
|
```bash
|
|
$> cargo build --workspace
|
|
```
|
|
|
|
To run all the tests placed in the submodule you need to run
|
|
```bash
|
|
$> git submodule init
|
|
```
|
|
at the first time.
|
|
Afterwards you need to update the content of the submodule to be on the currently used revision by
|
|
```bash
|
|
$> git submodule update
|
|
```
|
|
|
|
The tests can be started by using the test-framework of cargo, i.e.
|
|
```bash
|
|
$> cargo test
|
|
```
|
|
Note that some of the instances are quite big and it might take some time to finish all the tests.
|
|
If you do not initialise the submodule, tests will "only" run on the other unit-tests and (possibly forthcoming) other integration tests.
|
|
Due to the way of the generated test-modules you need to call
|
|
```bash
|
|
$> cargo clean
|
|
```
|
|
if you change some of your test-cases.
|
|
|
|
To remove the tests just type
|
|
```bash
|
|
$> git submodule deinit res/adf-instances
|
|
```
|
|
or
|
|
```bash
|
|
$> git submodule deinit --all
|
|
```
|
|
|
|
# Acknowledgements
|
|
This work is partly supported by Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) in projects number 389792660 (TRR 248, [Center for Perspicuous Systems](https://www.perspicuous-computing.science/)),
|
|
the Bundesministerium für Bildung und Forschung (BMBF, Federal Ministry of Education and Research) in the
|
|
[Center for Scalable Data Analytics and Artificial Intelligence](https://www.scads.de) (ScaDS.AI),
|
|
and by the [Center for Advancing Electronics Dresden](https://cfaed.tu-dresden.de) (cfaed).
|
|
|
|
# Affiliation
|
|
This work has been partly developed by the [Knowledge-Based Systems Group](http://kbs.inf.tu-dresden.de/), [Faculty of Computer Science](https://tu-dresden.de/ing/informatik) of [TU Dresden](https://tu-dresden.de).
|
|
|
|
# Disclaimer
|
|
Hosting content here does not establish any formal or legal relation to TU Dresden.
|