Interface Automata 29-September-2011. Modeling Temporal Behavior of Component Component behaves with Environment Traditional (pessimistic) approach –

Slides:



Advertisements
Similar presentations
Formal Methods in Software Engineering
Advertisements

CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 14: Simulations 1.
Global States.
COMMUNICATING SEQUENTIAL PROCESSES C. A. R. Hoare The Queen’s University Belfast, North Ireland.
Remote Procedure Call (RPC)
Interface-based design Philippe Giabbanelli CMPT 894 – Spring 2008.
Alternate Software Development Methodologies
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 04. Other.
Objectives Detailed Object-Oriented Requirements Definitions
CPSC 668Set 14: Simulations1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
ITEC200 Week02 Program Correctness and Efficiency.
Introduction To System Analysis and Design
Interface-based Design of Embedded Systems Thomas A. Henzinger University of California, Berkeley.
CS 582 / CMPE 481 Distributed Systems Fault Tolerance.
An Introduction to Input/Output Automata Qihua Wang.
CPSC 668Set 16: Distributed Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Software Engineering, COMP201 Slide 1 Protocol Engineering Protocol Specification using CFSM model Lecture 30.
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
SE-565 Software System Requirements More UML Diagrams.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
Introduction To System Analysis and design
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 31 Slide 1 Service-centric Software Engineering 2.
SDS Foil no 1 How to make real systems: Implementation design, deployment and realisation.
Object-Oriented Systems Analysis and Design Using UML
Design Patterns.
Formal Model for Simulations Instructor: DR. Lê Anh Ngọc Presented by – Group 6: 1. Nguyễn Sơn Hùng 2. Lê Văn Hùng 3. Nguyễn Xuân Hậu 4. Nguyễn Xuân Tùng.
Modeling Process CSCE 668Set 14: Simulations 2 May be several algorithms (processes) runs on each processor to simulate the desired communication system.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Introduction To System Analysis and Design
Use Cases 1. Last week  Introduction to software engineering  How is it different from traditional engineering?  Introduction to specification  Operational.
Modelling III: Asynchronous Shared Memory Model Chapter 9 by Nancy A. Lynch presented by Mark E. Miyashita.
Architectures of distributed systems Fundamental Models
Java Threads 11 Threading and Concurrent Programming in Java Introduction and Definitions D.W. Denbo Introduction and Definitions D.W. Denbo.
 How are you going to collaborate?  How are you going to divide up work?  How are you going to make sure that changes work with other people’s code?
EEC 688/788 Secure and Dependable Computing Lecture 7 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
Design Analysis builds a logical model that delivers the functionality. Design fully specifies how this functionality will be delivered. Design looks from.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
6.852: Distributed Algorithms Spring, 2008 Class 13.
Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/ Input-output conformance testing for channel-based connectors 1.
CORRECTNESS CRITERIA FOR CONCURRENCY & PARALLELISM 6/16/2010 Correctness Criteria for Parallelism & Concurrency 1.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Chapter 2 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University Building Dependable Distributed Systems.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Computing Simulation in Orders Based Transparent Parallelizing Pavlenko Vitaliy Danilovich, Odessa National Polytechnic University Burdeinyi Viktor Viktorovych,
Programming in the Simple Raster Graphics Package (SRGP) Chapter 2.
May University of Glasgow Generalising Feature Interactions in Muffy Calder, Alice Miller Dept. of Computing Science University of Glasgow.
Protocol Specification Prof Pallapa. Venkataram Department of Electrical Communication Engineering Indian Institute of Science Bangalore – , India.
Systems Analysis and Design in a Changing World, Fourth Edition
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
Slide 1 Service-centric Software Engineering. Slide 2 Objectives To explain the notion of a reusable service, based on web service standards, that provides.
JAVA INTRODUCTION. What is Java? 1. Java is a Pure Object – Oriented language 2. Java is developing by existing languages like C and C++. How Java Differs.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
Chapter 8 Asynchronous System Model by Mikhail Nesterenko “Distributed Algorithms” by Nancy A. Lynch.
E81 CSE 532S: Advanced Multi-Paradigm Software Development Venkita Subramonian, Christopher Gill, Ying Huang, Marc Sentany Department of Computer Science.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
UML - Development Process 1 Software Development Process Using UML.
Basic Concepts and Definitions
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
Systems Analysis and Design in a Changing World, Fourth Edition
Sections Inheritance and Abstract Classes
Requirements Techniques, cont.
Service-centric Software Engineering
Logical architecture refinement
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
EEC 688/788 Secure and Dependable Computing
Presentation transcript:

Interface Automata 29-September-2011

Modeling Temporal Behavior of Component Component behaves with Environment Traditional (pessimistic) approach – Environment is free to behave as it wants to – Two components are compatible if no environment leads them into an error state Optimistic approach of Interface Automata – Components designed with assumptions about environment – Two components are compatible if some environment can make both of them work together In context of this course – Write code ONCE and know that it works

Interface Automata Interaction specified by synchronizing input and output actions – Internal actions of concurrent automata are interleaved asynchronously Input actions – Model methods that can be called – Receiving ends of communication channels Output actions – Model method calls – Messages being transmitted – Exceptions Component designed under environmental assumptions – i.e., an object works if methods called in specific order

Sample Automata Internal state machine externally invisible Labels – msg? means message received – send! means action sent out – Dot/arrow on interface species in- or out-connection – Internal transitions are arrows between states based upon interface interactions Let’s discuss possible valid/invalid interactions

Sample Interface Automata User – Designed to be used only with message-transmission services that cannot fail

Comp  User Compose Comp with User – msg? and msg! collapsed to msg; – Error state 6 upon second failed nack? Composition – Note how a “new” automata is created from the composition with its own In/Out actions Handling errors – Why does 6  have no exiting arrows? – Declared “Illegal” state(s)

Interface Automata Definition in paper – Review page 113 Compatibility and Composition – All independent actions are asynchronous – All shared actions force automata to synchronize state transitions Two automata P and Q are composable if – They don’t share states – There is no duplication of Input or Output actions – That is, “shared” means pairing Input with Output

Component Product Review Definition (p114) Legal environments – Steers away from Illegal states – How to specify? Use an Interface Automata! Environment Automata E – E is composable with R and non-empty – Input of E is the output of R – Illegal(R, E) = 

Example Channel wraps error-prone send (ack/nack) with an error-free get_token / put_token to ensure delivery – Parse this from the graphics

Final Notation Automata Product Composition: Comp  User Restricted Composition: Comp || User Nice features of composition – Associative (P || Q) ||R == P || (R || Q) if either is defined – Some automata cannot be composed in this restrictive way

Refinement Consider relation between abstract and concrete version of a component QuickComp (next slide) – Provides try-twice msg service – Provides try-once once service Shouldn’t QuickComp be considered a refinement of Comp?

QuickComp Comp QuickComp means QC refines C

Contravariance Refined automata must allow for (possibly) more legal inputs and (possibly) fewer outputs – Weaken the pre-condition – Strengthen the post-condition Notion of alternating simulation – Q refines P if – all input steps of P can be simulated by Q – all output steps of Q can be simulated by P – works because internal state transitions are invisible to external viewers Captures a simple kind of subclassing – If Q refines P then implementation Q is able to provide more services than specification P – Q must be consistent with P on shared services

More definitions Transitive: Q refines P and R refines Q – If P Q and Q R then P R Reflexive: P refines P – P P Refinement and compatibility are related – Replace P with Q if (a) P and Q are connected to the environment by same input/output; and (b) P Q

Refinement is Compositional Is P||R S||T? – One need only check two smaller cases – Is P S? – Is R T? Compositional reasoning is the key to dealing with large scale systems

Refinement and Composition Given interface automata P, Q, and R where – Q and R are composable – Input Q  Output R  Input P  Output R If P and R are compatible and P Q – Q and R are compatible – P||R Q||R

Single-Threaded Interface Automata Many compositions can be restricted to single- threaded – Client makes request (and then blocks); during this time client cannot alter state – Server receives request and once it has responded, it becomes quiescent and won’t alter state See Figure 7

Single-Threaded vs. Multi-Threaded