Comparing Models of Nondeterministic Expression Evaluation

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.