60 likes | 77 Views
Dive into the foundational programming theory of action systems as a traditional model for distributed applications, focusing on individual component performance. Learn the syntax, execution semantics, invariants, and fixed points within action systems. This chapter provides a comprehensive framework for analyzing and designing distributed systems.
E N D
“A Discipline of Multiprogramming: Programming Theory for Distributed Applications” by Jayadev Misra Chapter 2, Action Systems
Idea • action system (state transition system) – no method invocations • objects contain only actions, communicate through shared variables only • this is more traditional model (objects usually called processes) • suitable for problems where tight interaction between components is unimportant and the focus is on correct performance of each individual component
Syntax • action system is defined by • state space – finite number of variables, each variable of some specified type (boolean, integer, etc.), is discrete (may have infinite number of values), The Cartesian product of values of each variable defines state space.booleanb; integerx,y;initial state(s) – defined by declaring initial values for some (or all) variables • may be specified by initial condition – a predicate that is true in initial states: b x=0 y=0 • specification of actions – is a guard (a predicate over the state space) and command (a prescription for the state change)x<y x:=x+1; y:=y-1requirement: if the guard holds the execution of action terminates
Execution semantics • state – an assignment of values to all system variables • the execution of an action system starts in an initial state and consists of an infinite number of steps • step – execution of an arbitrary action • ineffective – guard of the action does not hold, no change to the state • effective – guard holds, command is executed • fairness condition – each action is executed infinitely often
Invariant • invariant – a predicate that is initially true and is preserved by the execution of each action, hence invariant is true throughout the execution • Example: Program Claim: xy is invariant initially holds,Can prove:
Fixed point • fixed point (fixpoint), denoted FP – a state that remains unchanged by execution of any action • once the fixpoint is reached further execution has not effect • To compute fixpoint