A Tour Through the Programming Choices: Semantics and Applications

Pedro Ribeiro*, Kangfeng Ye*, Frank Zeyda, Alvaro Miyazawa

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingChapter

Abstract

The discipline of programming, as Edsger Dijkstra would call it, has provided a formal basis for the study of programs where choices are not necessarily deterministic. That is, despite reservations from pioneers, like Tony Hoare, about the inclusion of nondeterministic behaviour in a program. For over 65 years, nondeterminism has played an important role in modelling and reasoning about programs. Moreover, there are at least two major flavours: angelic and demonic. Further programming choices, such as preferential and probabilistic, have been proposed to capture other important phenomena, for example, in the context of cyber-physical systems, distributed systems, and cryptography. In this chapter, we provide a critical account of these programming choices and their semantics, and discuss their applications. Our account focuses mainly on denotational semantics, and in particular relational models, as is fitting in honour of Jim Woodcock. We discuss approaches based on, or inspired by, weakest preconditions semantics and alphabetised relations, as found in the Unifying Theories of Programming (UTP). They are at the core of the semantics of notations such as Z and Circus, and extensions to deal with time and probabilities. Some of the ideas discussed here have been developed in close collaboration with Jim.

Original languageEnglish
Title of host publicationLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Subtitle of host publicationThe Application of Formal Methods
EditorsSimon Foster, Auguto Sampaio
PublisherSpringer Science and Business Media Deutschland GmbH
Pages261-305
Number of pages45
Volume14900
ISBN (Electronic)978-3-031-67114-2
ISBN (Print)978-3-031-67113-5
DOIs
Publication statusPublished - 1 Sept 2024

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume14900 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Bibliographical note

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG. This is an author-produced version of the published paper. Uploaded in accordance with the publisher’s self-archiving policy. Further copying may not be permitted; contact the publisher for details.

Keywords

  • choice
  • programming
  • refinement
  • relations
  • semantics
  • UTP

Cite this