Expression evaluation in programming languages is normally deterministic; however, if expressions involve variables that are being modified by the environment of the process during their evaluation, the result of the evaluation can be nondeterministic. Two common cases where this occurs are in concurrent programs where processes share variables and real-time programs that interact to monitor and/or control their environment. In these contexts, while any particular evaluation of an expression gives a single result, there is a range of possible results that could be returned depending on the relative timing of modification of variables by the environment and their access within expression evaluation. Hence to model the semantics of expression evaluation one can use the set of possible values the expression evaluation could return. This paper considers three views of interpreting expressions nondeterministically. The paper formalises the three approaches, highlights different properties satisfied by the approaches, relates the approaches and explores conditions under which they coincide. Furthermore, a link is made to a new notation used in reasoning about interference. © 2011 Newcastle University. Printed and published by Newcastle University, Computing Science, Claremont Tower, Claremont Road, Newcastle upon Tyne, NE1 7RU, England. Bibliographical details HAYES, I.J., BURNS, A., DONGOL, B., JONES, C.B., Comparing Models of Nondeterministic Expression Evaluation [By] I.J. Hayes, A. Burns, B. Dongol, C.B. Jones Newcastle upon Tyne: Newcastle University: Computing Science, 2011. (Newcastle University, Computing Science, Technical Report Series, No. CS-TR-1273) Added entries NEWCASTLE UNIVERSITY Computing Science. Technical Report Series. CS-TR-1273 Abstract Expression evaluation in programming languages is normally deterministic; however, if expressions involve variables that are being modified by the environment of the process during their evaluation, the result of the evaluation can be nondeterministic. Two common cases where this occurs are in concurrent programs where processes share variables and real-time programs that interact to monitor and/or control their environment. In these contexts, while any particular evaluation of an expression gives a single result, there is a range of possible results that could be returned depending on the relative timing of modification of variables by the environment and their access within expression evaluation. Hence to model the semantics of expression evaluation one can use the set of possible values the expression evaluation could return. This paper considers three views of interpreting expressions nondeterministically. The paper formalises the three approaches, highlights different properties satisfied by the approaches, relates the approaches and explores conditions under which they coincide. Furthermore, a link is made to a new notation used in reasoning about interference. About the authors Ian Hayes is a Professor in the School of Information Technology and Electrical Engineering at the University of Queensland. His research interests are in the field of formal methods for the specification and development of software, especially for real-time systems. His current research is on the use of time bands and teleo-reactive programming for the development of real-time systems. He is a fellow of the British Computer Society. Professor Alan Burns a member of the Department of Computer Science, University of York, U.K. His research interests cover a number of aspects of real-time systems including the assessment of languages for use in the realtime domain, distributed operating systems, the formal specification of scheduling algorithms and implementation strategies, and the design of dependable user interfaces to real-time applications. Professor Burns has authored/coauthored 450 papers/reports and 15 books. Many of these are in the real-time area. His teaching activities include courses in Operating Systems and Real-time Systems. He is a member of ARTIST the EU Centre of Excellence in Real-Time and Embedded Systems. In 2009 Professor Burns was elected a Fellow of the Royal Academy of Engineering. Dr Brijesh Dongol received his PhD from The University of Queensland, Australia in 2009 and is currently working as a post-doctoral researcher with Prof Ian Hayes on combining teleo-reactive programs with time bands to improve dependability of real-time programs. He is mainly interested in developing methods for formally verifying and deriving concurrent programs, lock-free algorithms and real-time systems. Cliff Jones is a Professor of Computing Science at Newcastle University. He is now applying research on formal methods to wider issues of dependability. Until 2007 his major research involvement was the five university IRC on "Dependability of Computer-Based Systems" of which he was overall Project Director he is now PI of the follow-on Platform Grant "Trustworthy Ambient Systems" (TrAmS) (also EPSRC). He is also PI on an EPSRCfunded project "Splitting (Software) Atoms Safely" and coordinates the "Methodology" strand of the EU-funded RODIN project. As well as his academic career, Cliff has spent over twenty years in industry. His fifteen years in IBM saw among other things the creation -with colleagues in Viennaof VDM which is one of the better known "formal methods". Under Tony Hoare, Cliff wrote his doctoral thesis in two years (and enjoyed the family atmosphere of Wolfson College). From Oxford, he moved directly to a chair at Manchester University where he built a world-class Formal Methods group which -among other projectswas the academic lead in the largest Software Engineering project funded by the Alvey programme (IPSE 2.5 created the "mural"(Formal Method) Support Systems theorem proving assistant). Cliff is a Fellow of the Royal Academy of Engineering (FREng), ACM, BCS, and IET. He has been a member of IFIP Working Group 2.3 (Programming Methodology) since 1973 (and was Chair from 1987-96). Suggested keywords LOGIC SEMANTICS NON-DETERMINISM TIME BANDS Comparing Models of Nondeterministic Expression Evaluation Ian J. Hayes, Alan Burns, Brijesh Dongol, and Cliff B. Jones 1 School of Information Technology and Electrical Engineering, The University of Queensland, Brisbane, 4072, Australia. {Ian.Hayes, Brijesh}@itee.uq.edu.au 2 Department of Computer Science, University of York, UK burns@cs.york.ac.uk 3 School of Computing Science, Newcastle University, NE1 7RU, England. cliff.jones@ncl.ac.uk Abstract. Expression evaluation in programming languages is normally deterministic; however, if expressions involve variables that are being modified by the environment of the process during their evaluation, the result of the evaluation can be nondeterministic. Two common cases where this occurs are in concurrent programs where processes share variables and real-time programs that interact to monitor and/or control their environment. In these contexts, while any particular evaluation of an expression gives a single result, there is a range of possible results that could be returned depending on the relative timing of modification of variables by the environment and their access within expression evaluation. Hence to model the semantics of expression evaluation one can use the set of possible values the expression evaluation could return. This paper considers three views of interpreting expressions nondeterministically. The paper formalises the three approaches, highlights different properties satisfied by the approaches, relates the approaches and explores conditions under which they coincide. Furthermore, a link is made to a new notation used in reasoning about interference. Expression evaluation in programming languages is normally deterministic; however, if expressions involve variables that are being modified by the environment of the process during their evaluation, the result of the evaluation can be nondeterministic. Two common cases where this occurs are in concurrent programs where processes share variables and real-time programs that interact to monitor and/or control their environment. In these contexts, while any particular evaluation of an expression gives a single result, there is a range of possible results that could be returned depending on the relative timing of modification of variables by the environment and their access within expression evaluation. Hence to model the semantics of expression evaluation one can use the set of possible values the expression evaluation could return. This paper considers three views of interpreting expressions nondeterministically. The paper formalises the three approaches, highlights different properties satisfied by the approaches, relates the approaches and explores conditions under which they coincide. Furthermore, a link is made to a new notation used in reasoning about interference.
[1]
N. Ward.
A refinement calculus for nondeterministic expressions
,
1994
.
[2]
P Lucas,et al.
On the formal description of PL/I
,
1969
.
[3]
Cliff B. Jones,et al.
Operational semantics: Concepts and their expression
,
2003,
Inf. Process. Lett..
[4]
Cliff B. Jones,et al.
Deriving Specifications for Systems That Are Connected to the Physical World
,
2007,
Formal Methods and Hybrid Real-Time Systems.
[5]
Ian J. Hayes.
A predicative semantics for real-time refinement
,
2003
.
[6]
Cliff B. Jones,et al.
Systematic software development using VDM
,
1986,
Prentice Hall International Series in Computer Science.
[7]
Cliff B. Jones,et al.
Specification and Design of (Parallel) Programs
,
1983,
IFIP Congress.
[8]
Gordon D. Plotkin,et al.
A structural approach to operational semantics
,
2004,
J. Log. Algebraic Methods Program..
[9]
J. Michael Spivey,et al.
The Z notation - a reference manual
,
1992,
Prentice Hall International Series in Computer Science.
[10]
Suresh Jagannathan,et al.
Relaxed-memory concurrency and verified compilation
,
2011,
POPL '11.
[11]
Lauretta O. Osho,et al.
Axiomatic Basis for Computer Programming
,
2013
.
[12]
Ian J. Hayes,et al.
Specification case studies
,
1987
.
[13]
Cliff B. Jones,et al.
Accommodating interference in the formal design of concurrent object-based programs
,
1996,
Formal Methods Syst. Des..
[14]
Thomas B. Steel,et al.
Formal language description languages for computer programming : proceedings of the IFIP Working Conference on Formal Language Description Languages
,
1966
.
[15]
Alan Burns,et al.
A timeband framework for modelling real-time systems
,
2010,
Real-Time Systems.
[16]
Cliff B. Jones,et al.
A Structural Proof of the Soundness of Rely/guarantee Rules
,
2007,
J. Log. Comput..
[17]
Cliff B. Jones,et al.
Developing methods for computer programs including a notion of interference
,
1981
.
[18]
Ian J. Hayes,et al.
A sequential real-time refinement calculus
,
2001,
Acta Informatica.
[19]
Peter Gorm Larsen,et al.
Semantics of under-determined expressions
,
2005,
Formal Aspects of Computing.
[20]
Cliff B. Jones,et al.
Determining the Specification of a Control System from That of Its Environment
,
2003,
FME.
[21]
Cliff B. Jones,et al.
Elucidating concurrent algorithms via layers of abstraction and reification
,
2011,
Formal Aspects of Computing.
[22]
Alan Burns,et al.
EVALUATING TIMEBANDS AS A TOOL FOR STRUCTURING THE DESIGN OF SOCIO-TECHNICAL SYSTEMS
,
2007
.
[23]
Gordon D. Plotkin,et al.
The origins of structural operational semantics
,
2004,
J. Log. Algebraic Methods Program..
[24]
Max J. Cresswell,et al.
A New Introduction to Modal Logic
,
1998
.
[25]
John McCarthy.
A Formal Description of a Subset of Algol
,
1964
.