Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

ONT Re: Program Semantics




¤~~~~~~~~~¤~~~~~~~~~¤~~~~~~~~~¤~~~~~~~~~¤~~~~~~~~~¤

| Algebraic Approaches to Program Semantics
|
| Part 1.  Denotational Semantics of Control
|
| Chapter 1.  An Introduction to Denotational Semantics
|
|
| 1.2.  A Simple Fragment of Pascal (cont.)
|
| As a prelude to defining the semantics of statements, we aid the
| reader's intuition with flowschemes for the programming constructs
| in Table 7.
|
| Table 7.  Flowschemes for Programming Constructs
| -------------------------------------------------------------
|
| Assignment Statement.  I := E
|
|           o---------o
|      ---->| I := E  |---->
|           o---------o
|
| Composition.  begin S_1; ...; S_n end
|
|           o---------o    o---------o    o---------o
|      ---->|   S_1   |--->|   ...   |--->|   S_n   |---->
|           o---------o    o---------o    o---------o
|
| Conditional.  (if B then R else S)
|
|                T         o---------o
|                o-------->|    R    |-------->o
|               / \        o---------o         |
|              /   \                           |
|      ------>o  B  o                          o------>
|              \   /                           |
|               \ /        o---------o         |
|                o-------->|    S    |---------o
|                F         o---------o
|
| Repetitive Constructs.
|
| (while B do S)
|
|         o<-----------------------------------o
|         |                                    ^
|         |      T         o---------o         |
|         |      o-------->|    S    |-------->o
|         |     / \        o---------o
|         v    /   \
|      ------>o  B  o
|              \   /
|               \ /
|                o-------------->
|                F
|
|
| (repeat S until B)
|                                              T
|                                              o--------->
|                                             / \
|                          o---------o       /   \
|      ------------------->|    S    |----->o  B  o
|                ^         o---------o       \   /
|                |                            \ /
|                o<----------------------------o
|                                              F
|
| -------------------------------------------------------------
|
| Manes & Arbib, AAPS, pages 8-9.
|
| Ernest G. Manes & Michael A. Arbib,
|'Algebraic Approaches to Program Semantics',
| Springer-Verlag, New York, NY, 1986.

¤~~~~~~~~~¤~~~~~~~~~¤~~~~~~~~~¤~~~~~~~~~¤~~~~~~~~~¤