Volta Is A Suite Of Development Tools For Hard Real-Time Java

1. Acronym: VOLTA

2. Full title or Brief Description:
Volta is a suite of development tools for hard real-time Java. It includes the following components:
Cascade, a control flow analyzer
Clepsydra, a worst-case execution time analyzer

3. Technical Specification and Platform Requirements:

Runs on all 3 OS:
Linux
Windows
Mac
To install and use the Volta tools, the following components are required:
Java 1.6??or higher
Ant 1.7??or higher
ILP Solver

4. URL:

Download URL: http://sourceforge.net/projects/volta/files/
Documentation: http://volta.sourceforge.net/doc/manual/multi-page/index.html

Introduction:
With the increasing size and complexity of hard real-time systems, developers are beginning to move away from C and towards a simpler language like Java. Despite its status as the most popular language in real-time computing, it is relatively low-level, error-prone, and less dynamic with results like segmentation fault, memory corruption, etc. So researchers are now looking at Java as alternative. Compilers for Java catch many errors that C compilers may miss; the language definition specifically addresses safety and security issues; and the high-level nature of Java makes it more productive, extendable, maintainable, and portable than C.
For real-time systems, Java is an immature but high potential platform. Commercial implementations of the??Real-time Specification for Java (RTSJ)??are available from??Aicas??and??Sun.
Worst-case Execution Time
In spite of these advances, few things are still missing. Even when a real-time Java implementation provides deterministic scheduling, priority inversion avoidance, and a real-time garbage collector, no guarantee on the timeliness of the system can be made without knowledge of the worst-case execution time (WCET) for each task. A more dependable and systematic approach to finding the WCET involves a static analysis. Given the executable code for a task and the processor on which it will run, static analysis provides an upper bound on the time taken to execute the task.
The following shows a high-level sketch of this process for a trivial example.
if (someCondition) ' 50 ns
variable += 5; ' 100 ns
else {
variable -= 10; ' 100 ns
flag = true; ' 150 ns
}
50 + max(100,250) = 300 ns

In the non-trivial real world, static analysis is not so simple. The traditional real-time Java environment offers many sources of unpredictability that result in alarmingly pessimistic WCET values. For instance, just-in-time compilation, a common technique for improving average performance in Java virtual machines, causes the first few executions of a task to be slow while subsequent executions are fast. Static analysis must account for this variance, leading to very large estimations of WCET. Developers are faced with unsettling choices: Turning off just-in-time compilation would merely slow down every execution, while reducing the WCET to the expected (average) running time would be unsafe and defeat the very purpose of analysis. Modern processors also affect the WCET calculation as, large pipelines, branch prediction, and sophisticated multi-level caching have greatly improved average throughput at the expense of worst-case throughput.
As a response to the increasing size and complexity of hard real-time software, the real-time community is moving towards solutions offered by the Java platform. Specialized Java processors are particularly important in such environments, not just for the development process to become easy but also for providing safety.
The Volta??project offers a suite of tools for worst-case execution time analysis in Java microprocessors. It is fully open-source (available under the??GNU Public License) and implemented in Java. Still a work-in-progress, it is intended as a platform for research and experimentation hard??real-time computing.

Example:

Cascade
The Cascade component is used for generating control flow data structures for subsequent analysis by higher-level tools. It takes as input a Java class file and can produce a??control flow graph, or CFG, for each method in the class. Most control flow analyzers operate at the assembly language level. Cascade is different: It operates at the source code level, making the control flow data much easier to read and understand. It relies on??JODE, a powerful Java decompiler, to produce a source code representation for every node in the CFG. In most cases, the decompiled code matches the original Java source code exactly.
Let us consider to illustrate this

A simple Java class
public class QuickTest
{
public void test() {
int j = 0;

for (int i = j; i < 10; i++) {
j++;
}
}
}
Control flow graphs in Cascade for it will be as follows:

Clepsydra
Clepsydra performs static worst-case execution time analysis. Clepsydra takes as input the high-level control flow information and produces as output the WCET for every statement in the method, as well as the method as a whole. Traditionally, WCET analyzers have operated at a very low level, producing timing data only for executables. The abstractions provided by the higher-level source code language are lost in such a scenario. In contrast, Clepsydra preserves these high-level abstractions. It displays WCET timing graphs that strongly resemble the original source code.
Let us illustrate this with an example.

Source:

public class QuickTest
{
private int foo() {
return 42;
}

public void test()
{
int j = 0;
@LoopBound(max=10)
for (int i = j; i < 10; i++) {
j += foo();
}
}
}

Output:

Total: 1378 ms

User Interface:

Cascade
Cascade can be invoked from the command line to perform control flow analysis of a single method. To do so, run Java from the command line and specify the??edu.uci.eecs.doc.cascade. Cascade??class followed by the appropriate arguments, as described below. (Alternatively, the??quick-test??target in the Ant build script provides an easy way of supplying these arguments without re-typing them.)
edu.uci.eecs.doc.cascade.Cascade??[-bytecode] {-classpath??classpath} [-dot??filename] [-gml??filename] [-graphml??filename] [-hideCacheMiss] {-method??signature} [-print] [-recursive] [[-svgfilename] | [-svgColorized??filename]] [-text??filename]
-bytecode
If specified, Cascade will add a list of bytecode instructions to each control flow node in all output formats.
-classpath
A list of directories that will be searched when loading classes during control flow construction.
-dot
If specified, Cascade will save a representation of the control flow graph in??DOT??format to the given file.
-gml
If specified, Cascade will save a representation of the control flow graph in??GML??format to the given file.
-graphml
If specified, Cascade will save a representation of the control flow graph in??GraphML??format to the given file.
-hideCacheMiss
If specified, Cascade will not display cache miss blocks in the control flow graphs that it creates.
-method
The method whose control flow graph or tree should be constructed.
-print
If specified, Cascade will print a plain-text representation of the control flow tree to the console.
-recursive
If specified during control flow tree generation, Cascade will produce trees for the method, the methods that it invokes, the methods that they invoke, and so on.
-svg
If specified, Cascade will save a representation of the control flow tree in black-and-white??SVG??format to the given file.
-svgColorized
If specified, Cascade will save a representation of the control flow tree in a color-coded??SVG??format to the given file.
-text
If specified, Cascade will save a representation of the control flow tree in plain text format to the given file.

Clepsydra
Clepsydra can be invoked from the command line to perform WCET analysis of a single method. To do so, run Java from the command line and specify the??edu.uci.eecs.doc.clepsydra.Clepsydra??class followed by the appropriate arguments, as described below.
edu.uci.eecs.doc.cascade.Clepsydra??[-bytecode] {-classpath??classpath} [-dot??filename] [-gml??filename] [-graphml??filename] {[-tree] | [-ipet]} {-loopbounds??classname} {-method??signature} {-methodcache??classname} [-print] [-recursive] [[-svg??filename] | [-svgColorized??filename]] [-text??filename] {-timings??classname}
-bytecode
If specified, Clepsydra will add a list of bytecode instructions to each control flow node in all output formats.
-classpath
A list of directories that will be searched when loading classes during WCET analysis.
-dot
If specified, Clepsydra will save a representation of the control flow graph in??DOT??format to the given file.
-gml
If specified, Clepsydra will save a representation of the control flow graph in??GML??format to the given file.
-graphml
If specified, Clepsydra will save a representation of the control flow graph in??GraphML??format to the given file.
-ipet
Computes the WCET using the IPET strategy and prints the result. At least one of??-tree??or??-ipet??must be specified.
-loopbounds
The name of a class that implements the??LoopBoundStrategy??interface.
-method
The method to be analyzed for WCET. The method signature must be fully qualified. For example, the signature for??indexOf??is??java.lang.String.indexOf(java.lang.String,int).
-methodcache
The name of a class that implements the??MethodCacheStrategy??interface.
-print
If specified, Clepsydra will print a plain-text representation of the control flow tree to the console. Each node in the tree will also show its WCET, computed using the tree strategy.
-recursive
When producing output, also include details of methods that are invoked (directly or indirectly) by the given method.
-svg
If specified, Clepsydra will save a representation of the control flow tree in??SVG??format to the given file.
-svgColorized
If specified, Clepsydra will save a representation of the control flow tree in a color-coded??SVG??format to the given file.
-text
If specified, Cascade will save a representation of the control flow tree in plain text format to the given file.
-timings
The name of a class that implements the??InstructionTimingStrategy??interface.

-tree
Computes the WCET using the tree strategy and prints the result. At least one of??-tree??or??-ipet??must be specified.

Summary on reports/papers

Performance Analysis

One of the key benefits of the Volta tool suite is interactive development of real-time software. Almost all prior work has focused on reducing pessimism in WCET analysis [1], i.e. have WCET value closer to average case but there has been little to no emphasis on reducing its execution time. But Volta differs in this aspect and provides near-instantaneous analysis.

Speed of Analysis
In prior work, Trevor Harmon has tested how each technique performed as the cyclomatic complexity of a contrived input program increases. It showed that the tree-based technique was the clear winner [1]. Its performance, while linear in growth, appears virtually constant, requiring only a few milliseconds even at high complexity.

Accuracy of Analysis
Although the primary focus of this work is the flexibility and speed of WCET analysis tools, the accuracy of those tools is certainly a factor as well. We define the accuracy of a WCET analysis tool in terms of pessimism; that is, the amount by which the predicted and measured WCET values differ [1].
To evaluate the pessimism of Clepsydra tool, a set of fifteen WCET benchmark programs were created. The benchmarks vary widely including Discrete Cosine Transform, Fibonacci, Matrix Count, and Matrix Multiplication etc. The poor pessimism for some of these benchmarks is in part due to their nature. They are designed to stress typical weaknesses that often afflict WCET analyzers. When measuring these benchmarks, it was also observed that the largest increase in pessimism was often a result of ineffective loop bound annotations. The Insertion Sort and Quick Sort benchmarks in particular expose this problem. The loop bound annotation mechanism currently supplied with Clepsydra can only specify constant bounds, leading to overly conservative estimates [1].
Limitations
The Volta suite is still in a prototype stage and has many known issues and limitations. It currently lacks support for:
Recursion
Polymorphism
Exception handling
switch,??break, and??continue??statements
Inner and anonymous classes
In addition, a number of bugs exist in the supported features. For example, tree-based WCET calculation produces invalid results in the presence of??return??statements that are not the last statement in the method.
Conclusion:
Given the importance of WCET analysis tools, and world moving towards languages like Java, it's important for a good WCET tool to be present. Volta is an open-source, extensible tool that supports WCET analysis of Java programs. Designed for flexibility, it is built around a plug-in model that allows features to be incorporated as and when needed. Users can plug in various processor models, loop bound detectors, and WCET analysis algorithms without having to understand or alter the tool's internals which makes it more useful.

Source: Essay UK - http://doghouse.net/free-essays/information-technology/volta-suite-development-tools.php


Not what you're looking for?

Search:


About this resource

This Information Technology essay was submitted to us by a student in order to help you with your studies.


Rating:

Rating  
No ratings yet!


Word count:

This page has approximately words.


Share:


Cite:

If you use part of this page in your own work, you need to provide a citation, as follows:

Essay UK, Volta Is A Suite Of Development Tools For Hard Real-Time Java. Available from: <http://doghouse.net/free-essays/information-technology/volta-suite-development-tools.php> [22-02-19].


More information:

If you are the original author of this content and no longer wish to have it published on our website then please click on the link below to request removal:


Essay and dissertation help

badges