Nondeterministic Relational Semantics of a while Program
DOI:
https://doi.org/10.24297/jam.v3i3.7222Keywords:
while loop, demonic semantics, relational abstractionAbstract
A relational semantics is a mapping of programs to relations. We consider that the input-output semantics of a program is given by a relation on its set of states; in a nondeterministic context, this relation is calculated by considering the worst behavior of the program (demonic relational semantics). In this paper, we concentrate on while loops. Calculating the relational abstraction (semantics) of a loop is difficult, but showing the correctness of any candidate abstraction is much easier. For functional programs, Mills has described a checking method known as the while statement verification rule. A programming theorem for iterative constructs is proposed, proved, demonstrated and applied for an example. This theorem can be considered as a generalization of the while statement verification to nondeterministic loops.
Downloads
Downloads
Published
How to Cite
Issue
Section
License
All articles published in Journal of Advances in Linguistics are licensed under a Creative Commons Attribution 4.0 International License.