Skip to content
LaTeX package to typeset Uppaal timed automata specifications
TeX
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
custom-uppaal-code.png
example.tex
example1.tex
example2.tex
inline-uppaal-code.png
manual.tex
min-uppaal-code.png
prop-uppaal-code.png
props.tex
uppaal.sty

README.md

Uppaal Style for LaTeX

LaTeX package to typeset Uppaal timed automata specifications.

The style depends on listings.sty, xcolor.sty and xspace.sty.

Inline Examples

Properties in a table:

Properties in uppaalcode

Timed automata labels:

Inline uppaalcode

Listing Examples

Minimal uppaalcode environment:

Minimal uppaalcode

Customized using lstlisting options:

Customized uppaalcode

Instructions

  1. Make sure that listings, xcolor and xspace are installed. In Linux distributions this is usually found in texlive-latex-recommended (sudo apt-get install texlive-latex-recommended).

  2. Download uppaal.sty from releases and put it into your LaTeX project directory.

  3. Add \usepackage{uppaal} to your main .tex file.

  4. Embed Uppaal code into your .tex files, like:

\begin{uppaalcode}
int lIZERO = 0;   // note the characters l, I, 0 and O
int distance = 5; // approximated distance between cars
int velocityEgo, velocityFront; /* approximated velocities */
int accelerationEgo, accelerationFront; /** acceleration */
void updateDiscrete() {
    int newVel, oldVel = velocityFront - velocityEgo;
    velocityEgo = velocityEgo + accelerationEgo;
    velocityFront = velocityFront + accelerationFront;
    newVel = velocityFront - velocityEgo;
    if (distance > maxSensorDistance) {
        distance = maxSensorDistance + 1;
    } else { // $d \approx \sum_i \frac{v_i+v_{i+1}}{2}\Delta t$
        distance += (oldVel + newVel)/2;
    }
}
\end{uppaalcode}

See manual.pdf from releases for more details on how to customize.

You can’t perform that action at this time.