## An abstract dynamic semantics for C (1997)

Venue: | Computer Laboratory, University of Cambridge |

Citations: | 15 - 1 self |

### BibTeX

@TECHREPORT{Norrish97anabstract,

author = {Michael Norrish},

title = {An abstract dynamic semantics for C},

institution = {Computer Laboratory, University of Cambridge},

year = {1997}

}

### OpenURL

### Abstract

This report is a presentation of a formal semantics for the C programming language. The semantics has been defined operationally in a structured semantics style and covers the bulk of the core of the language.

### Citations

1562 | The Definition of Standard ML
- Miller, Tofte, et al.
- 1990
(Show Context)
Citation Context .... . . . . . . . . . 28 4 Related work 29 5 Future work and conclusions 29 1 Introduction This work presents a formal description of the C language [1] in the tradition of the formal definition of SML =-=[17]-=-. It is significant in two important ways. Firstly, it is a demonstration that a language as complicated and as inherently unco-operative as C can nonetheless be treated formally. Secondly, the model ... |

1358 | An axiomatic basis for computer programming
- Hoare
- 1969
(Show Context)
Citation Context ... presented here with that as the underlying motivation (see also [18]). 3.1 A derived “axiomatic” logic Following Gordon [9], I have proved a number of theorems mimicking the axiomatic rules of Ho=-=are [14]. -=-Though Hoare’s rules are axioms defining the semantics of his language, here the operational semantics is the ultimate authority. The theorems do not define the language, but are statements about th... |

500 |
T.: Introduction to HOL: A Theorem Proving Environment for Higher Order Logic: Cambridge
- Melham
- 1993
(Show Context)
Citation Context ...stly, it is a demonstration that a language as complicated and as inherently unco-operative as C can nonetheless be treated formally. Secondly, the model has been mechanised in the HOL theorem prover =-=[10]-=-. This provides the theorem proving community with a demonstration that large semantic descriptions are both possible, and that they can be used for the basis of further reasoning. It also suggests th... |

120 |
Bisimilarity as a theory of functional programming
- Gordon
- 1995
(Show Context)
Citation Context ... Once created, this will subsequently bubble its way up to the root of the syntax tree. 2.3.2 Expression evaluation contexts Following the example of other presentations of reduction semantics (e.g., =-=[8], and -=-ultimately [7]) Cholera’s expression semantics makes use of evaluation contexts. Informally, an evaluation context is a piece of syntax “with a hole in it”. Contexts provide a convenient way to ... |

84 | The Semantics of the C Programming Language
- Gurevich, Huggins
- 1992
(Show Context)
Citation Context ...xpressions are characterised at a much higher level than in Cholera. In other work, the details of expression evaluation are simply not correct. The evolving algebra semantics of Gurevich and Huggins =-=[11, 12]-=- relies on the mistaken assumption that side effects are applied as they are generated, and that expressions involving binary operators can be evaluated by evaluating all of one argument before switch... |

83 |
Control operators, the SECD machine and the -calculus
- Felleisen, Friedman
- 1986
(Show Context)
Citation Context ...will subsequently bubble its way up to the root of the syntax tree. 2.3.2 Expression evaluation contexts Following the example of other presentations of reduction semantics (e.g., [8], and ultimately =-=[7]) Cholera'-=-s expression semantics makes use of evaluation contexts. Informally, an evaluation context is a piece of syntax "with a hole in it". Contexts provide a convenient way to generalise a whole f... |

73 |
Control Operators, the SECD machine, and the λ-calculus
- Felleisen, Friedman
- 1986
(Show Context)
Citation Context ...will subsequently bubble its way up to the root of the syntax tree. 2.3.2 Expression evaluation contexts Following the example of other presentations of reduction semantics (e.g., [8], and ultimately =-=[7]) Chol-=-era’s expression semantics makes use of evaluation contexts. Informally, an evaluation context is a piece of syntax “with a hole in it”. Contexts provide a convenient way to generalise a whole f... |

69 |
Evolving Algebras. A Tutorial Introduction
- Gurevich
- 1991
(Show Context)
Citation Context ...xpressions are characterised at a much higher level than in Cholera. In other work, the details of expression evaluation are simply not correct. The evolving algebra semantics of Gurevich and Huggins =-=[11, 12]-=- relies on the mistaken assumption that side effects are applied as they are generated, and that expressions involving binary operators can be evaluated by evaluating all of one argument before switch... |

58 | Mechanising Programming Logics in Higher Order Logic
- Gordon
- 1988
(Show Context)
Citation Context ...these have been proved with an eye to their later use in verification. They are presented here with that as the underlying motivation (see also [18]). 3.1 A derived “axiomatic” logic Following Gor=-=don [9], -=-I have proved a number of theorems mimicking the axiomatic rules of Hoare [14]. Though Hoare’s rules are axioms defining the semantics of his language, here the operational semantics is the ultimate... |

24 |
Binary decision diagrams as a hol derived rule
- Harrison
- 1994
(Show Context)
Citation Context ...and library calls, this verification can’t attempt anything like the thttpd code of [3], but will rather look at the C code written by John Harrison as part of his work on binary decision diagrams i=-=n [13]-=-. This code is 12 Although the improvements mentioned might result in the big-step non-determinism of [12]. 29sover 300 lines long, uses a hash table, linked lists as buckets, and a promote-tofront st... |

23 |
Side Effects and Aliasing Can Have Simple Axiomatic Descriptions
- Boehm
- 1985
(Show Context)
Citation Context ...ortunately, was has no obvious nice properties that might allow it be the basis for a C reasoning system. In particular, it doesn’t seem likely that a system such as the one presented in Boehm’s w=-=ork [4] c-=-ould grow out of it. Boehm’s system relies on expressions being both terminating and deterministic, properties not true of C expressions in general. On the other hand, C does not fall into the categ... |

15 | Inference rules for programming languages with side effects in expressions
- Black, Windley
- 1996
(Show Context)
Citation Context ...spect of C. However, none of them address the modelling of sequence points and side effects in expression evaluation. The only work for which this is probably not a significant issue is that of Black =-=[3]-=-, where the attempt is to describe C at a much higher level than this work. Here, an axiomatic semantics is developed ex nihilo, and expressions are characterised at a much higher level than in Choler... |

4 |
Arbib and Suad Alagi'c. Proof rules for gotos
- Michael
- 1979
(Show Context)
Citation Context ...nvolving multiple post-conditions are also possible. An example of this is the presentation of a wp semantics for a language with an exit statement [16]. Earlier work along the same lines is found in =-=[2]. In-=- C, one would want triples with four postconditions, corresponding to the three different forms of interruption and normal execution. 3.3 Purity analysis Expressions cause would-be “axiomatic” rul... |

4 |
Programming language constructs for which it is impossible to obtain good Hoare axiom systems
- Jr
- 1979
(Show Context)
Citation Context ...ing and deterministic, properties not true of C expressions in general. On the other hand, C does not fall into the category of languages for which “nice” descriptions are impossible, as described=-= in [5], -=-as it does not allow nested function definitions. 3.2 Further analysis of loops The usual rule that one wants to be able to use when analysing loop executions states that the negation of the loop’s ... |

3 |
Mechanical verification of C programs
- Subramanian, Cook
- 1996
(Show Context)
Citation Context ... σ ′ 〉 → ∗ e 〈v2, σ〉 〈e1 ⊙ e2, σ0〉 → ∗ e 〈v1 ⊙ v2, σ〉 〈e2, σ0〉 → ∗ e 〈v2, σ ′ 〉 〈e1, σ ′ 〉 → ∗ e 〈v1, σ〉 〈e1 ⊙ e2, σ0〉 → ∗ e =-=〈v1 ⊙ v2, σ〉 Subramanian and Cook present a semantics for a subset of C in [19]-=-. This work has the distinction of having been done in the theorem-prover Nqthm. However, this work assumes a particular order of evaluation for binary operators, and also leaves out such features of ... |

2 |
Derivation of verificiation rules for C from operational definitions
- Norrish
- 1996
(Show Context)
Citation Context ... a number of results relating to the semantics. Most of these have been proved with an eye to their later use in verification. They are presented here with that as the underlying motivation (see also =-=[18]). 3.1-=- A derived “axiomatic” logic Following Gordon [9], I have proved a number of theorems mimicking the axiomatic rules of Hoare [14]. Though Hoare’s rules are axioms defining the semantics of his l... |

1 |
A formal denotational semantics for C. A draft document, available from Trusted Information Systems’ web-site at http://www.tis.com/docs/research/assurance/formal-c.html
- Cook, Cohen, et al.
- 1994
(Show Context)
Citation Context ...es a particular order of evaluation for binary operators, and also leaves out such features of the full language as interrupt statements (break, continue etc). Finally, Cook et al. in the unpublished =-=[6] p-=-resent a denotational semantics that denotes C forms as expressions in a custom-built temporal logic. This semantics also makes the convenient assumption that C’s expressions are evaluated leftto-ri... |

1 |
Exits in the refinement calculus. Formal aspects of computing
- King, Morgan
- 1995
(Show Context)
Citation Context ...he previous section, alternatives to this approach involving multiple post-conditions are also possible. An example of this is the presentation of a wp semantics for a language with an exit statement =-=[16]-=-. Earlier work along the same lines is found in [2]. In C, one would want triples with four postconditions, corresponding to the three different forms of interruption and normal execution. 3.3 Purity ... |