scispace - formally typeset
Search or ask a question
Topic

Hoare logic

About: Hoare logic is a research topic. Over the lifetime, 816 publications have been published within this topic receiving 26376 citations. The topic is also known as: Floyd–Hoare logic & Hoare rules.


Papers
More filters
Journal ArticleDOI
TL;DR: An attempt is made to explore the logical foundations of computer programming by use of techniques which were first applied in the study of geometry and have later been extended to other branches of mathematics.
Abstract: In this paper an attempt is made to explore the logical foundations of computer programming by use of techniques which were first applied in the study of geometry and have later been extended to other branches of mathematics. This involves the elucidation of sets of axioms and rules of inference which can be used in proofs of the properties of computer programs. Examples are given of such axioms and rules, and a formal proof of a simple theorem is displayed. Finally, it is argued that important advantages, both theoretical and practical, may follow from a pursuance of these topics.

2,638 citations

Proceedings ArticleDOI
22 Jul 2002
TL;DR: An extension of Hoare logic that permits reasoning about low-level imperative programs that use shared mutable data structure is developed, including extensions that permit unrestricted address arithmetic, dynamically allocated arrays, and recursive procedures.
Abstract: In joint work with Peter O'Hearn and others, based on early ideas of Burstall, we have developed an extension of Hoare logic that permits reasoning about low-level imperative programs that use shared mutable data structure. The simple imperative programming language is extended with commands (not expressions) for accessing and modifying shared structures, and for explicit allocation and deallocation of storage. Assertions are extended by introducing a "separating conjunction" that asserts that its subformulas hold for disjoint parts of the heap, and a closely related "separating implication". Coupled with the inductive definition of predicates on abstract data structures, this extension permits the concise and flexible description of structures with controlled sharing. In this paper, we survey the current development of this program logic, including extensions that permit unrestricted address arithmetic, dynamically allocated arrays, and recursive procedures. We also discuss promising future directions.

2,348 citations

Journal ArticleDOI
Leslie Lamport1
TL;DR: The inductive assertion method is generalized to permit formal, machine-verifiable proofs of correctness for multiprocess programs, represented by ordinary flowcharts, and no special synchronization mechanisms are assumed.
Abstract: The inductive assertion method is generalized to permit formal, machine-verifiable proofs of correctness for multiprocess programs. Individual processes are represented by ordinary flowcharts, and no special synchronization mechanisms are assumed, so the method can be applied to a large class of multiprocess programs. A correctness proof can be designed together with the program by a hierarchical process of stepwise refinement, making the method practical for larger programs. The resulting proofs tend to be natural formalizations of the informal proofs that are now used.

1,022 citations

Book ChapterDOI
10 Sep 2001
TL;DR: An extension of Hoare's logic for reasoning about programs that alter data structures is described, based on a possible worlds model of the logic of bunched implications, and includes spatial conjunction and implication connectives alongside those of classical logic.
Abstract: We describe an extension of Hoare's logic for reasoning about programs that alter data structures. We consider a low-level storage model based on a heap with associated lookup, update, allocation and deallocation operations, and unrestricted address arithmetic. The assertion language is based on a possible worlds model of the logic of bunched implications, and includes spatial conjunction and implication connectives alongside those of classical logic. Heap operations are axiomatized using what we call the "small axioms", each of which mentions only those cells accessed by a particular command. Through these and a number of examples we show that the formalism supports local reasoning: A specification and proof can concentrate on only those cells in memory that a program accesses. This paper builds on earlier work by Burstall, Reynolds, Ishtiaq and O'Hearn on reasoning about data structures.

747 citations

Journal ArticleDOI
TL;DR: An appropriate axiom system is given which is complete for loop-free programs and also puts conventional predicate calculus in a different light by lumping quantifiers with non-logical assignments rather than treating them as logical concepts.
Abstract: This paper deals with logics of programs The objective is to formalize a notion of program description and to give both plausible (semantic) and effective (syntactic) criteria for the notion of truth of a description A novel feature of this treatment is the development of the mathematics underlying Floyd-Hoare axiom systems independently of such systems Other directions that such research might take are also considered This paper grew out of, and is intended to be usable as, class notes for an introductory semantics course The three sections of the paper are: 1) A frame work for the logic of programs Programs and their partial correctness theories are treated as binary relations on states and formulae respectively Truth-values are assigned to partial correctness assertions in a plausible (Tarskian) but not directly usable way 2) Particular Programs Effective criteria for truth are established for some programs using the Tarskian criteria as a benchmark This leads directly to a sound, complete, effective axiom system for the theories of these programs The difficulties involved in finding such effective criteria for other programs are explored 3) Variations and extensions of the framework Alternatives to binary relations for both programs and theories are speculated on, and their possible roles in semantics are considered We discuss a hierarchy of varieties of programs and the importance of this hierarchy to the issues of definability and describability Modal logic is considered as a first-order alternative to Floyd-Hoare logic We give an appropriate axiom system which is complete for loop-free programs and also puts conventional predicate calculus in a different light by lumping quantifiers with non-logical assignments rather than treating them as logical concepts

610 citations


Network Information
Related Topics (5)
Concurrency
13K papers, 347.1K citations
88% related
Model checking
16.9K papers, 451.6K citations
87% related
Formal specification
18.3K papers, 370.6K citations
85% related
Formal verification
15.6K papers, 278.1K citations
82% related
Executable
24K papers, 391.1K citations
82% related
Performance
Metrics
No. of papers in the topic in previous years
YearPapers
20235
202212
202128
202029
201931
201831