xhail2 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- xhail2-1.0.0/.editorconfig +17 -0
- xhail2-1.0.0/.github/workflows/ci.yml +32 -0
- xhail2-1.0.0/.gitignore +13 -0
- xhail2-1.0.0/CHANGELOG.md +15 -0
- xhail2-1.0.0/LICENSE +674 -0
- xhail2-1.0.0/PKG-INFO +230 -0
- xhail2-1.0.0/README.md +201 -0
- xhail2-1.0.0/examples/ec.lp +31 -0
- xhail2-1.0.0/examples/empty.lp +0 -0
- xhail2-1.0.0/examples/example1.lp +11 -0
- xhail2-1.0.0/examples/example2.lp +19 -0
- xhail2-1.0.0/examples/example3.lp +19 -0
- xhail2-1.0.0/examples/example4.lp +13 -0
- xhail2-1.0.0/examples/mwe1.lp +186 -0
- xhail2-1.0.0/examples/mwe2.lp +2565 -0
- xhail2-1.0.0/examples/penguins_simple.lp +19 -0
- xhail2-1.0.0/examples/penguins_unsatisfiable.lp +22 -0
- xhail2-1.0.0/examples/penguins_weighted.lp +21 -0
- xhail2-1.0.0/examples/phone4_abd.lp +90 -0
- xhail2-1.0.0/examples/phone4_complex.lp +219 -0
- xhail2-1.0.0/examples/phone4_ded.lp +188 -0
- xhail2-1.0.0/examples/phone4_hard.lp +213 -0
- xhail2-1.0.0/examples/phone4_hardest.lp +213 -0
- xhail2-1.0.0/examples/phone4_ind.lp +195 -0
- xhail2-1.0.0/examples/reaction.lp +119 -0
- xhail2-1.0.0/logo.png +0 -0
- xhail2-1.0.0/pyproject.toml +90 -0
- xhail2-1.0.0/src/xhail/__init__.py +1 -0
- xhail2-1.0.0/src/xhail/__main__.py +3 -0
- xhail2-1.0.0/src/xhail/application.py +181 -0
- xhail2-1.0.0/src/xhail/core/__init__.py +0 -0
- xhail2-1.0.0/src/xhail/core/config.py +94 -0
- xhail2-1.0.0/src/xhail/core/dialler.py +176 -0
- xhail2-1.0.0/src/xhail/core/entities/__init__.py +0 -0
- xhail2-1.0.0/src/xhail/core/entities/answer.py +126 -0
- xhail2-1.0.0/src/xhail/core/entities/answers.py +257 -0
- xhail2-1.0.0/src/xhail/core/entities/grounding.py +422 -0
- xhail2-1.0.0/src/xhail/core/entities/hypothesis.py +249 -0
- xhail2-1.0.0/src/xhail/core/entities/problem.py +381 -0
- xhail2-1.0.0/src/xhail/core/entities/values.py +49 -0
- xhail2-1.0.0/src/xhail/core/finder.py +107 -0
- xhail2-1.0.0/src/xhail/core/logger.py +237 -0
- xhail2-1.0.0/src/xhail/core/parser/__init__.py +0 -0
- xhail2-1.0.0/src/xhail/core/parser/acquirer.py +91 -0
- xhail2-1.0.0/src/xhail/core/parser/parser.py +426 -0
- xhail2-1.0.0/src/xhail/core/parser/splitter.py +166 -0
- xhail2-1.0.0/src/xhail/core/parser/tokeniser.py +62 -0
- xhail2-1.0.0/src/xhail/core/statements/__init__.py +0 -0
- xhail2-1.0.0/src/xhail/core/statements/display.py +37 -0
- xhail2-1.0.0/src/xhail/core/statements/example.py +59 -0
- xhail2-1.0.0/src/xhail/core/statements/mode_b.py +49 -0
- xhail2-1.0.0/src/xhail/core/statements/mode_h.py +67 -0
- xhail2-1.0.0/src/xhail/core/terms/__init__.py +0 -0
- xhail2-1.0.0/src/xhail/core/terms/atom.py +128 -0
- xhail2-1.0.0/src/xhail/core/terms/clause.py +76 -0
- xhail2-1.0.0/src/xhail/core/terms/literal.py +59 -0
- xhail2-1.0.0/src/xhail/core/terms/number.py +22 -0
- xhail2-1.0.0/src/xhail/core/terms/placemarker.py +62 -0
- xhail2-1.0.0/src/xhail/core/terms/quotation.py +27 -0
- xhail2-1.0.0/src/xhail/core/terms/scheme.py +112 -0
- xhail2-1.0.0/src/xhail/core/terms/scheme_term.py +224 -0
- xhail2-1.0.0/src/xhail/core/terms/term.py +5 -0
- xhail2-1.0.0/src/xhail/core/terms/variable.py +23 -0
- xhail2-1.0.0/src/xhail/core/utils.py +159 -0
- xhail2-1.0.0/tests/core/entities/__init__.py +0 -0
- xhail2-1.0.0/tests/core/entities/test_answer_answers.py +678 -0
- xhail2-1.0.0/tests/core/entities/test_grounding.py +711 -0
- xhail2-1.0.0/tests/core/entities/test_hypothesis.py +537 -0
- xhail2-1.0.0/tests/core/entities/test_problem.py +611 -0
- xhail2-1.0.0/tests/core/entities/test_values.py +121 -0
- xhail2-1.0.0/tests/core/parser/__init__.py +0 -0
- xhail2-1.0.0/tests/core/parser/test_parser.py +401 -0
- xhail2-1.0.0/tests/core/parser/test_splitter.py +122 -0
- xhail2-1.0.0/tests/core/parser/test_tokeniser_acquirer.py +144 -0
- xhail2-1.0.0/tests/core/statements/__init__.py +0 -0
- xhail2-1.0.0/tests/core/statements/test_display_example.py +192 -0
- xhail2-1.0.0/tests/core/statements/test_mode_b_mode_h.py +224 -0
- xhail2-1.0.0/tests/core/terms/test_atom_scheme.py +409 -0
- xhail2-1.0.0/tests/core/terms/test_literal_clause.py +290 -0
- xhail2-1.0.0/tests/core/terms/test_number_quotation.py +111 -0
- xhail2-1.0.0/tests/core/terms/test_scheme_term_statics.py +345 -0
- xhail2-1.0.0/tests/core/terms/test_term_scheme_term.py +37 -0
- xhail2-1.0.0/tests/core/terms/test_variable_placemarker.py +196 -0
- xhail2-1.0.0/tests/core/test_config.py +262 -0
- xhail2-1.0.0/tests/core/test_dialler.py +517 -0
- xhail2-1.0.0/tests/core/test_finder.py +259 -0
- xhail2-1.0.0/tests/core/test_logger.py +532 -0
- xhail2-1.0.0/tests/core/test_utils.py +436 -0
- xhail2-1.0.0/tests/test_application.py +391 -0
- xhail2-1.0.0/tests/test_smoke.py +5 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
indent_style = space
|
|
7
|
+
insert_final_newline = true
|
|
8
|
+
trim_trailing_whitespace = true
|
|
9
|
+
|
|
10
|
+
[*.py]
|
|
11
|
+
indent_size = 4
|
|
12
|
+
|
|
13
|
+
[*.{toml,yml,yaml}]
|
|
14
|
+
indent_size = 2
|
|
15
|
+
|
|
16
|
+
[*.md]
|
|
17
|
+
trim_trailing_whitespace = false
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
test:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
python-version: ["3.14"]
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: actions/setup-python@v5
|
|
14
|
+
with:
|
|
15
|
+
python-version: ${{ matrix.python-version }}
|
|
16
|
+
- run: pip install -e ".[dev]"
|
|
17
|
+
- run: pytest --cov
|
|
18
|
+
|
|
19
|
+
publish:
|
|
20
|
+
needs: test
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
23
|
+
permissions:
|
|
24
|
+
id-token: write
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
- uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.14"
|
|
30
|
+
- run: pip install hatch
|
|
31
|
+
- run: hatch build
|
|
32
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
xhail2-1.0.0/.gitignore
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.0.0] — 2026-06-22
|
|
4
|
+
|
|
5
|
+
Initial release: faithful Python port of the original Java XHAIL implementation.
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Full Python port of the XHAIL abduction/induction/deduction pipeline
|
|
10
|
+
- `Problem`, `Grounding`, `Hypothesis`, `Answer`, `Answers` entities
|
|
11
|
+
- ASP-based solver integration via external Gringo/Clasp v3 binaries
|
|
12
|
+
- `#display`, `#example`, `#modeh`, `#modeb` directive parser
|
|
13
|
+
- Command-line interface (`xhail` entry point) with all original flags
|
|
14
|
+
- 1009-test suite at 93 % coverage
|
|
15
|
+
- Example problems in `examples/toys/`
|