SlideShare a Scribd company logo
Model Testing of
Executable Statecharts
Tom Mens Alexandre Decan
Software Engineering Lab
University of Mons, Belgium
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Statecharts
(hierarchical state machines)
• Invented in 1987 by David Harel
• Used to specify, design and control the complex
behaviour of discrete-event systems
– embedded systems, user interfaces, network
protocols, robots, computer game logic, ...
• Executable semantics
– Can be used to generate executable source code, if a
statechart compiler is available
– Can be integrated in an existing code base directly, if a
statechart interpreter is available
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Statecharts
A simple example
An Elevator controller
Visualised with PlantUML (https://plantuml.com)
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Statecharts
Existing Tooling
Many existing tools
• Itemis Create: A statechart simulator and code generator
https://www.itemis.com/en/products/itemis-create/
• Mathworks Stateflow
https://www.mathworks.com/products/stateflow.html
• QuantumLeaps QM and QP for embedded software development
https://www.state-machine.com
• IBM Rational Statemate
• IBM Rational Rhapsody
• SISMIC: A Python-based statechart interpreter
https://pypi.org/project/sismic/ focus of this talk!
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Running example
A microwave oven controller
Created with
Itemis Create
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
• Many “agile” development techniques
provide lightweight approaches to facilitate
change and increase reliability of software
• Design by contract
• Test-driven development
• unit testing
• behavior-driven development
• Dynamic verification of properties
• We raise these techniques to the level of
executable statechart models
Defensive software development
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
SISMIC
Architecture
g and validating executable statechart models 843
al overview
framework
validate statecharts, by using the techniques editor and import these models through the I/O API provided
...
...
https://sismic.readthedocs.io https://github.com/AlexandreDecan/sismic
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Running example
A microwave oven controller
statechart:
name: Microwave controller
preamble: |
POWER_VALUES = [300, 600, 900, 1200, 1500]
POWER_DEFAULT = 2 # 900W
MAXPOWER = 3 # 1200W
root state:
name: controller
initial: door closed
on entry: |
power = POWER_DEFAULT
timer = 0
transitions:
- event: cooking_stop
action: |
power = POWER_DEFAULT
timer = 0
states:
- name: door closed
initial: closed without item
states:
- name: closed without item
transitions:
- event: door_opened
target: opened without item
- name: closed with item
...
SISMIC adopts
a YAML-based
specification
of statecharts
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Running example
A micowave oven controller
SISMIC supports
visualisation
through PlantUML
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Running example
A microwave oven controller
Example: Basic GUI to
control the executable
statechart model
SISMIC provides an API
for Python code to use
the statechart model
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
SISMIC
Macrostep semantics
Stepwise execution of statechart behaviour
from sismic.io import import_from_yaml
from sismic.interpreter import Interpreter
from sismic.model import Event
with open('microwave.yaml') as f:
statechart = import_from_yaml(f)
interpreter = Interpreter(statechart)
interpreter.execute_once()
MacroStep(None, [], >['controller', 'door closed', 'closed without item'], <[])
interpreter.queue(Event(’door_opened’))
interpreter.execute_once()
MacroStep(Event(door_opened), [Transition(closed without item, opened without
item, door_opened)], >['door opened', 'opened without item'], <['closed without
item', 'door closed'])
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Software-controlled systems
are difficult to develop
Control software can be very complex
– Continuous interaction
– between software and hardware
– with external world and users
– Must respect
– functional requirements
• Oven should cook food placed in oven
with specified power and duration
– non-functional requirements
• Oven should stop cooking if doors are opened
14
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
• Based on Bertrand Meyer’s “Design by Contract” in 1986
• Add precise and dynamically verifiable specifications to
executable code components (e.g., methods, functions,
classes) or model components (e.g., states, transitions)
• The code (or model) should respect a contract composed of
– preconditions
– postconditions
– invariants
Contract-driven development
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Example (from https://www.eiffel.com/values/design-by-contract/ introduction)
Contract-driven development
class DICTIONARY [ ELEMENT ]
feature
put (x : ELEMENT; key : STRING ) is
require
count <= capacity
not key.empty
ensure
has (x)
item (key) = x
count = old count + 1
end
invariant
0 <= count
count <= capacity
end
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Contract-driven modelling
contract for controller state:
invariants:
not sent(heating_on) or active(cooking mode)
timer>=0
0 < power <= MAXPOWER
contract for cooking mode state:
precondition: timer>0
invariants:
timer >= 0
power == power@pre
postcondition: received(door_opened) or timer==0
contract for ready state:
invariant: timer > 0
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Contract-driven modelling
statechart:
name: Microwave controller with contracts
preamble: | # as on earlier slide
root state:
name: controller
initial: door closed
on entry: |
power = POWER_DEFAULT
timer = 0
# ...some stuff removed here...
contract:
- always: not sent('heating_on') or active('cooking mode’)
- always: timer >= 0
- always: 0 <= power <= MAXPOWER
states:
- name: door closed
initial: closed with item
states:
- name: closed with item
states:
- name: cooking mode
# ... some stuff removed here...
contract:
- before: timer > 0
- always: timer >= 0
- always: power == __old__.power or received('cooking_stop’)
- after: received('door_opened') or timer == 0
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
SISMIC
Macrostep semantics revisited
A method for testing and validating executable statechart models 845
Fig. 8 Sismic’s macrostep
semantics, adding support
required for dynamic monitoring
of contracts and properties
with support for
runtime monitoring
of contracts
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
SISMIC
Macrostep semantics revisited
interpreter.queue('door_opened’, 'item_placed', 'door_closed')
interpreter.queue('timer_dec', 'cooking_start', 'tick')])
interpreter.execute()
MacroStep(None, [], >['controller', 'door closed', 'closed without item'], <[]),
MacroStep(Event(door_opened), [Transition(closed without item, opened without item,
door_opened)], >['door opened', 'opened without item'], <['closed without item', 'door
closed']),
MacroStep(InternalEvent(lamp_on), [], >[], <[]),
MacroStep(Event(item_placed), [Transition(opened without item, opened with item,
item_placed)], >['opened with item'], <['opened without item']),
MacroStep(Event(door_closed), [Transition(opened with item, closed with item,
door_closed)], >['door closed', 'closed with item', 'program mode', 'not ready'],
<['opened with item', 'door opened']),
…
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Example of failing
contract
InvariantError
State: controller
Assertion: timer >= 0
Configuration:
[controller, door closed, closed with item,
program mode, not ready]
Step:
event timer_dec
internal transition on closed with item
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Solution to failing
contract
Add guards to the actions associated to the events
that increment and decrement power and timer
timer_dec [timer>0] / timer = timer - 1
power_inc [power<MAXPOWER] / power = power+1
power_dec [power>1] / power = power -1
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Without guards on
timer_dec event
Test-driven
development
class MicrowaveTests(unittest.TestCase):
def setUp(self):
# code here for setting up statechart interpreter
def test_negative_timer(self):
self.interpreter. queue (door_opened, item_placed, door_closed, timer_dec)
interpreter.execute()
self.assertEqual(self.interpreter.context['timer'], 0)
test negative_timer ... FAIL
===========================================
AssertionError: -1 != 0
----------------------------------------------------------------------
Ran 1 tests in 0.005s
FAILED (failures=1)
Using Python’s unittest module
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Test-driven
development
class MicrowaveTests(unittest.TestCase):
def setUp(self):
# code here for setting up statechart interpreter
def test_negative_timer(self):
self.interpreter. queue (door_opened, item_placed, door_closed, timer_dec)
interpreter.execute()
self.assertEqual(self.interpreter.context['timer'], 0)
Using Python’s unittest module
test negative_timer ... ok
----------------------------------------------------------------------
Ran 1 tests in 0.005s
OK
With guards on
timer_dec event
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Coverage analysis
State coverage: 81.82%
Entered states:
controller (3) | door closed (4) |door opened (2) |
closed without item (3) | opened without item (2) |
opened with item (2) | closed with item (1) |
not ready (1) | program mode (1)
Remaining states:
cooking mode | ready
Transition coverage: 16.67%
Processed transitions:
opened without item [item_placed] -> opened with item (2)
closed without item [door_opened] -> opened without item (2)
opened with item [door_closed] -> closed with item (1)
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
• Include customer test practices into TDD
• Encourage collaboration between developers, QA,
and non- technical stakeholders (domain experts,
project managers, users)
• Reduce technical gap between developers and
other project stakeholders
• Use a domain-specific textual language to
specify how the code should behave
– By defining feature specifications and scenarios
– Using Gherkin language
– Supported by Cucumber framework
Behaviour-Driven
Development
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Example
(from docs.behat.org/en/v2.5/guides/1.gherkin.html)
Behaviour-Driven
Development
Feature: Serve coffee
In order to earn money customers should be able to buy coffee
Scenario: Buy last coffee
Given there is 1 coffee left in the machine
And I have deposited 1 dollar
When I press the coffee button
Then I should be served a coffee
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Behaviour-Driven
Modeling
Feature: No heating if door is opened
Scenario: No heating when nothing is done
When I power up the microwave
Then heating should not be on
Scenario: No heating when item is placed
Given I open the door
When I place an item
Then heating should not turn on
Scenario: No heating when door is not closed
Given I open the door
And I place an item
When I close the door
Then heating should not turn on
Microwave scenarios
Described in (structured) textual
language, without any knowledge
of the statechart’s internals.
1 feature passed, 0 failed, 0 skipped
3 scenarios passed, 0 failed, 0 skipped
11 steps passed, 0 failed, 0 skipped, 0 undefined
Took 0m0.005s
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Behaviour-Driven
Modeling
Feature: No heating if door is opened
Scenario: No heating when nothing is done
Given I do nothing
And I execute the statechart
Then state cooking_mode should not be active
And event heating_on should not be fired
Scenario: No heating when item is placed
Given I send event door_opened
When I send event item_placed
Then event heating_on should not be fired
Scenario: No heating when door is not closed
Given I send event door_opened
And I send event item_placed
When I send event door_closed
Then event heating_on should not be fired
Intermediate
(statechart-specific) scenarios
Automatically generated
from high-level scenarios
through user-defined mapping.
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
Behaviour-Driven
Modeling
from sismic.bdd import map_action, map_assertion
map_action('I open the door', 'I send event door_opened’)
map_action('I close the door', 'I send event door_closed’)
map_action('I place an item in the oven', 'I send event item_placed’)
map_action('I press increase timer button {time} times', 'I repeat "I send event
timer_inc" {time} times’)
map_action('I press increase power button', 'I send event power_inc’)
map_action('I press start button', 'I send event cooking_start’)
map_action('I press stop button', 'I send event cooking_stop’)
map_action('{tick} seconds elapsed', 'I repeat "I send event timer_tick" {tick} times’)
map_assertion('Heating turns on', 'Event heating_on is fired’)
map_assertion('Heating does not turn on', 'Event heating_on is not fired’
map_assertion('heating turns off', 'Event heating_off is fired’)
map_assertion('lamp turns on', 'Event lamp_switch_on is fired’)
map_assertion('lamp turns off', 'Event lamp_switch_off is fired')
Mapping
specification
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
SISMIC
Behaviour-Driven Modeling
from behave import given, when, then
from sismic.io import import_from_yaml
from sismic.interpreter import Interpreter
from sismic.interpreter.helpers import log_trace
from sismic.model import Event
@given('I execute the statechart')
def execute_statechart(context):
_execute_statechart(context, force_execution=True)
@then('state {state_name} should be active')
def state_is_active(context, state_name):
assert state_name in context._statechart.states, 'Unknown state {}'.format(state_name)
assert state_name in context._interpreter.configuration, 'State {} is not
active'.format(state_name)
Using Python’s behave module
$ sismic-behave microwave.yaml --features heating.feature
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
SISMIC
Property statecharts
Define and verify behavioural properties by
1. instrumenting the statechart interpreter
2. intercepting specific actions of the statechart being
executed
• entered(<NAME OF STATE>)
• exited(<NAME OF STATE>)
• consumed(<NAME OF EVENT>)
• sent(<NAME OF EVENT>)
• …
3. executing a statechart that verifies a desirable or
undesirable property
<<property statechart>>
Heating does not start if door is opened
door is
closed
door is
opened
consumed(door_closed)
consumed(door_opened)
failure
sent(heating_on)
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
SISMIC
Property statecharts
Examples
<<property statechart>>
Heating does not start if door is opened
door is
closed
door is
opened
consumed(door_closed)
consumed(door_opened)
failure
sent(heating_on)
<<property statechart>>
Heating must stop when door is opened
heating
is off
heating
is on
sent(heating_off)
sent(heating_on)
heating is on while
door is opened
failure
consumed(door_opened)
consumed(tick)
sent(heating_off)
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
SISMIC
Communicating statecharts
• Statecharts can communicate with other
statecharts or external components (e.g. a
user interface) by sending/receiving events
• This is realised by binding their statechart
interpreters
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
SISMIC
Communicating statecharts
Example: Events sent by buttons are propagated to elevator
buttons = Interpreter(import_from_yaml(open(‘buttons.yaml')))
elevator = Interpreter(import_from_yaml(open(‘elevator.yaml')))
buttons.bind(elevator)
buttons.queue(Event(’floor_2_pushed'))
buttons.execute()
Awaiting events in buttons: [Event(button_2_pushed)]
Awaiting events in buttons: [InternalEvent(floorSelected, floor=2)]
Awaiting events in elevator: [Event(floorSelected, floor=2)]
elevator.execute()
print('Current floor:', elevator.context.get('current'))
Current floor: 2
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
SISMIC
Other features
• Use other semantic variants of statecharts by
overriding private methods of Interpreter
• E.g. outer-first instead of inner-first semantics;
changing priority of events
• Different ways of dealing with time
– Real time versus simulated time
Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
• Model quality assessment (model smells) and improvement (model
refactoring)
– E.g. splitting up a complex statechart into multiple interacting statecharts
• More advanced testing techniques
– Automatic generation of contracts based on scenario specifications
– Automatic generation of tests based on contract specifications
– Mutation testing
– ...
• Explore (dynamic?) model checking techniques
– E.g., based on LTL formulas, using Dwyer’s specification patterns, others?
• Model variability analysis
• Consider product families (e.g. different microwave variants) and analyse commonalities
and variabilities in their statechart models
• Design space exploration
• Analyse pros and cons of syntactically different, but semantically similar
statecharts
• Model composition and scalability
• Semantic variation
• Detecting if statechart is compatible with alternative statechart semantics
Future Work
Conclusion / Summary
Feature: No heating if door is opened
Scenario: No heating when nothing is done
When I power up the microwave
Then heating should not be on
Scenario: No heating when item is placed
Given I open the door
When I place an item
Then heating should not turn on
Scenario: No heating when door is not closed
Given I open the door
And I place an item
When I close the door
Then heating should not turn on
ng and validating executable statechart models 843
ral overview
framework
d validate statecharts, by using the techniques
BDD, and dynamic monitoring of contracts
expressed over statecharts.
and support the proposed method, we devel-
c tool. Sismic is a Python library for inter-
ing statecharts. Version 1.0.0 has been used
It is distributed through the Python Pack-
i.python.org/pypi/sismic). Its documentation
on sismic.readthedocs.io. Its source code is
thub.com/AlexandreDecan/sismic under the
ence LGPLv3, adhering to the principles of
d open research. It allows other researchers to
the tool, and it facilitates integrating received
ewer versions of the tool.
vel architecture of Sismic is summarised in
ferent code components and work products
ture will be presented in the following sub-
rts of the architecture included in the shaded
d sismic havebeendevelopedspecificallyfor
statechart simulation, testing and validation.
se activities, Sismic makes use of third-party
ehave for BDD) or external tools (e.g. Plan-
EME for model visualisation and editing).
ut files used by Sismic are shown in yellow
editor and import these models through the I/O API provided
forthispurpose.Uponimportofastatechartfile,thesyntactic
correctness of the statechart is checked automatically.
Currently, Sismic allows importing and exporting state-
chart expressed using the human-readable YAML markup
language and has experimental support for importing and
exporting statechart diagrams expressed in the AMOLA lan-
guage [46] through the ASEME IDE2 statechart editor [48].
Sismic also provides export support to PlantUML3 in order
to visualise statecharts, benefiting from its automatic layout
features.ThisishowwegeneratedFig.14forexample.Other
exchange formats can be easily accommodated.
4.2 Statechart interpreter
The core of Sismic is composed of its statechart interpreter.
In order to execute a statechart model, a statechart inter-
pretermustbeinstantiated.Thisinterpreterreliesonanaction
code evaluator to execute any action code contained in the
statechart specification. By default, action code and guards
(conditions) are expressed using regular Python code. Other
action languages can be supported if a language interpreter
is provided for them.
The statechart interpreter offers a discrete, step-by-step
...
...
<<property statechart>>
Heating must stop when door is opened
heating
is off
heating
is on
sent(heating_off)
sent(heating_on)
heating is on while
door is opened
failure
consumed(door_opened)
consumed(tick)
sent(heating_off)
contract for controller state:
invariants:
not sent(heating_on) or
active(cooking mode)
timer>=0
0 < power <= MAXPOWER
contract for cooking mode state:
precondition: timer>0
invariants:
timer >= 0
power == power@pre
postcondition:
received(door_opened) or timer==0
contract for ready state:
invariant: timer > 0
Ad

More Related Content

Similar to Model Testing of Executable Statecharts using SISMIC (20)

Infrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using PrometheusInfrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using Prometheus
Marco Pas
 
[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test
Zsolt Fabok
 
UberCloud: From Experiment to Marketplace
UberCloud: From Experiment to MarketplaceUberCloud: From Experiment to Marketplace
UberCloud: From Experiment to Marketplace
The UberCloud
 
UberCloud: From Experiment to Marketplace
UberCloud: From Experiment to MarketplaceUberCloud: From Experiment to Marketplace
UberCloud: From Experiment to Marketplace
inside-BigData.com
 
Tick
TickTick
Tick
Vincenzo Ferrari
 
11thDockerMeetupSwitzerland
11thDockerMeetupSwitzerland11thDockerMeetupSwitzerland
11thDockerMeetupSwitzerland
Michael Mueller
 
After test Barcelona 20160303
After test Barcelona 20160303After test Barcelona 20160303
After test Barcelona 20160303
Almudena Vivanco
 
OSMC 2024 | Zabbix meets AI – The power of opensource monitoring combined wit...
OSMC 2024 | Zabbix meets AI – The power of opensource monitoring combined wit...OSMC 2024 | Zabbix meets AI – The power of opensource monitoring combined wit...
OSMC 2024 | Zabbix meets AI – The power of opensource monitoring combined wit...
NETWAYS
 
Odoo Experience 2018 - Code Profiling in Odoo
Odoo Experience 2018 - Code Profiling in OdooOdoo Experience 2018 - Code Profiling in Odoo
Odoo Experience 2018 - Code Profiling in Odoo
ElínAnna Jónasdóttir
 
The Green Lab - [04 B] [PWA] Experiment setup
The Green Lab - [04 B] [PWA] Experiment setupThe Green Lab - [04 B] [PWA] Experiment setup
The Green Lab - [04 B] [PWA] Experiment setup
Ivano Malavolta
 
Creating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with ChaperoneCreating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with Chaperone
Gary Wisniewski
 
Terraform – Infrastructure as Code (Kielux'18)
Terraform – Infrastructure as Code (Kielux'18)Terraform – Infrastructure as Code (Kielux'18)
Terraform – Infrastructure as Code (Kielux'18)
Martin Schütte
 
Tdd & clean code
Tdd & clean codeTdd & clean code
Tdd & clean code
Eyal Vardi
 
Modelling performance tests
Modelling performance testsModelling performance tests
Modelling performance tests
Almudena Vivanco
 
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
QADay
 
Interoute Virtual Data Centre api 101
Interoute Virtual Data Centre api 101Interoute Virtual Data Centre api 101
Interoute Virtual Data Centre api 101
jon_graham1977
 
Terraform: Cloud Configuration Management (WTC/IPC'16)
Terraform: Cloud Configuration Management (WTC/IPC'16)Terraform: Cloud Configuration Management (WTC/IPC'16)
Terraform: Cloud Configuration Management (WTC/IPC'16)
Martin Schütte
 
ConnectTheDots - My Galileo based weather station and first entry into IoT
ConnectTheDots - My Galileo based weather station and first entry into IoTConnectTheDots - My Galileo based weather station and first entry into IoT
ConnectTheDots - My Galileo based weather station and first entry into IoT
Joe Healy
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3
Velocidex Enterprises
 
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
Agile Testing Alliance
 
Infrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using PrometheusInfrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using Prometheus
Marco Pas
 
[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test
Zsolt Fabok
 
UberCloud: From Experiment to Marketplace
UberCloud: From Experiment to MarketplaceUberCloud: From Experiment to Marketplace
UberCloud: From Experiment to Marketplace
The UberCloud
 
UberCloud: From Experiment to Marketplace
UberCloud: From Experiment to MarketplaceUberCloud: From Experiment to Marketplace
UberCloud: From Experiment to Marketplace
inside-BigData.com
 
11thDockerMeetupSwitzerland
11thDockerMeetupSwitzerland11thDockerMeetupSwitzerland
11thDockerMeetupSwitzerland
Michael Mueller
 
After test Barcelona 20160303
After test Barcelona 20160303After test Barcelona 20160303
After test Barcelona 20160303
Almudena Vivanco
 
OSMC 2024 | Zabbix meets AI – The power of opensource monitoring combined wit...
OSMC 2024 | Zabbix meets AI – The power of opensource monitoring combined wit...OSMC 2024 | Zabbix meets AI – The power of opensource monitoring combined wit...
OSMC 2024 | Zabbix meets AI – The power of opensource monitoring combined wit...
NETWAYS
 
Odoo Experience 2018 - Code Profiling in Odoo
Odoo Experience 2018 - Code Profiling in OdooOdoo Experience 2018 - Code Profiling in Odoo
Odoo Experience 2018 - Code Profiling in Odoo
ElínAnna Jónasdóttir
 
The Green Lab - [04 B] [PWA] Experiment setup
The Green Lab - [04 B] [PWA] Experiment setupThe Green Lab - [04 B] [PWA] Experiment setup
The Green Lab - [04 B] [PWA] Experiment setup
Ivano Malavolta
 
Creating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with ChaperoneCreating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with Chaperone
Gary Wisniewski
 
Terraform – Infrastructure as Code (Kielux'18)
Terraform – Infrastructure as Code (Kielux'18)Terraform – Infrastructure as Code (Kielux'18)
Terraform – Infrastructure as Code (Kielux'18)
Martin Schütte
 
Tdd & clean code
Tdd & clean codeTdd & clean code
Tdd & clean code
Eyal Vardi
 
Modelling performance tests
Modelling performance testsModelling performance tests
Modelling performance tests
Almudena Vivanco
 
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
QADay
 
Interoute Virtual Data Centre api 101
Interoute Virtual Data Centre api 101Interoute Virtual Data Centre api 101
Interoute Virtual Data Centre api 101
jon_graham1977
 
Terraform: Cloud Configuration Management (WTC/IPC'16)
Terraform: Cloud Configuration Management (WTC/IPC'16)Terraform: Cloud Configuration Management (WTC/IPC'16)
Terraform: Cloud Configuration Management (WTC/IPC'16)
Martin Schütte
 
ConnectTheDots - My Galileo based weather station and first entry into IoT
ConnectTheDots - My Galileo based weather station and first entry into IoTConnectTheDots - My Galileo based weather station and first entry into IoT
ConnectTheDots - My Galileo based weather station and first entry into IoT
Joe Healy
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3
Velocidex Enterprises
 
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
Agile Testing Alliance
 

More from Tom Mens (20)

Dependency Issues in Open Source Software Package Registries
Dependency Issues in Open Source Software Package RegistriesDependency Issues in Open Source Software Package Registries
Dependency Issues in Open Source Software Package Registries
Tom Mens
 
How to be(come) a successful PhD student
How to be(come) a successful PhD studentHow to be(come) a successful PhD student
How to be(come) a successful PhD student
Tom Mens
 
Recognising bot activity in collaborative software development
Recognising bot activity in collaborative software developmentRecognising bot activity in collaborative software development
Recognising bot activity in collaborative software development
Tom Mens
 
A Dataset of Bot and Human Activities in GitHub
A Dataset of Bot and Human Activities in GitHubA Dataset of Bot and Human Activities in GitHub
A Dataset of Bot and Human Activities in GitHub
Tom Mens
 
The (r)evolution of CI/CD on GitHub
 The (r)evolution of CI/CD on GitHub The (r)evolution of CI/CD on GitHub
The (r)evolution of CI/CD on GitHub
Tom Mens
 
Nurturing the Software Ecosystems of the Future
Nurturing the Software Ecosystems of the FutureNurturing the Software Ecosystems of the Future
Nurturing the Software Ecosystems of the Future
Tom Mens
 
Comment programmer un robot en 30 minutes?
Comment programmer un robot en 30 minutes?Comment programmer un robot en 30 minutes?
Comment programmer un robot en 30 minutes?
Tom Mens
 
On the rise and fall of CI services in GitHub
On the rise and fall of CI services in GitHubOn the rise and fall of CI services in GitHub
On the rise and fall of CI services in GitHub
Tom Mens
 
On backporting practices in package dependency networks
On backporting practices in package dependency networksOn backporting practices in package dependency networks
On backporting practices in package dependency networks
Tom Mens
 
Comparing semantic versioning practices in Cargo, npm, Packagist and Rubygems
Comparing semantic versioning practices in Cargo, npm, Packagist and RubygemsComparing semantic versioning practices in Cargo, npm, Packagist and Rubygems
Comparing semantic versioning practices in Cargo, npm, Packagist and Rubygems
Tom Mens
 
Lost in Zero Space
Lost in Zero SpaceLost in Zero Space
Lost in Zero Space
Tom Mens
 
Evaluating a bot detection model on git commit messages
Evaluating a bot detection model on git commit messagesEvaluating a bot detection model on git commit messages
Evaluating a bot detection model on git commit messages
Tom Mens
 
Is my software ecosystem healthy? It depends!
Is my software ecosystem healthy? It depends!Is my software ecosystem healthy? It depends!
Is my software ecosystem healthy? It depends!
Tom Mens
 
Bot or not? Detecting bots in GitHub pull request activity based on comment s...
Bot or not? Detecting bots in GitHub pull request activity based on comment s...Bot or not? Detecting bots in GitHub pull request activity based on comment s...
Bot or not? Detecting bots in GitHub pull request activity based on comment s...
Tom Mens
 
On the fragility of open source software packaging ecosystems
On the fragility of open source software packaging ecosystemsOn the fragility of open source software packaging ecosystems
On the fragility of open source software packaging ecosystems
Tom Mens
 
How magic is zero? An Empirical Analysis of Initial Development Releases in S...
How magic is zero? An Empirical Analysis of Initial Development Releases in S...How magic is zero? An Empirical Analysis of Initial Development Releases in S...
How magic is zero? An Empirical Analysis of Initial Development Releases in S...
Tom Mens
 
Comparing dependency issues across software package distributions (FOSDEM 2020)
Comparing dependency issues across software package distributions (FOSDEM 2020)Comparing dependency issues across software package distributions (FOSDEM 2020)
Comparing dependency issues across software package distributions (FOSDEM 2020)
Tom Mens
 
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
Tom Mens
 
SecoHealth 2019 Research Achievements
SecoHealth 2019 Research AchievementsSecoHealth 2019 Research Achievements
SecoHealth 2019 Research Achievements
Tom Mens
 
SECO-Assist 2019 research seminar
SECO-Assist 2019 research seminarSECO-Assist 2019 research seminar
SECO-Assist 2019 research seminar
Tom Mens
 
Dependency Issues in Open Source Software Package Registries
Dependency Issues in Open Source Software Package RegistriesDependency Issues in Open Source Software Package Registries
Dependency Issues in Open Source Software Package Registries
Tom Mens
 
How to be(come) a successful PhD student
How to be(come) a successful PhD studentHow to be(come) a successful PhD student
How to be(come) a successful PhD student
Tom Mens
 
Recognising bot activity in collaborative software development
Recognising bot activity in collaborative software developmentRecognising bot activity in collaborative software development
Recognising bot activity in collaborative software development
Tom Mens
 
A Dataset of Bot and Human Activities in GitHub
A Dataset of Bot and Human Activities in GitHubA Dataset of Bot and Human Activities in GitHub
A Dataset of Bot and Human Activities in GitHub
Tom Mens
 
The (r)evolution of CI/CD on GitHub
 The (r)evolution of CI/CD on GitHub The (r)evolution of CI/CD on GitHub
The (r)evolution of CI/CD on GitHub
Tom Mens
 
Nurturing the Software Ecosystems of the Future
Nurturing the Software Ecosystems of the FutureNurturing the Software Ecosystems of the Future
Nurturing the Software Ecosystems of the Future
Tom Mens
 
Comment programmer un robot en 30 minutes?
Comment programmer un robot en 30 minutes?Comment programmer un robot en 30 minutes?
Comment programmer un robot en 30 minutes?
Tom Mens
 
On the rise and fall of CI services in GitHub
On the rise and fall of CI services in GitHubOn the rise and fall of CI services in GitHub
On the rise and fall of CI services in GitHub
Tom Mens
 
On backporting practices in package dependency networks
On backporting practices in package dependency networksOn backporting practices in package dependency networks
On backporting practices in package dependency networks
Tom Mens
 
Comparing semantic versioning practices in Cargo, npm, Packagist and Rubygems
Comparing semantic versioning practices in Cargo, npm, Packagist and RubygemsComparing semantic versioning practices in Cargo, npm, Packagist and Rubygems
Comparing semantic versioning practices in Cargo, npm, Packagist and Rubygems
Tom Mens
 
Lost in Zero Space
Lost in Zero SpaceLost in Zero Space
Lost in Zero Space
Tom Mens
 
Evaluating a bot detection model on git commit messages
Evaluating a bot detection model on git commit messagesEvaluating a bot detection model on git commit messages
Evaluating a bot detection model on git commit messages
Tom Mens
 
Is my software ecosystem healthy? It depends!
Is my software ecosystem healthy? It depends!Is my software ecosystem healthy? It depends!
Is my software ecosystem healthy? It depends!
Tom Mens
 
Bot or not? Detecting bots in GitHub pull request activity based on comment s...
Bot or not? Detecting bots in GitHub pull request activity based on comment s...Bot or not? Detecting bots in GitHub pull request activity based on comment s...
Bot or not? Detecting bots in GitHub pull request activity based on comment s...
Tom Mens
 
On the fragility of open source software packaging ecosystems
On the fragility of open source software packaging ecosystemsOn the fragility of open source software packaging ecosystems
On the fragility of open source software packaging ecosystems
Tom Mens
 
How magic is zero? An Empirical Analysis of Initial Development Releases in S...
How magic is zero? An Empirical Analysis of Initial Development Releases in S...How magic is zero? An Empirical Analysis of Initial Development Releases in S...
How magic is zero? An Empirical Analysis of Initial Development Releases in S...
Tom Mens
 
Comparing dependency issues across software package distributions (FOSDEM 2020)
Comparing dependency issues across software package distributions (FOSDEM 2020)Comparing dependency issues across software package distributions (FOSDEM 2020)
Comparing dependency issues across software package distributions (FOSDEM 2020)
Tom Mens
 
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
Tom Mens
 
SecoHealth 2019 Research Achievements
SecoHealth 2019 Research AchievementsSecoHealth 2019 Research Achievements
SecoHealth 2019 Research Achievements
Tom Mens
 
SECO-Assist 2019 research seminar
SECO-Assist 2019 research seminarSECO-Assist 2019 research seminar
SECO-Assist 2019 research seminar
Tom Mens
 
Ad

Recently uploaded (20)

Aligning Projects to Strategy During Economic Uncertainty
Aligning Projects to Strategy During Economic UncertaintyAligning Projects to Strategy During Economic Uncertainty
Aligning Projects to Strategy During Economic Uncertainty
OnePlan Solutions
 
Quasar Framework Introduction for C++ develpoers
Quasar Framework Introduction for C++ develpoersQuasar Framework Introduction for C++ develpoers
Quasar Framework Introduction for C++ develpoers
sadadkhah
 
Let's Do Bad Things to Unsecured Containers
Let's Do Bad Things to Unsecured ContainersLet's Do Bad Things to Unsecured Containers
Let's Do Bad Things to Unsecured Containers
Gene Gotimer
 
IObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download FreeIObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download Free
Iobit Uninstaller Pro Crack
 
Buy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training techBuy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training tech
Rustici Software
 
Shift Right Security for EKS Webinar Slides
Shift Right Security for EKS Webinar SlidesShift Right Security for EKS Webinar Slides
Shift Right Security for EKS Webinar Slides
Anchore
 
Hydraulic Modeling And Simulation Software Solutions.pptx
Hydraulic Modeling And Simulation Software Solutions.pptxHydraulic Modeling And Simulation Software Solutions.pptx
Hydraulic Modeling And Simulation Software Solutions.pptx
julia smits
 
iTop VPN With Crack Lifetime Activation Key
iTop VPN With Crack Lifetime Activation KeyiTop VPN With Crack Lifetime Activation Key
iTop VPN With Crack Lifetime Activation Key
raheemk1122g
 
TrsLabs - AI Agents for All - Chatbots to Multi-Agents
TrsLabs - AI Agents for All - Chatbots to Multi-AgentsTrsLabs - AI Agents for All - Chatbots to Multi-Agents
TrsLabs - AI Agents for All - Chatbots to Multi-Agents
Trs Labs
 
Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...
Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...
Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...
jamesmartin143256
 
Why CoTester Is the AI Testing Tool QA Teams Can’t Ignore
Why CoTester Is the AI Testing Tool QA Teams Can’t IgnoreWhy CoTester Is the AI Testing Tool QA Teams Can’t Ignore
Why CoTester Is the AI Testing Tool QA Teams Can’t Ignore
Shubham Joshi
 
Logs, Metrics, traces and Mayhem - An Interactive Observability Adventure Wor...
Logs, Metrics, traces and Mayhem - An Interactive Observability Adventure Wor...Logs, Metrics, traces and Mayhem - An Interactive Observability Adventure Wor...
Logs, Metrics, traces and Mayhem - An Interactive Observability Adventure Wor...
Imma Valls Bernaus
 
File Viewer Plus 7.5.5.49 Crack Full Version
File Viewer Plus 7.5.5.49 Crack Full VersionFile Viewer Plus 7.5.5.49 Crack Full Version
File Viewer Plus 7.5.5.49 Crack Full Version
raheemk1122g
 
Exchange Migration Tool- Shoviv Software
Exchange Migration Tool- Shoviv SoftwareExchange Migration Tool- Shoviv Software
Exchange Migration Tool- Shoviv Software
Shoviv Software
 
A Comprehensive Guide to CRM Software Benefits for Every Business Stage
A Comprehensive Guide to CRM Software Benefits for Every Business StageA Comprehensive Guide to CRM Software Benefits for Every Business Stage
A Comprehensive Guide to CRM Software Benefits for Every Business Stage
SynapseIndia
 
SamFw Tool v4.9 Samsung Frp Tool Free Download
SamFw Tool v4.9 Samsung Frp Tool Free DownloadSamFw Tool v4.9 Samsung Frp Tool Free Download
SamFw Tool v4.9 Samsung Frp Tool Free Download
Iobit Uninstaller Pro Crack
 
Best HR and Payroll Software in Bangladesh - accordHRM
Best HR and Payroll Software in Bangladesh - accordHRMBest HR and Payroll Software in Bangladesh - accordHRM
Best HR and Payroll Software in Bangladesh - accordHRM
accordHRM
 
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-RuntimeReinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Natan Silnitsky
 
Hyper Casual Game Developers Company
Hyper  Casual  Game  Developers  CompanyHyper  Casual  Game  Developers  Company
Hyper Casual Game Developers Company
Nova Carter
 
Codingo Ltd. - Introduction - Mobile application, web, custom software develo...
Codingo Ltd. - Introduction - Mobile application, web, custom software develo...Codingo Ltd. - Introduction - Mobile application, web, custom software develo...
Codingo Ltd. - Introduction - Mobile application, web, custom software develo...
Codingo
 
Aligning Projects to Strategy During Economic Uncertainty
Aligning Projects to Strategy During Economic UncertaintyAligning Projects to Strategy During Economic Uncertainty
Aligning Projects to Strategy During Economic Uncertainty
OnePlan Solutions
 
Quasar Framework Introduction for C++ develpoers
Quasar Framework Introduction for C++ develpoersQuasar Framework Introduction for C++ develpoers
Quasar Framework Introduction for C++ develpoers
sadadkhah
 
Let's Do Bad Things to Unsecured Containers
Let's Do Bad Things to Unsecured ContainersLet's Do Bad Things to Unsecured Containers
Let's Do Bad Things to Unsecured Containers
Gene Gotimer
 
IObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download FreeIObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download Free
Iobit Uninstaller Pro Crack
 
Buy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training techBuy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training tech
Rustici Software
 
Shift Right Security for EKS Webinar Slides
Shift Right Security for EKS Webinar SlidesShift Right Security for EKS Webinar Slides
Shift Right Security for EKS Webinar Slides
Anchore
 
Hydraulic Modeling And Simulation Software Solutions.pptx
Hydraulic Modeling And Simulation Software Solutions.pptxHydraulic Modeling And Simulation Software Solutions.pptx
Hydraulic Modeling And Simulation Software Solutions.pptx
julia smits
 
iTop VPN With Crack Lifetime Activation Key
iTop VPN With Crack Lifetime Activation KeyiTop VPN With Crack Lifetime Activation Key
iTop VPN With Crack Lifetime Activation Key
raheemk1122g
 
TrsLabs - AI Agents for All - Chatbots to Multi-Agents
TrsLabs - AI Agents for All - Chatbots to Multi-AgentsTrsLabs - AI Agents for All - Chatbots to Multi-Agents
TrsLabs - AI Agents for All - Chatbots to Multi-Agents
Trs Labs
 
Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...
Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...
Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...
jamesmartin143256
 
Why CoTester Is the AI Testing Tool QA Teams Can’t Ignore
Why CoTester Is the AI Testing Tool QA Teams Can’t IgnoreWhy CoTester Is the AI Testing Tool QA Teams Can’t Ignore
Why CoTester Is the AI Testing Tool QA Teams Can’t Ignore
Shubham Joshi
 
Logs, Metrics, traces and Mayhem - An Interactive Observability Adventure Wor...
Logs, Metrics, traces and Mayhem - An Interactive Observability Adventure Wor...Logs, Metrics, traces and Mayhem - An Interactive Observability Adventure Wor...
Logs, Metrics, traces and Mayhem - An Interactive Observability Adventure Wor...
Imma Valls Bernaus
 
File Viewer Plus 7.5.5.49 Crack Full Version
File Viewer Plus 7.5.5.49 Crack Full VersionFile Viewer Plus 7.5.5.49 Crack Full Version
File Viewer Plus 7.5.5.49 Crack Full Version
raheemk1122g
 
Exchange Migration Tool- Shoviv Software
Exchange Migration Tool- Shoviv SoftwareExchange Migration Tool- Shoviv Software
Exchange Migration Tool- Shoviv Software
Shoviv Software
 
A Comprehensive Guide to CRM Software Benefits for Every Business Stage
A Comprehensive Guide to CRM Software Benefits for Every Business StageA Comprehensive Guide to CRM Software Benefits for Every Business Stage
A Comprehensive Guide to CRM Software Benefits for Every Business Stage
SynapseIndia
 
Best HR and Payroll Software in Bangladesh - accordHRM
Best HR and Payroll Software in Bangladesh - accordHRMBest HR and Payroll Software in Bangladesh - accordHRM
Best HR and Payroll Software in Bangladesh - accordHRM
accordHRM
 
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-RuntimeReinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Natan Silnitsky
 
Hyper Casual Game Developers Company
Hyper  Casual  Game  Developers  CompanyHyper  Casual  Game  Developers  Company
Hyper Casual Game Developers Company
Nova Carter
 
Codingo Ltd. - Introduction - Mobile application, web, custom software develo...
Codingo Ltd. - Introduction - Mobile application, web, custom software develo...Codingo Ltd. - Introduction - Mobile application, web, custom software develo...
Codingo Ltd. - Introduction - Mobile application, web, custom software develo...
Codingo
 
Ad

Model Testing of Executable Statecharts using SISMIC

  • 1. Model Testing of Executable Statecharts Tom Mens Alexandre Decan Software Engineering Lab University of Mons, Belgium
  • 2. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024
  • 3. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Statecharts (hierarchical state machines) • Invented in 1987 by David Harel • Used to specify, design and control the complex behaviour of discrete-event systems – embedded systems, user interfaces, network protocols, robots, computer game logic, ... • Executable semantics – Can be used to generate executable source code, if a statechart compiler is available – Can be integrated in an existing code base directly, if a statechart interpreter is available
  • 4. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Statecharts A simple example An Elevator controller Visualised with PlantUML (https://plantuml.com)
  • 5. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Statecharts Existing Tooling Many existing tools • Itemis Create: A statechart simulator and code generator https://www.itemis.com/en/products/itemis-create/ • Mathworks Stateflow https://www.mathworks.com/products/stateflow.html • QuantumLeaps QM and QP for embedded software development https://www.state-machine.com • IBM Rational Statemate • IBM Rational Rhapsody • SISMIC: A Python-based statechart interpreter https://pypi.org/project/sismic/ focus of this talk!
  • 6. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Running example A microwave oven controller Created with Itemis Create
  • 7. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 • Many “agile” development techniques provide lightweight approaches to facilitate change and increase reliability of software • Design by contract • Test-driven development • unit testing • behavior-driven development • Dynamic verification of properties • We raise these techniques to the level of executable statechart models Defensive software development
  • 8. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 SISMIC Architecture g and validating executable statechart models 843 al overview framework validate statecharts, by using the techniques editor and import these models through the I/O API provided ... ... https://sismic.readthedocs.io https://github.com/AlexandreDecan/sismic
  • 9. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Running example A microwave oven controller statechart: name: Microwave controller preamble: | POWER_VALUES = [300, 600, 900, 1200, 1500] POWER_DEFAULT = 2 # 900W MAXPOWER = 3 # 1200W root state: name: controller initial: door closed on entry: | power = POWER_DEFAULT timer = 0 transitions: - event: cooking_stop action: | power = POWER_DEFAULT timer = 0 states: - name: door closed initial: closed without item states: - name: closed without item transitions: - event: door_opened target: opened without item - name: closed with item ... SISMIC adopts a YAML-based specification of statecharts
  • 10. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Running example A micowave oven controller SISMIC supports visualisation through PlantUML
  • 11. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Running example A microwave oven controller Example: Basic GUI to control the executable statechart model SISMIC provides an API for Python code to use the statechart model
  • 12. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 SISMIC Macrostep semantics Stepwise execution of statechart behaviour from sismic.io import import_from_yaml from sismic.interpreter import Interpreter from sismic.model import Event with open('microwave.yaml') as f: statechart = import_from_yaml(f) interpreter = Interpreter(statechart) interpreter.execute_once() MacroStep(None, [], >['controller', 'door closed', 'closed without item'], <[]) interpreter.queue(Event(’door_opened’)) interpreter.execute_once() MacroStep(Event(door_opened), [Transition(closed without item, opened without item, door_opened)], >['door opened', 'opened without item'], <['closed without item', 'door closed'])
  • 13. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Software-controlled systems are difficult to develop Control software can be very complex – Continuous interaction – between software and hardware – with external world and users – Must respect – functional requirements • Oven should cook food placed in oven with specified power and duration – non-functional requirements • Oven should stop cooking if doors are opened 14
  • 14. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 • Based on Bertrand Meyer’s “Design by Contract” in 1986 • Add precise and dynamically verifiable specifications to executable code components (e.g., methods, functions, classes) or model components (e.g., states, transitions) • The code (or model) should respect a contract composed of – preconditions – postconditions – invariants Contract-driven development
  • 15. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Example (from https://www.eiffel.com/values/design-by-contract/ introduction) Contract-driven development class DICTIONARY [ ELEMENT ] feature put (x : ELEMENT; key : STRING ) is require count <= capacity not key.empty ensure has (x) item (key) = x count = old count + 1 end invariant 0 <= count count <= capacity end
  • 16. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Contract-driven modelling contract for controller state: invariants: not sent(heating_on) or active(cooking mode) timer>=0 0 < power <= MAXPOWER contract for cooking mode state: precondition: timer>0 invariants: timer >= 0 power == power@pre postcondition: received(door_opened) or timer==0 contract for ready state: invariant: timer > 0
  • 17. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Contract-driven modelling statechart: name: Microwave controller with contracts preamble: | # as on earlier slide root state: name: controller initial: door closed on entry: | power = POWER_DEFAULT timer = 0 # ...some stuff removed here... contract: - always: not sent('heating_on') or active('cooking mode’) - always: timer >= 0 - always: 0 <= power <= MAXPOWER states: - name: door closed initial: closed with item states: - name: closed with item states: - name: cooking mode # ... some stuff removed here... contract: - before: timer > 0 - always: timer >= 0 - always: power == __old__.power or received('cooking_stop’) - after: received('door_opened') or timer == 0
  • 18. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 SISMIC Macrostep semantics revisited A method for testing and validating executable statechart models 845 Fig. 8 Sismic’s macrostep semantics, adding support required for dynamic monitoring of contracts and properties with support for runtime monitoring of contracts
  • 19. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 SISMIC Macrostep semantics revisited interpreter.queue('door_opened’, 'item_placed', 'door_closed') interpreter.queue('timer_dec', 'cooking_start', 'tick')]) interpreter.execute() MacroStep(None, [], >['controller', 'door closed', 'closed without item'], <[]), MacroStep(Event(door_opened), [Transition(closed without item, opened without item, door_opened)], >['door opened', 'opened without item'], <['closed without item', 'door closed']), MacroStep(InternalEvent(lamp_on), [], >[], <[]), MacroStep(Event(item_placed), [Transition(opened without item, opened with item, item_placed)], >['opened with item'], <['opened without item']), MacroStep(Event(door_closed), [Transition(opened with item, closed with item, door_closed)], >['door closed', 'closed with item', 'program mode', 'not ready'], <['opened with item', 'door opened']), …
  • 20. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Example of failing contract InvariantError State: controller Assertion: timer >= 0 Configuration: [controller, door closed, closed with item, program mode, not ready] Step: event timer_dec internal transition on closed with item
  • 21. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Solution to failing contract Add guards to the actions associated to the events that increment and decrement power and timer timer_dec [timer>0] / timer = timer - 1 power_inc [power<MAXPOWER] / power = power+1 power_dec [power>1] / power = power -1
  • 22. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Without guards on timer_dec event Test-driven development class MicrowaveTests(unittest.TestCase): def setUp(self): # code here for setting up statechart interpreter def test_negative_timer(self): self.interpreter. queue (door_opened, item_placed, door_closed, timer_dec) interpreter.execute() self.assertEqual(self.interpreter.context['timer'], 0) test negative_timer ... FAIL =========================================== AssertionError: -1 != 0 ---------------------------------------------------------------------- Ran 1 tests in 0.005s FAILED (failures=1) Using Python’s unittest module
  • 23. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Test-driven development class MicrowaveTests(unittest.TestCase): def setUp(self): # code here for setting up statechart interpreter def test_negative_timer(self): self.interpreter. queue (door_opened, item_placed, door_closed, timer_dec) interpreter.execute() self.assertEqual(self.interpreter.context['timer'], 0) Using Python’s unittest module test negative_timer ... ok ---------------------------------------------------------------------- Ran 1 tests in 0.005s OK With guards on timer_dec event
  • 24. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Coverage analysis State coverage: 81.82% Entered states: controller (3) | door closed (4) |door opened (2) | closed without item (3) | opened without item (2) | opened with item (2) | closed with item (1) | not ready (1) | program mode (1) Remaining states: cooking mode | ready Transition coverage: 16.67% Processed transitions: opened without item [item_placed] -> opened with item (2) closed without item [door_opened] -> opened without item (2) opened with item [door_closed] -> closed with item (1)
  • 25. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 • Include customer test practices into TDD • Encourage collaboration between developers, QA, and non- technical stakeholders (domain experts, project managers, users) • Reduce technical gap between developers and other project stakeholders • Use a domain-specific textual language to specify how the code should behave – By defining feature specifications and scenarios – Using Gherkin language – Supported by Cucumber framework Behaviour-Driven Development
  • 26. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Example (from docs.behat.org/en/v2.5/guides/1.gherkin.html) Behaviour-Driven Development Feature: Serve coffee In order to earn money customers should be able to buy coffee Scenario: Buy last coffee Given there is 1 coffee left in the machine And I have deposited 1 dollar When I press the coffee button Then I should be served a coffee
  • 27. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Behaviour-Driven Modeling Feature: No heating if door is opened Scenario: No heating when nothing is done When I power up the microwave Then heating should not be on Scenario: No heating when item is placed Given I open the door When I place an item Then heating should not turn on Scenario: No heating when door is not closed Given I open the door And I place an item When I close the door Then heating should not turn on Microwave scenarios Described in (structured) textual language, without any knowledge of the statechart’s internals. 1 feature passed, 0 failed, 0 skipped 3 scenarios passed, 0 failed, 0 skipped 11 steps passed, 0 failed, 0 skipped, 0 undefined Took 0m0.005s
  • 28. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Behaviour-Driven Modeling Feature: No heating if door is opened Scenario: No heating when nothing is done Given I do nothing And I execute the statechart Then state cooking_mode should not be active And event heating_on should not be fired Scenario: No heating when item is placed Given I send event door_opened When I send event item_placed Then event heating_on should not be fired Scenario: No heating when door is not closed Given I send event door_opened And I send event item_placed When I send event door_closed Then event heating_on should not be fired Intermediate (statechart-specific) scenarios Automatically generated from high-level scenarios through user-defined mapping.
  • 29. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 Behaviour-Driven Modeling from sismic.bdd import map_action, map_assertion map_action('I open the door', 'I send event door_opened’) map_action('I close the door', 'I send event door_closed’) map_action('I place an item in the oven', 'I send event item_placed’) map_action('I press increase timer button {time} times', 'I repeat "I send event timer_inc" {time} times’) map_action('I press increase power button', 'I send event power_inc’) map_action('I press start button', 'I send event cooking_start’) map_action('I press stop button', 'I send event cooking_stop’) map_action('{tick} seconds elapsed', 'I repeat "I send event timer_tick" {tick} times’) map_assertion('Heating turns on', 'Event heating_on is fired’) map_assertion('Heating does not turn on', 'Event heating_on is not fired’ map_assertion('heating turns off', 'Event heating_off is fired’) map_assertion('lamp turns on', 'Event lamp_switch_on is fired’) map_assertion('lamp turns off', 'Event lamp_switch_off is fired') Mapping specification
  • 30. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 SISMIC Behaviour-Driven Modeling from behave import given, when, then from sismic.io import import_from_yaml from sismic.interpreter import Interpreter from sismic.interpreter.helpers import log_trace from sismic.model import Event @given('I execute the statechart') def execute_statechart(context): _execute_statechart(context, force_execution=True) @then('state {state_name} should be active') def state_is_active(context, state_name): assert state_name in context._statechart.states, 'Unknown state {}'.format(state_name) assert state_name in context._interpreter.configuration, 'State {} is not active'.format(state_name) Using Python’s behave module $ sismic-behave microwave.yaml --features heating.feature
  • 31. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 SISMIC Property statecharts Define and verify behavioural properties by 1. instrumenting the statechart interpreter 2. intercepting specific actions of the statechart being executed • entered(<NAME OF STATE>) • exited(<NAME OF STATE>) • consumed(<NAME OF EVENT>) • sent(<NAME OF EVENT>) • … 3. executing a statechart that verifies a desirable or undesirable property <<property statechart>> Heating does not start if door is opened door is closed door is opened consumed(door_closed) consumed(door_opened) failure sent(heating_on)
  • 32. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 SISMIC Property statecharts Examples <<property statechart>> Heating does not start if door is opened door is closed door is opened consumed(door_closed) consumed(door_opened) failure sent(heating_on) <<property statechart>> Heating must stop when door is opened heating is off heating is on sent(heating_off) sent(heating_on) heating is on while door is opened failure consumed(door_opened) consumed(tick) sent(heating_off)
  • 33. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 SISMIC Communicating statecharts • Statecharts can communicate with other statecharts or external components (e.g. a user interface) by sending/receiving events • This is realised by binding their statechart interpreters
  • 34. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 SISMIC Communicating statecharts Example: Events sent by buttons are propagated to elevator buttons = Interpreter(import_from_yaml(open(‘buttons.yaml'))) elevator = Interpreter(import_from_yaml(open(‘elevator.yaml'))) buttons.bind(elevator) buttons.queue(Event(’floor_2_pushed')) buttons.execute() Awaiting events in buttons: [Event(button_2_pushed)] Awaiting events in buttons: [InternalEvent(floorSelected, floor=2)] Awaiting events in elevator: [Event(floorSelected, floor=2)] elevator.execute() print('Current floor:', elevator.context.get('current')) Current floor: 2
  • 35. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 SISMIC Other features • Use other semantic variants of statecharts by overriding private methods of Interpreter • E.g. outer-first instead of inner-first semantics; changing priority of events • Different ways of dealing with time – Real time versus simulated time
  • 36. Tom Mens – IPA Fall Days – Zandvoort, Nederland – 4 November 2024 • Model quality assessment (model smells) and improvement (model refactoring) – E.g. splitting up a complex statechart into multiple interacting statecharts • More advanced testing techniques – Automatic generation of contracts based on scenario specifications – Automatic generation of tests based on contract specifications – Mutation testing – ... • Explore (dynamic?) model checking techniques – E.g., based on LTL formulas, using Dwyer’s specification patterns, others? • Model variability analysis • Consider product families (e.g. different microwave variants) and analyse commonalities and variabilities in their statechart models • Design space exploration • Analyse pros and cons of syntactically different, but semantically similar statecharts • Model composition and scalability • Semantic variation • Detecting if statechart is compatible with alternative statechart semantics Future Work
  • 37. Conclusion / Summary Feature: No heating if door is opened Scenario: No heating when nothing is done When I power up the microwave Then heating should not be on Scenario: No heating when item is placed Given I open the door When I place an item Then heating should not turn on Scenario: No heating when door is not closed Given I open the door And I place an item When I close the door Then heating should not turn on ng and validating executable statechart models 843 ral overview framework d validate statecharts, by using the techniques BDD, and dynamic monitoring of contracts expressed over statecharts. and support the proposed method, we devel- c tool. Sismic is a Python library for inter- ing statecharts. Version 1.0.0 has been used It is distributed through the Python Pack- i.python.org/pypi/sismic). Its documentation on sismic.readthedocs.io. Its source code is thub.com/AlexandreDecan/sismic under the ence LGPLv3, adhering to the principles of d open research. It allows other researchers to the tool, and it facilitates integrating received ewer versions of the tool. vel architecture of Sismic is summarised in ferent code components and work products ture will be presented in the following sub- rts of the architecture included in the shaded d sismic havebeendevelopedspecificallyfor statechart simulation, testing and validation. se activities, Sismic makes use of third-party ehave for BDD) or external tools (e.g. Plan- EME for model visualisation and editing). ut files used by Sismic are shown in yellow editor and import these models through the I/O API provided forthispurpose.Uponimportofastatechartfile,thesyntactic correctness of the statechart is checked automatically. Currently, Sismic allows importing and exporting state- chart expressed using the human-readable YAML markup language and has experimental support for importing and exporting statechart diagrams expressed in the AMOLA lan- guage [46] through the ASEME IDE2 statechart editor [48]. Sismic also provides export support to PlantUML3 in order to visualise statecharts, benefiting from its automatic layout features.ThisishowwegeneratedFig.14forexample.Other exchange formats can be easily accommodated. 4.2 Statechart interpreter The core of Sismic is composed of its statechart interpreter. In order to execute a statechart model, a statechart inter- pretermustbeinstantiated.Thisinterpreterreliesonanaction code evaluator to execute any action code contained in the statechart specification. By default, action code and guards (conditions) are expressed using regular Python code. Other action languages can be supported if a language interpreter is provided for them. The statechart interpreter offers a discrete, step-by-step ... ... <<property statechart>> Heating must stop when door is opened heating is off heating is on sent(heating_off) sent(heating_on) heating is on while door is opened failure consumed(door_opened) consumed(tick) sent(heating_off) contract for controller state: invariants: not sent(heating_on) or active(cooking mode) timer>=0 0 < power <= MAXPOWER contract for cooking mode state: precondition: timer>0 invariants: timer >= 0 power == power@pre postcondition: received(door_opened) or timer==0 contract for ready state: invariant: timer > 0