There is a newer version of the record available.

Published October 25, 2024 | Version v1
Software Open

Automating the Analysis of Quantitative Automata with QuAK

  • 1. ROR icon Institute of Science and Technology Austria
  • 2. ROR icon Slovak University of Technology in Bratislava

Contributors

Description

Requirements

You need docker installed. Alternatively, you can download QuAK from https://github.com/ista-vamos/QuAK or use the code in src.zip, and build QuAK from sources using the instructions in QuAK's README.md.

Running the docker image

First, download the docker image from the artifact link. Loading and running a docker image takes these two steps:

docker load < quak-tacas25.tar.gz
docker run --rm -ti quak

The first command loads the docker image and the other command runs a new container with this image and gives you a terminal from which you can run the binary `quak`. You can also examine and play with the code of QuAK inside this terminal. Options `--rm` and `-ti` make docker to remove the container after it exits and give you the terminal, resp.

(Re-)building the docker image

If you wish to (re-)build the docker image yourself, instead of using the one from Zenodo, run:

docker build . -t quak

from the top-level repository directory (https://github.com/ista-vamos/QuAK). For more guidance, see README.md of QuAK.

Examples

A few examples of the new features follow. For more examples, the entire usage instructions, and the description of API of QuAK, see README.md in the QuAK's repository (or the attached source code). In the examples below, we use some sample automata stored in the repository of QuAK, feel free to modify them or use new ones.


Improvement 1: decomposition of nondeterministic automata

The old version of QuAK could decompose only deterministic automata (for certain value functions). You can try decomposing a deterministic automaton, in this case ../samples/ainf.txt, into its liveness and safe components with this command:

./quak -d ../samples/ainf.txt decompose LimInf s.txt l.txt

The safety and liveness component automata are stored into s.txt and l.txt, resp. Because of the -d switch, the automata are also printed to stdout.

For an example of decomposing a nondeterministic automaton into its liveness and safe components, you can decompose ../samples/binf.txt:

./quak -d ../samples/binf.txt decompose LimInf s.txt l.txt

You can also check the decomposition of the automaton in Fig. 1. in the paper. This automaton is in ../samples/ex.txt:


./quak -d ../samples/ex.txt decompose LimInfAvg s.txt l.txt

Note that the decomposed automata might be slightly different than in the figure, they are equivalent, though.


Improvement 2: witnesses

Here are some examples of getting witnesses from operations:


./quak -print-witness ../samples/A.txt isEquivalent LimInf ../samples/B.txt 
----------
isEquivalent(LimInf) = 0
Witness: ab(a)
----------


./quak -print-witness ../samples/B.txt constant LimSup
----------
isConstant(LimSup) = 0
Witness: ab(ba)
----------


./quak -print-witness ../samples/D2.txt empty Inf 4
----------
isEmpty(Inf, weight=4) = 1
Witness: a(ba)
----------

Using C++ API

An example of how to use the C++ API to get witnesses and the new liveness-safety decomposition can be found in the file examples/sampleProgramWitness.cpp. You can compile and run it manually (the automaton is hard-coded, feel free to change it) using these commands:

cd ../examples
g++ sampleProgramWitness.cpp -I ../src -DWEIGHT_EQ_EPSILON=10e-5 ../build/src/libquak.a -o ex
./ex

For more details on the API, check README of QuAK.

Files

README.md

Files (279.5 MB)

Name Size Download all
md5:659b837c884b9d557cbdd1493ce821b6
1.1 kB Download
md5:12d602a6d832f2708bcfad778eec20a5
277.7 MB Download
md5:626db17e43e44d5f7fb04ffde19b9d68
3.6 kB Preview Download
md5:a9ee9bcb9e11481acaf24513b1c8105d
1.8 MB Preview Download