Natalia Ioustinova , Specification and Analysis of Embedded Systems

Testing with TTCN-3 in simulated time


Testing with TTCN-3 in simulated time

TTCN-3 is a language for specification of (abstract) test suites. The specifiications can be generated automatically or developed manually. TTCN-3 has the syntax and semantics standardized by ETSI. TTCN-3 was originally developed for real-time testing telecommunication systems. A TTCN-3 test system has standard predefined interfaces that allow to offer TTCN-3 solutions that do not depend on the implementation details of a system under test (SUT).  Therefore, applying TTCN-3 to domains other than telecommunication systems is potentially beneficial.

In  TTMedal: Test and Testing Methodologies for Advanced Languages project, we proposed a testing method for  interlockings. An interlocking is a layer of  a railway control  system that guarantees safety. It allows to execute commands given by a user only if the are safe: unsafe commands leading to train derailments and collisions are rejected.  Prior to system testing , the software of a railway control system is tested separately from hardware.  We showed that real time and scaled time semantics are inefficient for testing this software. We provided a time semantics based on simulated time where the system clock is a discrete logical clock.  Simulated time is based on the assumption that the time spent by the system on computation is negligible compared to the duration of external events. Time progression is modelled as a tick-action  that represents elapsing one unit of time.
 
Implementing simulated time with existing TTCN-3 interfaces is not straightforward. In simulated time,  time progression has the least priority. A test system and an SUT should agree on simulated time. To guarantee this, we provide a mechanism that detects an idleness point of an SUT together with a test system and  then synchronizes them on time progression. A TTCN-3 test system and an SUT usually consist of several concurrent components, so we extend Dijkstra's distributed termination detection algorithm to decide on idleness of all components and to synchronize them on time progression. Our implementation consists of a TTCN-3 module and Java classes for simulated time. The TTCN-3 module supports simulated time within the TTCN-3 executable entity. The Java classes provide implementation of simulated time for platform and system adapters.  The solution is general and can be used to test systems other than interlockings. 

This work is published as a CWI technical report:

Simulated time for testing railway interlockings with TTCN-3, Stefan Blom, Natalia Ioustinova, Jaco van de Pol, Axel Rennoch and Natalia Sidorova, Technical Report SEN-E0503, CWI, Amsterdam, 2004,  PDF



Test Examples

The source code of the current implementation: SimTime.tar.gz.
This file contains a TTCN-3 module for simulated time, Java classes for simulated  time, readme file and a  couple of examples.
To try them decompress the archive with

gzip -d simtime.tar.gz
tar -xf simtime.tar


To be able to run these examples you will need Java version 1.4.1_01 (or later) and the following tools:

Tcl/Tk

Tcl/Tk, Tool Command Language and the Tk toolkit.


mCRL

µCRL (micro CRL - written as mCRL if the symbol µ is not available) is a process algebraic language that was especially developed to take account of data in the study of communicating processes. µCRL is supported by a collection of tools, the µCRL toolset. The µCRL toolset currently comprises a well-formedness checker, a linearizer, a simulator, a state space generator as well as a few tools to analyze and optimize LPOs. For more information about  µCRL, please, visit the corresponding web-page.


TTthree

TTthree  (revision 4.0, January 2004) is a toolset developed  by Testing Technologies IST GmbH. The toolset  supports compilation and execution of TTCN-3 test suites.


If you have any problems with the archives, running examples or want some more information, please write to Nataliya Yustinova: ustin@cwi.nl.