Skip to content

Commit

Permalink
version from toml
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefandinno committed Dec 12, 2024
1 parent ebcab6d commit ac9a76c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
40 changes: 16 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@
---

## Description
`eclingo` is a solver for epistemic logic programs [[1]](#References) built upon the ASP system [`clingo`](https://github.com/potassco/clingo).
`eclingo` is a solver for epistemic logic programs [[1,2]](#References) built upon the ASP system [`clingo`](https://github.com/potassco/clingo).
Currently, `eclingo` can compute world views under the following semantics:
- Gelfond 1991; Gelfond and Przymusinska 1993; Gelfond 1994 (G94) [[2, 3, 4]](#References)
- Gelfond 1991; Gelfond and Przymusinska 1993; Gelfond 1994 (G94) [[3, 4, 5]](#References)

## Dependencies

- `python 3.9`
- `clingo 5.5` Python module.
- `linux`
- `python 3.9` or above
- `clingo 5.5` Python module or above

## Installation

### Install clingo

Install the correct version of python and clingo:
```
conda create --name eclingo python=3.9
conda create --name eclingo python=3.12
conda activate eclingo
conda install -c potassco clingo=5.5
conda install -c potassco clingo=5.7.1
```

For installation in development mode go to the [contributing](#Contributing) section below.
Expand All @@ -38,7 +38,7 @@ Clone this repo:
```
git clone https://github.com/potassco/eclingo.git &&
cd eclingo/ &&
git checkout develop
git checkout master
```

### Setup
Expand All @@ -60,18 +60,8 @@ pip install .

#### Rules

`eclingo` accepts rules with the same structure as `clingo` does. Additionally, `eclingo` allows these rules to include subjective literals in their body. These subjective literals are represented using the modal operator **K**, which is represented as `&k{}`. The expression inside the curly braces can be an explicit literal (that is, an atom `A` or its explicit negation `-A`) possibly preceded by default negation, that is represented `not` (alternatively default negation can be represented as `~` for backward compatibility).
`eclingo` accepts rules with the same structure as `clingo` does. Additionally, `eclingo` allows these rules to include subjective literals in their body. These subjective literals are represented using the modal operators **K** and ***M***, which are respectively represented as `&k{}` and `&m{}. The expression inside the curly braces can be an explicit literal (that is, an atom `A` or its explicit negation `-A`) possibly preceded by default negation, that is represented `not` (alternatively default negation can be represented as `~` for backward compatibility).

> Modal operator **M** is not directly supported but `M q` can be replaced by the construction `not &k{ not q }`.
For example, the epistemic logic program:
```
p <- M q.
```
is written under `eclingo`'s syntax as:
```
p :- not &k{ not q }.
```

#### Show statements
Show statements follow `clingo`'s syntax but, in eclingo, they refer to *subjective atoms*.
Expand All @@ -80,7 +70,7 @@ For example, the show statement:
```
#show p/1.
```
refers to the subjective atom `&k{p/1}`.
refers to the subjective atoms `&k{p/1}` and `&m{p/1}`.

## Contributing

Expand Down Expand Up @@ -162,10 +152,12 @@ Create a pull request in github.

## References

[1] Cabalar P., Fandinno J., Garea J., Romero J. and Schaub T. 2020. eclingo: A solver for Epistemic Logic Programs. In Theory and Practice of Logic Programming.
[1] Cabalar, P., Fandinno, J., Garea, J., Romero, J. and Schaub, T. 2020. eclingo: A solver for Epistemic Logic Programs. In Theory and Practice of Logic Programming.

[2] Fandinno J. and Lillo, P. Solving Epistemic Logic Programs using Generate-and-Test with Propagation.

[2] Gelfond, M. 1991. Strong introspection. In Proceedings of the Ninth National Conference on Artificial Intelligence (AAAI’91), T. Dean and K. McKeown, Eds. AAAI Press / The MIT Press, 386–391.
[3] Gelfond, M. 1991. Strong introspection. In Proceedings of the Ninth National Conference on Artificial Intelligence (AAAI’91), T. Dean and K. McKeown, Eds. AAAI Press / The MIT Press, 386–391.

[3] Gelfond, M. and Przymusinska, H. 1993. Reasoning on open domains. In Logic Programming and Non-monotonic Reasoning, Proceedings of the Second International Workshop, Lisbon, Portugal, June 1993, L. Moniz Pereira and A. Nerode, Eds. MIT Press, 397–413.
[4] Gelfond, M. and Przymusinska, H. 1993. Reasoning on open domains. In Logic Programming and Non-monotonic Reasoning, Proceedings of the Second International Workshop, Lisbon, Portugal, June 1993, L. Moniz Pereira and A. Nerode, Eds. MIT Press, 397–413.

[4] Gelfond, M. 1994. Logic programming and reasoning with incomplete information. Annals of Mathematics and Artificial Intelligence 12, 1-2, 89–116.
[5] Gelfond, M. 1994. Logic programming and reasoning with incomplete information. Annals of Mathematics and Artificial Intelligence 12, 1-2, 89–116.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "eclingo"
version = "0.5.0"
version = "1.2.0"
description = ""
authors = ["Jorge Fandinno <[email protected]>"]

Expand Down
7 changes: 6 additions & 1 deletion src/eclingo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
This package contains tools for solving epistemic logic programs
"""

__version__ = "0.5.0"
import importlib.metadata

__version__ = importlib.metadata.version("eclingo")

if __version__ == None:
__version__ = "0.0.0"

0 comments on commit ac9a76c

Please sign in to comment.