Towards a HOL Framework for the Deductive Analysis of Hybrid Control Systems ADPM’2000 Norbert Völker University of Essex, England.

Slides:



Advertisements
Similar presentations
Functional Decompositions for Hardware Verification With a few speculations on formal methods for embedded systems Ken McMillan.
Advertisements

Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Efficient representation for formal verification of PLC programs Vincent Gourcuff, Olivier de Smet and Jean-Marc Faure LURPA – ENS de Cachan.
Proofs and Programs Wei Hu 11/01/2007. Outline  Motivation  Theory  Lambda calculus  Curry-Howard Isomorphism  Dependent types  Practice  Coq Wei.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
1 How to transform an analyzer into a verifier. 2 OUTLINE OF THE LECTURE a verification technique which combines abstract interpretation and Park’s fixpoint.
Formal Semantics of Programming Languages 虞慧群 Topic 5: Axiomatic Semantics.
Timed Automata.
Verification of Hybrid Systems An Assessment of Current Techniques Holly Bowen.
1 Mechanical Verification of Timed Automata Myla Archer and Constance Heitmeyer Presented by Rasa Bonyadlou 24 October 2002.
ECE 720T5 Fall 2012 Cyber-Physical Systems Rodolfo Pellizzoni.
ISBN Chapter 3 Describing Syntax and Semantics.
An Integration of Program Analysis and Automated Theorem Proving Bill J. Ellis & Andrew Ireland School of Mathematical & Computer Sciences Heriot-Watt.
An Automata-based Approach to Testing Properties in Event Traces H. Hallal, S. Boroday, A. Ulrich, A. Petrenko Sophia Antipolis, France, May 2003.
1 Formal Models for Stability Analysis : Verifying Average Dwell Time * Sayan Mitra MIT,CSAIL Research Qualifying Exam 20 th December.
The Programming Discipline Professor Stephen K. Kwan 2010 Things you need to know (learn) for developing large computer programs.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
Temporal Logic of Actions (TLA) Leslie Lamport
Models of Computation for Embedded System Design Alvise Bonivento.
A Type System for Expressive Security Policies David Walker Cornell University.
Sparkle A theorem prover for the functional language Clean Maarten de Mol University of Nijmegen February 2002.
Describing Syntax and Semantics
Chapter 1 Program Design
Testing and Monitoring at Penn An Integrated Framework for Validating Model-based Embedded Software Li Tan University of Pennsylvania September, 2003.
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
Programming Language Semantics Denotational Semantics Chapter 5 Part III Based on a lecture by Martin Abadi.
Program Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Chapter 8: Introduction to High-Level Language Programming Invitation to Computer Science, C++ Version, Fourth Edition.
Lesson-21Process Modeling Define systems modeling and differentiate between logical and physical system models. Define process modeling and explain its.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
CIS Computer Programming Logic
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
Using Mathematica for modeling, simulation and property checking of hardware systems Ghiath AL SAMMANE VDS group : Verification & Modeling of Digital systems.
Speaking Bluntly about SharpHDL: Some Old Stuff and Some Other Proposed Future Extensions Gordon J. Pace & Christine Vella Synchron’05 Malta, November.
Types for Programs and Proofs Lecture 1. What are types? int, float, char, …, arrays types of procedures, functions, references, records, objects,...
CAS- 734 (Presentation -1) By : Vasudha Kapil
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
B. Fernández, D. Darvas, E. Blanco Formal methods appliedto PLC code verification Automation seminar CERN – IFAC (CEA) 02/06/2014.
A Locally Nameless Theory of Objects 1.Introduction:  -calculus and De Bruijn notation 2.locally nameless technique 3.formalization in Isabelle and proofs.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
Model construction and verification for dynamic programming languages Radu Iosif
ASPfun: A Distributed Object Calculus and its Formalization in Isabelle Work realized in collaboration with Florian Kammüller and Henry Sudhof (Technische.
1 Model Checking of Robotic Control Systems Presenting: Sebastian Scherer Authors: Sebastian Scherer, Flavio Lerda, and Edmund M. Clarke.
Verification & Validation By: Amir Masoud Gharehbaghi
Theory-Aided Model Checking of Concurrent Transition Systems Guy Katz, Clark Barrett, David Harel New York University Weizmann Institute of Science.
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
ECE/CS 584: Verification of Embedded Computing Systems Model Checking Timed Automata Sayan Mitra Lecture 09.
A Mechanized Model of the Theory of Objects 1.Functional  -calculus in Isabelle 2.Confluence Proof in Isabelle 3.Ongoing Work, Applications, Conclusion.
Automated Formal Verification of PLC (Programmable Logic Controller) Programs
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
Carnegie Mellon Vadim Zaliva, Franz Franchetti Carnegie Mellon University Department of Electrical and Computer Engineering Funded by the DARPA I2O HACMS.
Interface specifications At the core of each Larch interface language is a model of the state manipulated by the associated programming language. Each.
Sub-fields of computer science. Sub-fields of computer science.
Functional Programming
Formal methods: Lecture
Sparkle a functional theorem prover
Lecture 5 Floyd-Hoare Style Verification
IS 2935: Developing Secure Systems
CSEP590 – Model Checking and Automated Verification
A Design Structure for Higher Order Quotients
Formal Methods in software development
A Refinement Calculus for Promela
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Sub-system interfaces
Programming Languages
Presentation transcript:

Towards a HOL Framework for the Deductive Analysis of Hybrid Control Systems ADPM’2000 Norbert Völker University of Essex, England

Two Tanks System V0V0 V2V2 V1V1 L Given a controller, verify that the tanks do not overflow and an equilibrium is reached.

Controllers PLC Languages Plants Differential Equations Control Loops Requirements Isabelle/HOL model verify properties and requirements The Idea ODE solverModel checker

HOL Version of higher order predicate logic designed for mechanical hardware verification. Polymorphic type system:   ,   ,  list, … Very expressive due to abstraction and quantification over functions. Widely studied and well understood logical systems. Methodology of embedding other formalisms in HOL, for example subsets of VHDL and Java.

Isabelle/HOL Popular, interactive HOL theorem proving assistant. Stresses logical safety - avoidance of inconsistency. Supports safe theory extension by definitions, data types, primitive recursive functions,... Comes with libraries: nat, int, real, set,.... Open and extendible Proof results from external tools can be imported via oracles.

Discrete Components in HOL f   stream = (    ) f ::  stream   stream causal f =  g.  n x. take n (f x) = g (take n x) stream operators, LTL operators transition systems, automata a  a  a  a  b  b  b  b 

Real Time clock = (    ) constant T :: clock T  T 1 T 2 T 3         Clocks are strictly monotonous, unbounded and start at 0. Conceptual clocks - cycle duration can vary

Function Blocks in HOL IEC PLC programming languages Structured Text (ST) and Sequential Function Charts (SFC) Function blocks written in an idealised subset of ST/SFC are mapped to automata in HOL. Mapping is similar to writing an interpreter in a functional programming language. Automata are not executed - size is not important as long as there is a compact representation in HOL. The HOL embedding defines a semantics.

A Verifiable Subset of ST Restriction to function block level: no configurations, resources, tasks or scheduling Omission of absolute, global, reference or retentive variables. Reactive model: actions are atomic Idealised data types: Int, Bool, String, records, arrays Disregard of implementation limitations. Function block invocation has no side effects!

Real Analysis in Isabelle/HOL Axiomatic type class V of finite-dimensional, normed vector spaces over  Limits, continuity, differentiation Type  flow = (    ) Differentiation operator D:: (  :: V ) flow   flow Lots of elementary lemmas and theorems. Currently no integration, exp, sqrt, ln, sin, … Currently 17 K theory files, 95 K proof code files.

Differential Systems in HOL A differential system (f,x 0 ) without input is a transition system  diffsys = ([ ,  ]   )   where f is continuous and  :: V. Behaviour is given by the solution of the associated differential equation bhv D ::  diffsys   flow bhv D (f, x 0 ) = (  g. g 0 = x 0  D g = f  g) where  is Hilbert’s choice operator. This does not mean we have solved the ODE.

Plants in HOL   F F ::  stream   flow causal F Transition systems (f,y 0 ) f :: [ ,  ]  , y 0 ::   a. continuous (f a) g 0 = bhv D (f (x 0), y 0 ) g (n+1) = bhv D (f (x (n+1), g n (T (n+1))) g 0 g 1 g 2 g 3 g 4

A Control Loop in HOL ttcttp B  B  B                4,4 tt = feedback (ttp  ttc)  4,4 0 ttc ::  stream  (B  B  B) stream ttp :: (B  B  B) stream  (        ) stream

Verification Use standard Isabelle proof strategies and tools: –induction, case distinctions, algebraic manipulation –conditional term rewriting –proof search algorithms Problems: –command line user interface –still relatively low level of proofs –real number library not well developed yet –algebraic manipulation often cumbersome –few decision procedures –analytically intractable systems remain intractable in HOL

What’s There HOL models of automata, stream operators, LTL operators, PLC language subsets, differential and hybrid systems. The beginnings of a HOL Real Analysis library. Small verification examples (standard function blocks, traffic light, container control) Strong points: –Compositional model of hybrid systems as causal functions on stream and flows. –Verification lemmas yield understanding –Trustworthiness of Isabelle/HOL

What’s Missing Models of bigger/ more faithful PLC language subsets More automation of HOL modelling and proofs Connection to other tools A better theorem prover front-end. Comprehensive Real Analysis and Control theory libraries Bigger examples Verification of function block libraries An answer to: What contribution can HOL make?

Questions or Comments?

Transition Systems in HOL ( ,  ) trsys = ([ ,  ]   )   bhv T :: [( ,  ) trsys,  stream ]   stream bhv T (f,y 0 ) x 0 = y 0 bhv T (f,y 0 ) x (n+1) = f (x n) (bhv T (f,y 0 ) x n) Theorem: causal bhv T

Automata in HOL ( , ,  ) automaton = ( ,  ) trsys  ([ ,  ]   ) bhv A :: [( , ,  ) automaton,  stream ]   stream bhv A (S,w) x n = w (x n) (bhv T S x n) Theorem: causal bhv A

SFC Controller S0 S1 S2 S3 S4R S S S Start T 1  S1.T T 2  S2.T Level  L  L   Level V0 V2 V1  bool  level time V0 V1 V2

Controller in HOL ttc_autom :: (   ,   , B  B  B) automaton ttc_autom = ((ttc_tf, (0,0)), ttc_outf ) ttc_tf :: [   ,    ]     ttc_tf (level, t) (step, t 0 ) = ifstep = 0 then (1,t) else ifstep = 1  T 1  t  t 0 then (2,t) else if step = 2  T 2  t  t 0 then (3,t) else if step = 3  Level  L  then (4,t) else if step = 4  Level  L  then (3,t) else (step, t 0 )

Controller in HOL (continued) ttc_outf :: [   ,    ]  B  B  B ttc_outf (level, t) (step, t 0 ) = ifstep = 0 then (False,False,False) else ifstep = 1 then (True, False, False) else if step = 2 then (True, True, False) else if step = 3 then (True, True, True) else (True, False, False)

General Hybrid Systems     g :: [  stream,  flow]   stream   flow causal g g