MaC Monitoring and Checking at Runtime Presented By Usa Sammapun CIS 700 Oct 10, 2005.

Slides:



Advertisements
Similar presentations
Copyright W. Howden1 Programming by Contract CSE 111 6/4/2014.
Advertisements

MaC Monitoring and Checking at Runtime (Continue) Presented By Usa Sammapun CIS 700 Oct 12, 2005.
A Survey of Runtime Verification Jonathan Amir 2004.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Introduction to Embedded Systems Chapter 14 Reachability Analysis (14.1, – ) Hao Zheng U of South Florida.
LASER From Natural Language Requirements to Rigorous Property Specifications Lori A. Clarke Work done in collaboration with Rachel L. Smith, George S.
ECE 720T5 Fall 2012 Cyber-Physical Systems Rodolfo Pellizzoni.
/ PSWLAB Efficient Decentralized Monitoring of Safety in Distributed System K Sen, A Vardhan, G Agha, G Rosu 20 th July 2007 Presented by.
Run Time Monitoring of Reactive System Models Mikhail Auguston Naval Postgraduate School Mark Trakhtenbrot Holon Academic Institute of.
ISBN Chapter 3 Describing Syntax and Semantics.
1 Simulator-Model Checker for Reactive Real-Time Abstract State Machines Anatol Slissenko University Paris 12 Pavel Vasilyev University Paris 12 University.
Atomicity in Multi-Threaded Programs Prachi Tiwari University of California, Santa Cruz CMPS 203 Programming Languages, Fall 2004.
SEERE, Neum 2009 Runtime verification of Java programs using ITL Vladimir Valkanov, Damyan Mitev Plovdiv, Bulgaria.
Lecture 4&5: Model Checking: A quick introduction Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
Probabilistic Verification of Discrete Event Systems Håkan L. S. Younes.
MaCS: Monitoring, Checking and Steering O. Sokolsky, S. Kannan, I. Lee, U. Sammapun, J. Shin, M. Viswanathan CIS, Penn M. Kim SECUi.com, Korea.
16/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Testing The process of verifying the software performs to the specifications.
System Design Research Laboratory Model-based Testing and Monitoring for Hybrid Embedded Systems Li Tan Jesung Kim Oleg Sokolsky Insup Lee University of.
November 18, 2004 Embedded System Design Flow Arkadeb Ghosal Alessandro Pinto Daniele Gasperini Alberto Sangiovanni-Vincentelli
Describing Syntax and Semantics
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
Testing and Monitoring at Penn An Integrated Framework for Validating Model-based Embedded Software Li Tan University of Pennsylvania September, 2003.
SDRL & RTG University of Pennsylvania 5/24/01 1 Run-time Monitoring and Checking Based on Formal Specifications Insup Lee Department of Computer and Information.
5/24/011 Advanced Tool Integration for Embedded Systems Assurance Insup Lee Department of Computer and Information Science University of Pennsylvania.
Formal Techniques for Verification Using SystemC By Nasir Mahmood.
Verification technique on SA applications using Incremental Model Checking 컴퓨터학과 신영주.
11/9/041 Bridging the gap between specification and implementation Insup Lee Department of Computer and Information Science University of Pennsylvania.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
Verification and Validation Overview References: Shach, Object Oriented and Classical Software Engineering Pressman, Software Engineering: a Practitioner’s.
1 Program Correctness CIS 375 Bruce R. Maxim UM-Dearborn.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Proof Carrying Code Zhiwei Lin. Outline Proof-Carrying Code The Design and Implementation of a Certifying Compiler A Proof – Carrying Code Architecture.
1 Boolean Algebra & Logic Gates. 2 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple.
Assertion Based Testing. Testing and verification Does the design function according to the specifications? Example.
(c) 2007 Mauro Pezzè & Michal Young The Big Picture.
Modeling and simulation of systems Model building Slovak University of Technology Faculty of Material Science and Technology in Trnava.
5/27/03MDES Supporting Model-Based Validation at Run-time Insup Lee and Oleg Sokolsky Department of Computer and Information Science University of.
Verification and Validation in the Context of Domain-Specific Modelling Janne Merilinna.
Programming Life Cycle Problem analysisunderstand the problem Requirements definition specify what program will do High- and low-level designhow it meets.
Safety-Critical Systems 5 Testing and V&V T
Requirements Specification. Welcome to Software Engineering: “Requirements Specification” “Requirements Specification”  Verb?  Noun?  “Specification”
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Semantics In Text: Chapter 3.
More on Correctness. Prime Factorization Problem: Write a program that computes all the prime factors of a given number Solution (Idea): Factors are less.
2015 Concurrency: logical properties 1 ©Magee/Kramer 2 nd Edition Chapter 14 Logical Properties Satisfied? Not satisfied?
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.
Constraints Assisted Modeling and Validation Presented in CS294-5 (Spring 2007) Thomas Huining Feng Based on: [1]Constraints Assisted Modeling and Validation.
Title 11/5/2000 eSimplex Architecture Using MaCS Insup Lee Oleg Sokolsky Moonjoo Kim Anirban Majumdar Sampath Kannan Mahesh Viswanathan Insik Shin and.
CSCI1600: Embedded and Real Time Software Lecture 28: Verification I Steven Reiss, Fall 2015.
Grigore Rosu Founder, President and CEO Professor of Computer Science, University of Illinois
Requirement Analysis SOFTWARE ENGINEERING. What are Requirements? Expression of desired behavior Deals with objects or entities, the states they can be.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 CEN 4020 Software Engineering PPT4: Requirement analysis.
4/22/02VU '021 Specification-Based Techniques for Validation at Run-time and Design-time* Insup Lee SDRL (Systems Design Research Lab) RTG (Real-Time Systems.
Real-time Systems Group University of Pennsylvania 5/12/98 Example: Railroad Crossing There are 3 processes: a train, a controller and a gate Safety property.
Real-time Systems Group University of Pennsylvania 10/13/98 1 Design-time and Run-time Assurance Insup Lee Department of Computer and Information Science.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
29/06/2016Verification Synchronous Languages Verification.
C++ Plus Data Structures
Verification and Validation Overview
Formally Specified Monitoring of Temporal Properties
runtime verification Brief Overview Grigore Rosu
Monitoring, Checking and Steering of Real-Time Systems
Run-time Verification of Software Systems
CSCI1600: Embedded and Real Time Software
The Zoo of Software Security Techniques
Presentation transcript:

MaC Monitoring and Checking at Runtime Presented By Usa Sammapun CIS 700 Oct 10, 2005

What is MaC? ► A verification technique –Goal: Ensure a software program runs correctly ► To understand software verification –Know how software is developed –Know how software is verified

Software Development Process ► Requirement and Properties What program should do –When AIBO dog walks, it must not fall Informal (English)  Formal (Logic, FSM) Requirement DesignImplement Walk  !(Fall)

Software Development Process ► Design Specification and Analysis How program fulfill requirements –AIBO dog coordinates his 4 legs Formal modeling (UML, FSM, Control theory) Analysis –Simulation –Verification (Model checking) Requirement Design Implement

Software Development Process ► Implementation Actual program (AIBO dog walking program in C++) Varification & Validation –Testing –Runtime verification Requirement Implement Design AIBO.c++ main() { int leg1,leg2; int leg3, leg4; … }

Verification ► Design –Model Checking ► Implementation –Testing –Runtime Verification MaC Monitoring and Checking At Runtime

Verification ► Design –Model Checking ► Implementation –Testing –Runtime Verification

Model Checking ► Given –Requirement & Properties –Model ► Verify –Explore all paths –Violate requirement ?? Walk  !(Fall) leg1 leg2 leg4 leg3 all-leg-down !walk leg1-up, leg4-up walk & !fall leg2-up, leg3-up walk & !fall leg1-up, leg2-up walk & fall

Model Checking ► Given –Requirement & Properties –Model ► Verify –Explore all paths –Violate requirement ?? Walk  !(Fall) leg1 leg2 leg4 leg3 all-leg-down !walk leg1-up, leg4-up walk & !fall leg2-up, leg3-up walk & !fall leg1-up, leg2-up walk & fall

Model Checking - GOOD ► Rigorous and Formal –Based on Mathematics ► Complete –Explore all paths

Model Checking - PROBLEM ► Check Design, not implementation –What if implementation does not follow model? ► Not scalable –What if the program is HUGH? Explore all paths might not be feasible

Verification ► Design –Model Checking ► Implementation –Testing –Runtime Verification

Testing ► We’ve seen it –Run actual program with different inputs –See if outputs are what we want ► Ex. AIBO –Run AIBO dog –See whether or not AIBO dog falls ► Good –Check directly the implementation

Testing – PROBLEM ► Not rigorous, Not formal –Possibly random inputs ► Not complete –What if bugs never show up during test ?? –What if it’s not AIBO, but a heart device !?!

Verification ► Design –Model Checking ► Implementation –Testing –Runtime Verification MaC Monitoring and Checking At Runtime

Runtime Verification ► Given –Requirement & Properties –Implementation ► Ensures the current program execution follows its formal requirements Walk  !(Fall)

Runtime Verification Program (ex. AIBO)Verifier (MaC) 2. Execution Information 3. Check 4. Sat / Unsat 4. Feedback User 1. Specify formal requirements (Walk  !Fall)

Runtime Verification ► Rigorous and Formal ► Done at implementation ► Not complete –Guarantee for current execution

Runtime Verification ► MaC –Monitoring and Checking at Runtime –Components MaC verifier MaC formal language

MaC Verifier Program MaC Verifier Execution Information Check Sat / Unsat Feedback User Event Recognizer Checker Injector Abstract Info

MaC Verifier and Language Program Instrumented Program MaC Compiler PEDLMEDL MaC Specification Event Recognizer CheckerInjector MaC Verifier SADL 1. Which program info to probe 2. How to map info to properties System PropertiesWhere / when to steer

Abstract Information ► To capture roughly and abstractly what the program is doing ► Events –Instantaneous incidents –such as variable updates update(position) ► Conditions –Proposition about the program that may be true/false/undefined for a duration of time –such as position < 50 true position = 40position = 55position = 60 Time position < 50 false position = 55 position = 60 s1s1 s2s2 s3s3 s4s4 position = 55position = 40position = 55 position < 50

Events ► e - variable update, start/end method ► e1 || e2 - or ► e1 && e2 - and ► start(c) - instant when condition c becomes true ► end(c) - instant when condition c becomes false ► e when c - e occurs when condition c is true

Conditions ► Conditions interpreted over 3 values: true, false and undefined. ► c - boolean expression ► !c - not c ► c 1 || c 2 - or ► c 1 && c 2 - and ► c 1 -> c 2 - imply ► defined(c) - true when c is defined ► [e 1, e 2 ) - interval e1e1 e2e2 [e 1,e 2 )

MaC Language ► PEDL –How execution information transform into events and conditions ► MEDL –Specify properties using events and conditions

PEDL and MEDL Java ProgramPEDLMEDL Abstraction - When train position is between 30 and 50 - When gate starts/ends being down Railroad Crossing Property: - If train is crossing, then gate must be down - Train is crossing when position is between 30 and 50 Abstraction - When gate is down Check - If train is crossing, then gate must be down position = 0 position = 20 position = 40 Gate.down() position = 55 Gate.up() position = 60 startGD endGD cross Violation gateDown cross

Instrumentation class Train { int position; main() { position = 0; position = 20; position = 40; position = 55; } Train.position; class Train { int position; main() { position = 0; send(x,0); position = 20; send(x,20); position = 40; send(x,40); position = 55; send(x,55); } + = Sent to Event Recognizer: [ (position,0), (position,20), (position,40), (position,55) ]

MaC Language - PEDL position = 0 Java ProgramPEDL Abstraction - When train position is between 30 and 50 - When gate starts/ends being down position = 20 position = 40 Gate.down() position = 55 Gate.up() position = 60 export event startGD, endGD; export condition cross; monobj Train.position; monmeth Gate.up(); monmeth Gate.down(); condition cross = (30 < RRC.position) && (RRC.position < 50); event startGD = endM(Gate.down()); event endGD = startM(Gate.up()); startGD endGD cross Railroad Crossing Property: - If train is crossing, then gate must be down - Train is crossing when position is between 30 and 50 position = 0 position = 20 position = 40 Gate.down() position = 55 Gate.up() position = 60

MEDL – Property Language ► Composed using –Events –Conditions –Connectives ► Properties –Alarms: events that must never occur alarm elevator = door_open when ! floor_level –Safety Properties: conditions that must always hold true property rail_road = train_cross  gate_down

MaC Language - MEDL PEDL MEDL import event startGD, endGD; import conditions cross; condition gateDown = [startGD, endGD); property safeRRC = cross -> gateDown; startGD endGD cross Violation gateDown cross Abstraction - When gate is down Check - If train is crossing, then gate must be down Railroad Crossing Property: - If train is crossing, then gate must be down - Train is crossing when position is between 30 and 50

Current Work ► Timing properties ► Probabilistic properties ► Dynamic MaC ► Steering using control theory

Quantitative Properties ► Time bound interval: e1e1 e2e2 e1e1 e2e2 s1s1 s2s2 s3s3 s4s4 s5s5 s1s1 s2s2 s3s3 s4s4 s5s5

Example ► A real-time task T must finish within 100 time units –startT – event when task T starts executing –endT – event when task T finishes executing