Tool Mentor: SWEET WCET Tool
The SWEET tool is capable of approximating best-case and worst-case execution times (BCET/WCET) for a given source code.

Relationships
Main Description

Abstraction level

Implementation

Use Case Tasks

·         Specify Timing Budgets / Time budget properties

Covered aspect

Approximate BCET/WCET for source code

Algorithm

Static BCET/WCET analysis by abstract execution

Inputs

Source code (Ansi C)

A timing model for the particular combination of hardware and compiler

Ranges for input data, if known

Particular constraints on inputs

The timing model, expressed as costs on constructs and operators In our intermediate format ALF, must be provided as a table in a particular format

Input data ranges are expressed as annotations on ALF variables

The analysis will not handle program features such as dynamic memory and recursion well.

Preparation of input

The C source must first be translated into ALF. There is a backend generating ALF for the LLVM compiler. Using this backend, the compiler can translate C code into ALF.

The timing model can be derived more or less automatically using another tool, from measured execution times for a number of compiled “training programs” running on the target hardware.

Invocation of the algorithm

From the command line, with appropriate flags set:

sweet -i=$file.alf,std_hll.alf -ae css vola=i tc=st,op aac="$ResultFile"

 

Full documentation how SWEET is used is found at

http://www.mrtc.mdh.se/projects/wcet/DocBook/out/content/

Outputs

Approximate BCET and WCET for the analyzed function (typically a runnable)

Visualization of results

None (textual output).