Skip to main content

asp-fzn

Python interface for asp-fzn which enables solving head-cycle free ASP programs via FlatZinc solvers via translation written in rust.

The inferface supports answer set solving through Python directly through MiniZinc, which needs to be installed on the system and in PATH.

Alternatively, FlatZinc solver directly, without MiniZinc, by passing their .msc file.

The package can also be used to translate ASP programs into FlatZinc and store the model in a file.

Example

Enumerating answer sets with CP-SAT (bundled in MiniZinc, which needs to be installed)

import aspfzn

prg = '''
a:- not b.
b :- not a.
c :- b.
'''
result = aspfzn.solve(prg, "cp-sat", all_solutions=True, on_solution=print)
print(result)

License

The code of this project is licensed under the Apache License 2.0.

Furthermore, note the following legal disclaimer:

This software is a research prototype only. It has not been tested for the use in or for products and/or services (in particular in any safety-relevant areas). It was solely published as part of the publication “ASP-FZN: A Translation-based Constraint Answer Set Solver“ and will neither be maintained nor monitored.

Robert Bosch GmbH is acknowledged for financial support.

Metadata

Release files for asp-fzn 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asp-fzn 0.3.1
File Size Uploaded
asp_fzn-0.3.1.tar.gz 63.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for asp-fzn 0.3.1
File
asp_fzn-0.3.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
asp_fzn-0.3.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
asp_fzn-0.3.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
asp_fzn-0.3.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
asp_fzn-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 5.2 MB

Release files / asp_fzn-0.3.1.tar.gz

Download URL asp_fzn-0.3.1.tar.gz
Size 63.0 kB
Tags Source
SHA-256 checksum
How to use checksums
157a90beb720240b3aa928edd8d4c2b4ad1149deaaa84efa0a21dd044f479d91
BLAKE2b-256 checksum
How to use checksums
e33cb64cb8e05ae9704ff65e9ac1be92141b8a23daa80a673929a2b58a0cb89e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / asp_fzn-0.3.1-cp39-abi3-win_amd64.whl

Download URL asp_fzn-0.3.1-cp39-abi3-win_amd64.whl
Size 1.3 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
eda30c7113b54debcb0abebeef950bbf8f4cc7aaab69a0dc727821f7d3e7ca18
BLAKE2b-256 checksum
How to use checksums
d4bf0895fa0a4dc8a522f16ebc6c17531038d0be84aca4a989c849ba066466ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / asp_fzn-0.3.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL asp_fzn-0.3.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 558.8 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
b4f50273aa337da1d4d4154edd127848358e13238fa8afefc245b827bdde78d7
BLAKE2b-256 checksum
How to use checksums
8d803949d9d4a2a43323a7797eaa5980334e19c8ad5d2430c3eabf1f54880332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / asp_fzn-0.3.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL asp_fzn-0.3.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 520.7 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
a6df505e2b2ac9c2cd69e3cef1e825df232330ad7b29555488341a6ebed80fb3
BLAKE2b-256 checksum
How to use checksums
eb453793f94651662d0ecf6052274b69d5e7e44b8f1f0df2ce9b239c5ded2f0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / asp_fzn-0.3.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL asp_fzn-0.3.1-cp39-abi3-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
999609bda78f3ffcbccfdea22cc0fb8f96cd963e287647ba64df09078288874f
BLAKE2b-256 checksum
How to use checksums
2dd3a46bfb14f077c10955ea311358f152f663e614091f60762c610d49fd50ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / asp_fzn-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL asp_fzn-0.3.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 1.4 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f1bc9623ff97b5a4eaac8c8cd282e5c3514db9586812e8ea1f3dcf9058406fa2
BLAKE2b-256 checksum
How to use checksums
2d8fcf39ad33693188d20c4c154ac5611b4af88692726d98e4fa1bb9a76d107d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.3.1 This release

6 release files

0.3.0

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page