Formal Verification for UML/SysML models

Similar documents
Distributed Systems Programming (F21DS1) Formal Verification

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements

Fachgebiet Softwaretechnik, Heinz Nixdorf Institut, Universität Paderborn. 2.3 Timed Automata and Real-Time Statecharts

Formal Verification of Business Continuity Solutions

T Reactive Systems: Kripke Structures and Automata

Introduction to Linear-Time Temporal Logic. CSE 814 Introduction to LTL

Simulink 모델과 C/C++ 코드에대한매스웍스의정형검증툴소개 The MathWorks, Inc. 1

Timo Latvala. January 28, 2004

Test and Evaluation of Autonomous Systems in a Model Based Engineering Context

Automated Freedom from Interference Analysis for Automotive Software

Formal Support for QVT-Relations with Coloured Petri Nets

[module 2.2] MODELING CONCURRENT PROGRAM EXECUTION

Research Collection. Formal background and algorithms. Other Conference Item. ETH Library. Author(s): Biere, Armin. Publication Date: 2001

Finite State Verification. CSCE Lecture 14-02/25/2016

Software Model Checking: Theory and Practice

want turn==me wait req2==0

Finite State Verification. CSCE Lecture 21-03/28/2017

Formal Technology in the Post Silicon lab

Formal Specification and Verification

Practical Model-based Testing With Papyrus and RT-Tester

Model Checking. Automatic Verification Model Checking. Process A Process B. when not possible (not AI).

Specifying circuit properties in PSL. (Some of this material is due to Cindy Eisner and Dana Fisman, with thanks) See also the Jasper PSL Quick Ref.

Motivation State Machines

Formal Methods for Software Development

ECE 587 Hardware/Software Co-Design Lecture 12 Verification II, System Modeling

IODINE: A Tool to Automatically Infer Dynamic Invariants for Hardware Designs

Software Testing IV. Prof. Dr. Holger Schlingloff. Humboldt-Universität zu Berlin

CSc 225 Algorithms and Data Structures I Case Studies

Formal Verification Adoption. Mike Bartley TVS, Founder and CEO

By: Chaitanya Settaluri Devendra Kalia

Distributed Systems Programming (F21DS1) SPIN: Formal Analysis I

OMG Systems Modeling Language Tutorial May, 2012

Self Stabilization. CS553 Distributed Algorithms Prof. Ajay Kshemkalyani. by Islam Ismailov & Mohamed M. Ali

Leveraging Formal Methods Based Software Verification to Prove Code Quality & Achieve MISRA compliance

Verification and Validation of Models for Embedded Software Development Prashant Hegde MathWorks India Pvt. Ltd.

Specifying circuit properties in PSL

M. De Wulf, L. Doyen,J.-F. Raskin Université Libre de Bruxelles Centre Fédéré en Vérification

Applications of Program analysis in Model-Based Design

School of Computer & Communication Sciences École Polytechnique Fédérale de Lausanne

Practical Approaches to Formal Verification. Mike Bartley, TVS

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning

Equivalence of NTMs and TMs

Formal Methods. CITS5501 Software Testing and Quality Assurance

Modelling and verification of BPEL business processes

Binary Decision Diagrams and Symbolic Model Checking

CITS5501 Software Testing and Quality Assurance Formal methods

Modeling Requirements, Architectures, Behaviour...

Thread Synchronization: Too Much Milk

Leveraging Formal Verification Throughout the Entire Design Cycle

EE249 Discussion Petri Nets: Properties, Analysis and Applications - T. Murata. Chang-Ching Wu 10/9/2007

Thread Synchronization: Foundations. Properties. Safety properties. Edsger s perspective. Nothing bad happens

Coverability Graph and Fairness

Regression Verification - a practical way to verify programs

Lecture 2. Decidability and Verification

Lectures 20, 21: Axiomatic Semantics

Proving the Correctness of Distributed Algorithms using TLA

Formal Methods in Software Engineering. Lecture 07

15-122: Principles of Imperative Computation (Section G)

Lecture 1: Introduction to distributed Algorithms

Patrick Trentin Formal Methods Lab Class, March 03, 2017

Leveraging Formal Methods for Verifying Models and Embedded Code Prashant Mathapati Application Engineering Group

A Framework for Asynchronous Circuit Modeling and Verification in ACL2

SPIN: Introduction and Examples

Some notes about Event-B and Rodin

Reachability Analysis

2nd Belgian-Dutch workshop on Software Evolution

Test Scenarios and Coverage

Lecture 7: Mutual Exclusion 2/16/12. slides adapted from The Art of Multiprocessor Programming, Herlihy and Shavit

Computing with Infinitely Many Processes under assumptions on concurrency and participation -M.Merritt&G.Taubenfeld. Dean Christakos & Deva Seetharam

How to Verify a CSP Model? February 28, 2009

UMLEmb: UML for Embedded Systems. I. Introduction. Ludovic Apvrille Eurecom, office 470

The Spin Model Checker : Part I/II

Verifiable Hierarchical Protocols with Network Invariants on Parametric Systems

Reducing Fair Stuttering Refinement of Transaction Systems

Verifying Parallel Programs

Model Checking with Automata An Overview

INF672 Protocol Safety and Verification. Karthik Bhargavan Xavier Rival Thomas Clausen

Hardware Design Verification: Simulation and Formal Method-Based Approaches William K Lam Prentice Hall Modern Semiconductor Design Series

OMEGA2. Profile & tools for system modelling and verification with UML 2.x & SysML. Iulian OBER, Iulia DRAGOMIR IRIT / University of Toulouse

Administrivia. ECE/CS 5780/6780: Embedded System Design. Acknowledgements. What is verification?

Automatic synthesis of switching controllers for linear hybrid systems: Reachability control

Patrick Trentin Formal Methods Lab Class, Feb 26, 2016

Using Choice and Junction Points in RSARTE vs RoseRT

Verification of Tree-Based Hierarchical Read-Copy Update in the Linux Kernel

Foundations of Computing

Hybrid Verification in SPARK 2014: Combining Formal Methods with Testing

Hierarchical Petri Net Simulator: Simulation, Design Validation, and Model Checking Tool for Hierarchical Place/Transition Petri Nets

Safety and liveness for critical sections

Intro to UPPAAL. Gerd Behrmann Kim Larsen. BRICS & Aalborg University. Intro to UPPAAL p.1/23

Foundations, Reasoning About Algorithms, and Design By Contract CMPSC 122

Leslie Lamport: The Specification Language TLA +

On the Definition of Sequential Consistency

Lecture 1 Contracts. 1 A Mysterious Program : Principles of Imperative Computation (Spring 2018) Frank Pfenning

Last time. Reasoning about programs. Coming up. Project Final Presentations. This Thursday, Nov 30: 4 th in-class exercise

Reasoning about programs

C07: Testing and JUnit

The Application of Formal Technology on Fixed-Point Arithmetic SystemC Designs

Overview of Timed Automata and UPPAAL

Towards the integration of security patterns in UML Component-based Applications

Lecture 11 Lecture 11 Nov 5, 2014

Transcription:

Formal Verification for UML/SysML models IBM Research Lab - Haifa

Content Formal verification v.s. testing Correctness properties Formal verification for Rhapsody models 2

Formal Verification Desired Properties Model Analysis Does the system obey its requirements? Demonstrate the cases where the system fails Exhaustive search for bugs In the absence of requirements Try to violate universal rules that all systems should obey 3

From models to models A model of a system: UML / SysML Analysis model: finite state machine (mathematical) Yes, these are huge! FV algorithms analyze them without building them 4

Computations Verification amounts to analyzing computations looking for possible bad states Imagine a system that reacts to its inputs and changes states Initial state 2 bits of input Assuming n Boolean variables: 5 2 n different states

Testing In testing we run the system on a single path through the computation tree Didn t hit an error? We run again. And again. And again 6

Formal Verification Formal verification uses mathematics rather than chance 7

Formal Verification Formal verification uses mathematics rather than chance 8

Formal Verification Formal verification uses mathematics rather than chance 9

crit_st proc2 updating IBM Formal verification for UML/SysML The user creates behavioral models The user defines correctness properties Mutual exclusion Object: proc1 State: Object: State: always (door_unlocked -> speed=0) never (P1.critical & P2.critical) 10 Fail + sequence diagram Pass

Correctness properties First rule: Second rule: know what you want to verify! Say it clearly Formal verification uses temporal specification languages Formally defined Powerful Not so easy to read / write Template properties hide the temporal language Easy to understand, easy to use Limited expressibility 11

Internal Non-Determinism Find scenarios in which there are two (or more) enabled transitions from the same state Model independent property Non determinism Can these two guards hold at the same time? check for ND transitions 12

Out of Bounds Check that attributes cannot be assigned with out-of-bounds values Model independent property Out-Of-Bounds check attribute bounds 13

Mutual Exclusion The user specifies two distinct states in two different objects The tool verifies that these states can never be active at the same time Model specific property 14

Invariants An invariant is an expression that should hold at all times Invariant Invariant expression: (state(a1) = done) -> (a1.x > 0) Invariant expressions can refer to states and attributes a1 is an object name state(a1) is the current state of a1 (can be hierarchical) a1.x is the attribute x of a1 Model specific property 15

Dead Code Find states that cannot be reached Find transitions that cannot fire Model independent property Dead States check for dead states 16

Deadlock Freedom A deadlock is a situation in which no progress can be made regardless of what the environment does. In other words, no transitions can ever be fired Model independent property Deadlock check for deadlocks 17

and more Template properties can be added and customized on-demand Should be tailored to in-house design methodology of specific customer Verification methodology: Template properties used by engineers Temporal logic used by verification expert Correctness properties should be part of the model 18

The Model Verifier Verifying UML/SysML (behavioral) specifications A subset defined for safety critical systems Rhapsody Mathematical representation of model and properties Problematic scenarios / Proofs Formal Engine 19

Contact information Ronen Levy Emerging Quality Technologies, Manager E-mail: ronenl@il.ibm.com Karen Yorav FV for UML project leader E-mail: yorav@il.ibm.com 20