230 likes | 242 Views
Testing Real-Time System. by M. Abdul Basit-Ur-Rahim MSCS (SE). Translating Real-Time UML Timing Constraints into Real-Time Logic Formulas Gowri Aruchamy and Albert Mo Kim Cheng Real-Time Systems Laboratory Department of Computer Science University of Houston Houston, TX, 77204, USA
E N D
Testing Real-Time System by M. Abdul Basit-Ur-Rahim MSCS (SE)
Translating Real-Time UML Timing Constraints into Real-Time Logic Formulas Gowri Aruchamy and Albert Mo Kim Cheng Real-Time Systems Laboratory Department of Computer Science University of Houston Houston, TX, 77204, USA http://www.cs.uh.edu Technical Report UH-CS-06-07 June 5, 2006
Real-time software development is a complex process • Modeling can help to understand the Complex system design • UML is expressive and easy to use • Semantics of UML is not well defined (to prove the timing correctness and safety properties of real-time systems)
Focus • UML specification Real-Time Logic
Focuses on translation of UML timing constraints into RTL formulas. • By SDRTL tool, these RTL formulas are verified. • RTL is to capture timing requirements of real-time systems.
Four types of events in RTL • 1. start events representing beginning of actions, preceded by • 2. stop events representing ending of action, preceded by • 3. transition events representing the change in certain attributes of the system state • 4. external events preceded by
Occurrence Function • Occurrence function @ assigns time values to event occurrences @ (e, i) represents the ith occurrence of event e. • occurrence function ± integer constant
Omega profile seemed a good choice for the UML for the following reasons: • Omega profile has concrete semantic based syntax for modeling timing properties • Allows expressing durations between event occurrences using the duration constraint. • Sequence diagrams are annotated with timing • Constraints on object level and class diagrams are annotated with timing constraints on class/type level.
Assumption Following diagrams are enough to model timing properties of a system • Objects, • classes, • operations, • class diagrams, • sequence diagrams
Types of time Time • Represents points in time Duration • Represents distances between time points.
List of event kinds identified The events associated with operation call are: • invoke- the emission of the call request by the caller, • receive- the reception of the call by the callee, • accept- the start of the actual processing of the call by the callee, • invokereturn- the emission of the “return” response by the callee, • receivereturn- the reception of the “return” by the caller, and • acceptreturn- the consumption of the return.
Translation of UML model timing constraints into RTL formulas • (1) Between two consecutive calls made by an Engine to the operation update of its Display, less than 100ms pass if the Engine rotation speed (attribute rpm) exceeds 7000 at the moment the first call to update is made. • (2) Between the moment the engine temperature becomes critical (reception of signal criticalTemperature by the Engine from the TemperatureSensor) and the moment the engine reacts by decreasing its speed (invocation of the Engine operation accelerate with a negative parameter by the Engine to itself) less than 50ms pass. Moreover, the Display shall receive an update from the Engine less than 20ms after the call to accelerate.
In property (1), the identified event is operation of Update from engine to display. The definition of timed event InvokeUpdate refers to this operation and is given in the following Figure 2.
match clause expresses that an event of this type matches any occurrence of an invocation of Update of any object e of type Engine to an object d of type Display. • when restricts it to only the occurrences of call made by engine to display object defined by its screen attribute. • dostatement saves the engine’s rpm value at the point of time event occurred.
Conversion Program • Timing constraints in the requirements are expressed in UML as duration expressions. • By using a program these constraints are translated into RTL The idea is to read the UML model time constraints extract the duration expressions. Parse the duration expressions (to identify the events and the time between those events in that constraint) events are represented as occurrence functions of the form @ (event, occurrence) converted as RTL formula (form: occurrence function1 ± time occurrence function2.)
Assumptions • The timing constraints in UML model are in Omega-RT profile time constraints format. • Invoke event name starts with the prefix Inv, • Receive event name starts with the prefix Rcv • External event name start with the prefix Ext. • The UML time constraints annotations are extracted from the model and stored in the text file. • This file is taken as command line argument when the program starts.
The program is written in java. The program algorithm works as follows. • It reads the lines that starts with the key word “Duration”. • It extracts the events given in that duration expression and stores in an array named events. • Then the time value that should be satisfied by the event occurrences is identified.
RTL notation To be consistent with RTL notation, the event names are translated to RTL equivalent as given below. • If the event name starts with Inv then it is identified as RTL start event and the prefix Inv is changed to “S_”. • If the event name starts with Rcv then it is identified as RTL stop event and the prefix Rcv is changed to “E_”. • If the event name starts with Ext then it is identified as RTL external event and the prefix Ext is changed to • “Extern_”.
[1] S. Andrei, W.-N. Chin, A. M. K. Cheng, and M. Lupu, ``Incremental Automatic Debugging of Real-Time Systems Based on Satisfiability Counting'', IEEE-CS Real-Time and Embedded Technology and Applications Symposium, San Francisco, March 2005.