SlideShare una empresa de Scribd logo
1 de 25
Descargar para leer sin conexión
SMC
The State Machine Compiler               (40 ’)




  François Perrad
  francois.perrad@gadz.org




                   fperrad@OSDC.fr2009
The State Machine Compiler
   Introduction
   Basic concepts
   Advanced concepts
   More features
   A case study : a Telephone
   Conclusion



                 fperrad@OSDC.fr2009
FSM are everywhere
   FSM : Finite State Machine
   Not a new technology
   Strong theorical base
   Reactive systems / Transformational
    systems
   Event driven
   Applications :
       Telephones, automobiles, communication
        networks, avionic systems, man-machine
        interface

                  fperrad@OSDC.fr2009
FSM graphical view
   Moore
   Mealy
   Grafcet
   UML = Harel statechart




                  fperrad@OSDC.fr2009
A SourceForge project
   Some facts :
       registered in 2000
       ~500 downloads / month
       ~100 bugs (closed)
       written in Java
       mature codebase
       well documented
       3 developers
       Licence MPL

   See :
    http://www.ohloh.net/projects/7339?p=SMC

                     fperrad@OSDC.fr2009
The State Machine Compiler
   Introduction
   Basic concepts
   Advanced concepts
   More features
   A case study : a Telephone
   Conclusion



                 fperrad@OSDC.fr2009
A Compiler
   A input source .sm (yacc-like syntax)
   A output source (readable) in your language
   Currently 14 target languages :
       C, C++, C#, Groovy, Java, Lua, Objective-C, Perl, PHP,
        Python, Ruby, Scala, Tcl and VB.net
   An Object Oriented design :
       your class has a member which is the FSM generated class
   A small RunTime Library
   Parser & Lexer of SMC are written with SMC
   The root of SMC is ATN (Augmented Transition
    Network)
   Robert C. Martin (uncle bob) is the author of the
    initial SMC implementation
                           fperrad@OSDC.fr2009
A Simple Transition
// State 
Idle {
   // Trans    Next State        Actions 
   Run         Running           {} 
} 




                 fperrad@OSDC.fr2009
A Reflexive Transition
// State 
Idle { 
   // Trans    Next State  Actions 
   Timeout     Idle        {} 
} 




                 fperrad@OSDC.fr2009
A Internal Event
// State
Idle { 
   // Trans    Next State  Actions 
   Timeout     nil         {} 
} 




                 fperrad@OSDC.fr2009
A Transition with Actions
// State 
Idle 
{ 
   // Trans 
   Run 
      // Next State 
      Running 
             // Actions 
             { 
                 StopTimer("Idle"); 
                 DoWork(); 
             } 
} 



                     fperrad@OSDC.fr2009
Transition Guards
// State 
Idle 
{ 
    // Trans 
    Run 
    // Guard condition 
    [ctxt.isValid()] 
       // Next State 
       Running 
              // Actions 
              { 
                  StopTimer("Idle"); 
                  DoWork(); 
              } 

    Run       Idle    { RejectRequest(); } 
} 
                        fperrad@OSDC.fr2009
Transition Arguments
// State 
Idle 
{ 
    // Transition 
    Run(msg: const Message&) 
    // Guard condition 
    [msg.isValid()] 
        // Next State 
        Running 
       // Actions 
       { 
           StopTimer("Idle"); 
           DoWork(msg); 
       } 
    Run(msg: const Message&) 
        // Next State Actions 
        Idle          { RejectRequest(msg); } 
} 
                          fperrad@OSDC.fr2009
Entry and Exit Actions
// State 
Idle 
Entry { StartTimer("Idle", 1); CheckQueue(); } 
Exit { StopTimer("Idle"); } 
{ 
   // Transitions 

} 




                     fperrad@OSDC.fr2009
the State Machine Compiler
   Introduction
   Basic concepts
   Advanced concepts
   More features
   A case study : a Telephone
   Conclusion



                 fperrad@OSDC.fr2009
Advanced Features
   Map : state container
       only one level (multiple with UML)
   Push/Pop
       with stack context
       see UML History
   Default state
        factorisation of common behavior
        in a map
   No concurrency (ie //)
                 fperrad@OSDC.fr2009
The Design Pattern




       fperrad@OSDC.fr2009
the State Machine Compiler
   Introduction
   Basic concepts
   Advanced concepts
   More features
   A case study : a Telephone
   Conclusion



                 fperrad@OSDC.fr2009
More features
   Event management is yours
   Graphviz output generation
   HTML table generation
   Dynamic trace
   Namespace support
   Reflection/Introspection (for MMI)




               fperrad@OSDC.fr2009
Graphviz output




       fperrad@OSDC.fr2009
the State Machine Compiler
   Introduction
   Basic concepts
   Advanced concepts
   More Features
   A case study : a Telephone
   Conclusion



               fperrad@OSDC.fr2009
A Telephone
   Go to the WEB
   Play with the demo (Applet Java)
@   http://smc.sourceforge.net/SmcDemo.htm




                   fperrad@OSDC.fr2009
the State Machine Compiler
   Introduction
   Basic concepts
   Advanced concepts
   More Features
   A case study : a Telephone
   Conclusion



                 fperrad@OSDC.fr2009
all contributions welcomed
   Eclipse plugin
   Debian packaging
   Pluggable language support
   New target language
   Regression test
   …




                fperrad@OSDC.fr2009
Bibliography / Webography
- SMC : http://smc.sourceforge.net/
- Robert C. Martin, "Agile Software Development"
- http://en.wikipedia.org/wiki/Finite_state_machine
- http://en.wikipedia.org/wiki/Statechart
- D. Harel, "Statecharts: A Visual Formalism for Complex
     Systems"
- http://www.uml.org/
- http://fr.wikipedia.org/wiki/Grafcet
- NF C03-190 - Diagramme fonctionnel "GRAFCET"
- http://en.wikipedia.org/wiki/Augmented_transition_network




                         fperrad@OSDC.fr2009

Más contenido relacionado

La actualidad más candente

8-класс.Windows прикладдык чойронун озгочолуктору
8-класс.Windows прикладдык чойронун озгочолуктору8-класс.Windows прикладдык чойронун озгочолуктору
8-класс.Windows прикладдык чойронун озгочолукторуKasymbek Junusaliev
 
UplinQ - enhance qualcomm® snapdragon™ audio using android audio ap_is
UplinQ - enhance qualcomm® snapdragon™ audio using android audio ap_isUplinQ - enhance qualcomm® snapdragon™ audio using android audio ap_is
UplinQ - enhance qualcomm® snapdragon™ audio using android audio ap_isSatya Harish
 
Tag Integration with Schneider Electric PLCs and Modbus in InduSoft Web Studio
Tag Integration with Schneider Electric PLCs and Modbus in InduSoft Web StudioTag Integration with Schneider Electric PLCs and Modbus in InduSoft Web Studio
Tag Integration with Schneider Electric PLCs and Modbus in InduSoft Web StudioAVEVA
 
Chapter 5-programming
Chapter 5-programmingChapter 5-programming
Chapter 5-programmingAten Kecik
 
CICS basic mapping support - session 3
CICS basic mapping support - session 3CICS basic mapping support - session 3
CICS basic mapping support - session 3Srinimf-Slides
 
Mantıksal programlama
Mantıksal programlama Mantıksal programlama
Mantıksal programlama Betul Kesimal
 
8-класс.Прикладдык чойро
8-класс.Прикладдык чойро8-класс.Прикладдык чойро
8-класс.Прикладдык чойроKasymbek Junusaliev
 
2013이민화 노래중심집단음악치료활동 저소득층 아동 자기표현, 자아존중감 학교생활적응영향
2013이민화 노래중심집단음악치료활동 저소득층 아동 자기표현, 자아존중감 학교생활적응영향2013이민화 노래중심집단음악치료활동 저소득층 아동 자기표현, 자아존중감 학교생활적응영향
2013이민화 노래중심집단음악치료활동 저소득층 아동 자기표현, 자아존중감 학교생활적응영향혜원 정
 
Problem Solving and Programming
Problem Solving and ProgrammingProblem Solving and Programming
Problem Solving and ProgrammingSelvaraj Seerangan
 
PTC Live: Integrating PTC Windchill with Cadence PCB Design
PTC Live: Integrating PTC Windchill with Cadence PCB DesignPTC Live: Integrating PTC Windchill with Cadence PCB Design
PTC Live: Integrating PTC Windchill with Cadence PCB DesignEMA Design Automation
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
Lecture 5 - Webservers for the Internet of Things
Lecture 5 - Webservers for the Internet of ThingsLecture 5 - Webservers for the Internet of Things
Lecture 5 - Webservers for the Internet of ThingsAlexandru Radovici
 
Módulo 5 Arquitetura de Computadores
Módulo 5 Arquitetura de ComputadoresMódulo 5 Arquitetura de Computadores
Módulo 5 Arquitetura de ComputadoresLuis Ferreira
 
REGULAMENTO DA ESCOLA PREPARATÓRIA DE CADETES DO AR 21 33 2018 epcar
REGULAMENTO DA ESCOLA PREPARATÓRIA DE CADETES DO AR  21 33 2018 epcarREGULAMENTO DA ESCOLA PREPARATÓRIA DE CADETES DO AR  21 33 2018 epcar
REGULAMENTO DA ESCOLA PREPARATÓRIA DE CADETES DO AR 21 33 2018 epcarRevista Sociedade Militar
 
Create a Thermal Camera With Python On a Raspberry Pi
Create a Thermal Camera With Python On a Raspberry PiCreate a Thermal Camera With Python On a Raspberry Pi
Create a Thermal Camera With Python On a Raspberry PiNUS-ISS
 
Operating Systems MCQ Bank from mcqSets.com
Operating Systems MCQ Bank from mcqSets.comOperating Systems MCQ Bank from mcqSets.com
Operating Systems MCQ Bank from mcqSets.comSuresh Khanal
 

La actualidad más candente (20)

WINDOWS HISTORIA
WINDOWS HISTORIAWINDOWS HISTORIA
WINDOWS HISTORIA
 
8-класс.Windows прикладдык чойронун озгочолуктору
8-класс.Windows прикладдык чойронун озгочолуктору8-класс.Windows прикладдык чойронун озгочолуктору
8-класс.Windows прикладдык чойронун озгочолуктору
 
UplinQ - enhance qualcomm® snapdragon™ audio using android audio ap_is
UplinQ - enhance qualcomm® snapdragon™ audio using android audio ap_isUplinQ - enhance qualcomm® snapdragon™ audio using android audio ap_is
UplinQ - enhance qualcomm® snapdragon™ audio using android audio ap_is
 
Tag Integration with Schneider Electric PLCs and Modbus in InduSoft Web Studio
Tag Integration with Schneider Electric PLCs and Modbus in InduSoft Web StudioTag Integration with Schneider Electric PLCs and Modbus in InduSoft Web Studio
Tag Integration with Schneider Electric PLCs and Modbus in InduSoft Web Studio
 
Chapter 5-programming
Chapter 5-programmingChapter 5-programming
Chapter 5-programming
 
Guia intouch
Guia intouchGuia intouch
Guia intouch
 
CICS basic mapping support - session 3
CICS basic mapping support - session 3CICS basic mapping support - session 3
CICS basic mapping support - session 3
 
Mantıksal programlama
Mantıksal programlama Mantıksal programlama
Mantıksal programlama
 
8-класс.Прикладдык чойро
8-класс.Прикладдык чойро8-класс.Прикладдык чойро
8-класс.Прикладдык чойро
 
2013이민화 노래중심집단음악치료활동 저소득층 아동 자기표현, 자아존중감 학교생활적응영향
2013이민화 노래중심집단음악치료활동 저소득층 아동 자기표현, 자아존중감 학교생활적응영향2013이민화 노래중심집단음악치료활동 저소득층 아동 자기표현, 자아존중감 학교생활적응영향
2013이민화 노래중심집단음악치료활동 저소득층 아동 자기표현, 자아존중감 학교생활적응영향
 
Problem Solving and Programming
Problem Solving and ProgrammingProblem Solving and Programming
Problem Solving and Programming
 
PTC Live: Integrating PTC Windchill with Cadence PCB Design
PTC Live: Integrating PTC Windchill with Cadence PCB DesignPTC Live: Integrating PTC Windchill with Cadence PCB Design
PTC Live: Integrating PTC Windchill with Cadence PCB Design
 
Bus ou Barramento
Bus ou BarramentoBus ou Barramento
Bus ou Barramento
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Lecture 5 - Webservers for the Internet of Things
Lecture 5 - Webservers for the Internet of ThingsLecture 5 - Webservers for the Internet of Things
Lecture 5 - Webservers for the Internet of Things
 
Módulo 5 Arquitetura de Computadores
Módulo 5 Arquitetura de ComputadoresMódulo 5 Arquitetura de Computadores
Módulo 5 Arquitetura de Computadores
 
REGULAMENTO DA ESCOLA PREPARATÓRIA DE CADETES DO AR 21 33 2018 epcar
REGULAMENTO DA ESCOLA PREPARATÓRIA DE CADETES DO AR  21 33 2018 epcarREGULAMENTO DA ESCOLA PREPARATÓRIA DE CADETES DO AR  21 33 2018 epcar
REGULAMENTO DA ESCOLA PREPARATÓRIA DE CADETES DO AR 21 33 2018 epcar
 
Create a Thermal Camera With Python On a Raspberry Pi
Create a Thermal Camera With Python On a Raspberry PiCreate a Thermal Camera With Python On a Raspberry Pi
Create a Thermal Camera With Python On a Raspberry Pi
 
Computer
ComputerComputer
Computer
 
Operating Systems MCQ Bank from mcqSets.com
Operating Systems MCQ Bank from mcqSets.comOperating Systems MCQ Bank from mcqSets.com
Operating Systems MCQ Bank from mcqSets.com
 

Similar a The State Machine Compiler

Open Source XMPP for Cloud Services
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Servicesmattjive
 
Crushing Latency with Vert.x
Crushing Latency with Vert.xCrushing Latency with Vert.x
Crushing Latency with Vert.xPaulo Lopes
 
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423Giulio Vian
 
Virtual platform
Virtual platformVirtual platform
Virtual platformsean chen
 
PLUG : Presentation Layer Universal Generator
 PLUG : Presentation Layer Universal Generator PLUG : Presentation Layer Universal Generator
PLUG : Presentation Layer Universal GeneratorEmmanuel Fuchs
 
Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...inside-BigData.com
 
Glomosim adding routing protocol
Glomosim   adding routing protocolGlomosim   adding routing protocol
Glomosim adding routing protocolKathirvel Ayyaswamy
 
DDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkDDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkbanq jdon
 
First Failure Data Capture for your enterprise application with WebSphere App...
First Failure Data Capture for your enterprise application with WebSphere App...First Failure Data Capture for your enterprise application with WebSphere App...
First Failure Data Capture for your enterprise application with WebSphere App...Rohit Kelapure
 
Python Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkPython Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkAljoscha Krettek
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Jorisimec.archive
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointJavaTpoint.Com
 
Ob1k presentation at Java.IL
Ob1k presentation at Java.ILOb1k presentation at Java.IL
Ob1k presentation at Java.ILEran Harel
 
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...Flink Forward
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0Thomas Conté
 

Similar a The State Machine Compiler (20)

Open Source XMPP for Cloud Services
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Services
 
ECI OpenFlow 2.0 the Future of SDN
ECI OpenFlow 2.0 the Future of SDN ECI OpenFlow 2.0 the Future of SDN
ECI OpenFlow 2.0 the Future of SDN
 
Model_Driven_Development_SDR
Model_Driven_Development_SDRModel_Driven_Development_SDR
Model_Driven_Development_SDR
 
Crushing Latency with Vert.x
Crushing Latency with Vert.xCrushing Latency with Vert.x
Crushing Latency with Vert.x
 
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
 
Virtual platform
Virtual platformVirtual platform
Virtual platform
 
Erlang OTP
Erlang OTPErlang OTP
Erlang OTP
 
PLUG : Presentation Layer Universal Generator
 PLUG : Presentation Layer Universal Generator PLUG : Presentation Layer Universal Generator
PLUG : Presentation Layer Universal Generator
 
Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...
 
Glomosim adding routing protocol
Glomosim   adding routing protocolGlomosim   adding routing protocol
Glomosim adding routing protocol
 
DDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkDDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFramework
 
First Failure Data Capture for your enterprise application with WebSphere App...
First Failure Data Capture for your enterprise application with WebSphere App...First Failure Data Capture for your enterprise application with WebSphere App...
First Failure Data Capture for your enterprise application with WebSphere App...
 
Python Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkPython Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on Flink
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpoint
 
Ob1k presentation at Java.IL
Ob1k presentation at Java.ILOb1k presentation at Java.IL
Ob1k presentation at Java.IL
 
Cloud RPI4 tomcat ARM64
Cloud RPI4 tomcat ARM64Cloud RPI4 tomcat ARM64
Cloud RPI4 tomcat ARM64
 
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
 
Eclipse RT Day
Eclipse RT DayEclipse RT Day
Eclipse RT Day
 

Último

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

The State Machine Compiler

  • 1. SMC The State Machine Compiler (40 ’) François Perrad francois.perrad@gadz.org fperrad@OSDC.fr2009
  • 2. The State Machine Compiler  Introduction  Basic concepts  Advanced concepts  More features  A case study : a Telephone  Conclusion fperrad@OSDC.fr2009
  • 3. FSM are everywhere  FSM : Finite State Machine  Not a new technology  Strong theorical base  Reactive systems / Transformational systems  Event driven  Applications :  Telephones, automobiles, communication networks, avionic systems, man-machine interface fperrad@OSDC.fr2009
  • 4. FSM graphical view  Moore  Mealy  Grafcet  UML = Harel statechart fperrad@OSDC.fr2009
  • 5. A SourceForge project  Some facts :  registered in 2000  ~500 downloads / month  ~100 bugs (closed)  written in Java  mature codebase  well documented  3 developers  Licence MPL  See : http://www.ohloh.net/projects/7339?p=SMC fperrad@OSDC.fr2009
  • 6. The State Machine Compiler  Introduction  Basic concepts  Advanced concepts  More features  A case study : a Telephone  Conclusion fperrad@OSDC.fr2009
  • 7. A Compiler  A input source .sm (yacc-like syntax)  A output source (readable) in your language  Currently 14 target languages :  C, C++, C#, Groovy, Java, Lua, Objective-C, Perl, PHP, Python, Ruby, Scala, Tcl and VB.net  An Object Oriented design :  your class has a member which is the FSM generated class  A small RunTime Library  Parser & Lexer of SMC are written with SMC  The root of SMC is ATN (Augmented Transition Network)  Robert C. Martin (uncle bob) is the author of the initial SMC implementation fperrad@OSDC.fr2009
  • 8. A Simple Transition // State  Idle { // Trans  Next State Actions  Run  Running  {}  }  fperrad@OSDC.fr2009
  • 9. A Reflexive Transition // State  Idle {  // Trans  Next State  Actions  Timeout  Idle  {}  }  fperrad@OSDC.fr2009
  • 10. A Internal Event // State Idle {  // Trans  Next State  Actions  Timeout  nil  {}  }  fperrad@OSDC.fr2009
  • 11. A Transition with Actions // State  Idle  {  // Trans  Run  // Next State  Running  // Actions  {      StopTimer("Idle");      DoWork();  }  }  fperrad@OSDC.fr2009
  • 12. Transition Guards // State  Idle  {      // Trans      Run  // Guard condition  [ctxt.isValid()]  // Next State  Running  // Actions  {      StopTimer("Idle");      DoWork();  }      Run  Idle  { RejectRequest(); }  }  fperrad@OSDC.fr2009
  • 13. Transition Arguments // State  Idle  {      // Transition      Run(msg: const Message&)  // Guard condition  [msg.isValid()]      // Next State      Running  // Actions  {      StopTimer("Idle");      DoWork(msg);  }      Run(msg: const Message&)      // Next State Actions      Idle  { RejectRequest(msg); }  }  fperrad@OSDC.fr2009
  • 14. Entry and Exit Actions // State  Idle  Entry { StartTimer("Idle", 1); CheckQueue(); }  Exit { StopTimer("Idle"); }  {  // Transitions  }  fperrad@OSDC.fr2009
  • 15. the State Machine Compiler  Introduction  Basic concepts  Advanced concepts  More features  A case study : a Telephone  Conclusion fperrad@OSDC.fr2009
  • 16. Advanced Features  Map : state container  only one level (multiple with UML)  Push/Pop  with stack context  see UML History  Default state  factorisation of common behavior in a map  No concurrency (ie //) fperrad@OSDC.fr2009
  • 17. The Design Pattern fperrad@OSDC.fr2009
  • 18. the State Machine Compiler  Introduction  Basic concepts  Advanced concepts  More features  A case study : a Telephone  Conclusion fperrad@OSDC.fr2009
  • 19. More features  Event management is yours  Graphviz output generation  HTML table generation  Dynamic trace  Namespace support  Reflection/Introspection (for MMI) fperrad@OSDC.fr2009
  • 20. Graphviz output fperrad@OSDC.fr2009
  • 21. the State Machine Compiler  Introduction  Basic concepts  Advanced concepts  More Features  A case study : a Telephone  Conclusion fperrad@OSDC.fr2009
  • 22. A Telephone  Go to the WEB  Play with the demo (Applet Java) @ http://smc.sourceforge.net/SmcDemo.htm fperrad@OSDC.fr2009
  • 23. the State Machine Compiler  Introduction  Basic concepts  Advanced concepts  More Features  A case study : a Telephone  Conclusion fperrad@OSDC.fr2009
  • 24. all contributions welcomed  Eclipse plugin  Debian packaging  Pluggable language support  New target language  Regression test  … fperrad@OSDC.fr2009
  • 25. Bibliography / Webography - SMC : http://smc.sourceforge.net/ - Robert C. Martin, "Agile Software Development" - http://en.wikipedia.org/wiki/Finite_state_machine - http://en.wikipedia.org/wiki/Statechart - D. Harel, "Statecharts: A Visual Formalism for Complex Systems" - http://www.uml.org/ - http://fr.wikipedia.org/wiki/Grafcet - NF C03-190 - Diagramme fonctionnel "GRAFCET" - http://en.wikipedia.org/wiki/Augmented_transition_network fperrad@OSDC.fr2009