SlideShare a Scribd company logo
🎤 Tomohiro Oda,
Software Research Associates, Inc.
@ESUG2022, Novi Sad, Serbia, Aug 26, 2022
re:mobidyc
the overview
2
Nauplius is EAffinis with
age [day].
Copepodite is EAffinis with
age [day]
heading [degree].
Nauplius random_walk
where
the speed -> 0.3[mm/s].
Copepodite swim
where
the heading -> my heading
the speed -> 1[mm/s].
to random_walk is
my d/dt x' = v * cos(theta)
my d/dt y' = v * sin(theta)
where
theta = uniform 0 [degree] to 360 [degree]
v = normal 0 [m/s] sigma the speed.
to swim is
when uniform 0 to 1 < 0.3
my d/dt x' = the speed * cos(my heading)
my d/dt y' = the speed * sin(my heading)
the d/dt heading' = (normal 0 sigma 2) [degree/s].
Multi-Agent Simulation
3
agent definition
task definition
action definition
species
stage
Nauplius
Copepodite
Expected applications
Ecology Biology Ecotoxicology
4
climate change living marine resource management aquaculture
Contributors
DGtalAqualab
Shizuoka University,
Japan
Key Technology Group
Software Research Associates, Inc.,
Japan
Organizational Supporters
Individual Contributors (in alphabetical order)
● Feddal Nordine, Université de Lille
● Gaël Dur, Shizuoka University
● Sami Souissi, Université de Lille
● Serge Stinckwich, UN University
● Stéphane Ducasse, Inria
● Tomohiro Oda, Software Research Associates, Inc.
5
History
MoBIDyC
● on 32bit VisualWorks
● development started in 1996,
gained its full form in 2002,
and still in use
re:mobidyc
● on 64bit Pharo 10 + petitparser2
● open source at
https://github.com/ReMobidyc/ReMobidyc/
● from the same design principles, we re-designed and
added new technical elements.
6
Features inherited from the original MoBIDyC
7
● discrete-time individual-based simulation
○ Turtles + Cellular Automata
● modeling without programming skills
○ modeling with minimal coding
● 25 primitives from MoBIDyC.
○ move, eat, kill, die, stage, spawn, ...
In re:mobidyc, we added a few design principles
● reliable models
○ referential transparency: synchronous updates of variables
○ type checking: check models without testing
○ termination: no infinite loop
● reviewable results
○ traceability : record all attributes of all agents at all time steps
○ reproducibility : always the same result from the same model and the same initial conditions
constructing DSL on Pharo
8
overview of re:mobidyc
● Original modeling language
○ domain specific modeling language
○ syntax definition
○ formal semantics ... implement in Pharo first, and then specify in formal language (VDM-SL)
○ memory model
● Pharo
○ cross platform
○ high productivity
○ Spec2 and PetitParser2
9
Implementation Layers
10
Text-based
Modeller UI
(Spec2)
GUI-based
Modeller UI
(Spec2)
Observatory UI
(Spec2)
AST
Parser (PetitParser2)
Type checker Interpreter
(ported to VDM-SL)
Memory model
Measuring units
AbstractInterpreter
Pharo
11
SpTextPresenter << #RMDSourceTextPresenter
traits: {TRMDPresenter};
slots: {
#syntaxNode => ObservableSlot .
#lastValidSyntaxNode => ObservableSlot .
#highlights => ObservableSlot .
#highlightColor => ObservableSlot .
#parser };
tag: 'Widgets';
package: 'ReMobidyc-Spec2'
(self newSourceWith: RMDGrammar new actionDefinition)
...
highlights: Array new;
whenLastValidSyntaxNodeChangedDo: [ :syntaxNode | ];
yourself.
Spec2 + PetitParser2 → easy construction of GUI for DSL
actionDefinition
^ self actionDefinitionHeaderLine , self whenClause optional
, self withClause optional
, self actionDefinitionAttributePart optional
, self actionDefinitionUtilityPart optional
, '.' asPParser trimBlanks , #newline asPParser trimBlanks optional
==> [ :array | ... ]
need for original memory model: the time-course matters
12
S[1] = initial state
S[2]
S[last]
S[t]
The objective of re:mobidyc is to enable users to analyze
● what happens
● why it happens
● how it happens
We need a memory model with
● lightweight snapshot
○ to trace cause and effect
● synchronous update
○ to isolate effects of each action
○ to eliminate intermediate state
UI : Text-based Modeler
13
UI : GUI-based Modeler
14
UI : Observatory
15
modeling with agents
16
three kinds of agents
17
Patch: local environment
Animat: individual body
World: global environment
Agents
● An agent has a set of attributes.
● e.g.
Nauplius is EAffinis
with
age [day].
Copepodite is EAffinis
with
age [day]
heading [degree].
18
species
stage
stages of E. Affinis
Nauplius
Copepodite
attribute
Interactions
Actions (verb)
● A verb updates attributes of interacting agents.
● A verb is either vi or vt.
● e.g.
to random_walk is
my d/dt x' = v * cos(theta)
my d/dt y' = v * sin(theta)
where
theta = uniform 0 [degree] to
360 [degree]
v = normal 0 sigma the speed.
19
Tasks (sentence)
● A task defines interaction among agents.
● A task is either S+V or S+V+O
● The interpreter performs a task for every
instance of the subject agent at every time step.
● e.g.
Nauplius random_walk
where
the speed -> 0.3[mm/s].
updates on attributes
local definitions
verb
delta_x += v * cos(theta) * timestep;
Interactions
Actions (verb)
● A verb updates attributes of interacting agents.
● A verb is either vi or vt.
● e.g.
to random_walk is
my d/dt x' = v * cos(theta)
my d/dt y' = v * sin(theta)
where
theta = uniform 0 [degree] to
360 [degree]
v = normal 0 sigma the speed.
20
Tasks (sentence)
● A task defines interaction among agents.
● A task is either S+V or S+V+O
● The interpreter performs a task for every
instance of the subject agent at every time step.
● e.g.
Nauplius random_walk
where
the speed -> 0.3[mm/s].
verb
subject
specialization
major features of the re:mobidyc modeling language
● no messaging
● no inheritance
● no become: primitive
● no while-loop
● no recursion
● non-turing complete
● no string, no bool, float is the only first-class object
but has
● static typing
● type casting
● templates
● time-series memory with synchronous update
● termination because no loop!
● instance creation trace
to model interactions among the global environment, local environment patches, and animats. 21
Types
in a language where the only FCO is float
22
static typing with measuring units
Animat definitions
Nauplius is EAffinis with
x [m]
y [m]
heading [degree].
Type checking on attribute definitions
expression my Δx' = v * cos(theta) * Δtime
unit [m] = [mm/s]*[1]*[s] = [mm]
SI coherent unit [m] [m]
the both types agree
The system converts values into SI coherent units
so that all computation will be in coherent SI.
Also [rad],[℃], [℉] are handled as SI base
units.
23
detecting type error
Animat definitions
Nauplius is EAffinis with
x [m]
y [m]
heading [degree].
Type checking on attribute definitions
expression my Δx' = v * cos(theta) * Δtime
unit [m] = [mm/s]*[1]= [mm/s]
SI coherent unit [m] [m/s]
type error ! 24
type casting with measuring units
● de-unit casting
(cm) x
where x = 1.0 [mm]
= 0.1
● en-unit casting
x [cm]
where x = 3.0
= 0.03 [m]
3.0 has no dimension.
3.0 [cm] = 0.03 [m]
1.0 [mm] = 0.001 [m]
0.001[m] = 0.1[cm]
25
time-series memory with synchronous updates
re:mobidyc = computing big sequences of numbers
26
The time-course matters
27
S[1] = initial state
S[2]
S[last]
S[t]
The objective of re:mobidyc is to enable users to analyze
● what happens
● why it happens
● how it happens
We need a memory model with
● lightweight snapshot
○ to trace cause and effect
● synchronous update
○ to isolate effects of each action
○ to eliminate intermediate state
three cells per address
agent 1 4
attribute x y heading x y heading
address 1 2 3 4 5 6 7
value read 12.5 -5.2 1.23 -4.5 34.1 3.0
nextValue write 12.5 -5.2 -0.2 -4.5 34.1 -0.2
nextDelta write -2.4 0.0 0.0 -2.4 0.0 0.0
my x' = -2.4[m]
memory nextAt: 1 put: -2.4
my Δheading' = -0.2[rad]
memory nextDeltaAt:3 add:
a = my x + cos(my heading)
memory at: 1 memory at: 3
28
synchronous update
time 354
address 1 2 3 4 5 6 7
value read 12.5 -5.2 -0.2 -4.5 34.1 3.0
nextValue write 12.5 -5.2 -0.2 -4.5 34.1 -0.2
nextDelta write -2.4 0.0 0.0 -2.4 0.0 0.0
time 355
address 1 2 3 4 5 6 7
value read 10.1 -5.2 -0.2 -6.9 34.1 -0.2
nextValue write 10.1 -5.2 -0.2 -6.9 34.1 -0.2
nextDelta write 0.0 0.0 0.0 0.0 0.0 0.0 29
time-series memory
time 355
address
\
time 1 2 3 4 5 6 ...
... ... ... ... ... ... ... ...
350 22.1 -5.2 -4.2 5.1 34.1 -1.5 ...
351 19.7 -5.2 -4.2 2.7 34.1 2.3 ...
352 17.3 -5.2 3.2 0.3 34.1 5.1 ...
353 14.9 -5.2 -5.2 -2.1 34.1 -5.2 ...
354 12.5 -5.2 1.23 -4.5 34.1 3.0 ...
355 10.1 -5.2 -0.2 -6.9 34.1 -0.2 ...
356
...
address 1 2 3 4 5 6 7
value read 10.1 -5.2 -0.2 -6.9 34.1 -0.2
nextValue write 10.1 -5.2 -0.2 -6.9 34.1 -0.2
nextDelta write 0.0 0.0 0.0 0.0 0.0 0.0
backend storage (on-memory, file system, ...)
30
3 dictionaries:
values, nextValues, nextDelta
Summary
moving forward
31
Summary
● multi-agent simulator
○ re:realization of Object Orientation as a modeling language
■ de-centralized autonomous entities interacting each other.
○ open source at https://github.com/ReMobidyc/ReMobidyc/
○ built on Pharo 10
○ for scientific research of biology, ecology and ecotoxicology
● Future work
○ complete 25 primitives from MoBIDyC
○ formal specification
○ memory models with DBMS backends (RDB, GemStone/S, and so on)
○ debugger
○ git interface
○ computation server
○ data analysis environment
○ visualization
○ verification 32
Thank you!

More Related Content

What's hot

Introduction to Data MiningInstructor’s Solution Manual.docx
Introduction to Data MiningInstructor’s Solution Manual.docxIntroduction to Data MiningInstructor’s Solution Manual.docx
Introduction to Data MiningInstructor’s Solution Manual.docx
bagotjesusa
 
保全マンだった私がこれからFA業界でやりたいこと
保全マンだった私がこれからFA業界でやりたいこと保全マンだった私がこれからFA業界でやりたいこと
保全マンだった私がこれからFA業界でやりたいこと
ssusera9355c
 

What's hot (20)

Microdown
MicrodownMicrodown
Microdown
 
Improving Pharo Snapshots
Improving Pharo SnapshotsImproving Pharo Snapshots
Improving Pharo Snapshots
 
Deferred rendering using compute shader
Deferred rendering using compute shaderDeferred rendering using compute shader
Deferred rendering using compute shader
 
Functional microscope - Lenses in C++
Functional microscope - Lenses in C++Functional microscope - Lenses in C++
Functional microscope - Lenses in C++
 
pip and virtualenv
pip and virtualenvpip and virtualenv
pip and virtualenv
 
Steel
SteelSteel
Steel
 
Introduction to Data MiningInstructor’s Solution Manual.docx
Introduction to Data MiningInstructor’s Solution Manual.docxIntroduction to Data MiningInstructor’s Solution Manual.docx
Introduction to Data MiningInstructor’s Solution Manual.docx
 
保全マンだった私がこれからFA業界でやりたいこと
保全マンだった私がこれからFA業界でやりたいこと保全マンだった私がこれからFA業界でやりたいこと
保全マンだった私がこれからFA業界でやりたいこと
 
Screen Space Decals in Warhammer 40,000: Space Marine
Screen Space Decals in Warhammer 40,000: Space MarineScreen Space Decals in Warhammer 40,000: Space Marine
Screen Space Decals in Warhammer 40,000: Space Marine
 
Hb1805 a1 p
Hb1805 a1 pHb1805 a1 p
Hb1805 a1 p
 
The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Triangle Visibility buffer
Triangle Visibility bufferTriangle Visibility buffer
Triangle Visibility buffer
 
Bindless Deferred Decals in The Surge 2
Bindless Deferred Decals in The Surge 2Bindless Deferred Decals in The Surge 2
Bindless Deferred Decals in The Surge 2
 
Hsk nível 1 150 palavras (com modelo de escrita)
Hsk nível 1   150 palavras (com modelo de escrita)Hsk nível 1   150 palavras (com modelo de escrita)
Hsk nível 1 150 palavras (com modelo de escrita)
 
Unity advanced computer graphics week 02
Unity advanced computer graphics week 02Unity advanced computer graphics week 02
Unity advanced computer graphics week 02
 
Star Ocean 4 - Flexible Shader Managment and Post-processing
Star Ocean 4 - Flexible Shader Managment and Post-processingStar Ocean 4 - Flexible Shader Managment and Post-processing
Star Ocean 4 - Flexible Shader Managment and Post-processing
 
Vbt215 b2
Vbt215 b2Vbt215 b2
Vbt215 b2
 
Killzone Shadow Fall: Threading the Entity Update on PS4
Killzone Shadow Fall: Threading the Entity Update on PS4Killzone Shadow Fall: Threading the Entity Update on PS4
Killzone Shadow Fall: Threading the Entity Update on PS4
 
Relic's FX System
Relic's FX SystemRelic's FX System
Relic's FX System
 

Similar to re:mobidyc the overview

Data structures notes for college students btech.pptx
Data structures notes for college students btech.pptxData structures notes for college students btech.pptx
Data structures notes for college students btech.pptx
KarthikVijay59
 
Stack squeues lists
Stack squeues listsStack squeues lists
Stack squeues lists
James Wong
 
Stacksqueueslists
StacksqueueslistsStacksqueueslists
Stacksqueueslists
Fraboni Ec
 
Stacks queues lists
Stacks queues listsStacks queues lists
Stacks queues lists
Tony Nguyen
 
SEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODEL
SEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODELSEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODEL
SEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODEL
grssieee
 

Similar to re:mobidyc the overview (20)

Learn Matlab
Learn MatlabLearn Matlab
Learn Matlab
 
Data structures notes for college students btech.pptx
Data structures notes for college students btech.pptxData structures notes for college students btech.pptx
Data structures notes for college students btech.pptx
 
Advance data structure & algorithm
Advance data structure & algorithmAdvance data structure & algorithm
Advance data structure & algorithm
 
02 functions, variables, basic input and output of c++
02   functions, variables, basic input and output of c++02   functions, variables, basic input and output of c++
02 functions, variables, basic input and output of c++
 
Constraint Programming in Haskell
Constraint Programming in HaskellConstraint Programming in Haskell
Constraint Programming in Haskell
 
Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor Concurrency
 
Glowworm Swarm Optimisation
Glowworm Swarm OptimisationGlowworm Swarm Optimisation
Glowworm Swarm Optimisation
 
Optimization in Programming languages
Optimization in Programming languagesOptimization in Programming languages
Optimization in Programming languages
 
Slides Vba Mamb
Slides Vba MambSlides Vba Mamb
Slides Vba Mamb
 
Mechanics Class Notes
Mechanics Class NotesMechanics Class Notes
Mechanics Class Notes
 
Java Foundations: Data Types and Type Conversion
Java Foundations: Data Types and Type ConversionJava Foundations: Data Types and Type Conversion
Java Foundations: Data Types and Type Conversion
 
Stack squeues lists
Stack squeues listsStack squeues lists
Stack squeues lists
 
Stacks queues lists
Stacks queues listsStacks queues lists
Stacks queues lists
 
Stacks queues lists
Stacks queues listsStacks queues lists
Stacks queues lists
 
Stacksqueueslists
StacksqueueslistsStacksqueueslists
Stacksqueueslists
 
Stacks queues lists
Stacks queues listsStacks queues lists
Stacks queues lists
 
Stacks queues lists
Stacks queues listsStacks queues lists
Stacks queues lists
 
Yoyak ScalaDays 2015
Yoyak ScalaDays 2015Yoyak ScalaDays 2015
Yoyak ScalaDays 2015
 
SEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODEL
SEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODELSEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODEL
SEGMENTATION OF POLARIMETRIC SAR DATA WITH A MULTI-TEXTURE PRODUCT MODEL
 
2_EditDistance_Jan_08_2020.pptx
2_EditDistance_Jan_08_2020.pptx2_EditDistance_Jan_08_2020.pptx
2_EditDistance_Jan_08_2020.pptx
 

More from ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
ESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
ESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
ESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
ESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
ESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
ESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
ESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
ESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
ESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
ESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
ESUG
 

More from ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Recently uploaded

Recently uploaded (20)

5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data Migration
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with StrimziStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 

re:mobidyc the overview

  • 1. 🎤 Tomohiro Oda, Software Research Associates, Inc. @ESUG2022, Novi Sad, Serbia, Aug 26, 2022
  • 3. Nauplius is EAffinis with age [day]. Copepodite is EAffinis with age [day] heading [degree]. Nauplius random_walk where the speed -> 0.3[mm/s]. Copepodite swim where the heading -> my heading the speed -> 1[mm/s]. to random_walk is my d/dt x' = v * cos(theta) my d/dt y' = v * sin(theta) where theta = uniform 0 [degree] to 360 [degree] v = normal 0 [m/s] sigma the speed. to swim is when uniform 0 to 1 < 0.3 my d/dt x' = the speed * cos(my heading) my d/dt y' = the speed * sin(my heading) the d/dt heading' = (normal 0 sigma 2) [degree/s]. Multi-Agent Simulation 3 agent definition task definition action definition species stage Nauplius Copepodite
  • 4. Expected applications Ecology Biology Ecotoxicology 4 climate change living marine resource management aquaculture
  • 5. Contributors DGtalAqualab Shizuoka University, Japan Key Technology Group Software Research Associates, Inc., Japan Organizational Supporters Individual Contributors (in alphabetical order) ● Feddal Nordine, Université de Lille ● Gaël Dur, Shizuoka University ● Sami Souissi, Université de Lille ● Serge Stinckwich, UN University ● Stéphane Ducasse, Inria ● Tomohiro Oda, Software Research Associates, Inc. 5
  • 6. History MoBIDyC ● on 32bit VisualWorks ● development started in 1996, gained its full form in 2002, and still in use re:mobidyc ● on 64bit Pharo 10 + petitparser2 ● open source at https://github.com/ReMobidyc/ReMobidyc/ ● from the same design principles, we re-designed and added new technical elements. 6
  • 7. Features inherited from the original MoBIDyC 7 ● discrete-time individual-based simulation ○ Turtles + Cellular Automata ● modeling without programming skills ○ modeling with minimal coding ● 25 primitives from MoBIDyC. ○ move, eat, kill, die, stage, spawn, ... In re:mobidyc, we added a few design principles ● reliable models ○ referential transparency: synchronous updates of variables ○ type checking: check models without testing ○ termination: no infinite loop ● reviewable results ○ traceability : record all attributes of all agents at all time steps ○ reproducibility : always the same result from the same model and the same initial conditions
  • 9. overview of re:mobidyc ● Original modeling language ○ domain specific modeling language ○ syntax definition ○ formal semantics ... implement in Pharo first, and then specify in formal language (VDM-SL) ○ memory model ● Pharo ○ cross platform ○ high productivity ○ Spec2 and PetitParser2 9
  • 10. Implementation Layers 10 Text-based Modeller UI (Spec2) GUI-based Modeller UI (Spec2) Observatory UI (Spec2) AST Parser (PetitParser2) Type checker Interpreter (ported to VDM-SL) Memory model Measuring units AbstractInterpreter Pharo
  • 11. 11 SpTextPresenter << #RMDSourceTextPresenter traits: {TRMDPresenter}; slots: { #syntaxNode => ObservableSlot . #lastValidSyntaxNode => ObservableSlot . #highlights => ObservableSlot . #highlightColor => ObservableSlot . #parser }; tag: 'Widgets'; package: 'ReMobidyc-Spec2' (self newSourceWith: RMDGrammar new actionDefinition) ... highlights: Array new; whenLastValidSyntaxNodeChangedDo: [ :syntaxNode | ]; yourself. Spec2 + PetitParser2 → easy construction of GUI for DSL actionDefinition ^ self actionDefinitionHeaderLine , self whenClause optional , self withClause optional , self actionDefinitionAttributePart optional , self actionDefinitionUtilityPart optional , '.' asPParser trimBlanks , #newline asPParser trimBlanks optional ==> [ :array | ... ]
  • 12. need for original memory model: the time-course matters 12 S[1] = initial state S[2] S[last] S[t] The objective of re:mobidyc is to enable users to analyze ● what happens ● why it happens ● how it happens We need a memory model with ● lightweight snapshot ○ to trace cause and effect ● synchronous update ○ to isolate effects of each action ○ to eliminate intermediate state
  • 13. UI : Text-based Modeler 13
  • 14. UI : GUI-based Modeler 14
  • 17. three kinds of agents 17 Patch: local environment Animat: individual body World: global environment
  • 18. Agents ● An agent has a set of attributes. ● e.g. Nauplius is EAffinis with age [day]. Copepodite is EAffinis with age [day] heading [degree]. 18 species stage stages of E. Affinis Nauplius Copepodite attribute
  • 19. Interactions Actions (verb) ● A verb updates attributes of interacting agents. ● A verb is either vi or vt. ● e.g. to random_walk is my d/dt x' = v * cos(theta) my d/dt y' = v * sin(theta) where theta = uniform 0 [degree] to 360 [degree] v = normal 0 sigma the speed. 19 Tasks (sentence) ● A task defines interaction among agents. ● A task is either S+V or S+V+O ● The interpreter performs a task for every instance of the subject agent at every time step. ● e.g. Nauplius random_walk where the speed -> 0.3[mm/s]. updates on attributes local definitions verb delta_x += v * cos(theta) * timestep;
  • 20. Interactions Actions (verb) ● A verb updates attributes of interacting agents. ● A verb is either vi or vt. ● e.g. to random_walk is my d/dt x' = v * cos(theta) my d/dt y' = v * sin(theta) where theta = uniform 0 [degree] to 360 [degree] v = normal 0 sigma the speed. 20 Tasks (sentence) ● A task defines interaction among agents. ● A task is either S+V or S+V+O ● The interpreter performs a task for every instance of the subject agent at every time step. ● e.g. Nauplius random_walk where the speed -> 0.3[mm/s]. verb subject specialization
  • 21. major features of the re:mobidyc modeling language ● no messaging ● no inheritance ● no become: primitive ● no while-loop ● no recursion ● non-turing complete ● no string, no bool, float is the only first-class object but has ● static typing ● type casting ● templates ● time-series memory with synchronous update ● termination because no loop! ● instance creation trace to model interactions among the global environment, local environment patches, and animats. 21
  • 22. Types in a language where the only FCO is float 22
  • 23. static typing with measuring units Animat definitions Nauplius is EAffinis with x [m] y [m] heading [degree]. Type checking on attribute definitions expression my Δx' = v * cos(theta) * Δtime unit [m] = [mm/s]*[1]*[s] = [mm] SI coherent unit [m] [m] the both types agree The system converts values into SI coherent units so that all computation will be in coherent SI. Also [rad],[℃], [℉] are handled as SI base units. 23
  • 24. detecting type error Animat definitions Nauplius is EAffinis with x [m] y [m] heading [degree]. Type checking on attribute definitions expression my Δx' = v * cos(theta) * Δtime unit [m] = [mm/s]*[1]= [mm/s] SI coherent unit [m] [m/s] type error ! 24
  • 25. type casting with measuring units ● de-unit casting (cm) x where x = 1.0 [mm] = 0.1 ● en-unit casting x [cm] where x = 3.0 = 0.03 [m] 3.0 has no dimension. 3.0 [cm] = 0.03 [m] 1.0 [mm] = 0.001 [m] 0.001[m] = 0.1[cm] 25
  • 26. time-series memory with synchronous updates re:mobidyc = computing big sequences of numbers 26
  • 27. The time-course matters 27 S[1] = initial state S[2] S[last] S[t] The objective of re:mobidyc is to enable users to analyze ● what happens ● why it happens ● how it happens We need a memory model with ● lightweight snapshot ○ to trace cause and effect ● synchronous update ○ to isolate effects of each action ○ to eliminate intermediate state
  • 28. three cells per address agent 1 4 attribute x y heading x y heading address 1 2 3 4 5 6 7 value read 12.5 -5.2 1.23 -4.5 34.1 3.0 nextValue write 12.5 -5.2 -0.2 -4.5 34.1 -0.2 nextDelta write -2.4 0.0 0.0 -2.4 0.0 0.0 my x' = -2.4[m] memory nextAt: 1 put: -2.4 my Δheading' = -0.2[rad] memory nextDeltaAt:3 add: a = my x + cos(my heading) memory at: 1 memory at: 3 28
  • 29. synchronous update time 354 address 1 2 3 4 5 6 7 value read 12.5 -5.2 -0.2 -4.5 34.1 3.0 nextValue write 12.5 -5.2 -0.2 -4.5 34.1 -0.2 nextDelta write -2.4 0.0 0.0 -2.4 0.0 0.0 time 355 address 1 2 3 4 5 6 7 value read 10.1 -5.2 -0.2 -6.9 34.1 -0.2 nextValue write 10.1 -5.2 -0.2 -6.9 34.1 -0.2 nextDelta write 0.0 0.0 0.0 0.0 0.0 0.0 29
  • 30. time-series memory time 355 address \ time 1 2 3 4 5 6 ... ... ... ... ... ... ... ... ... 350 22.1 -5.2 -4.2 5.1 34.1 -1.5 ... 351 19.7 -5.2 -4.2 2.7 34.1 2.3 ... 352 17.3 -5.2 3.2 0.3 34.1 5.1 ... 353 14.9 -5.2 -5.2 -2.1 34.1 -5.2 ... 354 12.5 -5.2 1.23 -4.5 34.1 3.0 ... 355 10.1 -5.2 -0.2 -6.9 34.1 -0.2 ... 356 ... address 1 2 3 4 5 6 7 value read 10.1 -5.2 -0.2 -6.9 34.1 -0.2 nextValue write 10.1 -5.2 -0.2 -6.9 34.1 -0.2 nextDelta write 0.0 0.0 0.0 0.0 0.0 0.0 backend storage (on-memory, file system, ...) 30 3 dictionaries: values, nextValues, nextDelta
  • 32. Summary ● multi-agent simulator ○ re:realization of Object Orientation as a modeling language ■ de-centralized autonomous entities interacting each other. ○ open source at https://github.com/ReMobidyc/ReMobidyc/ ○ built on Pharo 10 ○ for scientific research of biology, ecology and ecotoxicology ● Future work ○ complete 25 primitives from MoBIDyC ○ formal specification ○ memory models with DBMS backends (RDB, GemStone/S, and so on) ○ debugger ○ git interface ○ computation server ○ data analysis environment ○ visualization ○ verification 32