From ac9a76c565ee387a101cafe5839f6ed591e65bf0 Mon Sep 17 00:00:00 2001 From: Jorge Fandinno Date: Thu, 12 Dec 2024 10:03:55 -0600 Subject: [PATCH] version from toml --- README.md | 40 ++++++++++++++++------------------------ pyproject.toml | 2 +- src/eclingo/__init__.py | 7 ++++++- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index f784ac9..5c859d7 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,14 @@ --- ## 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 @@ -25,9 +25,9 @@ Currently, `eclingo` can compute world views under the following semantics: 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. @@ -38,7 +38,7 @@ Clone this repo: ``` git clone https://github.com/potassco/eclingo.git && cd eclingo/ && -git checkout develop +git checkout master ``` ### Setup @@ -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*. @@ -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 @@ -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. diff --git a/pyproject.toml b/pyproject.toml index 19ac875..00e83df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "eclingo" -version = "0.5.0" +version = "1.2.0" description = "" authors = ["Jorge Fandinno "] diff --git a/src/eclingo/__init__.py b/src/eclingo/__init__.py index da5724d..d256e0d 100644 --- a/src/eclingo/__init__.py +++ b/src/eclingo/__init__.py @@ -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"