Generalized and Relational Test Tables

Generalized Test Tables for the specification and verification of safety and security properties in automation software.

Getting Started

Newer versions of geteta are bundled in the verifaps-lib repository. Old version can be downloaded below. To build verifaps-lib see Getting Starting on the main page.

The geteta module provides following programs

Program: geteta

The getata program provides the facilities for the verification of gtt against the nuXmv model-checker, incl. the paraparations of debugging and diagnostics information. Ensure, that you have installed nuXmv. You need to set the NUXMV environment variable to the nuXmv executable.

export NUXMV=/home/weigl/work/nuXmv-1.1.1-Linux/bin/nuXmv

Usage of geteta:

Usage: geteta [OPTIONS]

options for handling programs:
  -L, --library PATH          Library files to include in the namespace
  -P, -c, --program PATH      File containing the main program
  --no-simplify / --simplify  Disable the simplification to ST0

Options:
  -T VALUE                         setting a time constant
  -t, --table FILE                 test table file
  --select-table TABLE_NAME        specify table by name, which should be used
                                   from the given file
  --meshed / -M                    enable experimental meshed tables
  -o, --output TEXT                Output directory
  --model-check / --dont-model-check, --dry-run
                                   the model checker is invoked when set
                                   [default:true]
  --nuxmv TEXT                     Path to nuXmv binary. You can also set the
                                   environment variable $NUXMV
  --cexjson                        exports an analysis of the counter example
                                   in json
  --row-map / --no-row-map         print out a mapping between table rows and
                                   states
  --ods PATH                       generate ods counter-example file
  --ods-open
  --cexout                         prints an analyis of the counter example
                                   and the program
  --debug-automaton                generate a dot file, showing the generated
                                   automaton
  --show-automaton                 run dot and show the image of the automaton
  -m, --mode VALUE                 verification mode
  -h, --help                       Show this message and exit

Example

You find examples for geteta in geteta/examples/ folder. For example with:

cd Counter && geteta  -t OneIncrement.gtt -c OneIncrement.st

you verify the simple counter example with nuXmv and IC3. If you want to view the generated automaton, you specify --print-automaton:

cd Counter && geteta --print-automaton  -t OneIncrement.gtt -c OneIncrement.st

geteta also provides with sophisticated preprataions of the counter-example when a verification attempt failes. For example, with

cd constantprogram && geteta --row-map  --cexout -t constantprogram_broken.gtt -c constantprogram.st

geteta maps between each state in the counter-example to a table row (--row-map). Note, there might be multiple possible row mappings. By --cexout, geteta writes a text file, containing the state of the program and the test table for each cycle. The state of the program also includes the value of every variable at each assignment and whether branches are taken. The table state includes the current active table rows, and the violation or satisfication of assumption and assertions.

Program: geteta-smt

Program: reteta

The program reteta provides support for model-checking of relational test tables. These are test tables which descirbes properties over multiple program runs of different (or the same) programs.

Usage: reteta [OPTIONS]

options for handling programs:
  -L, --library PATH          Library files to include in the namespace
  -P, -c, --program TEXT      File containing the main program
  --no-simplify / --simplify  Disable the simplification to ST0

Options:
  --verbose                        enable detailed output message
  --version                        show current version
  -T VALUE                         setting a time constant
  -t, --table FILE                 test table file
  --select-table TABLE_NAME        specify table by name, which should be used
                                   from the given file
  --meshed / -M                    enable experimental meshed tables
  -o, --output TEXT                Output directory
  --nuxmv TEXT                     Path to nuXmv binary. You can also set the
                                   environment variable $NUXMV
  --model-check / --dont-model-check, --dry-run
                                   the model checker is invoked when set
                                   [default:true]
  --debug-automaton                generate a dot file, showing the generated
                                   automaton
  --show-automaton                 run dot and show the image of the automaton
  --print-augmented-programs       prints the augmented programs into files:
                                   <name>.st
  -h, --help                       Show this message and exit

Examples

Program: ttmonitor

Generation of runtime monitors for C++

Usage: ttmonitor [OPTIONS]

  Construction of monitors from test tables for Runtime Verification

Options:
  -T VALUE                         setting a time constant
  -t, --table FILE                 test table file
  --select-table TABLE_NAME        specify table by name, which should be used
                                   from the given file
  --meshed / -M                    enable experimental meshed tables
  -o, --output PATH                destination of the output file
  --write-header / --dont-write-header
                                   Write the 'monitor.h' header file.
  -f, --format VALUE               code format, possible values: CPP
  --disable-combined / --combined  Generate a combined monitored or single
                                   monitors of given tables
  -I TEXT                          give header files to be included
  -h, --help                       Show this message and exit

Examples

The typical call of ttmonitor` is:

$ ttmonitor -t table.tt -I yoursystemheader.hpp

It will generate a monitor (C++ files) for every test table given in the given test table file as <output>.hpp with an include directive "yoursystemheader.hpp".

Program: ttprint

printing of rtt/gtt into LaTeX or HTML

Usage: ttprint [OPTIONS] [FILE]...

  generate print files for rtt/gtt

Options:
  -f, --format VALUE
  --output FILE       Print output to the given file.
  --standalone        Standalone version (include preamble/postamble)
  -h, --help          Show this message and exit

Arguments:
  FILE  test table

Program ttcsv

A program that transforms CSV files into test table files.

Usage: ttcsv [OPTIONS] [FILE]...

Options:
  -o FILE     output table file
  -q TEXT
  -d TEXT
  -h, --help  Show this message and exit

Arguments:
  FILE  CSV files

ttcsv -- Generate table template from csv files.

Program ttunwind

UnwindODS – Tooling for Relational Test Tables.

Usage: tt-debug.sh [OPTIONS] [table]...

Options:
  -o, --output PATH   Output ODS file
  -L, --library PATH  ST code to be weaved in
  -p, --program PATH  ST code to be weaved in
  --name TEXT         Name of Program or function block
  -h, --help          Show this message and exit

Arguments:
  table  the xml file of the table

Program ttcov

ttcov computes the program coverage of a test table.

Usage: ttcov [OPTIONS]

options for handling programs:
  -L, --library PATH          Library files to include in the namespace
  -P, -c, --program TEXT      File containing the main program
  --no-simplify / --simplify  Disable the simplification to ST0

Options:
  --verbose                  enable detailed output message
  --version                  show current version
  -T VALUE                   setting a time constant
  -t, --table FILE           test table file
  --select-table TABLE_NAME  specify table by name, which should be used from
                             the given file
  --meshed / -M              enable experimental meshed tables
  --run-smt
  -o, --output TEXT          Output directory
  -h, --help                 Show this message and exit

Download of old version

These are jar files include all dependencies:

A DSL for Test Tables

In this section we describe the input language for defining gtts and rtts. As writing a table-shaped input mechnnism is quite cumbersome and error prone, we decided for a concise textual representation, that can understand and written by human or used as an input language for other tools.

The test table language is valid for all test table tools.

Structure

A test table file consists out of multiple table declaration:

table <NAME> { <BODY> }

relational table(a,b,c, ... ) { <BODY> }

A table declaration has a name (for identification) and a body. Additionally, rtts are defined with the modifier relational and a finite list of names of the program runs (a,b,c).

The body <BODY> contains different elements

Cell Content

A cell content is either comma-separated list of following elements:

An expression is constructed inductively defined:

Every literal (TRUE, FALSE, integers, enum values), variables, or past reference is an expression, which can be combined by following operators: