Multiparadigm Programming Language: Semantics 0.9



WORK IN PROGRESS
The goal of this work is This work is supports ideas developing in Introduction to Programming Languages where abstraction, generalization and computational models are used as unifying concepts for understanding programming languages.


Imperative Programming

Axiomatic Semantics

Skip
 
{P}skip{P}
Assignment
 
{P[x0 is e0 ,..., xn is en]}x0 ,..., xn := e0 ,..., en{P}
Linear Sequence
 
P=Q0, {Qi} commandi+1{Qi+1}, Qn=R; for i=0..n 

{P}{; command1  ,..., commandn }{R}
Selection
 
{P /\ guardi command i{Q}; for i=1..n 
{P} {? guard1 --> command1 , ... , guardn --> commandn  } {Q}
Iteration
 
{I /\ guardi} command i{I}

{I} {* guard1 --> command1 , ... , guardn --> commandn  } {I, /\i not guardi }
for i=1..n
Parallel
 
{P} command i{Qi}

{P} {|| command1  ,..., commandn } {/\Qi }
for i=1..n

 Exceptions

 
 

by 1998 Anthony A. Aaby. Send comments to aabyan@wwc.edu