1 Generating FSMs from Abstract State Machines Wolfgang Grieskamp Yuri Gurevich Wolfram Schulte Margus Veanes Foundations of Software Engineering Microsoft.

Slides:



Advertisements
Similar presentations
.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
Advertisements

Chapter 10 Software Testing
Seyedehmehrnaz Mireslami, Mohammad Moshirpour, Behrouz H. Far Department of Electrical and Computer Engineering University of Calgary, Canada {smiresla,
Abstract State Machines, and lessons of an ASM-based project at Microsoft Yuri Gurevich ( Erdos #2 ) Microsoft Research.
SEP1 - 1 Introduction to Software Engineering Processes SWENET SEP1 Module Developed with support from the National Science Foundation.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
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.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Testing Components in the Context of a System CMSC 737 Fall 2006 Sharath Srinivas.
L ECTURE 2 S OFTWARE P ROCESSES 1. O BJECTIVES To describe outline process models for requirements engineering, software development, testing and evolution.
April 20, 2006 Model Program Based Black-Box Testing, Lentedagen, Vught, The Netherlands 1 Model Program Based Black-Box Testing Margus Veanes Foundations.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Data Structures and Programming.  John Edgar2.
Advanced Modeling Model Based Test Generation and Abstract state machine Language Keith Stobie Test Architect XML Web Services Microsoft Corporation.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Texas A&M University Department of Computer Science Sameh S. Sharkawi
Software Engineering CS B Prof. George Heineman.
-Nikhil Bhatia 28 th October What is RUP? Central Elements of RUP Project Lifecycle Phases Six Engineering Disciplines Three Supporting Disciplines.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
Introduction to ASMs Dumitru Roman Digital Enterprise Research Institute
Software Engineering Chapter 23 Software Testing Ku-Yaw Chang Assistant Professor Department of Computer Science and Information.
Chapter 8 – Software Testing Lecture 1 1Chapter 8 Software testing The bearing of a child takes nine months, no matter how many women are assigned. Many.
Software School of Hunan University Database Systems Design Part III Section 5 Design Methodology.
Chapter 2: Software Process Omar Meqdadi SE 2730 Lecture 2 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 21. Review ANALYSIS PHASE (OBJECT ORIENTED DESIGN) Functional Modeling – Use case Diagram Description.
RUP Design RUP Artifacts and Deliverables
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Model Based Testing Group 7  Nishanth Chandradas ( )  George Stavrinides ( )  Jeyhan Hizli ( )  Talvinder Judge ( )  Saajan.
Microsoft Research, Foundations of Software EngineeringW. Grieskamp et. al: Behavioral Compositions in Symbolic Domains Behavioral Composition in Symbolic.
1 Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 1 Adaptation to this.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Systems Analysis and Design in a Changing World, 3rd Edition
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
UHD::3320::CH121 DESIGN PHASE Chapter 12. UHD::3320::CH122 Design Phase Two Aspects –Actions which operate on data –Data on which actions operate Two.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
The Semantics of AsmL in a Proper Perspective Yuri Gurevich Microsoft Research.
Supporting Scenario-Based Requirements Engineering IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 24, NO. 12, DECEMBER, 1998 A. G. Sutcliffe, N. A. M.
Toward a Semantic Anchoring Infrastructure for Domain-Specific Modeling Languages Kai Chen Janos Sztipanovits Sandeep Neema Matthew Emerson Sherif Abdelwahed.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
CS251 – Software Engineering Lecture 9: Software Design Slides by Mohammad El-Ramly, PhD
Conformant Probabilistic Planning via CSPs ICAPS-2003 Nathanael Hyafil & Fahiem Bacchus University of Toronto.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Requirements Engineering-Based Conceptual Modelling From: Requirements Engineering E. Insfran, O. Pastor and R. Wieringa Presented by Chin-Yi Tsai.
CIM LAB MEETING Presentation on UML Rakesh Mopidevi Kwangyeol Ryu.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
 Programming - the process of creating computer programs.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Software Processes.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 4 Slide 1 Software Processes.
Introduction Complex and large SW. SW crises Expensive HW. Custom SW. Batch execution Structured programming Product SW.
Quality Assurance in the Presence of Variability Kim Lauenroth, Andreas Metzger, Klaus Pohl Institute for Computer Science and Business Information Systems.
Generalized Point Based Value Iteration for Interactive POMDPs Prashant Doshi Dept. of Computer Science and AI Institute University of Georgia
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
1 Process activities. 2 Software specification Software design and implementation Software validation Software evolution.
Executable Specifications: Foundations  MS Tools
IEEE Std 1074: Standard for Software Lifecycle
Model-Driven Analysis Frameworks for Embedded Systems
Software testing.
Algorithms and Problem Solving
Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer Low level programming language: A programming.
Overview Activities from additional UP disciplines are needed to bring a system into being Implementation Testing Deployment Configuration and change management.
Presentation transcript:

1 Generating FSMs from Abstract State Machines Wolfgang Grieskamp Yuri Gurevich Wolfram Schulte Margus Veanes Foundations of Software Engineering Microsoft Research ISSTA 2002, Rome, July 22-24

2 Outline Background What is an ASM? Why use ASMs? Modeling with ASMs Conformance Testing with ASMs FSM Generation Exploration of the FSM Test Execution Demo

3 Abstract State Machines Introduced by Yuri Gurevich Deep mathematical theory World wide user community (academia + industry) The Idea: A machine that describes a system on any (but particular) level of abstraction An operational specification of a system A very high-level program

4 A Sample ASM var A as Seq of Integer Swap() choose i,j in indices(A) where i A(j) A(i) := A(j) A(j) := A(i) Sort() step until fixpoint Swap() A = [2,3,1] A = [1,3,2] A = [1,2,3] A = [2,1,3] Nondeterminsm Parallelism

5 ASMs are evolving structures An ASM is a mathematical machine that represents a system as evolving state A state is given by the current values of the variables A step is a transaction (synchronous parallelism) that may update many variables at once In the sequential case, a program describes one step, a run is a sequence of consecutive steps. In the distributed case, each agent has a program, a distributed run is a partial order of agents’ steps (asynchronous parallelism)

6 Why is software error-prone? Some reasons: Premature coding Lack of confidence in descriptions Late feedback from customer Unforeseen feature interaction Lack of understanding in maintenance phase

7 Models solve these problems Engineering models help you to gain confidence in requirements and designs. Examples: Architectural, Mechanical, Electrical, etc. Software models help you understand the behavior of each level of abstraction, examples are: Steps required to carry out the system’s user scenarios How features/components interact with each other The behavior of subsystems like file storage and messaging

8 Models can be used everywhere ModelingValidation Refinement Verification ASM Model Implementation C/C++/C#/… Product Idea Are you building the product right ? Are you building the right product? What product are you building?

9 AsmL: A modeling toolkit AsmL is a powerful, ASM-based specification language Combines mathematical, object-oriented and component-oriented approaches Fully integrated with the.Net framework Can be used for documentation Integrated with MS Word and XML Can be used for testing Ongoing Integration with existing testing tools

10 A guideline for AsmL users 1. Begin building a model by considering its purpose; this guides abstraction decisions during development 1. Define model state 2. Define model transitions 2. Validate the model early and often to increase confidence that the model is faithful.  Check internal consistency  Check against customer expectations

11 Outline Background What is an ASM? Why use ASMs? Modeling with ASMs Conformance Testing with ASMs FSM Generation Exploration of the FSM Test Execution Demo

12 Using AsmL models for conformance testing ASM-Model Implementation Test OracleTest Cases Are run by Provides actual results for Pass No pass Provides expected results for Generates User Info

13 AsmL Model M The dual role of ASM models Test cases Random generation Reduce FSM tool IUT Call next action Get state AsmL Model M Testing harness Is S valid according to M? Fail: witness Pass S view FSM

14 FSM Generation Typically ASMs have infinite state space We introduce indistinguishability properties to group states into equivalence classes called hyperstates The non-discovery problem The problem of reaching all hyperstates is in general undecidable Improvement relations provide a partial solution to this problem A way to encode domain specific search strategies

15 FSM generation sample Generate an FSM from the stack specification. class Stack var s as Seq of Integer = [] Top() as Integerrequire s <> [] return first(stack) Pop() require s <> [] stack := rest(stack) Push(x as Integer) s := [x] + s Indistinguishability property: s=[]

16 The FSM construction [] [0] Push(0) [] Pop()Push(0) [0,0] Top() The tree can be pruned, if a hyperstate is reached that has “already” been visited [] [0,..] Push(0) Pop Top The generated FSM Pop()

17 The algorithm generate() step s = head(frontier) frontier := tail(frontier) step foreach a in Actions nextStates = explore Fire(s,a) step foreach t in nextStates transitions(s,a,t) := true if relevant(s,a,t) then frontier := frontier + [t] hypers := hypers union {GetHyperstate(t)}

18 Improvement relations relevant(s as State, a as Action, t as State) as Boolean forall g in goals where improved(bestState(g),t,g) bestState(g) := t return (h.GetHyperstate(t) notin hypers) or (exists g in h.goals() where h.improved(bestState(g),t,g))

19 Outline Background What is an ASM? Why use ASMs? Modeling with ASMs Conformance Testing with ASMs FSM Generation Exploration of the FSM Test Execution Demo

20 Demo “Run” the paper

21 Current Work Generalized properties (non-Boolean finite valued properties) Parameter generation for actions with parameters.Net attribute scheme design for annotating the model with test related meta information

22 For more information Check out the public website of AsmL: research.microsoft.com/fse/asml You can download AsmL 2 You need VS.NET You need Office XP for Word integration