SlideShare a Scribd company logo
I believe that the best way to get better
programs is to teach programmers how to
think better
-- Dr. Leslie Lamport
SAMThe State Action Model Pattern
Jean-Jacques Dubray
© https://creativecommons.org/licenses/by-nc-sa/4.0/
'
(primed variables)
Action State
Thing Relationship
Dynamic
Static
Physical Conceptual
The STAR Diagram
Light Energy
Mass Force
Dynamic
Static
Physical Conceptual
STAR is as fundamental to
Computing as the FLEM Diagram is
to Physics
Thing
RelationshipState
Action
State machines provide a
framework for much of computer
science
• “Don’t be obsessed by computer languages
[and frameworks]”
• Keep a clear delineation between
o Programming model
o Wiring
o Architecture
-- Dr Lamport
Classical State
Machines
A set of states Q = {q0, q1, q2}
A start state q0
A set of transitions which are triplets (q,a,q') members of Q x Act x Q
State Machines can
Compute…
“the die-hard problem”
5 liters 3 liters
4 liters
State Machines can
Compute
There are several ways to
define computation
• A computation is a sequence of steps, called a
behavior
• There are three common choices for what a step is,
leading to three different kinds of behavior:
• Action Behavior a step is an action, an action
behavior is a sequence of actions
• State Behavior A step is a pair <Si , Si+1> of states, a
state behavior is a sequence
s1 → s2 → s3 → · · · of states
• State-Action Behavior A step is a triple < Si , α, Si+1 > where
S are states and α an action
-- Dr. Lamport
We just created a language that
computes volumes of liquid
(not sure it will be popular though)
1. Fill Big
2. Fill Small from Big
3. Empty Small
4. Fill small from Big
5. Fill Big
6. Fill small from Big
State-Action Behavior Action Behavior
5 liters
3 liters
Programming Languages are Designed
to Make it Easy to Create State
Machines
1. Fill Big
2. Fill Small from Big
3. Empty Small
4. Fill small from Big
5. Fill Big
6. Fill small from Big
How do we describe a
“standard” program as a state
machine?
var fact = function(n) {
return (n == 1) ? 1 : n * fact(n-1);
}
var fact = function(n) {
var f = 1, i =1 ;
for (i = 1; i <= n; ++i) { f = i * f; }
return f ;
}
How do we describe a
“standard” program as a state
machine?
computing
i = n
f = 1
done
i==1
i = i - 1
f = f * i
i>1
error
i==0
Recursion and State
Machines
Computing
i = 2
n = 5
f1 = 1
fi = i * fi-1
i = i + 1
i<=n
error
i==0
f1 = 1
f2 = 2
f3 = 6
f4 = 24
f5 = 120
i = 5
f = f5
!fi && i<=n
done
i>n
Introducing TLA+
(Temporal Logic of
Actions)
computing
i = n
f = 1
done
[i==1]
i = i - 1
f = f * i
[i>1]
error
[i==0]
Primed Variables
computing
i' = n
f' = 1
done
[i==1]
i' = i - 1
f' = f * i'
[i>1]
error
[i==0]
The meaning of primed
variables is the variable's
value in the next state.
Next-State Predicate
computing
i' = n
f' = 1
done
i' = i - 1
f' = f * i'
error
error = (i' == 0)
done = (i' == 1)
computing = !done && !error
f = f'
i = i'
What is a Programming
Step?
computing
i' = n
f' = 1
done
i' = i - 1
f' = f * i'
error
error = (i' == 0)
done = (i' == 1)
computing = !done && !error
f = f'
i = i'
1
Compute next-state
property values
2 Update State
3
Decide what
happens next
TLA+ is fundamentally
different from classical State
Machines
computing
i = n
f = 1
done
[i==1]
i = i - 1
f = f * i
[i>1]
error
[i==0]
Actions cannot
manipulate State,
and cannot decide
of the Target Stat
e
What Changed?
Not much…
Functions
State(s)
i' = i - 1
f' = f * i'Action
error = (i' == 0)
done = (i' == 1)
computing = !done && !error
f = f'
i = i'
Next-State Relation (Function)
Next-Action Function
if (computing) {
…
}
i' = n
f' = 1Initial State
What Changed?
What is State?
What is Type?
What is State?
What is Type?
A Type, Thing, Model… is a list of property values
{
rpm : 2400
}
A State is a range of property values (sometimes
reduced to one value)
started = (rpm > 900)
TLA+ Specification of
Factorial Algorithm
Action
State
Type
TLA+ Specification of
Factorial Algorithm
i = 5
5
1 5
mult
TLA+ Specification of
Factorial Algorithm
i = 5
5*1
1 5
mult
4
TLA+ Specification of
Factorial Algorithm
i = 5
5*1
1 5
mult
4
TLA+ Specification of
Factorial Algorithm
i = 5
5 4
mult
test
TLA+ Specification of
Factorial Algorithm
i = 5
5*4
5 4
mult
3
How do we use TLA+
in Practice?
Modern GUIs have become just a Node
in a Dynamic Distributed System
• your friends,
• players
• your watch
• IoT sensors
• …
Events and Callbacks
Composability
Encapsulation
Subscriptions
Separation of Concern
Data Consistency
from
to
Maintainability
…
Ingo Mayer et al (https://infoscience.epfl.ch/record/176887/files/DeprecatingObservers2012.pdf)
After some intense research …
1. Framing the code we used
to write as a
“class/component”
2. Adding a “reactive” change
detection mechanism to re-
render components
automatically each time their
properties change
Leading Web Frameworks like
React and Angular came up
with a … component Model …
Functional Reactive
Programming: Elm/Redux
• Immutable data
• Observables
• Pure functions
• Static typing
• Unidirectional data flow
Source: http://www.codemag.com/article/1601071
http://guide.elm-lang.org/architecture/user_input/buttons.html
33% of the code in Adobe’s desktop
applications is devoted to event handling
logic
50% of the bugs reported during a product
cycle exist in this code
Sean Parent , “A Possible Future of Software
Development”, Adobe 2007
Introducing SAM
- State-Action-Model -
??
The SAM Pattern
View
Mode
l
??
016 xgen.io
The SAM Pattern
View
Mode
l
V = f(M) Counter = Counter + 1Counter = Counter + 1
var p_counter = counter + 1
counter = p_counter
var p_counter = counter + 1
counter.accept(p_counter)
var p_counter = counter + 1
counter.accept(p_counter).then(learn)
1 Proposers
2 Acceptor(s) 3 Learners
Dr. Leslie Lamport: TLA+
http://research.microsoft.com/en-us/um/people/lamport/pubs/state-machine.pdf
{
}
SAM is Unapologetically
Focused on Mutation
View
Model
Action
s
V = f(props)
State next-action(Model)
1 Proposers
2 Acceptor(s)
next-
action(Model)
3Learner(s)
016 xgen.io
dispatch(event)
View=State(Model.present(Action(event))).then(nap);
“SAM is simple, I [have] never seen a
concept such minimalist and
powerful, [in particular] in its
decoupling potential”
— Daniel
Neveux
next action
Unidirectional Data Flow /
Single State Tree
Create Proposal
Modify Data
State Representation
SAM Pattern
next-action
React/Redux Angular2 – Two Way Databinding
How do you write a Web
App with SAM?
<body>
…
<div id=“sam”></div>
…
<script src=“sam.js”></script>
<script type=“text/javascript”>
var a = { };
initSAM() ;
</script>
</body>
https://github.com/jdubray/sam-samples
View = State(
Model.present(
Action(event)
)
).then(nap);
view.innerHTML =
State(
Model.present(
Action(event)
)
).then(nap);
A simple
Blog Example
https://fish-trader.gomix.me/
<div id="representation"></div>
view.innerHTML =
State(
Model.present(
Action(event)
)
).then(nap);
A simple
Blog Example
https://fish-trader.gomix.me/
<div id="representation"></div>
view.innerHTML =
State(
Model.present(
Action(event)
)
).then(nap);
A simple
Blog Example
https://fish-trader.gomix.me/
<div id="representation"></div>
view.innerHTML =
State(
Model.present(
Action(event)
)
).then(nap);
A simple
Blog Example
https://fish-trader.gomix.me/
<div id="representation"></div>
Let’s look at some code
© Akveo 2016
Angular2
Component
Coupling the
business
logic to a
Web
Framework is
an anti-
pattern
events
Propertie
s
Angular2
Unidirectional Data
Flow
Single State Tree
Actions
events
Propertie
s
Actions
State
Model
SAM / Angular2
Action
s
Model
State
Conversational
Computing
https://www.infoq.com/news/2017/02/mindmeld-guide
Amazon Alexa,
Apple Siri,
Google Assistant,
Microsoft Cortana
“Since rule-based frameworks are not
intended to provide AI capabilities to
parse or classify incoming messages,
the developer must code all of the
necessary message processing and
interaction logic by hand. It is not
uncommon for even simple
applications to require hundreds of
rules to handle the different dialogue
states in a typical conversational
interface.”
By 2020 there will be 50 billion
Internet of Things (IoT) devices
Internet of Things
A new Application Architecture
- Services, APIs and Microservices -
SAM Isolates APIs
from the View
CUD
R
There is no need for
• an immutable model (Redux)
• declarative effects (Elm, ~Redux)
They create more problems than they solve
Create Proposal
Modify Data
State Representation
SAM Pattern
next-action
SAM + SAM
API API API
Consistency
APIs
Services
Microservices
Systems of Record
Services
Model
ActionsState
View
Model
Dispatche
r
State
View
Model
Actions
View
Activity
ActionAction
In Summary
• Programming model
• Centered on Mutation, not
immutability
• True Single State Tree, no
Sagas/Stateful components
• Focused on ”what’s allowed”,
not subscriptions
• View Components are 100%
decoupled from the application
business logic
• Functional UI/HTML (code
generation), not templates
• Architecture
• Can be implemented with
the framework of your
choice (React, Angular)
• Side-effects friendly
• Wiring agnostic
• Truly Isomorphic
• Action “Hang back” /
Generic Cancellations
• 3rd party Actions (OAuth)
References
• Computation and State Machines – Dr. Lamport
• Thinking for Programmers – Dr. Lamport

More Related Content

What's hot

Domain Modeling Made Functional (KanDDDinsky 2019)
Domain Modeling Made Functional (KanDDDinsky 2019)Domain Modeling Made Functional (KanDDDinsky 2019)
Domain Modeling Made Functional (KanDDDinsky 2019)
Scott Wlaschin
 
Scala 3 by Example - Algebraic Data Types for Domain Driven Design - Part 1
Scala 3 by Example - Algebraic Data Types for Domain Driven Design - Part 1Scala 3 by Example - Algebraic Data Types for Domain Driven Design - Part 1
Scala 3 by Example - Algebraic Data Types for Domain Driven Design - Part 1
Philip Schwarz
 
List in Python
List in PythonList in Python
List in Python
Sharath Ankrajegowda
 
File and directories in python
File and directories in pythonFile and directories in python
File and directories in python
Lifna C.S
 
آموزش ساختمان داده ها - بخش اول
آموزش ساختمان داده ها - بخش اولآموزش ساختمان داده ها - بخش اول
آموزش ساختمان داده ها - بخش اول
faradars
 
PHP for Adults: Clean Code and Object Calisthenics
PHP for Adults: Clean Code and Object CalisthenicsPHP for Adults: Clean Code and Object Calisthenics
PHP for Adults: Clean Code and Object Calisthenics
Guilherme Blanco
 
N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit – Haskell and...
N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit – Haskell and...N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit – Haskell and...
N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit – Haskell and...
Philip Schwarz
 
Python Pandas for Data Science cheatsheet
Python Pandas for Data Science cheatsheet Python Pandas for Data Science cheatsheet
Python Pandas for Data Science cheatsheet
Dr. Volkan OBAN
 
Python pandas tutorial
Python pandas tutorialPython pandas tutorial
Python pandas tutorial
HarikaReddy115
 
Tdm information retrieval
Tdm information retrievalTdm information retrieval
Tdm information retrievalKU Leuven
 
Clean Code: Chapter 3 Function
Clean Code: Chapter 3 FunctionClean Code: Chapter 3 Function
Clean Code: Chapter 3 Function
Kent Huang
 
What is Python Lambda Function? Python Tutorial | Edureka
What is Python Lambda Function? Python Tutorial | EdurekaWhat is Python Lambda Function? Python Tutorial | Edureka
What is Python Lambda Function? Python Tutorial | Edureka
Edureka!
 
Introduction to Recursion (Python)
Introduction to Recursion (Python)Introduction to Recursion (Python)
Introduction to Recursion (Python)
Thai Pangsakulyanont
 
Evaluation in IR system (검색 시스템의 평가)
Evaluation in IR system (검색 시스템의 평가)Evaluation in IR system (검색 시스템의 평가)
Evaluation in IR system (검색 시스템의 평가)
Minsub Yim
 
Refactoring
RefactoringRefactoring
Refactoring
Ricardo Terra
 
Functional Programming Patterns (BuildStuff '14)
Functional Programming Patterns (BuildStuff '14)Functional Programming Patterns (BuildStuff '14)
Functional Programming Patterns (BuildStuff '14)
Scott Wlaschin
 
CS8080 INFORMATION RETRIEVAL TECHNIQUES - IRT - UNIT - I PPT IN PDF
CS8080 INFORMATION RETRIEVAL TECHNIQUES - IRT - UNIT - I  PPT  IN PDFCS8080 INFORMATION RETRIEVAL TECHNIQUES - IRT - UNIT - I  PPT  IN PDF
CS8080 INFORMATION RETRIEVAL TECHNIQUES - IRT - UNIT - I PPT IN PDF
AALIM MUHAMMED SALEGH COLLEGE OF ENGINEERING
 
Recommendation Systems
Recommendation SystemsRecommendation Systems
Recommendation Systems
Robin Reni
 
CouchDB Vs MongoDB
CouchDB Vs MongoDBCouchDB Vs MongoDB
CouchDB Vs MongoDB
Gabriele Lana
 

What's hot (19)

Domain Modeling Made Functional (KanDDDinsky 2019)
Domain Modeling Made Functional (KanDDDinsky 2019)Domain Modeling Made Functional (KanDDDinsky 2019)
Domain Modeling Made Functional (KanDDDinsky 2019)
 
Scala 3 by Example - Algebraic Data Types for Domain Driven Design - Part 1
Scala 3 by Example - Algebraic Data Types for Domain Driven Design - Part 1Scala 3 by Example - Algebraic Data Types for Domain Driven Design - Part 1
Scala 3 by Example - Algebraic Data Types for Domain Driven Design - Part 1
 
List in Python
List in PythonList in Python
List in Python
 
File and directories in python
File and directories in pythonFile and directories in python
File and directories in python
 
آموزش ساختمان داده ها - بخش اول
آموزش ساختمان داده ها - بخش اولآموزش ساختمان داده ها - بخش اول
آموزش ساختمان داده ها - بخش اول
 
PHP for Adults: Clean Code and Object Calisthenics
PHP for Adults: Clean Code and Object CalisthenicsPHP for Adults: Clean Code and Object Calisthenics
PHP for Adults: Clean Code and Object Calisthenics
 
N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit – Haskell and...
N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit – Haskell and...N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit – Haskell and...
N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit – Haskell and...
 
Python Pandas for Data Science cheatsheet
Python Pandas for Data Science cheatsheet Python Pandas for Data Science cheatsheet
Python Pandas for Data Science cheatsheet
 
Python pandas tutorial
Python pandas tutorialPython pandas tutorial
Python pandas tutorial
 
Tdm information retrieval
Tdm information retrievalTdm information retrieval
Tdm information retrieval
 
Clean Code: Chapter 3 Function
Clean Code: Chapter 3 FunctionClean Code: Chapter 3 Function
Clean Code: Chapter 3 Function
 
What is Python Lambda Function? Python Tutorial | Edureka
What is Python Lambda Function? Python Tutorial | EdurekaWhat is Python Lambda Function? Python Tutorial | Edureka
What is Python Lambda Function? Python Tutorial | Edureka
 
Introduction to Recursion (Python)
Introduction to Recursion (Python)Introduction to Recursion (Python)
Introduction to Recursion (Python)
 
Evaluation in IR system (검색 시스템의 평가)
Evaluation in IR system (검색 시스템의 평가)Evaluation in IR system (검색 시스템의 평가)
Evaluation in IR system (검색 시스템의 평가)
 
Refactoring
RefactoringRefactoring
Refactoring
 
Functional Programming Patterns (BuildStuff '14)
Functional Programming Patterns (BuildStuff '14)Functional Programming Patterns (BuildStuff '14)
Functional Programming Patterns (BuildStuff '14)
 
CS8080 INFORMATION RETRIEVAL TECHNIQUES - IRT - UNIT - I PPT IN PDF
CS8080 INFORMATION RETRIEVAL TECHNIQUES - IRT - UNIT - I  PPT  IN PDFCS8080 INFORMATION RETRIEVAL TECHNIQUES - IRT - UNIT - I  PPT  IN PDF
CS8080 INFORMATION RETRIEVAL TECHNIQUES - IRT - UNIT - I PPT IN PDF
 
Recommendation Systems
Recommendation SystemsRecommendation Systems
Recommendation Systems
 
CouchDB Vs MongoDB
CouchDB Vs MongoDBCouchDB Vs MongoDB
CouchDB Vs MongoDB
 

Similar to The SAM Pattern: State Machines and Computation

Intro to functional programming - Confoo
Intro to functional programming - ConfooIntro to functional programming - Confoo
Intro to functional programming - Confoo
felixtrepanier
 
Second Level Cache in JPA Explained
Second Level Cache in JPA ExplainedSecond Level Cache in JPA Explained
Second Level Cache in JPA Explained
Patrycja Wegrzynowicz
 
Hierarchical free monads and software design in fp
Hierarchical free monads and software design in fpHierarchical free monads and software design in fp
Hierarchical free monads and software design in fp
Alexander Granin
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
Fastly
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 DsQundeel
 
Data Structure
Data StructureData Structure
Data Structuresheraz1
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 DsQundeel
 
TensorFlow and Deep Learning Tips and Tricks
TensorFlow and Deep Learning Tips and TricksTensorFlow and Deep Learning Tips and Tricks
TensorFlow and Deep Learning Tips and Tricks
Ben Ball
 
Complex Event Processing
Complex Event ProcessingComplex Event Processing
Complex Event Processing
Matthew Versaggi
 
OttoBot
OttoBotOttoBot
R Programming: Mathematical Functions In R
R Programming: Mathematical Functions In RR Programming: Mathematical Functions In R
R Programming: Mathematical Functions In R
Rsquared Academy
 
The joy of functional programming
The joy of functional programmingThe joy of functional programming
The joy of functional programming
Steve Zhang
 
Functional Programming in R
Functional Programming in RFunctional Programming in R
Functional Programming in R
David Springate
 
Operationalizing Clojure Confidently
Operationalizing Clojure ConfidentlyOperationalizing Clojure Confidently
Operationalizing Clojure Confidently
Prasanna Gautam
 
elm-d3 @ NYC D3.js Meetup (30 June, 2014)
elm-d3 @ NYC D3.js Meetup (30 June, 2014)elm-d3 @ NYC D3.js Meetup (30 June, 2014)
elm-d3 @ NYC D3.js Meetup (30 June, 2014)Spiros
 
Lazy Java
Lazy JavaLazy Java
Lazy Java
J On The Beach
 
Lazy Java
Lazy JavaLazy Java
Lazy Java
Nicola Pedot
 
Mario Fusco - Lazy Java - Codemotion Milan 2018
Mario Fusco - Lazy Java - Codemotion Milan 2018Mario Fusco - Lazy Java - Codemotion Milan 2018
Mario Fusco - Lazy Java - Codemotion Milan 2018
Codemotion
 

Similar to The SAM Pattern: State Machines and Computation (20)

Intro to functional programming - Confoo
Intro to functional programming - ConfooIntro to functional programming - Confoo
Intro to functional programming - Confoo
 
Second Level Cache in JPA Explained
Second Level Cache in JPA ExplainedSecond Level Cache in JPA Explained
Second Level Cache in JPA Explained
 
Hierarchical free monads and software design in fp
Hierarchical free monads and software design in fpHierarchical free monads and software design in fp
Hierarchical free monads and software design in fp
 
Flink internals web
Flink internals web Flink internals web
Flink internals web
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 Ds
 
Data Structure
Data StructureData Structure
Data Structure
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 Ds
 
TensorFlow and Deep Learning Tips and Tricks
TensorFlow and Deep Learning Tips and TricksTensorFlow and Deep Learning Tips and Tricks
TensorFlow and Deep Learning Tips and Tricks
 
Complex Event Processing
Complex Event ProcessingComplex Event Processing
Complex Event Processing
 
OttoBot
OttoBotOttoBot
OttoBot
 
R Programming: Mathematical Functions In R
R Programming: Mathematical Functions In RR Programming: Mathematical Functions In R
R Programming: Mathematical Functions In R
 
The joy of functional programming
The joy of functional programmingThe joy of functional programming
The joy of functional programming
 
Functional Programming in R
Functional Programming in RFunctional Programming in R
Functional Programming in R
 
Operationalizing Clojure Confidently
Operationalizing Clojure ConfidentlyOperationalizing Clojure Confidently
Operationalizing Clojure Confidently
 
Java
JavaJava
Java
 
elm-d3 @ NYC D3.js Meetup (30 June, 2014)
elm-d3 @ NYC D3.js Meetup (30 June, 2014)elm-d3 @ NYC D3.js Meetup (30 June, 2014)
elm-d3 @ NYC D3.js Meetup (30 June, 2014)
 
Lazy Java
Lazy JavaLazy Java
Lazy Java
 
Lazy Java
Lazy JavaLazy Java
Lazy Java
 
Mario Fusco - Lazy Java - Codemotion Milan 2018
Mario Fusco - Lazy Java - Codemotion Milan 2018Mario Fusco - Lazy Java - Codemotion Milan 2018
Mario Fusco - Lazy Java - Codemotion Milan 2018
 

Recently uploaded

openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 

Recently uploaded (20)

openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 

The SAM Pattern: State Machines and Computation

Editor's Notes

  1. var fact = function(n) { return (n == 1) ? 1 : n * fact(n-1); } var fact = function(n) { var f = 1, i =1 ; for (i = 1; i <= n; ++i) { f = i * f; } return f ; }
  2. Graphical User Interfaces are part of a wide class of software, Reactive Applications, that responds to user input, network messages, and other events Reactive code is asynchronously triggered by event occurrences It is hard to trace and understand the control flow of the entire system