Dynamic Logic David Harel, The Weizmann Institute Dexter Kozen, Cornell University Jerzy Tiuryn, University of Warsaw The MIT Press, Cambridge, Massac

Similar documents
EXTENSIONS OF FIRST ORDER LOGIC

The Formal Semantics of Programming Languages An Introduction. Glynn Winskel. The MIT Press Cambridge, Massachusetts London, England

Communication Complexity and Parallel Computing

An Annotated Language

Contents. Chapter 1 SPECIFYING SYNTAX 1

Computation Engineering Applied Automata Theory and Logic. Ganesh Gopalakrishnan University of Utah. ^J Springer

Programming Languages Third Edition

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

Syllabi of the Comprehensive Examination in Computer Science

Appendix 1. Description Logic Terminology

Appendix 1. Description Logic Terminology

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016

AN INTRODUCTION TO FUZZY SETS Analysis and Design. Witold Pedrycz and Fernando Gomide


Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Thomas Jech. Set Theory. The Third Millennium Edition, revised and expanded. 4y Springer

LOGIC AND DISCRETE MATHEMATICS

KAT and PHL in Coq. 1 Introduction. 2 Revision of KAT and PHL concepts. David Pereira 1 and Nelma Moreira 1

Introductory logic and sets for Computer scientists

Fundamentals of Discrete Mathematical Structures

Negations in Refinement Type Systems

6 NFA and Regular Expressions

COMP 382: Reasoning about algorithms

Taxonomic Syntax for First Order Inference. Abstract: We identify a new polynomial time decidable fragment of rst order

Formal languages and computation models

Specification, Verification, and Interactive Proof

Reflection in the Chomsky Hierarchy

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE

! Use of formal notations. ! in software system descriptions. ! for a broad range of effects. ! and varying levels of use. !

CSC 501 Semantics of Programming Languages

Logik für Informatiker Logic for computer scientists

DISCRETE MATHEMATICS

Introduction to Axiomatic Semantics (1/2)

MIT Specifying Languages with Regular Expressions and Context-Free Grammars. Martin Rinard Massachusetts Institute of Technology

Discrete Mathematics Lecture 4. Harper Langston New York University

Theorem proving. PVS theorem prover. Hoare style verification PVS. More on embeddings. What if. Abhik Roychoudhury CS 6214

Semantics. There is no single widely acceptable notation or formalism for describing semantics Operational Semantics

MIT Specifying Languages with Regular Expressions and Context-Free Grammars

A First-Order Logic with First-Class Types

Chapter 3. Semantics. Topics. Introduction. Introduction. Introduction. Introduction

DATABASE THEORY. Lecture 11: Introduction to Datalog. TU Dresden, 12th June Markus Krötzsch Knowledge-Based Systems

Introduction to Axiomatic Semantics (1/2)

Formal Systems and their Applications

What if current foundations of mathematics are inconsistent? Vladimir Voevodsky September 25, 2010

(All chapters begin with an Introduction end with a Summary, Exercises, and Reference and Bibliography) Preliminaries An Overview of Database

Computational inductive denability

Logic and its Applications

Theory of Programming Languages COMP360

Programs with infinite loops: from primitive recursive predicates to the arithmetic hierarchy

Introduction to Axiomatic Semantics

Program Design in PVS. Eindhoven University of Technology. Abstract. Hoare triples (precondition, program, postcondition) have

Model checking pushdown systems

Compositional Software Model Checking

Handout 9: Imperative Programs and State

AXIOMS FOR THE INTEGERS

6. Hoare Logic and Weakest Preconditions

Principles of Program Analysis. Lecture 1 Harry Xu Spring 2013

Formal Languages and Compilers Lecture IV: Regular Languages and Finite. Finite Automata

Logic and Computation

The semantics of a programming language is concerned with the meaning of programs, that is, how programs behave when executed on computers.

An Evolution of Mathematical Tools

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,

Chapter 3 (part 3) Describing Syntax and Semantics

Lectures 20, 21: Axiomatic Semantics

Distributed Systems Programming (F21DS1) Formal Verification

COSC252: Programming Languages: Semantic Specification. Jeremy Bolton, PhD Adjunct Professor

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Introduction to Automata Theory. BİL405 - Automata Theory and Formal Languages 1

λ calculus Function application Untyped λ-calculus - Basic Idea Terms, Variables, Syntax β reduction Advanced Formal Methods

Introduction to Embedded Systems

Concurrent Models of Computation

Chapter 3: Propositional Languages

JAVA PROGRAMMING. Unit-3 :Creating Gui Using The Abstract Windowing Toolkit:

CS 6110 S14 Lecture 38 Abstract Interpretation 30 April 2014

Reconciling Dierent Semantics for Concept Denition (Extended Abstract) Giuseppe De Giacomo Dipartimento di Informatica e Sistemistica Universita di Ro

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Inadequacy of Computable Loop Invariants ANDREAS BLASS University of Michigan and YURI GUREVICH Microsoft Research Hoare logic is a widely recommended

CMSC 330: Organization of Programming Languages. Operational Semantics

Formal Verification. Lecture 10

Revisiting Kalmar completeness metaproof

A Survey of Mathematics with Applications 8 th Edition, 2009

Chapter 3. Describing Syntax and Semantics ISBN

Modal Logic ALEXANDER CHAGROV. Tver State University. and MICHAEL ZAKHARYASCHEV

Introduction to Denotational Semantics. Class Likes/Dislikes Survey. Dueling Semantics. Denotational Semantics Learning Goals. You re On Jeopardy!

Lecture 5: The Halting Problem. Michael Beeson

Reading 1 : Introduction

We ve studied the main models and concepts of the theory of computation:

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic

Model Checking Revision: Model Checking for Infinite Systems Revision: Traffic Light Controller (TLC) Revision: 1.12

A Hoare Logic Contract Theory: An Exercise in Denotational Semantics

Computing Fundamentals 2 Introduction to CafeOBJ

Chapter 3. Describing Syntax and Semantics

the application rule M : x:a: B N : A M N : (x:a: B) N and the reduction rule (x: A: B) N! Bfx := Ng. Their algorithm is not fully satisfactory in the

Introduction to Formal Methods

3.7 Denotational Semantics

Propositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

PROGRAM ANALYSIS & SYNTHESIS

Blum axioms and nondeterministic computation of functions

Languages and Automata

Transcription:

Dynamic Logic David Harel, The Weizmann Institute Dexter Kozen, Cornell University Jerzy Tiuryn, University of Warsaw The MIT Press, Cambridge, Massachusetts, 2000 Among the many approaches to formal reasoning about programs, Dynamic Logic enjoys the singular advantage of being strongly related to classical logic. Its variants constitute natural generalizations and extensions of classical formalisms. For example, Propositional Dynamic Logic (PDL) can be described as a blend of three complementary classical ingredients: propositional calculus, modal logic, and the algebra of regular events. In First-Order Dynamic Logic (DL), the propositional calculus is replaced by classical rst-order predicate calculus. Dynamic Logic is a system of remarkable unity that is theoretically rich as well as of practical value. It can be used for formalizing correctness specications and proving rigorously that those specications are met by a particular program. Other uses include determining the equivalence of programs, comparing the expressive power of various programming constructs, and synthesizing programs from specications. This book provides the rst comprehensive introduction to Dynamic Logic. It is divided into three parts. The rst part reviews the appropriate fundamental concepts of logic and computability theory and can stand alone as an introduction to these topics. The second part discusses PDL and its variants, and the third part discusses DL and its variants. Examples are provided throughout, and exercises and a short historical section are included at the end of each chapter. Contents I Fundamental Concepts...1 1 Mathematical Preliminaries... 3 1.1 Notational Conventions...3 1.2 Sets...3 A Note on Foundations...4 Sets and Classes....5 1.3 Relations.... 5 Binary Relations...6 Equivalence Relations...8 Functions....9 Partial Orders....10 Well-Foundedness and Induction.... 12 1.4 Graphs and Dags....13 1.5 Lattices...13 1.6 Transnite Ordinals...13 Set-Theoretic Denition of Ordinals...14 Transnite Induction.... 15 Zorn's Lemma and the Axiom of Choice...16 1.7 Set Operators...16 Monotone, Continuous, and Finitary Operators... 17 Prexpoints and Fixpoints...18 Closure Operators...19

The Knaster{Tarski Theorem...20 1.8 Bibliographical Notes.... 22 Exercises...22 2 Computability and Complexity...27 2.1 Machine Models.... 27 Deterministic Turing Machines... 27 Nondeterministic Turing Machines...33 Alternating Turing Machines...34 Universal Turing Machines and Undecidability...37 2.2 Complexity Classes.... 38 Time and Space Complexity...38 Oracle Machines and Relative Computability...40 Recursive and R.E. Sets...42 The Arithmetic Hierarchy...42 The Analytic Hierarchy...45 2.3 Reducibility and Completeness....53 Reducibility Relations.... 53 Completeness....57 Tiling Problems...58 2.4 Bibliographical Notes.... 63 Exercises...64 3 Logic...67 3.1 What is Logic?....67 Languages...68 Models, Satisfaction, and Validity...68 Deduction....69 3.2 Propositional Logic...71 Syntax...71 Semantics...73 Set-Theoretic Representation...76 A Deductive System....77 The Deduction Theorem...79 Completeness....79 Compactness...81 An Equational System...82 3.3 Equational Logic...86 Syntax...86 Semantics...88 The Quotient Construction.... 96 A Deductive System....99 The HSP Theorem....100 3.4 Predicate Logic...102 Syntax...102 Scope, Bound and Free Variables....104 Semantics...105 A Deductive System...111

Completeness with Equality...115 Compactness...115 The Lowenheim{Skolem Theorem...116 Undecidability...117 3.5 Ehrenfeucht{Frasse Games....119 3.6 Innitary Logic....120 Syntax...121 An Innitary Deductive System...122 The Downward Lowenheim{Skolem Theorem.... 126 Complexity...126 3.7 Modal Logic...127 Propositional Modal Logic...127 Multimodal Logic...130 Unwinding...132 Modal Logic and Programs...133 3.8 Bibliographical Notes....134 Exercises....134 4 Reasoning About Programs...145 4.1 What are Programs?... 145 4.2 States and Executions...146 4.3 Programming Constructs...147 While Programs...147 Regular Programs...148 Recursion...149 R.E. Programs...150 Nondeterminism... 151 4.4 Program Verication...152 Partial and Total Correctness...154 Hoare Logic...156 4.5 Exogenous and Endogenous Logics... 157 4.6 Bibliographical Notes....157 Exercises....158 II Propositional Dynamic Logic.... 161 5 Propositional Dynamic Logic...163 5.1 Syntax...164 5.2 Semantics...167 5.3 Computation Sequences...170 5.4 Satisability and Validity...171 5.5 A Deductive System...173 5.6 Basic Properties.... 174 Properties Inherited from Modal Logic... 174 Properties of [, ;, and?...175 The Converse Operator,... 177 The Iteration Operator...181 Reexive Transitive Closure and Induction... 182

5.7 Encoding Hoare Logic.... 186 5.8 Bibliographical Notes....187 Exercises....188 6 Filtration and Decidability... 191 6.1 The Fischer{Ladner Closure.... 191 6.2 Filtration and the Small Model Theorem...195 6.3 Filtration over Nonstandard Models...199 6.4 Bibliographical Notes....201 Exercises....202 7 Deductive Completeness...203 7.1 Deductive Completeness...203 7.2 Logical Consequences...209 7.3 Bibliographical Notes....209 Exercises....209 8 Complexity ofpdl...211 8.1 A Deterministic Exponential-Time Algorithm....211 8.2 ALower Bound... 216 8.3 Compactness and Logical Consequences... 220 8.4 Bibliographical Notes....224 Exercises....225 9 Nonregular PDL...227 9.1 Context-Free Programs...227 9.2 Basic Results.... 228 9.3 Undecidable Extensions... 232 Two-Letter Programs...232 One-Letter Programs...235 9.4 Decidable Extensions.... 237 Tree Models...239 Pushdown Automata on Innite Trees...242 Decidability for Simple-Minded Languages...244 Other Decidable Classes.... 249 9.5 More on One-Letter Programs.... 250 A Decidable Case... 250 Cases with no Finite Model Property...251 9.6 Bibliographical Notes....255 Exercises....256 10 Other Variants of PDL...259 10.1 Deterministic PDL and While Programs...259 10.2 Restricted Tests...263 10.3 Representation by Automata.... 266 10.4 Complementation and Intersection...268 10.5 Converse.... 270 10.6 Well-Foundedness and Total Correctness...271

10.7 Concurrency and Communication....276 10.8 Bibliographical Notes....277 III First-Order Dynamic Logic....281 11 First-Order Dynamic Logic...283 11.1 Basic Syntax...283 11.2 Richer Programs...287 Seqs and R.E. Programs...287 Arrays and Stacks...288 Wildcard Assignment...290 11.3 Semantics...291 States as Valuations....291 Assignment Statements...293 Programs and Formulas...295 11.4 Satisability and Validity...297 11.5 Bibliographical Notes....298 Exercises....298 12 Relationships with Static Logics.... 301 12.1 The Uninterpreted Level... 301 Uninterpreted Reasoning: Schematology.... 301 Failure of Classical Theorems....302 Expressive Power...304 12.2 The Interpreted Level...307 Interpreted Reasoning: Arithmetical Structures.... 307 Expressive Power over N...308 12.3 Bibliographical Notes....311 Exercises....311 13 Complexity...313 13.1 The Validity Problem...313 The Uninterpreted Level: Validity...313 The Interpreted Level: Validity over N...317 13.2 Spectral Complexity...317 Coding Finite Structures.... 318 Spectra....320 13.3 Bibliographical Notes....324 Exercises....325 14 Axiomatization...327 14.1 The Uninterpreted Level... 327 Completeness for Termination Assertions.... 327 Innitary Completeness for the General Case...329 14.2 The Interpreted Level...333 Relative Completeness for Correctness Assertions.... 334 Arithmetical Completeness for the General Case...335 14.3 Bibliographical Notes....341

Exercises....341 15 Expressive Power...343 15.1 The Unwind Property...344 15.2 Spectra and Expressive Power...347 15.3 Bounded Nondeterminism.... 355 Regular Programs...355 Boolean Stacks...364 Algebraic Stacks and Beyond...368 15.4 Unbounded Memory...369 Polyadic Vocabulary...370 Monadic Vocabulary...375 15.5 The Power of a Boolean Stack...376 15.6 Unbounded Nondeterminism... 377 15.7 Bibliographical Notes....378 Exercises....380 16 Variants of DL...383 16.1 Algorithmic Logic.... 383 16.2 Nonstandard Dynamic Logic... 384 16.3 Well-Foundedness...386 16.4 Dynamic Algebra...389 16.5 Probabilistic Programs...391 16.6 Concurrency and Communication....393 16.7 Bibliographical Notes....394 17 Other Approaches...397 17.1 Logic of Eective Denitions...397 17.2 Temporal Logic... 398 The Inductive Assertions Method...399 The Temporal Approach...400 Expressiveness... 404 The Until Operator...405 Concurrency and Nondeterminism.... 405 Complexity and Deductive Completeness...407 Embedding TL in DL...408 17.3 Process Logic... 408 Axiomatization...411 17.4 The -Calculus.... 415 17.5 Kleene Algebra...418 Kleene Algebra with Tests....421 References.... 425 Notation and Abbreviations.... 439 Index....449