SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
Towards an Integration of the Actor
Model in an FRP Language for
Small-Scale Embedded Systems
Takuo Watanabe & Kensuke Sawada
Department of Computer Science, Tokyo Institute of Technology
Oct. 30, 2016
AGERE!@SPLASH 2016
1
About This Work
• An actor-based execution model of a pure FRP
languages for small-scale embedded systems
• Objective
- flexible execution models
- open/customizable interface with higher-level abstraction
• Talk Outline
- EmFRP
- Runtime System
- Actor-Based Runtime Implementation
- Future Work
2
"Small-Scale" Embedded Systems
• Resource-Constrained Systems
- Processor: 8–32bit
- Clock: ≤ 100MHz
- Program Storage: ≤ 1M words
- RAM: ≤ 1M bytes
- No MMU
• w/o full-fledged OS (e.g., Linux)
- embedded in special purpose devices
• ex) Microcontrollers
- PIC, AVR, H8, ARM Cortex-M, etc.
3
Emfrp [Sawada & Watanabe, CROW2016]
• An FRP language for small-scale embedded systems
- Strongly-typed, Purely functional
• parametric polymorphism & type inference
• algebraic data types & pattern matching
- Simple abstraction for time-varying values (aka signals)
• node: named, non-first-class representation
• lifting-free
- Bounded & predictable amount of runtime memory
• syntactic restrictions & type system
• github.com/sawaken/emfrp
- Compiler & Interpreter (written in Ruby)
• The compiler generates platform-independent ANSI-C code
runnable several microcontrollers (AVR, ARM Cortex-M)
4
Ex1: Air-Conditioner Controller in Emfrp
5
01: module ACController # module name
02: in tmp : Float, # temperature sensor
03: hmd : Float # humidity sensor
04: out ac : Bool # air-conditioner
05: use Std # standard library
06:
07: # discomfort (temperature-humidity) index
08: node di = 0.81 * tmp + 0.01 * hmd
09: * (0.99 * tmp - 14.3) + 46.3
10:
11: # air-conditioner status
12: node init[False] ac = di >= 75.0 + ho
13:
14: # hysteresis offset
15: node ho = if ac@last then -0.5 else 0.5
History-Sensitive Behavior with @last
6
# air-conditioner status
node ac = di >= 75.0
# air-conditioner status
node init[False] ac =
di >= 75.0 + ho
# hysteresis offset
node ho = if ac@last
then -0.5 else 0.5
75.0
di
ac
75.0
di
ac
Emfrp syntax for referring to the previous value of an
arbitrary node (cf. foldp in Elm)
Case Study: Digital Clock [CROW2016]
• Target: mbed LPC1768
- ARM Cortex M3, 96MHz
- RAM 32K, Flash 512K
- LCD, 3 Buttons
• Code
- Emfrp: 80 loc
- Glue code in C++: 45 loc
- External Libraries
• Compiled Code
- Generated C code: 592 loc
- Binary (ARM RVDS4.1)
• w/o library : 2.3 KB
• w/ library: 30.1 KB
7
Related Work
8
Yampa
(FRP)
Elm
(FRP)
Céu
(procedural)
Simulink
(dataflow)
CFRP*
(FRP)
Emfrp
(FRP)
Usable for Small-Scale
Embedded Systems ✕ ✕ ⃝ ⃝ ⃝ ⃝
Frist-Class Functions ⃝ ⃝ ⃝ ✕ ⃝ ✕
Algebraic Data Types
& Pattern Matching ⃝ ⃝ ✕ ✕ ✕ ⃝
Declarative Programming
& Referential Transparency ⃝ ⃝ ✕ △ ⃝ ⃝
Automated Unit Test ⃝ ⃝ ✕ ⃝ ✕ ⃝
Modularity & Abstractness ⃝ ⃝ △ ⃝ ⃝ ⃝
*Another FRP language developed by use in prior to Emfrp
DAG Representation of Ex1
9
tmp
(Float)
hmd
(Float)
di
(Float)
ac
(Bool)
ho
(Float)
temperature
sensor
humidity
sensor
discomfort index
air-
conditioner
air-conditioner
status
hysteresis offset
node dependency
past-value dependencynode
device connection
Push-Based Execution Model of Emfrp
10
tmp
(Float)
hmd
(Float)
di
(Float)
ac
(Bool)
ho
(Float)
tmp hmd di ho ac
iteration
The runtime system
updates the values of the
nodes by repeatedly
evaluating them in an order
compatible to the DAG.
module ACController # module name
in tmp : Float, # temperature sensor
hmd : Float # humidity sensor
pulse10ms : Bool # hardware interval timer (10ms)
out ac : Bool, # air-conditioner
led : Bool # LED
use Std # standard library
# discomfort (temperature-humidity) index
node di = 0.81 * tmp + 0.01 * hmd * (0.99 * tmp - 14.3) + 46.3
# timer counter (resets to 0 every 1 minute)
node init[0] timer =
if !pulse10ms@last && pulse10ms
then (timer@last + 1) % 6000 else timer@last
# air-conditioner switch
node ac = if timer@last != timer && timer == 0
then di >= 75.0 else ac@last
# LED blinks at 1Hz
node led = (timer % 100) < 50
Ex2: A Timer-Based Air-Conditioner Controller
11
Actor-Based Execution Model
• With the push-based execution model, tmp, hmd and di
are evaluated in every iteration. However, the value of
them required only once per minute.
• In this work, we adopt an actor representation of
nodes to provide flexible runtime strategies and good
abstractions runtime access
- one actor (implemented as a C++ object) per node
- message-based dependency propagation
• single dispatch queue model
• transmission order preservation (a la ABCL)
- customizable scheduling via reflection (GWR)
• GWR = Reflection on Actor-Groups [Watanabe, AGERE2013]
12
DAG Representation of Ex2
13
tmp
(Float)
hmd
(Float)
di
(Float)
ac
(Bool)
timer
(Int)
temperature
sensor
humidity
sensor
air-
conditioner
led
(Bool)
hardware
timer
pulse
10ms
(Bool)
LED
class TMPNode : public Actor {
public:
TMPNode(Actor2 *di, TMPSensor *tmp);
virtual ~TMPNode() {}
virtual void activate(Message *m);
private:
Actor2 *di;
TMPSensor *tmp;
}
void TMPNode::activate(Message *m) {
di->send1(Message::floatMessage(tmp->read(), m->cust));
}
class DINode : public Actor2 {
public:
DINode(Actor *ac) ac(ac) { ... }
virtual ~DINode() {}
virtual void activate(Message *m);
private:
Actor *ac;
}
void DINode::activate(Message *mt, Message *mh) {
assert(mt->cust == mh->cust);
float t = mt->getFloat(), h = mh->getFloat();
float di = 0.81 * t + 0.01 * h * (0.99 * t - 14.3) + 46.3;
ac->send(Message::floatMessage(di, mt->cust));
}
Actor-Based
Representation of
Nodes in Ex2
14
Ex: Delayed (Lazy/Pull) Blocks
• An expression suffixed with @delay indicates that the
expression is evaluated only when it is required.
• Nodes in a delayed block and their dependent nodes
are evaluated in a separate actor group that is
activated only when it is needed.
15
# air-conditioner switch
node ac = if timer@last != timer && timer == 0
then (di >= 75.0)@delay else ac@last
The Actor-Group for the Delayed Block
• Actors in the group
for the delayed block
is detached from the
main iteration path.
- They have separate
message queue.
• The detached actor
group is activated by
sending an activation
message from ac
when they are
needed.
16
tmp
(Float)
hmd
(Float)
di
(Float)
ac
(Bool)
timer
(Int)
led
(Bool)
pulse
10ms
(Bool)
class DINode : public Actor2 { ... }
void DINode::activate(Message *mt, Message *mh) {
float t = mt->getFloat(), h = mh->getFloat();
float di = 0.81 * t + 0.01 * h * (0.99 * t - 14.3) + 46.3;
mt->cust->send(mkFloatMessage(di, mt->cust));
}
class ACNode : public Actor { ... }
void ACNode::activate(Message *m) {
if (m->prevInt() != m->getInt() &&
m->getInt() == 0) {
acDelayedBlockGroup->send(Message::unitMessage(&acDelayedBlock));
}
}
class ACDelayedBlock : public Actor { ...}
void ACDelayedBlock::activate(Message *m) {
m->cust->send(
Message::booleanMessage(m->getFloat() > 75.0, m->cust));
}
17
Summary & Future Work
• Proposed an actor-based execution model of Emfrp.
- actor representation of nodes (time-varying values)
- GWR for flexible execution strategies
• Future Work
- Possible Applications
• Asynchronous (Future) Node
- heavy node / slow peripheral devices / inter-device communication
• Group-Wide Iteration Control
- periodical iteration / deep sleep mode / interrupts from devices
• Actors as signal values
- Relationship to other concurrent / event models
- Better (meta-level) interface
- Implementation
18

Contenu connexe

Tendances

Semaphores and Monitors
 Semaphores and Monitors Semaphores and Monitors
Semaphores and Monitorssathish sak
 
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionConcurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionCherryBerry2
 
Semophores and it's types
Semophores and it's typesSemophores and it's types
Semophores and it's typesNishant Joshi
 
Introduction to OpenMP (Performance)
Introduction to OpenMP (Performance)Introduction to OpenMP (Performance)
Introduction to OpenMP (Performance)Akhila Prabhakaran
 
Identifying Optimal Trade-Offs between CPU Time Usage and Temporal Constraints
Identifying Optimal Trade-Offs between CPU Time Usage and Temporal ConstraintsIdentifying Optimal Trade-Offs between CPU Time Usage and Temporal Constraints
Identifying Optimal Trade-Offs between CPU Time Usage and Temporal ConstraintsLionel Briand
 
Presentation on Shared Memory Parallel Programming
Presentation on Shared Memory Parallel ProgrammingPresentation on Shared Memory Parallel Programming
Presentation on Shared Memory Parallel ProgrammingVengada Karthik Rangaraju
 
Lab3 advanced port scanning 30 oct 21
Lab3 advanced port scanning 30 oct 21Lab3 advanced port scanning 30 oct 21
Lab3 advanced port scanning 30 oct 21Hussain111321
 
Jvm profiling under the hood
Jvm profiling under the hoodJvm profiling under the hood
Jvm profiling under the hoodRichardWarburton
 
Module-related pages
Module-related pagesModule-related pages
Module-related pagesbutest
 
Simple asynchronous remote invocations for distributed real-time Java
Simple asynchronous remote invocations for distributed real-time JavaSimple asynchronous remote invocations for distributed real-time Java
Simple asynchronous remote invocations for distributed real-time JavaUniversidad Carlos III de Madrid
 

Tendances (20)

MPI n OpenMP
MPI n OpenMPMPI n OpenMP
MPI n OpenMP
 
Semaphores and Monitors
 Semaphores and Monitors Semaphores and Monitors
Semaphores and Monitors
 
Introduction to OpenMP
Introduction to OpenMPIntroduction to OpenMP
Introduction to OpenMP
 
Enhancing the region model of RTSJ
Enhancing the region model of RTSJEnhancing the region model of RTSJ
Enhancing the region model of RTSJ
 
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionConcurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System Discussion
 
openmp
openmpopenmp
openmp
 
Semophores and it's types
Semophores and it's typesSemophores and it's types
Semophores and it's types
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Open mp intro_01
Open mp intro_01Open mp intro_01
Open mp intro_01
 
OpenMP
OpenMPOpenMP
OpenMP
 
Introduction to OpenMP (Performance)
Introduction to OpenMP (Performance)Introduction to OpenMP (Performance)
Introduction to OpenMP (Performance)
 
No Heap Remote Objects for Distributed real-time Java
No Heap Remote Objects for Distributed real-time JavaNo Heap Remote Objects for Distributed real-time Java
No Heap Remote Objects for Distributed real-time Java
 
Identifying Optimal Trade-Offs between CPU Time Usage and Temporal Constraints
Identifying Optimal Trade-Offs between CPU Time Usage and Temporal ConstraintsIdentifying Optimal Trade-Offs between CPU Time Usage and Temporal Constraints
Identifying Optimal Trade-Offs between CPU Time Usage and Temporal Constraints
 
Presentation on Shared Memory Parallel Programming
Presentation on Shared Memory Parallel ProgrammingPresentation on Shared Memory Parallel Programming
Presentation on Shared Memory Parallel Programming
 
Lab3 advanced port scanning 30 oct 21
Lab3 advanced port scanning 30 oct 21Lab3 advanced port scanning 30 oct 21
Lab3 advanced port scanning 30 oct 21
 
Mutual exclusion and sync
Mutual exclusion and syncMutual exclusion and sync
Mutual exclusion and sync
 
Open mp directives
Open mp directivesOpen mp directives
Open mp directives
 
Jvm profiling under the hood
Jvm profiling under the hoodJvm profiling under the hood
Jvm profiling under the hood
 
Module-related pages
Module-related pagesModule-related pages
Module-related pages
 
Simple asynchronous remote invocations for distributed real-time Java
Simple asynchronous remote invocations for distributed real-time JavaSimple asynchronous remote invocations for distributed real-time Java
Simple asynchronous remote invocations for distributed real-time Java
 

En vedette

A Reflective Approach to Actor-Based Concurrent Context-Oriented Systems
A Reflective Approach to Actor-Based Concurrent Context-Oriented SystemsA Reflective Approach to Actor-Based Concurrent Context-Oriented Systems
A Reflective Approach to Actor-Based Concurrent Context-Oriented SystemsTakuo Watanabe
 
A Reflective Implementation of an Actor-based Concurrent Context-Oriented System
A Reflective Implementation of an Actor-based Concurrent Context-Oriented SystemA Reflective Implementation of an Actor-based Concurrent Context-Oriented System
A Reflective Implementation of an Actor-based Concurrent Context-Oriented SystemTakuo Watanabe
 
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...Shinpei Hayashi
 
Class Responsibility Assignment as Fuzzy Constraint Satisfaction
Class Responsibility Assignment as Fuzzy Constraint SatisfactionClass Responsibility Assignment as Fuzzy Constraint Satisfaction
Class Responsibility Assignment as Fuzzy Constraint SatisfactionShinpei Hayashi
 
Modeling and Utilizing Security Knowledge for Eliciting Security Requirements
Modeling and Utilizing Security Knowledge for Eliciting Security RequirementsModeling and Utilizing Security Knowledge for Eliciting Security Requirements
Modeling and Utilizing Security Knowledge for Eliciting Security RequirementsShinpei Hayashi
 
Incremental Feature Location and Identification in Source Code
Incremental Feature Location and Identification in Source CodeIncremental Feature Location and Identification in Source Code
Incremental Feature Location and Identification in Source CodeHiroshi Kazato
 
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Shinpei Hayashi
 
Refactoring Edit History of Source Code
Refactoring Edit History of Source CodeRefactoring Edit History of Source Code
Refactoring Edit History of Source CodeShinpei Hayashi
 
Feature Location for Multi-Layer System Based on Formal Concept Analysis
Feature Location for Multi-Layer System Based on Formal Concept AnalysisFeature Location for Multi-Layer System Based on Formal Concept Analysis
Feature Location for Multi-Layer System Based on Formal Concept AnalysisHiroshi Kazato
 
Guiding Identification of Missing Scenarios for Dynamic Feature Location
Guiding Identification of Missing Scenarios for Dynamic Feature LocationGuiding Identification of Missing Scenarios for Dynamic Feature Location
Guiding Identification of Missing Scenarios for Dynamic Feature LocationShinpei Hayashi
 
Detecting Occurrences of Refactoring with Heuristic Search
Detecting Occurrences of Refactoring with Heuristic SearchDetecting Occurrences of Refactoring with Heuristic Search
Detecting Occurrences of Refactoring with Heuristic SearchShinpei Hayashi
 
Terminology Matching of Requirements Specification Documents and Regulations ...
Terminology Matching of Requirements Specification Documents and Regulations ...Terminology Matching of Requirements Specification Documents and Regulations ...
Terminology Matching of Requirements Specification Documents and Regulations ...Shinpei Hayashi
 
Toward Understanding How Developers Recognize Features in Source Code from De...
Toward Understanding How Developers Recognize Features in Source Code from De...Toward Understanding How Developers Recognize Features in Source Code from De...
Toward Understanding How Developers Recognize Features in Source Code from De...Shinpei Hayashi
 
Understanding Source Code Differences by Separating Refactoring Effects
Understanding Source Code Differences by Separating Refactoring EffectsUnderstanding Source Code Differences by Separating Refactoring Effects
Understanding Source Code Differences by Separating Refactoring EffectsShinpei Hayashi
 
iFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature ImplementationsiFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature ImplementationsShinpei Hayashi
 
Toward Structured Location of Features
Toward Structured Location of FeaturesToward Structured Location of Features
Toward Structured Location of FeaturesHiroshi Kazato
 
Supporting Design Model Refactoring for Improving Class Responsibility Assign...
Supporting Design Model Refactoring for Improving Class Responsibility Assign...Supporting Design Model Refactoring for Improving Class Responsibility Assign...
Supporting Design Model Refactoring for Improving Class Responsibility Assign...Shinpei Hayashi
 
Sentence-to-Code Traceability Recovery with Domain Ontologies
Sentence-to-Code Traceability Recovery with Domain OntologiesSentence-to-Code Traceability Recovery with Domain Ontologies
Sentence-to-Code Traceability Recovery with Domain OntologiesShinpei Hayashi
 
Visualizing Stakeholder Concerns with Anchored Map
Visualizing Stakeholder Concerns with Anchored MapVisualizing Stakeholder Concerns with Anchored Map
Visualizing Stakeholder Concerns with Anchored MapTakanori Ugai
 
FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」
FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」
FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」Takashi Kobayashi
 

En vedette (20)

A Reflective Approach to Actor-Based Concurrent Context-Oriented Systems
A Reflective Approach to Actor-Based Concurrent Context-Oriented SystemsA Reflective Approach to Actor-Based Concurrent Context-Oriented Systems
A Reflective Approach to Actor-Based Concurrent Context-Oriented Systems
 
A Reflective Implementation of an Actor-based Concurrent Context-Oriented System
A Reflective Implementation of an Actor-based Concurrent Context-Oriented SystemA Reflective Implementation of an Actor-based Concurrent Context-Oriented System
A Reflective Implementation of an Actor-based Concurrent Context-Oriented System
 
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
Generating Assertion Code from OCL: A Transformational Approach Based on Simi...
 
Class Responsibility Assignment as Fuzzy Constraint Satisfaction
Class Responsibility Assignment as Fuzzy Constraint SatisfactionClass Responsibility Assignment as Fuzzy Constraint Satisfaction
Class Responsibility Assignment as Fuzzy Constraint Satisfaction
 
Modeling and Utilizing Security Knowledge for Eliciting Security Requirements
Modeling and Utilizing Security Knowledge for Eliciting Security RequirementsModeling and Utilizing Security Knowledge for Eliciting Security Requirements
Modeling and Utilizing Security Knowledge for Eliciting Security Requirements
 
Incremental Feature Location and Identification in Source Code
Incremental Feature Location and Identification in Source CodeIncremental Feature Location and Identification in Source Code
Incremental Feature Location and Identification in Source Code
 
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
 
Refactoring Edit History of Source Code
Refactoring Edit History of Source CodeRefactoring Edit History of Source Code
Refactoring Edit History of Source Code
 
Feature Location for Multi-Layer System Based on Formal Concept Analysis
Feature Location for Multi-Layer System Based on Formal Concept AnalysisFeature Location for Multi-Layer System Based on Formal Concept Analysis
Feature Location for Multi-Layer System Based on Formal Concept Analysis
 
Guiding Identification of Missing Scenarios for Dynamic Feature Location
Guiding Identification of Missing Scenarios for Dynamic Feature LocationGuiding Identification of Missing Scenarios for Dynamic Feature Location
Guiding Identification of Missing Scenarios for Dynamic Feature Location
 
Detecting Occurrences of Refactoring with Heuristic Search
Detecting Occurrences of Refactoring with Heuristic SearchDetecting Occurrences of Refactoring with Heuristic Search
Detecting Occurrences of Refactoring with Heuristic Search
 
Terminology Matching of Requirements Specification Documents and Regulations ...
Terminology Matching of Requirements Specification Documents and Regulations ...Terminology Matching of Requirements Specification Documents and Regulations ...
Terminology Matching of Requirements Specification Documents and Regulations ...
 
Toward Understanding How Developers Recognize Features in Source Code from De...
Toward Understanding How Developers Recognize Features in Source Code from De...Toward Understanding How Developers Recognize Features in Source Code from De...
Toward Understanding How Developers Recognize Features in Source Code from De...
 
Understanding Source Code Differences by Separating Refactoring Effects
Understanding Source Code Differences by Separating Refactoring EffectsUnderstanding Source Code Differences by Separating Refactoring Effects
Understanding Source Code Differences by Separating Refactoring Effects
 
iFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature ImplementationsiFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature Implementations
 
Toward Structured Location of Features
Toward Structured Location of FeaturesToward Structured Location of Features
Toward Structured Location of Features
 
Supporting Design Model Refactoring for Improving Class Responsibility Assign...
Supporting Design Model Refactoring for Improving Class Responsibility Assign...Supporting Design Model Refactoring for Improving Class Responsibility Assign...
Supporting Design Model Refactoring for Improving Class Responsibility Assign...
 
Sentence-to-Code Traceability Recovery with Domain Ontologies
Sentence-to-Code Traceability Recovery with Domain OntologiesSentence-to-Code Traceability Recovery with Domain Ontologies
Sentence-to-Code Traceability Recovery with Domain Ontologies
 
Visualizing Stakeholder Concerns with Anchored Map
Visualizing Stakeholder Concerns with Anchored MapVisualizing Stakeholder Concerns with Anchored Map
Visualizing Stakeholder Concerns with Anchored Map
 
FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」
FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」
FOSE2010 ミニチュートリアル 「データマイニング技術を応用したソフトウェア構築・保守支援」
 

Similaire à Towards an Integration of the Actor Model in an FRP Language for Small-Scale Embedded Systems

Threads and multi threading
Threads and multi threadingThreads and multi threading
Threads and multi threadingAntonio Cesarano
 
Hs java open_party
Hs java open_partyHs java open_party
Hs java open_partyOpen Party
 
Design & Analysis of Algorithm course .pptx
Design & Analysis of Algorithm course .pptxDesign & Analysis of Algorithm course .pptx
Design & Analysis of Algorithm course .pptxJeevaMCSEKIOT
 
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...DataWorks Summit/Hadoop Summit
 
Week1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC BeginWeek1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC Begin敬倫 林
 
Pretzel: optimized Machine Learning framework for low-latency and high throug...
Pretzel: optimized Machine Learning framework for low-latency and high throug...Pretzel: optimized Machine Learning framework for low-latency and high throug...
Pretzel: optimized Machine Learning framework for low-latency and high throug...NECST Lab @ Politecnico di Milano
 
CIS3110 Winter 2016CIS3110 (Operating Systems) Assig.docx
CIS3110 Winter 2016CIS3110 (Operating Systems) Assig.docxCIS3110 Winter 2016CIS3110 (Operating Systems) Assig.docx
CIS3110 Winter 2016CIS3110 (Operating Systems) Assig.docxclarebernice
 
Simple, fast, and scalable torch7 tutorial
Simple, fast, and scalable torch7 tutorialSimple, fast, and scalable torch7 tutorial
Simple, fast, and scalable torch7 tutorialJin-Hwa Kim
 
Parallelization of Coupled Cluster Code with OpenMP
Parallelization of Coupled Cluster Code with OpenMPParallelization of Coupled Cluster Code with OpenMP
Parallelization of Coupled Cluster Code with OpenMPAnil Bohare
 
Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
Strata Singapore: GearpumpReal time DAG-Processing with Akka at ScaleStrata Singapore: GearpumpReal time DAG-Processing with Akka at Scale
Strata Singapore: Gearpump Real time DAG-Processing with Akka at ScaleSean Zhong
 
JVM Memory Model - Yoav Abrahami, Wix
JVM Memory Model - Yoav Abrahami, WixJVM Memory Model - Yoav Abrahami, Wix
JVM Memory Model - Yoav Abrahami, WixCodemotion Tel Aviv
 
Pretzel: optimized Machine Learning framework for low-latency and high throug...
Pretzel: optimized Machine Learning framework for low-latency and high throug...Pretzel: optimized Machine Learning framework for low-latency and high throug...
Pretzel: optimized Machine Learning framework for low-latency and high throug...NECST Lab @ Politecnico di Milano
 
Porting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustPorting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustEvan Chan
 
Algorithm analysis.pptx
Algorithm analysis.pptxAlgorithm analysis.pptx
Algorithm analysis.pptxDrBashirMSaad
 

Similaire à Towards an Integration of the Actor Model in an FRP Language for Small-Scale Embedded Systems (20)

Threads and multi threading
Threads and multi threadingThreads and multi threading
Threads and multi threading
 
Data race
Data raceData race
Data race
 
04 performance
04 performance04 performance
04 performance
 
Hs java open_party
Hs java open_partyHs java open_party
Hs java open_party
 
Onnc intro
Onnc introOnnc intro
Onnc intro
 
Design & Analysis of Algorithm course .pptx
Design & Analysis of Algorithm course .pptxDesign & Analysis of Algorithm course .pptx
Design & Analysis of Algorithm course .pptx
 
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
 
Week1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC BeginWeek1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC Begin
 
Jvm memory model
Jvm memory modelJvm memory model
Jvm memory model
 
Pretzel: optimized Machine Learning framework for low-latency and high throug...
Pretzel: optimized Machine Learning framework for low-latency and high throug...Pretzel: optimized Machine Learning framework for low-latency and high throug...
Pretzel: optimized Machine Learning framework for low-latency and high throug...
 
Lecture1
Lecture1Lecture1
Lecture1
 
CIS3110 Winter 2016CIS3110 (Operating Systems) Assig.docx
CIS3110 Winter 2016CIS3110 (Operating Systems) Assig.docxCIS3110 Winter 2016CIS3110 (Operating Systems) Assig.docx
CIS3110 Winter 2016CIS3110 (Operating Systems) Assig.docx
 
Simple, fast, and scalable torch7 tutorial
Simple, fast, and scalable torch7 tutorialSimple, fast, and scalable torch7 tutorial
Simple, fast, and scalable torch7 tutorial
 
Parallelization of Coupled Cluster Code with OpenMP
Parallelization of Coupled Cluster Code with OpenMPParallelization of Coupled Cluster Code with OpenMP
Parallelization of Coupled Cluster Code with OpenMP
 
Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
Strata Singapore: GearpumpReal time DAG-Processing with Akka at ScaleStrata Singapore: GearpumpReal time DAG-Processing with Akka at Scale
Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
 
JVM Memory Model - Yoav Abrahami, Wix
JVM Memory Model - Yoav Abrahami, WixJVM Memory Model - Yoav Abrahami, Wix
JVM Memory Model - Yoav Abrahami, Wix
 
Pretzel: optimized Machine Learning framework for low-latency and high throug...
Pretzel: optimized Machine Learning framework for low-latency and high throug...Pretzel: optimized Machine Learning framework for low-latency and high throug...
Pretzel: optimized Machine Learning framework for low-latency and high throug...
 
Porting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustPorting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to Rust
 
A22 Introduction to DTrace by Kyle Hailey
A22 Introduction to DTrace by Kyle HaileyA22 Introduction to DTrace by Kyle Hailey
A22 Introduction to DTrace by Kyle Hailey
 
Algorithm analysis.pptx
Algorithm analysis.pptxAlgorithm analysis.pptx
Algorithm analysis.pptx
 

Dernier

VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 

Dernier (20)

VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 

Towards an Integration of the Actor Model in an FRP Language for Small-Scale Embedded Systems

  • 1. Towards an Integration of the Actor Model in an FRP Language for Small-Scale Embedded Systems Takuo Watanabe & Kensuke Sawada Department of Computer Science, Tokyo Institute of Technology Oct. 30, 2016 AGERE!@SPLASH 2016 1
  • 2. About This Work • An actor-based execution model of a pure FRP languages for small-scale embedded systems • Objective - flexible execution models - open/customizable interface with higher-level abstraction • Talk Outline - EmFRP - Runtime System - Actor-Based Runtime Implementation - Future Work 2
  • 3. "Small-Scale" Embedded Systems • Resource-Constrained Systems - Processor: 8–32bit - Clock: ≤ 100MHz - Program Storage: ≤ 1M words - RAM: ≤ 1M bytes - No MMU • w/o full-fledged OS (e.g., Linux) - embedded in special purpose devices • ex) Microcontrollers - PIC, AVR, H8, ARM Cortex-M, etc. 3
  • 4. Emfrp [Sawada & Watanabe, CROW2016] • An FRP language for small-scale embedded systems - Strongly-typed, Purely functional • parametric polymorphism & type inference • algebraic data types & pattern matching - Simple abstraction for time-varying values (aka signals) • node: named, non-first-class representation • lifting-free - Bounded & predictable amount of runtime memory • syntactic restrictions & type system • github.com/sawaken/emfrp - Compiler & Interpreter (written in Ruby) • The compiler generates platform-independent ANSI-C code runnable several microcontrollers (AVR, ARM Cortex-M) 4
  • 5. Ex1: Air-Conditioner Controller in Emfrp 5 01: module ACController # module name 02: in tmp : Float, # temperature sensor 03: hmd : Float # humidity sensor 04: out ac : Bool # air-conditioner 05: use Std # standard library 06: 07: # discomfort (temperature-humidity) index 08: node di = 0.81 * tmp + 0.01 * hmd 09: * (0.99 * tmp - 14.3) + 46.3 10: 11: # air-conditioner status 12: node init[False] ac = di >= 75.0 + ho 13: 14: # hysteresis offset 15: node ho = if ac@last then -0.5 else 0.5
  • 6. History-Sensitive Behavior with @last 6 # air-conditioner status node ac = di >= 75.0 # air-conditioner status node init[False] ac = di >= 75.0 + ho # hysteresis offset node ho = if ac@last then -0.5 else 0.5 75.0 di ac 75.0 di ac Emfrp syntax for referring to the previous value of an arbitrary node (cf. foldp in Elm)
  • 7. Case Study: Digital Clock [CROW2016] • Target: mbed LPC1768 - ARM Cortex M3, 96MHz - RAM 32K, Flash 512K - LCD, 3 Buttons • Code - Emfrp: 80 loc - Glue code in C++: 45 loc - External Libraries • Compiled Code - Generated C code: 592 loc - Binary (ARM RVDS4.1) • w/o library : 2.3 KB • w/ library: 30.1 KB 7
  • 8. Related Work 8 Yampa (FRP) Elm (FRP) Céu (procedural) Simulink (dataflow) CFRP* (FRP) Emfrp (FRP) Usable for Small-Scale Embedded Systems ✕ ✕ ⃝ ⃝ ⃝ ⃝ Frist-Class Functions ⃝ ⃝ ⃝ ✕ ⃝ ✕ Algebraic Data Types & Pattern Matching ⃝ ⃝ ✕ ✕ ✕ ⃝ Declarative Programming & Referential Transparency ⃝ ⃝ ✕ △ ⃝ ⃝ Automated Unit Test ⃝ ⃝ ✕ ⃝ ✕ ⃝ Modularity & Abstractness ⃝ ⃝ △ ⃝ ⃝ ⃝ *Another FRP language developed by use in prior to Emfrp
  • 9. DAG Representation of Ex1 9 tmp (Float) hmd (Float) di (Float) ac (Bool) ho (Float) temperature sensor humidity sensor discomfort index air- conditioner air-conditioner status hysteresis offset node dependency past-value dependencynode device connection
  • 10. Push-Based Execution Model of Emfrp 10 tmp (Float) hmd (Float) di (Float) ac (Bool) ho (Float) tmp hmd di ho ac iteration The runtime system updates the values of the nodes by repeatedly evaluating them in an order compatible to the DAG.
  • 11. module ACController # module name in tmp : Float, # temperature sensor hmd : Float # humidity sensor pulse10ms : Bool # hardware interval timer (10ms) out ac : Bool, # air-conditioner led : Bool # LED use Std # standard library # discomfort (temperature-humidity) index node di = 0.81 * tmp + 0.01 * hmd * (0.99 * tmp - 14.3) + 46.3 # timer counter (resets to 0 every 1 minute) node init[0] timer = if !pulse10ms@last && pulse10ms then (timer@last + 1) % 6000 else timer@last # air-conditioner switch node ac = if timer@last != timer && timer == 0 then di >= 75.0 else ac@last # LED blinks at 1Hz node led = (timer % 100) < 50 Ex2: A Timer-Based Air-Conditioner Controller 11
  • 12. Actor-Based Execution Model • With the push-based execution model, tmp, hmd and di are evaluated in every iteration. However, the value of them required only once per minute. • In this work, we adopt an actor representation of nodes to provide flexible runtime strategies and good abstractions runtime access - one actor (implemented as a C++ object) per node - message-based dependency propagation • single dispatch queue model • transmission order preservation (a la ABCL) - customizable scheduling via reflection (GWR) • GWR = Reflection on Actor-Groups [Watanabe, AGERE2013] 12
  • 13. DAG Representation of Ex2 13 tmp (Float) hmd (Float) di (Float) ac (Bool) timer (Int) temperature sensor humidity sensor air- conditioner led (Bool) hardware timer pulse 10ms (Bool) LED
  • 14. class TMPNode : public Actor { public: TMPNode(Actor2 *di, TMPSensor *tmp); virtual ~TMPNode() {} virtual void activate(Message *m); private: Actor2 *di; TMPSensor *tmp; } void TMPNode::activate(Message *m) { di->send1(Message::floatMessage(tmp->read(), m->cust)); } class DINode : public Actor2 { public: DINode(Actor *ac) ac(ac) { ... } virtual ~DINode() {} virtual void activate(Message *m); private: Actor *ac; } void DINode::activate(Message *mt, Message *mh) { assert(mt->cust == mh->cust); float t = mt->getFloat(), h = mh->getFloat(); float di = 0.81 * t + 0.01 * h * (0.99 * t - 14.3) + 46.3; ac->send(Message::floatMessage(di, mt->cust)); } Actor-Based Representation of Nodes in Ex2 14
  • 15. Ex: Delayed (Lazy/Pull) Blocks • An expression suffixed with @delay indicates that the expression is evaluated only when it is required. • Nodes in a delayed block and their dependent nodes are evaluated in a separate actor group that is activated only when it is needed. 15 # air-conditioner switch node ac = if timer@last != timer && timer == 0 then (di >= 75.0)@delay else ac@last
  • 16. The Actor-Group for the Delayed Block • Actors in the group for the delayed block is detached from the main iteration path. - They have separate message queue. • The detached actor group is activated by sending an activation message from ac when they are needed. 16 tmp (Float) hmd (Float) di (Float) ac (Bool) timer (Int) led (Bool) pulse 10ms (Bool)
  • 17. class DINode : public Actor2 { ... } void DINode::activate(Message *mt, Message *mh) { float t = mt->getFloat(), h = mh->getFloat(); float di = 0.81 * t + 0.01 * h * (0.99 * t - 14.3) + 46.3; mt->cust->send(mkFloatMessage(di, mt->cust)); } class ACNode : public Actor { ... } void ACNode::activate(Message *m) { if (m->prevInt() != m->getInt() && m->getInt() == 0) { acDelayedBlockGroup->send(Message::unitMessage(&acDelayedBlock)); } } class ACDelayedBlock : public Actor { ...} void ACDelayedBlock::activate(Message *m) { m->cust->send( Message::booleanMessage(m->getFloat() > 75.0, m->cust)); } 17
  • 18. Summary & Future Work • Proposed an actor-based execution model of Emfrp. - actor representation of nodes (time-varying values) - GWR for flexible execution strategies • Future Work - Possible Applications • Asynchronous (Future) Node - heavy node / slow peripheral devices / inter-device communication • Group-Wide Iteration Control - periodical iteration / deep sleep mode / interrupts from devices • Actors as signal values - Relationship to other concurrent / event models - Better (meta-level) interface - Implementation 18