Pecan is an automated theorem prover for Büchi automata, with additional features for making it easier to deal with expressing numbers in various numeration systems and working with automatic words.
You can try Pecan online! Just go to http://reedoei.com/pecan.
NOTE: You can also use Docker (see below), if you have it.
You will need Python 3.6 or higher.
Then, install spot; if you are on a Linux-y system, the
install-spot.sh script may work for you:
Otherwise, follow the instructions on the spot website.
You will also need to install the libraries in
# Use the appropriate line for your pip installation (if pip --version says 3.x, then you should be good; otherwise use/install pip3) pip install -r requirements.txt pip3 install -r requirements.txt
Then you can run Pecan files (
python3 pecan.py FILENAME
or start interactive mode via:
python3 pecan.py -i
If you have Docker, you can run Pecan with:
This will automatically build the image if you don't have it already.
all_ones are expressed as LTL formula.
has_zeros(a) := "!(Ga)" all_ones(a) := "Ga" prop_true() := forall x. has_zeros(x) => (not all_ones(x)) #assert_prop(true, prop_true) prop_false() := exists x. has_zeros(x) & all_ones(x) #assert_prop(false, prop_false)
Below we prove basic properties of addition (specifically, binary addition), see (here):
Restrict x, y, z are nat. add_zero_id() := forall x. x + 0 = x add_comm() := forall x. forall y. x + y = y + x add_assoc() := forall x. forall y. forall z. x + (y + z) = (x + y) + z #assert_prop(true, add_zero_id) #assert_prop(true, add_comm) #assert_prop(true, add_assoc)
Running it gives:
$ python3 pecan.py examples/arith_props.pn [INFO] Checking if add_zero_id is true. add_zero_id is true. [INFO] Checking if add_comm is true. add_comm is true. [INFO] Checking if add_assoc is true. add_assoc is true.
PECAN_PATH environment variable controls which paths are searched for files when importing/loading automata.
It should be a colon-separated or semicolon-separated list of paths, depending on your operating system (Linux/MacOs uses
:, Windows uses
Currently, the only "supported" editor is Vim, via a syntax file (
pecan.vim) in this repository.