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.0

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.0
File Size Uploaded
asp_fzn-0.3.0.tar.gz 63.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for asp-fzn 0.3.0
File
asp_fzn-0.3.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
asp_fzn-0.3.0-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.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
asp_fzn-0.3.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
asp_fzn-0.3.0-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.0.tar.gz

Download URL asp_fzn-0.3.0.tar.gz
Size 63.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3b966ea8ad4e43e3b1efb278fc4982c93cb28f4d4340dbbfea42c42b538b12c2
BLAKE2b-256 checksum
How to use checksums
ce87944e8973a4e4c861f631413de3491bb6a38147585316c2c29106a949b08f
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.0-cp39-abi3-win_amd64.whl

Download URL asp_fzn-0.3.0-cp39-abi3-win_amd64.whl
Size 1.4 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
dc4e511808883be04150d90e55fb7579a91cf129ea12afed71a59f1c7ed0c906
BLAKE2b-256 checksum
How to use checksums
b5341972f997202fd8e1f11a6de383952e35825871752bcbed83ff881b7672f4
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.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL asp_fzn-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 558.9 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
cb37f3a2a0df024c68e4eebb60ed5e7845608f7687711a0173796f5a596c5614
BLAKE2b-256 checksum
How to use checksums
fca9b78fbaf5c82deabc56c273f57d2e8cb9e534e315db6561a7afb9b69300f4
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.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL asp_fzn-0.3.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 520.8 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
2e26b6b50003976fc87de8d6ac263baf7392a63640b79d21c8d2c28116ef867e
BLAKE2b-256 checksum
How to use checksums
84792eef71e166ab14d5ed20b94ed0f71668934957357378806436f9c7448c91
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.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL asp_fzn-0.3.0-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
e7738e68852346ed34752254e67d1ecfacbe5bec99561c064e27c9146ce82046
BLAKE2b-256 checksum
How to use checksums
5a309ac1ac26d813ae7d230c26d18aaff4a326d015683968ffa5f44b5e3874f4
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.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL asp_fzn-0.3.0-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
1d7b0956d741b00f9abb5748205b8c1a2676c8843c1f0b5a6aff2987966eb7dd
BLAKE2b-256 checksum
How to use checksums
3bea77cecccba6b3938629110f5ae1f3222c2a7e51541f172a983181b769e2c6
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

0.3.1

6 release files

This release

0.3.0 This release

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