Lecture 05: Duration Calculus III

Similar documents
Lecture 03: Duration Calculus I

Lecture 3: Duration Calculus I

we could choose to work with the following symbols for natural numbers: Syntax: zero,one,two,...,twentyseven,...

Lecture 11: Timed Automata

Real-Time Systems. Lecture 10: Timed Automata Dr. Bernd Westphal. Albert-Ludwigs-Universität Freiburg, Germany main

Real-Time Systems. Lecture 15: The Universality Problem for TBA Dr. Bernd Westphal. Albert-Ludwigs-Universität Freiburg, Germany

Lecture 9: DC Implementables II

Lecture 12: Core State Machines II

How do PLC look like? What s special about PLC? What is a PLC? /50 2/50 5/50 6/50 3/ Splc main

Lecture 04: OCL Semantics

Benefits of Interval Temporal Logic for Specification of Concurrent Systems

Duration Calculus Introduction

An Algebraic Semantics for Duration Calculus

Declarative modelling for timing

Moby/RT: A Tool for Specification and Verification of Real-Time Systems

Lecture 10: PLC Automata

A Theory of Duration Calculus with Application

02917 Advanced Topics in Embedded Systems. Michael R. Ha. Brief Introduction to Duration Calculus. Michael R. Hansen

ECE473 Lecture 15: Propositional Logic

REAL-TIME control systems usually consist of some

Metric Propositional Neighborhood Logics

PLC-automata: a new class of implementable real-time automata

Operational and Logical Semantics. for Polling Real-Time Systems? Vaandrager 1. Abstract. PLC-Automata are a class of real-time automata suitable

03 Propositional Logic II

Propositional and Predicate Logic

Software Design, Modelling and Analysis in UML

02 Propositional Logic

Propositional logic (revision) & semantic entailment. p. 1/34

Mining bi-sets in numerical data

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming

Formal Methods for Java

Linking Duration Calculus and TLA

Lecture 10: Live Sequence Charts Cont d

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Formal Methods for Java

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World

Theoretical Foundations of the UML

Proofs Propositions and Calculuses

T Reactive Systems: Temporal Logic LTL

CSE507. Course Introduction. Computer-Aided Reasoning for Software. Emina Torlak

Model Checking for Propositions CS477 Formal Software Dev Methods

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

Synthesising Controllers from Real-Time Specifications

Propositional Logic: Part II - Syntax & Proofs 0-0

Language of Propositional Logic

Principles of Knowledge Representation and Reasoning

Calculus 140, section 4.7 Concavity and Inflection Points notes by Tim Pilachowski

Foundations of Artificial Intelligence

Essential facts about NP-completeness:

Propositional Logic: Logical Agents (Part I)

Introduction to Temporal Logic. The purpose of temporal logics is to specify properties of dynamic systems. These can be either

Natural Deduction for Propositional Logic

Lecture 07: Formal Methods for Requirements Engineering

Principles of Knowledge Representation and Reasoning

CSE507. Introduction. Computer-Aided Reasoning for Software. Emina Torlak courses.cs.washington.edu/courses/cse507/17wi/

A Duration Calculus Semantics. for. Real-Time Reactive Systems. Michael R. Hansen. Ernst-Rudiger Olderog. Michael Schenke.

Lecture 15: Software Quality Assurance

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

Propositional Logic: Models and Proofs

a. ~p : if p is T, then ~p is F, and vice versa

Lecture 6: Formal Syntax & Propositional Logic. First: Laziness in Haskell. Lazy Lists. Monads Later. CS 181O Spring 2016 Kim Bruce

Introduction to Artificial Intelligence. Logical Agents

( ) 4 and 20, find the value. v c is equal to this average CALCULUS WORKSHEET 1 ON PARTICLE MOTION

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

Formal Development of a Feedback Control System with Fault. Department of Automatic Control, Abstract

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

Semantic Equivalences and the. Verification of Infinite-State Systems 1 c 2004 Richard Mayr

CS156: The Calculus of Computation

HRML: a hybrid relational modelling language. He Jifeng

Propositional Calculus - Soundness & Completeness of H

Mathematics for linguists

Outline. Overview. Syntax Semantics. Introduction Hilbert Calculus Natural Deduction. 1 Introduction. 2 Language: Syntax and Semantics

Modal Logic. UIT2206: The Importance of Being Formal. Martin Henz. March 19, 2014

Foundations of Artificial Intelligence

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

Foundations of Artificial Intelligence

Chapter 4: Classical Propositional Semantics

Propositional Logic: Logical Agents (Part I)

Exponential Functions:

Lecture 07: Formal Methods for Requirements Engineering

Non-elementary Lower Bound for Propositional Duration. Calculus. A. Rabinovich. Department of Computer Science. Tel Aviv University

Modelling and Analysing Variability in Product Families

First-Order Logic. Chapter Overview Syntax

cis32-ai lecture # 18 mon-3-apr-2006

Model Checking I. What are LTL and CTL? dack. and. dreq. and. q0bar

Basic Algebraic Logic

Type Inference. For the Simply-Typed Lambda Calculus. Peter Thiemann, Manuel Geffken. Albert-Ludwigs-Universität Freiburg. University of Freiburg

r. Matthias Bretschneider amburg - Dept. Safety Fehleranalyse mit Hilfe von Model Checkern

Version Spaces.

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Propositional Logic: Deductive Proof & Natural Deduction Part 1

A Higher-Order Duration Calculus and Its Completeness 1

Typing λ-terms. Types. Typed λ-terms. Base Types. The Typing Relation. Advanced Formal Methods. Lecture 3: Simply Typed Lambda calculus

The semantics of propositional logic

CS 4700: Foundations of Artificial Intelligence

Timo Latvala. February 4, 2004

Transcription:

Real-Time Systems Lecture 05: Duration Calculus III 2014-05-20 Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: DC Syntax and Semantics: Formulae This Lecture: Educational Objectives: Capabilities for following tasks/questions. Read (and at best also write) Duration Calculus formulae including abbreviations. What is Validity/Satisfiability/Realisability for DC formulae? How can we prove a design correct? 05 2014-05-20 Sprelim Content: Duration Calculus Abbreviations Basic Properties Validity, Satisfiability, Realisability Correctness Proofs: Gas Burner 2/31

Duration Calculus Abbreviations 3/31 Abbreviations := l = 0 P := P = l l > 0 (point interval) (almost everywhere) P t := P l = t (for time t) P t := P l t (up to time t) F := true ;F ;true F := F (for some subinterval) (for all subintervals) 05 2014-05-20 Sdcabbrev 4/31

Abbreviations: Examples L I 1 0 0 2 4 6 8 Time 05 2014-05-20 Sdcabbrev I L = 0 (V, [0,2] ) = I L = 1 (V, [2,6] ) = I L = 0; L = 1 (V, [0,6] ) = I L (V, [0,2] ) = I L (V, [2,3] ) = I L ; L (V, [0,3] ) = I L ; L ; L (V, [0,6] ) = I L (V, [0,6] ) = I L (V, [0,6] ) = I L 2 (V, [0,6] ) = I L 2 ; L 1 ; L 3 (V, [0,6] ) = 5/31 Duration Calculus: Looking Back Duration Calculus is an interval logic. Formulae are evaluated in an (implicitly given) interval. gas valve flame sensor ignition G,F,I,H : {0,1} Strangest operators: Define L : {0,1} as G F. almost everywhere Example: G (Holds in a given interval [b,e] iff the gas valve is open almost everywhere.) chop Example: ( I ; I ; I ) = l 1 (Ignition phases last at least one time unit.) 05 2014-05-20 Sdcpreview integral Example: l 60 = L l 20 (At most 5% leakage time within intervals of at least 60 time units.) 6/31

DC Validity, Satisfiability, Realisability 7/31 Validity, Satisfiability, Realisability Let I be an interpretation, V a valuation, [b,e] an interval, and F a DC formula. I,V,[b,e] = F ( F holds in I, V, [b,e] ) iff I F (V,[b,e]) = tt. F is called satisfiable iff it holds in some I, V, [b,e]. I,V = F ( I and V realise F ) iff [b,e] Intv : I,V,[b,e] = F. F is called realisable iff some I and V realise F. 05 2014-05-20 Sdcsat I = F ( I realises F ) iff V Val : I,V = F. = F ( F is valid ) iff interpretation I : I = F. 8/31

Validity vs. Satisfiability vs. Realisability Remark 2.13. For all DC formulae F, F is satisfiable iff F is not valid, F is valid iff F is not satisfiable. If F is valid then F is realisable, but not vice versa. If F is realisable then F is satisfiable, but not vice versa. 05 2014-05-20 Sdcsat 9/31 Examples: Valid? Realisable? Satisfiable? l 0 l = 1 l = 30 l = 10;l = 20 ((F ;G);H) (F ;(G;H)) L x 05 2014-05-20 Sdcsat l = 2 10/31

Initial Values I,V = 0 F ( I and V realise F from 0 ) iff t Time : I,V,[0,t] = F. F is called realisable from 0 iff some I and V realise F from 0. Intervals of the form [0,t] are called initial intervals. I = 0 F ( I realises F from 0 ) iff V Val : I,V = 0 F. 05 2014-05-20 Sdcsat = 0 F ( F is valid from 0 ) iff interpretation I : I = 0 F. 11/31 Initial or not Initial... For all interpretations I, valuations V, and DC formulae F, (i) I,V = F implies I,V = 0 F, (ii) if F is realisable then F is realisable from 0, but not vice versa, (iii) F is valid iff F is valid from 0. 05 2014-05-20 Sdcsat 12/31

Specification and Semantics-based Correctness Proofs of Real-Time Systems with DC 13/31 Methodology: Ideal World... (i) Choose a collection of observables Obs. (ii) Provide the requirement/specification Spec as a conjunction of DC formulae (over Obs ). (iii) Provide a description Ctrl of the controller in form of a DC formula (over Obs ). (iv) We say Ctrl is correct (wrt. Spec ) iff = 0 Ctrl = Spec. 05 2014-05-20 Sdcmeth 14/31

Gas Burner Revisited gas valve flame sensor ignition 05 2014-05-20 Sdcgasburner (i) Choose observables: two boolean observables G and F (i.e. Obs = {G,F}, D(G) = D(F) = {0,1}) G = 1: gas valve open F = 1: have flame define L := G F (leakage) (ii) Provide the requirement: Req : (l 60 = 20 L l) (output) (input) 15/31 Gas Burner Revisited (iii) Provide a description Ctrl of the controller in form of a DC formula (over Obs ). Here, firstly consider a design: Des-1 : ( L = l 1) Des-2 : ( L ; L ; L = l > 30) (iv) Prove correctness: We want (or do we want = 0...?): 05 2014-05-20 Sdcgasburner = (Des-1 Des-2 = Req) (Thm. 2.16) 16/31

Gas Burner Revisited (iii) Provide a description Ctrl of the controller in form of a DC formula (over Obs ). Here, firstly consider a design: Des-1 : ( L = l 1) Des-2 : ( L ; L ; L = l > 30) (iv) Prove correctness: We want (or do we want = 0...?): 05 2014-05-20 Sdcgasburner = (Des-1 Des-2 = Req) (Thm. 2.16) We do show = Req-1 = Req (Lem. 2.17) with the simplified requirement Req-1 := (l 30 = L 1), 16/31 References 30/31

[Olderog and Dierks, 2008] Olderog, E.-R. and Dierks, H. (2008). Real-Time Systems - Formal Specification and Automatic Verification. Cambridge University Press. 31/31