LIRA: Handling Constraints of Linear Arithmetics over the Integers and the Reals

Bernd Becker, Christian Dax, Jochen Eisinger, and Felix Klaedtke

We present the tool LIRA that implements decision procedures based on automata-theoretic techniques for first-order logics with linear arithmetic over the integers and the reals. LIRA also provides an efficient automata library, which is accessible through a high-level and low-level API.

On this webpage we report on our experimental setting and present the results.

Table of Contents

Tool paper

Download

Sources:

The sources of LIRA are licensed under the terms of the GNU General Public License Version 2. LIRA includes third party sources, which are copyrighted by their respective owners.

Binaries:

Benchmarks

We carried out three different types of tests: (1) randomly generated formulas, (2) formulas from the domain of hybrid system verification, and (3) verification of integer-counter systems.

For the experiments, we used a dual AMD64 (Opteron 252 2.6GHz) machine with 16GB RAM running Debian GNU/Linux etch. Moreover, we used the GNU C++ Compiler 4.1.2 to compile the tools. We used 32-bit binaries for benchmarking to ensure comparability between the different tools.

All graphs below also link to a high-resolution version.

Random Formulas

We carried out benchmarks for constructing automata representing sets defined by random formulas. We used LIRA and LASH for FO(ℝ,ℤ,+,<) and FO(ℤ,+,<), and LIRA and PresTAF for FO(ℕ,+).

We have applied the tools to 100 randomly generated formulas with 4 variables, each involving about 10 disjunctions and conjunctions. The formulas are available here: random.tar.gz.

For all three logics three graphs are shown, where the first graph depicts the construction time of the automata for the quantifier-free formulas. The second and third graph shows the construction times for the formulas with quantifier prefix ∃ and ∀∃ respectively.

quantifier free formulas (WDBAs)
formulas with one existential quantifier (WDBAs) formulas with one existential and one universal quantifier (WDBAs)

Fig. 1. Required runtime to construct minimal weak deterministic Büchi automata for formulas in FO(ℝ,ℤ,+,<)

In Figure 1 a red cross on the 1000s timeout line corresponds to a timeout.

quantifier free formulas (Presburger)
formulas with one existential quantifier (Presburger) formulas with one existiential and one universal quantifier (Presburger)

Fig. 2. Required runtime to construct minimal deterministic finite automata from formulas in FO(ℤ,+,<)

quantifier free formulas (Presburger)
formulas with one existential quantifier (Presburger) formulas with one existiential and one universal quantifier (Presburger)

Fig. 3. Required runtime to construct minimal deterministic finite automata from formulas in FO(ℕ,+)

In the experiments to Figure 2 and Figure 3, LASH and PresTAF ran out of memory for some formulas. These cases are marked with a red cross that is above the 20s timeout line. A red cross on the 20s timeout line corresponds to a timeout.

Formulas from the First-order Model Checker

The following formulas stem form the domain of hybrid systems. They are automatically generated by the First-order Model Checker when accelerating the reachability computations of a hybrid system. We extracted the formulas from 4 different hybrid systems and from different acceleration steps. The formulas have a ∀∃ quantifier prefix and contain variables that range over the reals and the booleans. We used LIRA's decision procedure for FO(ℝ,ℤ,+,<) to the build the minimal weak deterministic Büchi automata for these formulas. More details about the First-order Model Checker and the formulas can be found in [Damm et al., 2006a] and [Damm et al. 2006b]. These benchmarks were executed using the 64-bit binary of LIRA.

Formula 3LP 4LP 4LPbinary crossing1
Size Time States Size Time States Size Time States Size Time States
#1 1.2K32.97s1267 1.4K57.02s1526 1.7K34.82s1138 4190.01s31
#2 98517.64s5 1.5K44.33s5 1.6K13.65s5 7555.48s7
#3 8960.30s267 1.3K0.96s391 1.4K0.42s391 31K6.15s375
#4 1.2K34.14s1267 1.4K56.43s1526 1.7K35.58s1138 31K131.15s2603
#5 98519.65s5 1.5K44.31s5 1.6K13.74s5 97K350.81s767
#6 8960.29s267 1.3K0.94s391 1.4K0.40s391 2.9M776.51s3355
#7 591K38.96s1267 5.2M106.73s1650 171K37.09s1138 97K400.95s767
#8 547K18.20s5 5.0M54.90s5 171K13.58s5 38M0.00s0
#9 547K9.50s267 5.0M43.99s520 171K15.15s503
#10 1.6M35.58s1422 1.5M35.39s1148
#11 1.6M18.96s5 1.5M14.01s5
#12 1.6M36.36s420 1.5M27.69s663
#13 423K34.30s1148
#14 422K13.68s5
#15 422K27.15s663

Fig. 4. Sizes of the formula, runtime required for quantification, and automata sizes in number of states for the various formulas derived from four benchmark sets.

FASTer/GENEPI Benchmarks

We used the model checker FASTer for integer-counter systems. We compared the running times of our LIRA plugin for FASTer to the running times of other plugins based on MONA, LASH, PresTAF, and the Omega library.

The generated benchmarks can be executed using the tool dijo for the different plugins. The input files for the tool dijo were generated by FASTer with the MONA plugin. The running times of the different plugins are listet in Figure 5.

The dijo trace files are available here: dijo.tar.gz.

LIRA MONA LASH PresTAF Omega (PresTAF*)
Central Server System 12.5 24.6 156.2 22.0 191.9 6.6
Consistency Protocol 162.6 129.1 1848.4 255.1 70.6 150.1
Producer/Consumer Java 119.1 175.9 3536.3 128.0 ≥ 3600 33.6
CSM - N 34.2 80.0 470.7 63.1 85.9 11.5
Dekker ME 51.6 82.3 1194.9 63.1 ≥ 3600 20.6
Multipoll 11.6 22.4 262.2 21.8 123.3 7.5
Swimming Pool 51.6 79.5 667.3 124.4 error 88.0
TTP 2 227.4 181.2 ≥ 3600 127.1 1294.8 94.3

Fig. 5. FASTer/GENEPI benchmarks (* with experimental GENEPI cache)

Note that benchmarks in which all plugins require less than 20 seconds are not listed in the table. Also note that LASH does not provide special support for the natural numbers. Hence, the LASH plugin uses a set representation that produces some overhead.

The PresTAF plugin has a built-in cache for storing and reusing intermediate results. We turned this cache off since, in principle, every FASTer plugin can be equipped with such a cache. In our experiments, we wanted to test the underlying libraries for representing and manipulating sets definable in Presburger arithmetic. The intention of our tests was not to evaluate the maturity of the implementations of different FASTer plugins. Nevertheless, the last column shows the running times of the PresTAF plugin where the cache was enabled. We want to point out that PresTAF itself has a cache, which was not disabled.

Usage

Frontend

The frontend to LIRA called 'LIRA' is a parser for first-order formulas. It uses the decision procedures implemented in the LIRA library to check whether a given formula is satisfiable with respect to a selected logic.

When you run LIRA with the parameter --help, you get an overview of the available options:

LIRA - a solver for first-order logic of the mixed linear arithmetic
over the integers and reals.

Usage: LIRA [options ..]

options:
  --parser [parser]     select parser (default is 'mixlinarith')
  --planner [planner]   select planner (default is 'simple')
  --logic [logic]       select logic (default is 'reals')
  --solver [solver]     select solver (default is 'wdba')
  --file file           input file
  --dump                dump the last set constructed
  --output file         send output to file instead of stdout
  --verbose             increase verbosity
  --help                show this help

parsers:        mixlinarith
planners:       simple
logics:         reals, ints, presburger
solvers:        wdba, dontcares, dfa

Homepage: http://lira.gforge.avacs.org/

The syntax of the formulas is as follows:

formula                 : <quantifier> ( <variable> : <formula> )
                        | <quantifier> ( <boolean> : <formula> )
                        | <formula> <binary-connective> <formula>
                        | <unary-connective> <formula>
                        | <term> <relation> <term>
                        | ( <formula> )
                        | <boolean>

term                    : <term> <binary-function> <term>
                        | <unary-function> <term>
                        | ( <term> )
                        | <variable>
                        | <constant>

quantifier              : exists | forall

binary-connective       : and | or | xor | iff | implies | minus

unary-connective        : not

relation                : < | <= | = | != | >= | =

binary-function         : + | - | * | /

unary-function          : -

constant                : [0-9]+

variable                : [a-zA-Z][a-zA-Z0-9'_]*

boolean                 : TRUE | FALSE | $<variable>

Advanced Usage

For advanced usage please refer to the LIRA 1.x Handbook.

Compiling

Compile and install LIRA using the following commands:

./configure
make
make install

If you have CppUnit installed on your system, you can also run a set of unit tests to verify the installation:

make check

Last update: 2007-07-01
Copyright © The LIRA Project. Valid XHTML 1.1.