Abstract State Machines, and lessons of an ASM-based project at Microsoft Yuri Gurevich ( Erdos #2 ) Microsoft Research.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

Variations of the Turing Machine
Advanced Piloting Cruise Plot.
1 Vorlesung Informatik 2 Algorithmen und Datenstrukturen (Parallel Algorithms) Robin Pomplun.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 1 Embedded Computing.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
Document #07-2I RXQ Customer Enrollment Using a Registration Agent (RA) Process Flow Diagram (Move-In) (mod 7/25 & clean-up 8/20) Customer Supplier.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Addition Facts
Year 6 mental test 10 second questions
2010 fotografiert von Jürgen Roßberg © Fr 1 Sa 2 So 3 Mo 4 Di 5 Mi 6 Do 7 Fr 8 Sa 9 So 10 Mo 11 Di 12 Mi 13 Do 14 Fr 15 Sa 16 So 17 Mo 18 Di 19.
ZMQS ZMQS
Solve Multi-step Equations
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Mathematics for Economics Beatrice Venturi 1 Economics Faculty CONTINUOUS TIME: LINEAR DIFFERENTIAL EQUATIONS Economic Applications LESSON 2 prof. Beatrice.
Data Structures Using C++
ABC Technology Project
5-1 Chapter 5 Theory & Problems of Probability & Statistics Murray R. Spiegel Sampling Theory.
1 Undirected Breadth First Search F A BCG DE H 2 F A BCG DE H Queue: A get Undiscovered Fringe Finished Active 0 distance from A visit(A)
2 |SharePoint Saturday New York City
VOORBLAD.
15. Oktober Oktober Oktober 2012.
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
BIOLOGY AUGUST 2013 OPENING ASSIGNMENTS. AUGUST 7, 2013  Question goes here!
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
© 2012 National Heart Foundation of Australia. Slide 2.
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
Addition 1’s to 20.
25 seconds left…...
H to shape fully developed personality to shape fully developed personality for successful application in life for successful.
Januar MDMDFSSMDMDFSSS
Week 1.
Analyzing Genes and Genomes
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Intracellular Compartments and Transport
PSSA Preparation.
Immunobiology: The Immune System in Health & Disease Sixth Edition
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Energy Generation in Mitochondria and Chlorplasts
CpSc 3220 Designing a Database
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
Introduction to ASMs Dumitru Roman Digital Enterprise Research Institute
1 Generating FSMs from Abstract State Machines Wolfgang Grieskamp Yuri Gurevich Wolfram Schulte Margus Veanes Foundations of Software Engineering Microsoft.
Executable Specifications: Foundations  MS Tools
Presentation transcript:

Abstract State Machines, and lessons of an ASM-based project at Microsoft Yuri Gurevich ( Erdos #2 ) Microsoft Research

Modeling No science without modeling The virtuous cycle Maybe even no life without modeling Physics uses PDEs for modeling. What are the PDEs of computer science? 2

Turing’s analysis of computation Great Yet limited 3

Improving on Turing’s analysis Emile Post Andrei Kolmogorov “Algorithms compute in steps of bounded complexity.” Pointer machines Robin Gandy 4

Another line of analysis Recursive functions Skolem to Gödel Lambda calculus Church’s thesis Comparing the two lines 5

6 A Thought Experiment A perfect machine model Step-for-step simulation of any algorithm Uses: software specs, model based testing What would the model look like?

Postulate 1: Sequential Time An algorithm is a transition system. What are states? What are transitions? 7

8 States The state is information that, given the program, determines the ensuing computation(s). More than the values of the variables. What is the form of states? Or what is is?

9 Postulate 2: Abstract State The states are structures in the sense of mathematical logic. Same vocabulary Transitions preserve the state domain. Everything is preserved under isomorphism.

What are transitions? Deterministic or nondeterministic? More generally, interactive or non-interactive? Let’s consider first the classical case of non-interactive algorithms. 10

What are transitions? (cont.) How powerful steps are? Let’s consider first the classical case of “steps of bounded complexity.” How to bound the complexity? 11

12 Locations and updates Locations = (f,(a 1,..,a j )) Content( ) = f(a 1,..,a j ) Updates (,v) The update set of state X is  (X) = { (,v) : v = Content( ) in Next(X)  Content( ) in X }

13 Postulate 3: Bounded Exploration There is a finite set t 1,..,t n of critical terms such that  (X) =  (Y) if every Val X (t i ) = Val Y (t i ).

14 Definition A sequential algorithm is an abstract-state bounded-exploration transition system.

15 Sequential ASMs SyntaxSemantics  = ? f(t 1,..,t j ):= t 0 {(,a 0 )} where = (f,(a 1,..,a j )) and each a i = Val(t i ) do in parallel R 1 … R k  (R 1 )  …   (R k ) if t then R 1 else R 2 if Val(t) = true then  (R 1 ) else  (R 2 )

16 Example if b = 0 then d := a else [do in-parallel] a := b b := a mod b Nullary dynamic functions:a, b, d Static functions: =, 0, mod

17 Example (cont.) if a(s)=0 then d(s) := b(s) s := s+1 else a(s) := b(s) mod a(s) b(s) := a(s)

18 Seq Characterization Theorem For any seq algorithm A there is a seq ASM B such that states of A are states of B and every Next A (X) = Next B (X). #141

Interaction The ASM model is relatively straightforward: External functions Choice and import operators The from-the-first-principles analysis is not straightforward. 19

20 In-place one-swap-a-time sorting var A as Seq of Integer = [3,1,2] 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

21 Wide steps Again, the ASM model is relatively straightforward do-for-all The from-the-first-principles analysis is not straightforward.

Topological Sorting Example 22

23 Distributed algorithms Distributed ASMs were defined long ago, but the axiomatization problem is wide (and maybe forever) open. To simulate, one can interleave (sets of) actions of the computing agents.

24 Early ASM engines ASM Workbench Uni Paderborn, Siemens ASM Gopher Uni Ulm, Siemens XASM Uni Berlin, Kestrel

25 AsmL creators In the hiring order: Wolfram Schulte, Margus Veanes, Colin Campbell, Lev Nachmanson, Mike Barnett, Wolfgang Grieskamp, Nikolai Tillmann

26 ModelingValidation Refinement Verification AsmL Model Implementation C, C++, C#,... Product Idea / Informal Spec Are you building the product right ? Are you building the right product? What product are you building? FSE propaganda example

27 Spec ValidateEnforce Comprehend Play scenarios Test Model check Prove properties Generate test suites Lockstep runtime verification On-the-fly testing

28 Conformance testing I AsmL model Test harness I Implementation under test Discrepancies flagged Any client I

Spec Explorer Original purpose Model based testing Why model-based testing? Arguably the largest model-based-testing operation anywhere. Success of sorts 29

Probability of success Coburn: (pain of crisis) divided by (pain of adoption) where pain means perceived pain. 30

Love triangle 31