![]() |
![]() |
![]() |
![]() |
![]() |
Introduction
The Basic Idea
An application generated with the Cadvanced SDL to C Compiler can be viewed as having three parts:
- The SDL system
- The physical environment of the system
- The environment functions, where you connect the SDL system with the environment of the system
In the SDL system process transitions are executed in priority order, signals are sent from one process to another initiating new transitions, timer signals are sent, and so on. These are examples of internal actions that only affect the execution of the SDL system. An SDL system communicates with its environment by sending signals to the environment and by receiving signals from the environment.
The physical environment of an application consists of an operating system, a file system, the hardware, a network of computers, and so on. In this world other actions than just signal sending are required. Examples of actions that an application wants to perform are:
- To read or to write on a file
- To send or receive messages over a network
- To respond on interrupts
- To read and to write information on hardware ports or on sockets
The environment functions are the place where the two worlds, the SDL system and the physical environment, meet. Here signals sent from the SDL system to the environment can induce all kinds of events in the physical environment, and events in the environment might cause signals to be sent into the SDL system. You have to provide the environment functions, as the Cadvanced SDL to C Compiler has no knowledge of the actions that should be performed.
In a distributed system an application might consist of several communicating SDL systems. Each SDL system will become one executable program. It might execute either as an operating system process, communicating with other operating system processes, or it might execute in a processor of its own, communicating over a network with other processors. There may, of course, also be combinations of these cases. Let us for the sake of simplicity call the operating system processes or processors for nodes communicating over a network. In the case of communicating operating system (OS) processes, the network will be the facilities for process communication provided by the OS.
There are no problems in building an application consisting of several nodes communicating over a network using the Cadvanced SDL to C Compiler. However, you have to implement the communication between the nodes in the environment functions.
The PId values (references to process instances), are a problem in a distributed world containing several communicating SDL systems. We still want, for example, "Output To Sender" to work, even if Sender refers to a process instance in another SDL system. To cope with this kind of problem, a global node number has been introduced as a component in a PId value. The global node number, which is a unique integer value assigned to each node, identifies the node where the current process instance resides, while the other component in the PId value is a local identification of the process instance within the node (SDL system).
The partitioning of an application into an SDL system and the environment functions has additional advantages. It separates external actions into the logical decision to perform the action (the decision to send a signal to the environment) and the implementation details of the action (treating the signal in the environment functions). This kind of separation reduces the complexity of the problem and allows separate testing. It also allows parallel development of the logic (the SDL system) and the interface towards the environment (the environment functions). When the signal interface between the SDL system and its environment is settled, it is possible to continue both the activities in parallel.
Libraries
Two libraries, Application and ApplicationDebug, are provided to generate applications. Both use real time (see Time and perform calls to environment functions (see section The Environment Functions). The difference is that ApplicationDebug includes the monitor system while Application does not include the monitor system.
When an application is developed, it is usually appropriate to first simulate and debug the SDL system or systems without its environment. One of the libraries Simulation or RealTimeSimulation may then be used. You first simulate each SDL system on its own and can then simulate the systems together (if you have communicating systems) using the facility of communicating simulations. After that you probably want to debug the application with the environment functions. This may be performed with the library ApplicationDebug. You may then generate the application with the library Application.
The library Validation allows you to build explorers from the code generated by the Cadvanced SDL to C Compiler. An Explorer has a user interface and executing principles that are similar to a Simulator. The technical approach is however different; an Explorer is based on a technique called state space exploration and operates on structures called behavior trees. Its purpose is to validate an SDL system in order to find errors and to verify its consistency against Message Sequence Charts.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |