[SDL Forum Society - Logo] Tutorial on SDL-88
Belina, Hogrefe (edits Reed)

3.8 Process diagram examples

Back Home Up

This section contains two realistic process diagrams, belonging to the Daemongame system that has been introduced in previous chapters. The reader should not have major difficulty to understand them, although they contain constructs that are explained in subsequent chapters (or are not explained at all in this tutorial, such as the macro).

In the process diagram for Monitor, a macro call

MACRO Datatypedef;

is used The corresponding macro description has been taken out and is given below (a macro description is visible in the whole system description, no matter where it is placed). The macro concept of SDL is very similar to that of programming languages.

MACRODEFINITION Datatypedef;
NEWTYPE Pidset Powerset (PId)
ADDING
    OPERATORS
        take!: Pidset, PId -> PId;
        take : Pidset -> PId;
    AXIOMS
        take (empty) == Error!;
        take (Pidset) == take!(Pidset, Null);
        take! (empty, PId) ==Error!:
        take!(Pidset, PId) ==
            IF PId IN Pidset then PId
            else
                take!(Pidset, unique!(PId));
/* Note that operator names ending with "!" are used only within axioms. The unique! operator is defined in the definition of PId, and it creates a unique PId value, based on the given PId value. The take! operator returns a PId value belonging to Pidset, by trying all possible PId values starting from Null. The take operator returns an element of the Pidset.*/
DEFAULT empty;
ENDNEWTYPE Pidset;
ENDMACRO Datatypedef;

Process Monitor diagram

Figure 20: Process Monitor

Process Game Diagram

Figure 21: Process Game

Back Home Up

Contact the webmaster with questions or comments about this web site.
Copyright © 1997-May, 2013 SDL Forum Society