Safety Critical Systems 4 Formal Methods / Modelling T 79.5303.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

Formal Methods and Testing Goal: software reliability Use software engineering methodologies to develop the code. Use formal methods during code development.
© Fachgebiet Softwaretechnik, Heinz Nixdorf Institut, Universität Paderborn 2.4 The Z Notation [Reference: M. Spivey: The Z Notation, Prentice Hall]
LIFE CYCLE MODELS FORMAL TRANSFORMATION
Software system modeling
Verification of Hybrid Systems An Assessment of Current Techniques Holly Bowen.
August Moscow meeting1August Moscow meeting1August Moscow meeting11 Deductive tools in insertion modeling verification A.Letichevsky.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
VIDE als voortzetting van Cocktail SET Seminar 11 september 2008 Dr. ir. Michael Franssen.
ISBN Chapter 3 Describing Syntax and Semantics.
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
Software Reliability CIS 640 Adapted from the lecture notes by Doron Pelel (
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture 05.
The Z Specification Language
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
Shaoying Liu Department of Computer Science
Formal Methods: Z CS 415, Software Engineering II Mark Ardis, Rose-Hulman Institute March 18, 2003.
Cleanroom Engineering and the B-Method: A Comparison Drew Connelly.
Course Summary. © Katz, 2003 Formal Specifications of Complex Systems-- Real-time 2 Topics (1) Families of specification methods, evaluation criteria.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Models of Computation for Embedded System Design Alvise Bonivento.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
Course Summary. © Katz, 2007 Formal Specifications of Complex Systems-- Real-time 2 Topics (1) Families of specification methods, evaluation criteria.
Describing Syntax and Semantics
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Requirements Expression and Modelling
Compositional IS Development Framework Application Domain Application Domain Pre-existing components, legacy systems Extended for CD (ontologies) OAD Methods.
Safety Critical Systems 4 Formal Methods / Modelling T
Safety-Critical Systems 6 Certification
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
Reliable Design of Safety Critical Systems Dr. Abhik Roychoudhury School of Computing
Introduction to Formal Methods Based on Jeannette M. Wing. A Specifier's Introduction to Formal Methods. IEEE Computer, 23(9):8-24, September,
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
Framework for the Development and Testing of Dependable and Safety-Critical Systems IKTA 065/ Supported by the Information and Communication.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
1 Introduction to Software Engineering Lecture 1.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
Safety-Critical Systems 5 Testing and V&V T
Page 1 Advanced Technology Center HCSS 03 – April 2003 vFaat: von Neumann Formal Analysis and Annotation Tool David Greve Dr. Matthew Wilding Rockwell.
Requirements Specification. Welcome to Software Engineering: “Requirements Specification” “Requirements Specification”  Verb?  Noun?  “Specification”
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Semantics In Text: Chapter 3.
Syntax and Semantics CIS 331 Syntax: the form or structure of the expressions, statements, and program units. Semantics: the meaning of the expressions,
Formal Methods.
Safety-Critical Systems 4 Formal Methods / Modelling
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Verification & Validation By: Amir Masoud Gharehbaghi
HACNet Simulation-based Validation of Security Protocols Vinay Venkataraghavan Advisors: S.Nair, P.-M. Seidel HACNet Lab Computer Science and Engineering.
1 Abstract Model Specification. 2 Explicitly describes behavior in terms of a model using well-defined types (viz. set, sequences, relations, functions)
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
1 CEN 4020 Software Engineering PPT4: Requirement analysis.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
Formal Methods. What Are Formal Methods Formal methods refers to a variety of mathematical modeling techniques that are applicable to computer system.
Principles of Programming & Software Engineering
Introduction to Formal Methods
Algorithms and Problem Solving
Formal Techniques (CS340 © John C. Knight 2004)
Logical architecture refinement
IS 2935: Developing Secure Systems
Programming Languages 2nd edition Tucker and Noonan
Software system modeling
Programming Languages 2nd edition Tucker and Noonan
Presentation transcript:

Safety Critical Systems 4 Formal Methods / Modelling T

Formal Methods and Safety-Critical Systems Formal Methods are used in expressing requirements, design and analysis of a safety critical software and hardware. There exists a need for using formal methods from writing requirements to verifying the system fullfilling those.

Method Method (system engineering) consists of: 1) Underlying model of development (process) 2) Language (expressing formal specification) 3) Defined, ordered steps (phases) 4) Guidance for applying steps in a coherent manner (instructions)

Semi-formal Requirements/Specification Requirements should be inambigious, complete, consistent and correct. - Natural language has the intepretation possibility. More accurate description needed. - Using pure mathematic notation – not always suitable for communication with domain expert. - Formalised Methods are used to tackle the requirement engineering. (Structured text, formalised English).

Domain Expert(s) Text Validation Consistency Validation Model Informal Verification Consistency Implement. Validation Verification (Testing) Consistency (another) Model  Formal Verification

Formal Methods/ Model orientated These languages involve the explicit specification of a state model - system‘s desired behaviour with abstract mathematical objects as sets, relations and fucntions. - VDM (Vienna Development Method) ISO standardisied. - Z-language - B-Method

Formal Methods/ Property orientated Property orientated include axiomatic and algebraic methods. -Axiomatic use first order predicate logic to express pre/post conditions over abstract data types (Larch/ADA, Sternol) -Algebraic methods are based on multi and order sorted algebras and relate properties of the system to equations over entities of the algebra (Act One, Clear and varities of OBJ)

Formal Methods/Process orientated Process algebras have been developed to meet the needs of concurrent systems. -Theories behind Hoare‘s Communicating Sequential Processes (CSP) and Milner‘s Calculus of Communicating Systems (CCS). -Protocol specification language LOTOS is based on combination of Act One and CCS.

Language/Method selection criteria Good expressiveness Core of the language will seldom or never be modified after its initial development, it is important that the notation fulfils this criterion. Established/accepted to use with Safety Critical Systems Possibility of defining subset/coding rules to allow efficient automatic processing by tools. Support for modular specifications – basic support is expected to be needed Temporal expressiveness Tool availability

Formal Methods/ Z-language Z-language bases on first order predicate logic and set theory. - The specification expressed in Z-notation is divived into smaller parts – schemas - These schemas describe the statical and dynamical characteritics of the system: static: possible states, invariants dynamic: possible operations, pre/post states -Z is an exellent tool for modelling data, state and operations

Simple example of Z notation ___BirthdayBook_______ known:PNAME birthday: NAME ‌→ DATE _____________________ known = dom birthday _____________________ ___AddBirthday________ ∆BirthdayBook name?:NAME date?:DATE _____________________ name? /€ known birthday’ =birthdayU{name?‌→date?} _____________________ ___FindBirthday____________ ΞBirthdayBook name?:NAME date!:DATE _________________________ name?€ known date! = birthday(name?) _________________________ ___Remind________________ Ξ BirthdayBook today?:DATE cards!:PNAME _________________________ cards!={n:known|birthday(n)=today?} _________________________

Formal Methods/ B-method B is quite well-known. Although not as established as Z, B figures in some remarkable success stories of industrial applications of formal methods, eg by MATRA and (B Toolkit/UK) - B-method uses Abstract Machine Notation (AMN) for specification and implementation.

Formal Methods/ B-method -Like Z, B is based on set theory and provides a rich set of operations. -B includes facilities for modular specifications, although not as powerful as those of Z. -The temporal expressiveness of B is poor. Only relations between a state and the next can be expressed.

Modeling Requirements Models needed for communicating with domain experts (simulation) Automatic verification (model checker, theorem proving)

Some Modeling Styles  Black Box Glass Box View point: versus FunctionalObject-based Decomposition: versus Textual Blabla  GFHP  Graphical Representation: versus

Model Verification e.g. „A point may never move when a route is locked.“ Challenger  Proof e.g. challenger is false in the following case: User: set route A System: steer point 1 left HW: point 1 at left User: set point 1 right System: steer point 1 right CONFLICT!!! Domain Expert Verifier Verification Support Tool Requirements Model Requirements Modeling Language

Languages of Logic –Propositional Logic Statements –(1st Order) Predicate Logic (FOPL) Statements quantified ( ,  ) over things (objects!) –Linear Temporal Logic (LTL) Statements quantified ( , , G, F, H, P) over things and time –Computational Tree Logic (CTL) Statements quantified ( , , G, F, H, P, ,  ) over things, time and worlds (modal logic) –Enhanced Regular Expression Logic (ERE) Statements about occurrence patterns (seq, sel, itr, par) of events and conditions causing actions Note: The list above is neither complete nor it does necessarily imply any hierarchy! S S t S t S t

(Some) Languages of Logic Objects ,  Time G, F, H, P Worlds ,  Propositional Logic Predicate Logic Modal Logic Temporal Logic (LTL) CTL ERE? DL

Verification Technologies Model Checking Theorem Proving Objects ,  Time G, F, H, P Worlds ,  Propositiona l Logic Predicate Logic Moda l Logic Temporal Logic (LTL) CTL ERE? DLDL

Tools for Validation & Verification Tools for Validation –Static analysers derive implicit information about a model (or a program) Examples: KeY, VDMTools (IFAD), … –Simulators for executable specifications Examples: UML (Cassandra), MATLAB/Simulink, Statemate, … Tools for Verification –Model checkers for “brute force” enumeration of states Examples: Alloy, SATO, SMV/NuSMV, SPIN, Statemate, UPPAAL, Validas, … –Theorem provers provide support for algebraic proofs of model properties Examples: ACL2, Alloy, eCHECK (Prover Technologies), KIV, PVS (SRI Inc.), TRIO-Matic, VSE II, …

Statemate modeling Based on Harel statecharts from 80‘s Functional decomposition Used years in aviation and car industry Mainly for simulating and validating functionality (Test cases) Model checker for verification

Language of Statemate Finite State Machines (FSM): A virtual machine that can be in any one of a set of finite states and whose next states and outputs are functions of input and the current state. Hierarchy: Structure: A state may consist of states which consists of states…. Priority Rule: Priority is given to the transition whose source and target states have a higher common ancestor state. Concurrency: “Processes that may execute in parallel on multiple processors or asynchronously on a single processor.” IEEE 729 S1S2 E1 E2 S1_S2 E1 E2F1F2 S1S2 S11 S12 S21 S22 “History Connector” S12_S3 S22S21 S1 E1 E2 E3 S2 H

Functional Decomposition Functional decomposition breaks down complex systems into a hierarchical structure of simpler parts. Breaking a system into smaller parts enables users to understand, describe, and design complex systems. Functional decomposition consists of the following steps: –Define the system context. –This will help define the system boundaries. –Describe the system in terms of high-level functions and their interfaces. –Refine the high-level functions and partition them into smaller, more specific functions.

Functional Decomposition Hierarchy Level 0 („Context-Diagram“) External Data Sink External Data Source Hierarchical Structured Activity Chart Bottom-Up Top-Down Hierarchy Level 1 Hierarchy Level 2

Formal Methods Home assignments: 11.2 What problems are associated with specifications written in natural language? Explain what is meant by a 'schema' in Z, and describe its basic form. Please to by 23 of March 2006 References: I-Logix, KnowGravity