Simple SAT solvers for use in Enstaller
Project description
Prototype for SAT-based dependency handling. This is a work in progress, do not expect any API not to change at this point.
Installation
To install the python package, simple do as follows:
git clone --recursive https://github.com/enthought/sat-solver cd sat-solver pip install -e .
Example usage
TODO
Usage from the CLI
To try things out from the CLI, you need to write a scenario file (yaml format), see simplesat/tests/simple_numpy.yaml for a simple example.
To print the rules:
python scripts/print_rules.py simplesat/tests/simple_numpy.yaml
To print the operations:
python scripts/solve.py simplesat/tests/simple_numpy.yaml
Comparing with php’s composer
First, clone composer’s somewhere on your machine:
git clone https://github.com/composer/composer
Then, use the scripts/scenario_to_php.py script to write a php file that will print the composer’s solution for a given scenario:
python scripts/scenario_to_php.py \ --composer-root <path to composer github checkout> \ simplesat/tests/simple_numpy.yaml \ scripts/print_operations.php.in
This will create a scripts/print_operations.php script you can simply execute w/ php:
php scripts/print_operations.php
Bibliography
Niklas Eén, Niklas Sörensson: An Extensible SAT-solver. SAT 2003
Lintao Zhang, Conor F. Madigan, Matthew H. Moskewicz, Sharad Malik: Efficient Conflict Driven Learning in a Boolean Satisfiability Solver. Proc. ICCAD 2001, pp. 279-285.
Donald Knuth: The art of computer programming. Vol. 4, Pre-fascicle 6A, Par. 7.2.2.2. (Satisfiability).
On the use of SAT solvers for managing packages:
Fosdem 2008 presentation: Using SAT for solving package dependencies. More details on the SUSE wiki.
The 0install project.
Chris Tucker, David Shuffelton, Ranjit Jhala, Sorin Lerner: OPIUM: Optimal Package Install/Uninstall Manager. Proc. ICSE 2007, pp. 178-188
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
File details
Details for the file simplesat-0.2.0.tar.gz
.
File metadata
- Download URL: simplesat-0.2.0.tar.gz
- Upload date:
- Size: 169.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb7bef311913fd44e68102f0a6d556e0f5855ac22528f8fe90bc0948266f8063 |
|
MD5 | c1e7bcb03cf31aea832e0a5012d87965 |
|
BLAKE2b-256 | c677f22b0f1cc6b3a9d0e45cf9e70100ae7edf6fb49c5465e6c3c0bdd2fb4b68 |
File details
Details for the file simplesat-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: simplesat-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 206.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e31f20421832dd655e8026da192b95223a63e5eed42660bebb693867d7c7c29 |
|
MD5 | ce6f21b41cd7cb7200fc4dba155c23e4 |
|
BLAKE2b-256 | 5b39e75b96f0849f5f9792ddbbe941c24e421a4d1c3e810a060f8deef8568eee |