Overall Objectives
Application Domains
New Results
Contracts and Grants with Industry
Other Grants and Activities
Inria / Raweb 2003
Project: VASY

Project : vasy

Section: New Results

Languages and Compilation Techniques

Compilation of LOTOS

Participants : Damien Bergamini, David Champelovier, Hubert Garavel, Wendelin Serwe.

In 2003, work took place — essentially in the framework of the FormalFame contract (see §  6.3.1 and §  7.2) — to enhance the Lotos tools present in the Cadp toolbox. As regards the Cæsar.adt compiler for the data part of Lotos:

As regards the Cæsar compiler for the process part of Lotos:

Additionally, we also investigated techniques for state space reduction, our goal being to decrease the size of the graphs generated by Cæsar, still preserving strong bisimulation between the original and reduced graphs.

We considered the approach based on live variable analysis, first proposed by H. Garavel and Juan Galvez [42]. The basic idea is to assign a canonical value to any variable that is no longer used, so as to avoid distinguishing state vectors that only differ by the values of some variables not used in the future. This is done by adapting classical data flow analysis to the extended Petri nets generated by Cæsar and by resetting to zero each variable as soon as it ceases to be alive.

In 2003, we generalized the approach of [42] to handle so-called hierarchical units, i.e., the possibility to split each process into a set of concurrent sub-processes at an arbitrary nesting depth. In this model, concurrent processes do not share variables; however, the variables of a parent process can be consulted (but not modified) by its children sub-processes, a situation for which we designed several heuristics.

We implemented our ideas in a prototype version of Cæsar (about 3 , 6 0 0 lines of additional C code), which we applied to a benchmark suite of 469 Lotos specifications. For 98 examples ( 2 1 % ), the size of graphs generated by Cæsar was divided by a mean factor of 11.6. On some examples, we even observed a reduction factor of 300.

Compilation of the E-LOTOS Data Part

Participants : David Champelovier, Hubert Garavel.

As regards the data part of E-Lotos, we continued to improve the Traian compiler (see §  5.2), which is distributed on the Internet (see §  9.1) and used intensively within the Vasy team as a development tool for compiler construction [6].

In 2003, we released a new version 2.3 of Traian, which supersedes the previous version 2.2 issued in 2002. This development effort, which increased the software size from 4 8 , 0 0 0 to 5 5 , 0 0 0 lines of code, completes the integration in Traian of the code optimizations studied by Claude Chaudet in 1999 (see § 5.2.3 in the 1999 Vasy activity report and § 5.2.1 in the 2002 Vasy activity report). It also brings a higher degree of symmetry between Traian and the Cæsar.adt compiler for the data part of Lotos (see §  5.1). In addition to several bug fixes, the new version of Traian brings useful enhancements:

In parallel, we pursued the design of Traian 3.0, a new generation compiler that could handle the data parts of both Lotos and Lotos NT, so as to merge Cæsar.adt and Traian 2.3 into a unique compiler. In 2003, the requirement base for Traian 3.0 grew from 140 to 198 entries.

Compilation of the E-LOTOS Process Part

Participants : Aurore Collomb, Hubert Garavel, Frédéric Lang, Guillaume Schaeffer.

Compiling the process part of E-Lotos and Lotos NT is a difficult problem as these languages combine concurrency, quantitative time, and exceptions. To deal with these problems progressively, we chose to focus first on the sequential processes present in E-Lotos and Lotos NT. We designed a formalism named Ntif (New Technology Intermediate Form) to be used as an intermediate language for compiling and verifying E-Lotos and Lotos NT processes.

Ntif allows to specify extended automata parameterized by typed variables. Each transition is labeled with an action (which allows communication with the environment according to the rendezvous semantics of process algebras) and a sequential code fragment to read and/or write variables. Compared to classical ``condition/action'' (or ``guarded commands'') automata, Ntif provides high level control structures (statements ``case'', ``if-then-else'', ``while'', etc.); this avoids the introduction of spurious intermediate states and transitions, as well as the duplication of boolean conditions, an important source of errors [5].

In 2003, we started introducing quantitative time concepts in Ntif. In the vein of E-Lotos, we added a ``wait'' operator that lets a given amount of time elapse, timing tags on actions to express deadline and urgency, and a construct to capture the time elapsed between the instant an action is enabled and the instant it actually occurs. We defined the semantics of this extension and started to demonstrate suitable properties (e.g., time additivity) using the Coq theorem prover. The semantics was also assessed by modeling several classical timed protocols (e.g., Bounded Retransmission Protocol, Fisher protocol, etc.) using Ntif.

In parallel, the existing tools for Ntif were enhanced in several ways:

These improvements increased the size of the Ntif tool from 6 , 5 0 0 to 1 3 , 3 0 0 lines of code ( 9 , 5 0 0 lines of Lotos NT code, 2 , 2 0 0 lines of Syntax code, and 1 , 6 0 0 lines of C code).