Вы находитесь на странице: 1из 35

ADARTS (Ada-based Design Approach for Real-Time Systems)

ADARTS
The ADARTS method was created to develop an Ada design from a Real-Time Structured Analysis (RTSA) specification. Features of ADARTS are:
principles for decomposing a real-time system into concurrent tasks and information hiding modules.

Task and module structuring criteria


Applied to the leaf transformations on the RTSA data flow/control flow diagrams. Each transformation is viewed from both a dynamic and static perspective. Dynamic perspective:
each transformation is considered as a separate thread of control.

Static perspective:
related functions (operations) identified in the RTSA are grouped into a module based on the information hiding criterion.

ADARTS Steps and Work Products

Steps in using ADARTS


1. Develop an RTSA Specification

2. Structure the system into concurrent tasks


3. Structure the system into Information hiding modules

4. Integrate the task and module views


5. Develop an Ada-based design 6. Define component interface specifications 7. Develop the software incrementally

Task Structuring
A task (concurrent process) represents the execution of a sequential program or, as in Ada, a sequential component in a concurrent program. Each task deals with one sequential thread of execution; hence no concurrency is allowed within a task.

However overall system concurrency is obtained by having multiple tasks that execute in parallel.

Task Structuring Categories


I/O task structuring criteria
Internal Task Structuring criteria Task Cohesion Criteria Task Priority Criteria

I/O task Structuring Criteria


Characteristics of I/O Devices Characteristics of Data Characteristics of passive devices Polling frequency for passive devices

I/O DEVICE

Asynchronous /Active Device


Interrupt driven

Passive
Does not generate Interrupt

Asynchronous Input device

Generates an interrupt when it has produced some input that requires processing by the real-time system

Asynchronous Output Generates an interrupt when it has finished device processing output operation and is ready to perform some new output.
Input from passive input device needs to be read either on polled basis or on demand Output needs to be provided either on regular (periodic) basis or on demand

Passive Input device Passive Output device

Characteristics of Data
Discrete data
Finite number of values

Continuous data (analog data)


Infinite number of values Polling

Characteristics of passive devices : Polling


Polling
Sample the device on demand
Periodic polling

Data written to a data store

Polling Frequency for Passive Device


Input device:
how critical the input is and how frequently it is expected to change.

Output device:
How often data should be output in order to prevent it from getting out of date.

I/O TASK

Asynchronous I/O Task


Asynchronous device

Periodic I/O Task


Passive device

Asynchronous I/O Task or Aperiodic Task

Panel Read Panel input Inputs Validate input

Panel input interrupt

Push buttons,
switch

Handling Control Panel Input

Processing control panel input

Periodic Task
Temperature

Read temperature input

Panel input interrupt

Temperature

Temparature input task

Resource monitor task


An input or output device that requests from multiple sources have a resource monitor task to coordinate these request.
Ex.: printer monitor task

Internal task structuring task


Periodic task Asynchronous task

Control task
User role task Multiple task of same type

TASK COHESION CRITERIA

Temporal cohesion
Sequential cohesion Control cohesion Functional cohesion

Temporal cohesion
Certain functions may perform operations that are activated by the same event.

functions may be grouped into a task, so that they are executed each time the task receives a stimulus

Temporal cohesion : issues


One function is more time critical than the other. Functions executed on separate processor Sampling rate of functions Functions with different priorities

Sequential cohesion
Certain functions may perform operations that must be carried out sequentially. The first function in the sequence is triggered by an asynchronous or periodic event. These sequentially dependent functions may be combined into one sequentially cohesive task.

Sequential Cohesion : issues


Next transformation in the sequence also receives inputs from another source and therefore activated by receiving input from that source. Next transformation is of lower priority and follows time critical functions

Control cohesion
Control transformation, which executes a state transition diagram.

Control cohesion: issues


State dependent transformations that are triggered by the control transformations as a result of state transition.
Group

State dependent transformations that are enabled or disabled by the control transformations as a result of state transition.
Separate task

State dependent transformations that are triggered by the control transformations as a result of state transition and execute for the duration of the state. Non-state dependent transformations that sends events to the control transformations, which cause it to change state.
group

TASK PRIORITY CRITERIA


Time critical:
A time critical function, i.e. one that needs to meet a hard deadline, needs to run at a high priority and therefore be structured as a separate high priority task.

Computationally intensive
A non-time critical computationally intensive function (or set of functions) may run as a low priority task consuming spare CPU cycles

Task Communication and Synchronization

STATIC VIEW Information Hiding And Module Structuring

STATIC VIEW
Changing requirements are all too frequent and cannot be ignored.

Software design of designing maintainable and potentially reusable software components using information hiding.

Information Hiding And Module Structuring categories


Device interface modules Behaviour hiding modules
Data abstraction module State transition module Function driver module Algorithm hiding module

Software decision moudles

Device interface modules (DIM)


Application software __________________ Virtual device interface (access procedures/functions) ____________________ Real world device interface __________________ real world I/O device
Software

Hardware

DIM
Hides actual interface to the real-world device by providing a virtual interface to it. For each I/O device and the functions on the DFD are mapped to the operations provided by DIM

Temperature sensor

Temperature

Read Temperature input

Read Temperature

FIG: DFD

FIG: Temperature Sensor DIM

Behaviour hiding modules


Data Abstraction Module

Read Location

Write Location

FIG: host aircraft position DAM

Behaviour hiding modules


State Transition Module

Process event Current state

Вам также может понравиться