Functional Behaviour of Nondeterministic Programs

The functional behavior of a deterministic program is a function f:D→D, where D is some set of states for the computation. This notion of functional behaviors can be extended to nondeterministic programs using techniques from linear algebra. In particular, the functional behavior of a nondeterministic program is a linear transformation f:A→A, where A is a free semiring module. Other notions from linear algebra carry over into this setting. For example, weakest preconditions and predicate transformers correspond to well-studied concepts in linear algebra. Finally, we consider multiple-input and multiple-output programs. The functional behavior of a nondeterministic program with multiple inputs and outputs is a linear transformation f:⊗ m A→⊗ n A, where ⊗ x A is an iterated tensor product of the semiring module A. This is in contrast to the deterministic case, where such a program is a function f:D m →D n , using the Cartesian products D m and D n .