PAC-learning-based program systhesizer
Project description
pacfix-python
Python re-implementation of pacfix.
Install
python3 -m pip install pacfix
pysmt-install --z3
Usage
To see how it works, check out the examples in the examples directory.
cd examples/example01
python3 -m pacfix run -i ./mem -l live-variables.txt
Inputs
live variables file
Specify the live variables file using -l or --live-vars live-variables.txt.
1 x int
2 y int
3 z bool
4 b int
5 c int
Each line lists a variable's ID, name, and type, separated by spaces.
Input directory
Specify the input directory using -i or --input-dir input-dir.
The input directory should contain neg and pos subdirectories, each with valuation files.
[begin]
1 7
2 1
3 0
4 8
5 6
[end]
[begin]
1 1
2 7
3 1
4 8
5 -6
[end]
Each file should list variable IDs and their corresponding values. Multiple iterations can be included, with each iteration separated by [begin] and [end].
Output
Specify the output file using -o or --output.
If not specified, the output will be printed to the standard output.
[metadata] [live-variables] [total 5] [int 4]
[metadata] [hypothesis-space] [original 1857] [final 1]
[metadata] [valuation] [neg 3] [pos 48] [uniq 51] [init-neg 4] [init-pos 54] [non-uniq 58]
[metadata] [pac] [delta 0.01] [eps 0.09029745462721749]
[metadata] [pac-no-uniq] [delta 0.01] [eps 0.07939948596531193]
[final] --------------
[invariant] [expr (c != 0)]
Output as SMT format
Specify the output directory as -s or --output-smt.
If not specified, it will not be stored.
python3 -m pacfix run -i ./mem -l live-variables.txt -s ./smt
In ./smt/0.smt
(set-logic QF_IDL)
(declare-fun c () Int)
(assert (let ((.def_0 (= c 0))) (let ((.def_1 (not .def_0))) .def_1)))
(check-sat)
Project details
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 pacfix-0.0.1.tar.gz.
File metadata
- Download URL: pacfix-0.0.1.tar.gz
- Upload date:
- Size: 53.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efe1cd39d34b1661b471d72b418cc8f1c48cae8bccfe4ccbfec4659548d94630
|
|
| MD5 |
5c31ba019f3ea9c77566eba70d56d869
|
|
| BLAKE2b-256 |
1d75569534fcac5756bac0c92da1e39650d3e15c28aa5dac35519f1d48dfe93b
|
File details
Details for the file pacfix-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pacfix-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57c90d2848ecd5de3808e095d5611af734a3663bacd6e61e6b6786d59fb1dcbf
|
|
| MD5 |
20e65c771231ab9754e75b112fe9df39
|
|
| BLAKE2b-256 |
537b5f85db45f1bc7306e78c6ca61f99b22bbe45d483c64375b221e3b4f00236
|