Portable conformance test suite for Datalog and Defeasible Datalog evaluators
Project description
datalog-conformance
Portable conformance suite for Datalog and Defeasible Datalog evaluators.
The package ships YAML suites plus a pytest plugin. An evaluator under test is supplied at runtime
with --datalog-evaluator=package.Class, and the plugin dispatches each YAML case through a small
runner/protocol layer.
What This Repo Contains
- Core Datalog suites for facts, joins, recursion, negation, and rejection/error cases.
- Defeasible suites for strict-only equivalence, mixed theories, superiority,
DePYsible-derived cases, and a first SPINdle-family slice from
spindle-racket. - Hypothesis property tests backed by a small internal reference evaluator for the positive and conflict-free fragments, plus live DePYsible-backed generated tests for the supported defeasible fragment.
- Harvest scripts for Souffle, Nemo, Crepe, and a starter SPINdle-family slice.
- Source and license notes in docs/HARVESTING.md.
Install
For working on this repo:
uv sync
From another project:
uv add datalog-conformance --dev
Run
Against a packaged evaluator:
uv run pytest --pyargs datalog_conformance --datalog-evaluator=mypackage.MyEvaluator
Against this repo's bundled tests:
uv run pytest tests --datalog-evaluator=mypackage.MyEvaluator
Filter by tags:
uv run pytest tests --datalog-evaluator=mypackage.MyEvaluator --datalog-tags=defeasible,basic
Current Corpus
- Core Datalog YAML cases: 111
- Defeasible YAML cases: 180
- KLM property YAML cases: 1
- Generated property and meta-tests remain under
tests/
Current notable sources:
- Souffle portable subset
- Nemo testcases
- Crepe UI rejection cases
- DePYsible examples
- spindle-racket test theories
- spindle-racket inline reasoning tests
- spindle-racket query theory tests
- spindle-racket query integration tests
- Derived strict-only defeasible lifts from the core corpus
- Maher 2021 Examples 2-3, authored from local page images
- Antoniou 2007 ambiguity-policy examples, authored from local page images and checked against a local paper-reference evaluator for the reduced propositional fragment
- Morris 2020 Example 6 closure cases, authored from local page images and checked against a local ranked-worlds closure reference for the reduced propositional fragment
- Morris 2020 Appendix C.2 Or property cases, authored from local page images and checked against a local reduced closure-plus-relevance reference
- Bozzato 2020 Example 1, Goldszmidt and Pearl 1992 Example 1, and Morris 2020 Example 5, adapted from local paper notes and checked against the supported DePYsible surface
See docs/IMPLEMENTATIONS.md for concrete runtimes to confirm against.
Verification
Current repo verification commands:
uv run scripts/audit_program_surface.py
uv run scripts/verify_core_with_nemo.py
uv run pytest tests/
uv run --with arpeggio --with colorama pytest tests/test_depysible_generated.py
uv run --extra dev ruff check .
uv run --extra dev pyright
uv run scripts/verify_core_with_nemo.py now writes each run to its own timestamped report
directory under reports/verify_core_with_nemo/, groups cases by shared visible program, and
prefers a release nmo binary when one is available.
Layout
src/datalog_conformance/schema.py: YAML dataclasses and validation.src/datalog_conformance/protocol.py: evaluator protocols.src/datalog_conformance/plugin.py: pytest discovery and parametrization.src/datalog_conformance/runner.py: bridge from YAML cases to evaluator methods.src/datalog_conformance/strategies.py: Hypothesis generators for generated programs and conflict-free defeasible theories.src/datalog_conformance/depysible_strategies.py: Hypothesis generators for live DePYsible-backed defeasible testing.src/datalog_conformance/_tests/: bundled YAML suites.src/datalog_conformance/examples/depysible_adapter.py: live example adapter for DePYsible.scripts/: source harvesters and helper scripts.tests/: meta-tests, property tests, and actual-implementation generated checks.
License
The framework code in this repo is MIT. Harvested or derived test data keeps source attribution and upstream license notes in docs/HARVESTING.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datalog_conformance-0.1.0.tar.gz.
File metadata
- Download URL: datalog_conformance-0.1.0.tar.gz
- Upload date:
- Size: 27.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6b63d9a827f41146970fb0cb43b64e4bb83fd55d87ff0e4d922fc0606cb3c82
|
|
| MD5 |
95dc55a23b3d5def83682bbd624af840
|
|
| BLAKE2b-256 |
c3eb4cf64de445b1b5759ff5be60e8574fd494c13fe9316e424ed777ade7b7b1
|
File details
Details for the file datalog_conformance-0.1.0-py3-none-any.whl.
File metadata
- Download URL: datalog_conformance-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6263752996a2adcbc1cb3dcc8e54cf6e1faa6627f8f0370aa566fed473ce423d
|
|
| MD5 |
ac8008d90091d9c17c788a4b5f497fca
|
|
| BLAKE2b-256 |
e4c125c00465e20d5b6ae07790b0c9cec581f0a03a7722420d668e3043b07b31
|