SlideShare a Scribd company logo
1 of 19
Download to read offline
Coen De Roover                      Christophe Scholliers
Software Languages Lab, Brussels      Wouter Amerijckx




The STADiUM language framework for
capturing domain-specific interaction patterns
Motivating Example
... SE problems associated with event-based programming
                                           Tent C
                                       Tent B
                                  Tent A




                             Component:
                                                                                         subscribed to single event
    Component:
  HumiditySensor
                          TemperatureSensor

                                                               Component:
                                                                                            receiveEvent(Event e) {
                                  online
                                                             HeatingController
                                                                                               // invoke application logic
         online
                           temperatureReading            online
                                                                                               // publish new event
    humidityReading

                                                            adjustHeating
                                                                                            }
                         Decentralized Event Bus
                                                                                            difficult to compose event handlers
                                                online

                                            humidityReading
                      adjustHeating
                                           temperatureReading                    subscribed to multiple events
                           Component:
                                                                                   dispatch over received events
                        ComfortLevelMonitor

                                                                                   manage state (event sequences)
                                                                                   relate events through matching
Motivating Example
... problems inherent to the STADiUM domain
                                           Tent C
                                       Tent B
                                  Tent A




                                                                                         compensate reactions to stale readings
                             Component:
                          TemperatureSensor
    Component:
  HumiditySensor
                                                               Component:
                                                                                            state changes
                                                             HeatingController

         online
                                  online
                                                                                            context-dependent behavioral adaptions
                           temperatureReading            online
    humidityReading

                                                            adjustHeating



                         Decentralized Event Bus


                                                online


                      adjustHeating
                                            humidityReading                      events carry sensor readings
                                           temperatureReading

                                                                                  readings expire
                           Component:
                        ComfortLevelMonitor
                                                                                  readings subsume others
                                                                                           application-specific: time, content, origin
CrimeSPOT in a Nutshell
... a domain-specific language for programming WSN interactions
                    minimize accidental complexity so developers can
                    focus on essential complexity


         m atch sub
                     sume    node-centric perspective
dispatch     expir
                   e
compensate                      specify interactions declaratively
            ement
state manag
                             network-centric perspective
                                specify which rules govern which components

                             configurable runtime
                                application-specific semantics of events
nod
The CrimeSPOT runtime                                             cen e-
... architectural overview
                                                                     tric

          CrimeSPOT runtime
                                           inference engine
            Inference Layer                  evaluates rules against facts
   Fact            Inference        Rule     tracks causality
   Base             Engine          Base



            Reification Layer               reification engine
      Reification          Configuration       reifies events as facts
       Engine                Base
                                             expiration and subsumption
           Infrastructure Layer

            Middleware Bridge
            Middleware Bridge              middleware bridge
                                             transfers events to and from bus
                                             bridge to LooCI
nod
Distributed Interaction Rules                                   cen e-
... publishing facts on the network                                tric


fact in fact base
    temperatureReading(Celsius=27)@[factExpires(Seconds=600)]



matching condition in rule
    celsiusReading(Celsius=?value)@[to(Mac=*)]
     ← temperatureReading(Celsius=?value)
nod
Distributed Interaction Rules                                     cen e-
... invoking application logic                                       tric

              from body of rule

 e.g., unicast a reading upon a request
      humidityReading(Percent=?p)@[to(MAC=?mac, ID=?id)]
       ← requestForHumidity()@[from(MAC=?mac, ID=?id)],
         ?p is this.getHumidity()


 e.g., broadcast a reading at set intervals
      humidityReading(Percent=?p)@[to(MAC=*),factExpires(Seconds=600)]
       ← ?p is this.getHumidity()@[renewEvery(Seconds = 600)]
nod
Distributed Interaction Rules                                              cen e-
... invoking application logic                                                tric

               in head of rule

 e.g., a state change that has to be undone
     this.adjustHeater
      ← adjustHeating(Level=?h)

     class HeatingController
       private CSAction adjustHeater = new CSAction() {
          public void activated(CSVariableBindings bindings) { //adjust heating }
          public void deactivate(CSVariableBindings bindings) { //reset heating }
       };
     }
nod
Reifying Events as Facts                                                            cen e-
... fine-tuning the reification engine                                                 tric

              mapping LooCI events to CrimeSPOT facts
                                                          Configuration
                                                             Base
                Decentralized
                 Event Bus



                                         Middleware           Reification              Fact
                                Event                                       Fact
                                           Bridge              Engine                 Base



                                     Event            Drop?          Subsumes?     Assert
                                   Reification




e.g., temperature readings
      mapping temperatureReading(Celsius=?temp)@[factExpires(Seconds=600)]
            <=> Event_101(Integer=?temp).
nod
Reifying Events as Facts                                           cen e-
... fine-tuning the reification engine                                tric

              controlling fact subsumption


e.g., a humidity reading subsumes others from same tent
      incoming humidityReading(Percent=?new)@[from(ID=?id)]
      subsumes humidityReading(Percent=?old)@[from(ID=?otherid)]
      provided online(Tent=?tent)@[from(ID=?id)],
               online(Tent=?tent)@[from(ID=?otherid)]
net
WSN Application as a Whole                                            wo
                                                                  cen rk-
... which CrimeSPOT code goes where?
                                                                     tric
                 quantify over components
                 enumerate rules and supporting code

e.g., tent-related code shared by all components

 *{
   online(Tent=?tnt)@[to(MAC=*),factExpires(Seconds=3600)]
      ← ?tnt is this.getTentBasedOnGPSReading()@[renewEvery(Seconds=3600)].
 }
 *.java {
   private CSValue getTentBasedOnGPSReading() { return ... }
 }
net
WSN Application as a Whole                                             wo
                                                                   cen rk-
... reusing CrimeSPOT code
                                                                      tric

                macro definition and application

ComfortLevelMonitor {
  subsumesOlderFromSameTent(humidityReading,Percent).
  subsumesOlderFromSameTent(temperatureReading,Celsius).
}
       * { defmacro subsumesOlderFromSameTent($reading,$type):
              incoming $reading($type =?new)@[from(ID=?id)]
              subsumes $reading($type =?old)@[from(ID=?otherid)]
              provided online(Tent=?tent)@[from(ID=?id)],
                      online(Tent=?tent)@[from(ID=?otherid)]
       }
Motivating Example Revisited
... lines of CrimeSPOT code for the entire WSN Application




                                73
Motivating Example Revisited
... TemperatureSensor and HumiditySensor components
 1.   TemperatureSensor,	
  HumiditySensor,	
  HeatingController	
  {
 2.   	
  	
  	
  	
  publishPresenceEvery($onlineInterval).
 3.   }
          4.    TemperatureSensor	
  {
          5.    	
  	
  	
  	
  temperatureMapping($readingInterval).	
  	
  	
  	
  
          6.    	
  	
  	
  	
  temperatureReading(Celsius=?temp)@[to(MAC=*),
          7.    	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  factExpires($readingInterval)]	
  
          8.    	
  	
  	
  	
  	
  	
  <-­‐	
  ?temp	
  is	
  this.getTemperature()@[renewEvery($readingInterval)].
          9.    	
  }
          10.   	
  
          11.   	
  TemperatureSensor.java	
  {
          12.   	
  	
  	
  	
  private	
  CSValue	
  getTemperature()	
  {	
  return	
  ...	
  }
          13.   	
  }
                                               14. 	
  HumiditySensor	
  {
                                               15. 	
  	
  	
  	
  humidityMapping($readingInterval).
                                               16. 	
  	
  	
  	
  humidityReading(Percent=?p)@[to(MAC=*),
                                               17. 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  factExpires($readingInterval)]
                                               18. 	
  	
  	
  	
  	
  <-­‐	
  ?p	
  is	
  this.getHumidity()@[renewEvery($readingInterval)]	
  
                                               19. 	
  }
                                               20. 	
  
                                               21. 	
  HumiditySensor.java	
  {
                                               22. 	
  	
  	
  	
  private	
  CSValue	
  getHumidity()	
  {	
  return	
  ...	
  }
                                               23. 	
  }
Motivating Example Revisited
... component HeatingController

24.   HeatingController	
  {
25.   	
  	
  	
  	
  incoming	
  adjustHeating(Level=?new)	
  subsumes	
  adjustHeating(Level=?old).
26.   	
   	
   	
   	
   	
   	
  
27.   	
  	
  	
  	
  this.adjustHeater
28.   	
  	
  	
  	
  	
  	
  <-­‐	
  adjustHeating(Level=?h).
29.   }
30.   	
  
31.   HeatingController.java	
  {
32.   	
  	
  private	
  CSAction	
  adjustHeater	
  =	
  new	
  CSAction()	
  {
33.   	
  	
  	
  	
  	
  public	
  void	
  activated(CSVariableBindings	
  bindings)	
  {	
  //adjust	
  heating	
  }
34.   	
  	
  	
  	
  	
  public	
  void	
  deactivate(CSVariableBindings	
  bindings)	
  {	
  //reset	
  heating	
  }
35.   	
  	
  };	
  	
  
36.   }
Motivating Example Revisited
... component ComfortLevelMonitor
37.	
  	
  ComfortLevelMonitor	
  {	
  
38.	
  	
  	
  	
  temperatureMapping($readingInterval).
39.	
  	
  	
  	
  humidityMapping($readingInterval).
40.	
  	
  	
  	
  subsumesOlderFromSameTent(humidityReading,Percent).
41.	
  	
  	
  	
  subsumesOlderFromSameTent(temperatureReading,Celsius).
42.	
  	
  	
  	
  incoming	
  online(Tent=?tnt,Component=?c)@[from(MAC=?m)]	
  
43.	
  	
  	
  	
  subsumes	
  online(Tent=?otnt,Component=?c)@[from(MAC=?m)].	
  	
                                                                                                    	
  
44.	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
45.	
  	
  	
  	
  this.logComfortLevel
46.	
  	
  	
  	
  	
  	
  <-­‐	
  humidityReading(Percent=?h)@[from(MAC=?hm,ID=?hi)],	
  	
  	
  	
  	
  	
  	
  
47.	
  	
  	
  	
  	
  	
  	
  	
  	
  temperatureReading(Celsius=?t)@[from(MAC=?tm,ID=?ti)],
48.	
  	
  	
  	
  	
  	
  	
  	
  	
  online(Tent=?tnt)@[from(MAC=?hm,ID=?hi)],
49.	
  	
  	
  	
  	
  	
  	
  	
  	
  online(Tent=?tnt)@[from(MAC=?tm,ID=?ti)].
50.	
             	
   	
  	
  	
  	
  
37.	
  	
  	
  	
  adjustHeating(Level=?heatingLevel)@[to(MAC=?hcm,ID=?hci),
38.	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  factExpires($readingInterval)]
39.	
  	
  	
  	
  	
  	
  <-­‐	
  temperatureReading(Celsius=?t)@[from(MAC=?tm,ID=?ti)],
40.	
  	
  	
  	
  	
  	
  	
  	
  	
  online(Tent=?tnt)@[from(MAC=?tm,ID=?ti)],
41.	
  	
  	
  	
  	
  	
  	
  	
  	
  ?heatingLevel	
  is	
  this.computeHeatingLevel((Number)?t),
42.	
  	
  	
  	
  	
  	
  	
  	
  	
  online(Component=`HeatingController,Tent=?tnt)@[from(MAC=?hcm,ID=?hci)].	
  
43.	
  	
  }	
  
44.	
  
45.	
  	
  ComfortLevelMonitor.java	
  {
46. 	
  	
  	
  private	
  CSValue	
  computeHeatingLevel(Number	
  t)	
  {	
  return	
  ...	
  }
47. 	
  }
Motivating Example Revisited
... code shared by all components
48.   	
  *.java	
  {
49.   	
  	
  	
  	
  private	
  CSValue	
  getTentBasedOnGPSReading()	
  {	
  return	
  ...	
  }
50.   	
  }
51.   	
  
52.   	
  *	
  {	
  	
  	
  	
  
53.   	
  	
  	
  	
  defvar	
  $readingInterval:	
  Seconds=600.
54.   	
  	
  	
  	
  defvar	
  $onlineInterval:	
  Seconds=3600.
55.   	
  
56.   	
  	
  	
  	
  defmacro	
  temperatureMapping():
57.   	
  	
  	
  	
  	
  	
  	
  	
  mapping	
  temperatureReading(Celsius=?temp)@[factExpires($readingInterval)]	
  
58.   	
   	
  	
  	
  	
  	
  <=>	
  Event_101(Integer=?temp).
59.   	
   	
  	
  	
  	
  	
  	
  	
  	
  
60.   	
  	
  	
  	
  defmacro	
  humidityMapping():
61.   	
  	
  	
  	
  	
  	
  	
  	
  mapping	
  humidityReading(Percent=?h)@[factExpires($readingInterval)]	
  
62.   	
   	
  	
  	
  	
  	
  <=>	
  Event_102(Integer=?h).
63.   	
  
64.   	
  	
  	
  	
  defmacro	
  publishPresenceEvery($time):
65.   	
  	
  	
  	
  	
  	
  	
  online(Tent=?tnt,Component=`$COMPONENT_NAME)@[to(MAC=*),factExpires($time)]	
  	
  
66.   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <-­‐	
  ?tnt	
  is	
  this.getTentBasedOnGPSReading()@[renewEvery($time)].
67.   	
   	
  	
  	
  	
  	
  	
  	
  	
  
68.   	
  	
  	
  	
  defmacro	
  subsumesOlderFromSameTent($reading,$type):
69.   	
  	
  	
  	
  	
  	
  	
  incoming	
  $reading($type=?new)@[from(MAC=?mac)]
70.   	
  	
  	
  	
  	
  	
  	
  subsumes	
  $reading($type=?old)@[from(MAC=?othermac)]
71.   	
  	
  	
  	
  	
  	
  	
  provided	
  online(Tent=?tnt)@[from(MAC=?mac)],
72.   	
   	
  	
  	
  	
  	
  	
  	
  online(Tent=?tnt)@[from(MAC=?othermac)].
73.   	
  }
Evaluation
... using CrimeSPOT on top of LooCI on SunSPOT motes
 73 lines of code for motivating example

                               LooCI: component deployment, wiring
                                      event routing, service discovery                 73
        node-centric CrimeSPOT: event dispatching, storage, matching
                                expiration, subsumption, causality, exceptions
     network-centric CrimeSPOT: untangles application logic from interaction rules
                                library of interaction rules

 validated expressiveness using 6 representative STADiUM applications (R.2.2.4)
     temperature monitoring, fire detection, flood monitoring, range coverage
     on average 0.22 mappings, 4.14 interaction rules, 3.72 component methods

 overhead
     ∆ROM: +460kB         ∆RAM: 3kB / fact, 30kB / worst-case rule with 6 conditions
     assertion latency: 30ms (LooCI event) 80ms (CrimeSPOT fact)
Conclusions
... and future work
language for programming WSN interactions
   minimizes accidental complexity so developer can focus on essential complexity
         node-centric: declarative rules specify interactions
      network-centric: which rules govern which components
      domain-specific: semantics for events that carry sensor readings

software engineering characteristics
         node-centric: interactions untangled from application logic
                       interaction rules straightforward to compose
      network-centric: library of network configurations

towards analyses for application-specific middleware modules (WP3.1)
   profile application with respect to network and memory usage
   explicit in code: expirations, intervals

More Related Content

Similar to The STADiUM language framework for capturing domain-specific interaction patterns

soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?soft-shake.ch
 
Enabling Value Added Services in the Event-based Internet
Enabling Value Added Services in the Event-based InternetEnabling Value Added Services in the Event-based Internet
Enabling Value Added Services in the Event-based InternetYiannis Verginadis
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Agora Group
 
Managing Cloud Security: Intrusion Detection Services in a Public Cloud
Managing Cloud Security: Intrusion Detection Services in a Public CloudManaging Cloud Security: Intrusion Detection Services in a Public Cloud
Managing Cloud Security: Intrusion Detection Services in a Public CloudRightScale
 
Mobile App Assurance: Yesterday, Today, and Tomorrow.
Mobile App Assurance: Yesterday, Today, and Tomorrow.Mobile App Assurance: Yesterday, Today, and Tomorrow.
Mobile App Assurance: Yesterday, Today, and Tomorrow.Bob Binder
 
Windows Azure Platform - The Color of Cloud Computing
Windows Azure Platform - The Color of Cloud ComputingWindows Azure Platform - The Color of Cloud Computing
Windows Azure Platform - The Color of Cloud ComputingGeorge Kanellopoulos
 
Tutorial on Constructing a Web-Server with Patterns at ADC 2004
Tutorial on Constructing a Web-Server with Patterns at ADC 2004 Tutorial on Constructing a Web-Server with Patterns at ADC 2004
Tutorial on Constructing a Web-Server with Patterns at ADC 2004 David Freitas
 
Emergency Services - Process+Rules+Events Rules Fest 2011
Emergency Services - Process+Rules+Events Rules Fest 2011Emergency Services - Process+Rules+Events Rules Fest 2011
Emergency Services - Process+Rules+Events Rules Fest 2011Mauricio (Salaboy) Salatino
 
Intrusion Alert Correlation
Intrusion Alert CorrelationIntrusion Alert Correlation
Intrusion Alert Correlationamiable_indian
 
Lap around windows azure
Lap around windows azureLap around windows azure
Lap around windows azureManish Corriea
 
Private cloud, the Good, the Bad and the Ugly
Private cloud, the Good, the Bad and the UglyPrivate cloud, the Good, the Bad and the Ugly
Private cloud, the Good, the Bad and the UglyTudor Damian
 
Dynamic Event-Driven Actors (DERA)
Dynamic Event-Driven Actors (DERA)Dynamic Event-Driven Actors (DERA)
Dynamic Event-Driven Actors (DERA)Huy Tran
 
Japan aws user group osaka study session #0 LT: DevOps
Japan aws user group osaka study session #0   LT: DevOpsJapan aws user group osaka study session #0   LT: DevOps
Japan aws user group osaka study session #0 LT: DevOpsHirokazu MORIKAWA
 
Correlation Architecture
Correlation ArchitectureCorrelation Architecture
Correlation Architecturesboray
 
Venus-c: Using open source clouds in eScience
Venus-c: Using open source clouds in eScienceVenus-c: Using open source clouds in eScience
Venus-c: Using open source clouds in eScienceOW2
 
Sa 005 performance
Sa 005 performanceSa 005 performance
Sa 005 performanceFrank Gielen
 
Restate: Event-driven Asynchronous Services, Easy as Synchronous RPC
Restate: Event-driven Asynchronous Services, Easy as Synchronous RPCRestate: Event-driven Asynchronous Services, Easy as Synchronous RPC
Restate: Event-driven Asynchronous Services, Easy as Synchronous RPCHostedbyConfluent
 
Ca today here and_now_martin_vajda
Ca today here and_now_martin_vajdaCa today here and_now_martin_vajda
Ca today here and_now_martin_vajdamvajda62
 

Similar to The STADiUM language framework for capturing domain-specific interaction patterns (20)

soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
 
Enabling Value Added Services in the Event-based Internet
Enabling Value Added Services in the Event-based InternetEnabling Value Added Services in the Event-based Internet
Enabling Value Added Services in the Event-based Internet
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012
 
Managing Cloud Security: Intrusion Detection Services in a Public Cloud
Managing Cloud Security: Intrusion Detection Services in a Public CloudManaging Cloud Security: Intrusion Detection Services in a Public Cloud
Managing Cloud Security: Intrusion Detection Services in a Public Cloud
 
Coca1
Coca1Coca1
Coca1
 
Mobile App Assurance: Yesterday, Today, and Tomorrow.
Mobile App Assurance: Yesterday, Today, and Tomorrow.Mobile App Assurance: Yesterday, Today, and Tomorrow.
Mobile App Assurance: Yesterday, Today, and Tomorrow.
 
Windows Azure Platform - The Color of Cloud Computing
Windows Azure Platform - The Color of Cloud ComputingWindows Azure Platform - The Color of Cloud Computing
Windows Azure Platform - The Color of Cloud Computing
 
Tutorial on Constructing a Web-Server with Patterns at ADC 2004
Tutorial on Constructing a Web-Server with Patterns at ADC 2004 Tutorial on Constructing a Web-Server with Patterns at ADC 2004
Tutorial on Constructing a Web-Server with Patterns at ADC 2004
 
Emergency Services - Process+Rules+Events Rules Fest 2011
Emergency Services - Process+Rules+Events Rules Fest 2011Emergency Services - Process+Rules+Events Rules Fest 2011
Emergency Services - Process+Rules+Events Rules Fest 2011
 
Intrusion Alert Correlation
Intrusion Alert CorrelationIntrusion Alert Correlation
Intrusion Alert Correlation
 
P106 rajagopalan-read
P106 rajagopalan-readP106 rajagopalan-read
P106 rajagopalan-read
 
Lap around windows azure
Lap around windows azureLap around windows azure
Lap around windows azure
 
Private cloud, the Good, the Bad and the Ugly
Private cloud, the Good, the Bad and the UglyPrivate cloud, the Good, the Bad and the Ugly
Private cloud, the Good, the Bad and the Ugly
 
Dynamic Event-Driven Actors (DERA)
Dynamic Event-Driven Actors (DERA)Dynamic Event-Driven Actors (DERA)
Dynamic Event-Driven Actors (DERA)
 
Japan aws user group osaka study session #0 LT: DevOps
Japan aws user group osaka study session #0   LT: DevOpsJapan aws user group osaka study session #0   LT: DevOps
Japan aws user group osaka study session #0 LT: DevOps
 
Correlation Architecture
Correlation ArchitectureCorrelation Architecture
Correlation Architecture
 
Venus-c: Using open source clouds in eScience
Venus-c: Using open source clouds in eScienceVenus-c: Using open source clouds in eScience
Venus-c: Using open source clouds in eScience
 
Sa 005 performance
Sa 005 performanceSa 005 performance
Sa 005 performance
 
Restate: Event-driven Asynchronous Services, Easy as Synchronous RPC
Restate: Event-driven Asynchronous Services, Easy as Synchronous RPCRestate: Event-driven Asynchronous Services, Easy as Synchronous RPC
Restate: Event-driven Asynchronous Services, Easy as Synchronous RPC
 
Ca today here and_now_martin_vajda
Ca today here and_now_martin_vajdaCa today here and_now_martin_vajda
Ca today here and_now_martin_vajda
 

More from Coen De Roover

A Recommender System for Refining Ekeko/X Transformation
A Recommender System for Refining Ekeko/X TransformationA Recommender System for Refining Ekeko/X Transformation
A Recommender System for Refining Ekeko/X TransformationCoen De Roover
 
A recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesA recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesCoen De Roover
 
Applicative Logic Meta-Programming as the foundation for Template-based Progr...
Applicative Logic Meta-Programming as the foundation for Template-based Progr...Applicative Logic Meta-Programming as the foundation for Template-based Progr...
Applicative Logic Meta-Programming as the foundation for Template-based Progr...Coen De Roover
 
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13Multi-dimensional exploration of API usage - ICPC13 - 21-05-13
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13Coen De Roover
 
Detecting aspect-specific code smells using Ekeko for AspectJ
Detecting aspect-specific code smells using Ekeko for AspectJDetecting aspect-specific code smells using Ekeko for AspectJ
Detecting aspect-specific code smells using Ekeko for AspectJCoen De Roover
 
Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012Coen De Roover
 
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...Coen De Roover
 
The SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
The SOUL Tool Suite for Querying Programs in Symbiosis with EclipseThe SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
The SOUL Tool Suite for Querying Programs in Symbiosis with EclipseCoen De Roover
 
Logic-based program transformation in symbiosis with Eclipse
Logic-based program transformation in symbiosis with EclipseLogic-based program transformation in symbiosis with Eclipse
Logic-based program transformation in symbiosis with EclipseCoen De Roover
 

More from Coen De Roover (9)

A Recommender System for Refining Ekeko/X Transformation
A Recommender System for Refining Ekeko/X TransformationA Recommender System for Refining Ekeko/X Transformation
A Recommender System for Refining Ekeko/X Transformation
 
A recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesA recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templates
 
Applicative Logic Meta-Programming as the foundation for Template-based Progr...
Applicative Logic Meta-Programming as the foundation for Template-based Progr...Applicative Logic Meta-Programming as the foundation for Template-based Progr...
Applicative Logic Meta-Programming as the foundation for Template-based Progr...
 
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13Multi-dimensional exploration of API usage - ICPC13 - 21-05-13
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13
 
Detecting aspect-specific code smells using Ekeko for AspectJ
Detecting aspect-specific code smells using Ekeko for AspectJDetecting aspect-specific code smells using Ekeko for AspectJ
Detecting aspect-specific code smells using Ekeko for AspectJ
 
Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012
 
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...
 
The SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
The SOUL Tool Suite for Querying Programs in Symbiosis with EclipseThe SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
The SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
 
Logic-based program transformation in symbiosis with Eclipse
Logic-based program transformation in symbiosis with EclipseLogic-based program transformation in symbiosis with Eclipse
Logic-based program transformation in symbiosis with Eclipse
 

Recently uploaded

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

The STADiUM language framework for capturing domain-specific interaction patterns

  • 1. Coen De Roover Christophe Scholliers Software Languages Lab, Brussels Wouter Amerijckx The STADiUM language framework for capturing domain-specific interaction patterns
  • 2. Motivating Example ... SE problems associated with event-based programming Tent C Tent B Tent A Component: subscribed to single event Component: HumiditySensor TemperatureSensor Component: receiveEvent(Event e) { online HeatingController // invoke application logic online temperatureReading online // publish new event humidityReading adjustHeating } Decentralized Event Bus difficult to compose event handlers online humidityReading adjustHeating temperatureReading subscribed to multiple events Component: dispatch over received events ComfortLevelMonitor manage state (event sequences) relate events through matching
  • 3. Motivating Example ... problems inherent to the STADiUM domain Tent C Tent B Tent A compensate reactions to stale readings Component: TemperatureSensor Component: HumiditySensor Component: state changes HeatingController online online context-dependent behavioral adaptions temperatureReading online humidityReading adjustHeating Decentralized Event Bus online adjustHeating humidityReading events carry sensor readings temperatureReading readings expire Component: ComfortLevelMonitor readings subsume others application-specific: time, content, origin
  • 4. CrimeSPOT in a Nutshell ... a domain-specific language for programming WSN interactions minimize accidental complexity so developers can focus on essential complexity m atch sub sume node-centric perspective dispatch expir e compensate specify interactions declaratively ement state manag network-centric perspective specify which rules govern which components configurable runtime application-specific semantics of events
  • 5. nod The CrimeSPOT runtime cen e- ... architectural overview tric CrimeSPOT runtime inference engine Inference Layer evaluates rules against facts Fact Inference Rule tracks causality Base Engine Base Reification Layer reification engine Reification Configuration reifies events as facts Engine Base expiration and subsumption Infrastructure Layer Middleware Bridge Middleware Bridge middleware bridge transfers events to and from bus bridge to LooCI
  • 6. nod Distributed Interaction Rules cen e- ... publishing facts on the network tric fact in fact base temperatureReading(Celsius=27)@[factExpires(Seconds=600)] matching condition in rule celsiusReading(Celsius=?value)@[to(Mac=*)] ← temperatureReading(Celsius=?value)
  • 7. nod Distributed Interaction Rules cen e- ... invoking application logic tric from body of rule e.g., unicast a reading upon a request humidityReading(Percent=?p)@[to(MAC=?mac, ID=?id)] ← requestForHumidity()@[from(MAC=?mac, ID=?id)], ?p is this.getHumidity() e.g., broadcast a reading at set intervals humidityReading(Percent=?p)@[to(MAC=*),factExpires(Seconds=600)] ← ?p is this.getHumidity()@[renewEvery(Seconds = 600)]
  • 8. nod Distributed Interaction Rules cen e- ... invoking application logic tric in head of rule e.g., a state change that has to be undone this.adjustHeater ← adjustHeating(Level=?h) class HeatingController private CSAction adjustHeater = new CSAction() { public void activated(CSVariableBindings bindings) { //adjust heating } public void deactivate(CSVariableBindings bindings) { //reset heating } }; }
  • 9. nod Reifying Events as Facts cen e- ... fine-tuning the reification engine tric mapping LooCI events to CrimeSPOT facts Configuration Base Decentralized Event Bus Middleware Reification Fact Event Fact Bridge Engine Base Event Drop? Subsumes? Assert Reification e.g., temperature readings mapping temperatureReading(Celsius=?temp)@[factExpires(Seconds=600)] <=> Event_101(Integer=?temp).
  • 10. nod Reifying Events as Facts cen e- ... fine-tuning the reification engine tric controlling fact subsumption e.g., a humidity reading subsumes others from same tent incoming humidityReading(Percent=?new)@[from(ID=?id)] subsumes humidityReading(Percent=?old)@[from(ID=?otherid)] provided online(Tent=?tent)@[from(ID=?id)], online(Tent=?tent)@[from(ID=?otherid)]
  • 11. net WSN Application as a Whole wo cen rk- ... which CrimeSPOT code goes where? tric quantify over components enumerate rules and supporting code e.g., tent-related code shared by all components *{ online(Tent=?tnt)@[to(MAC=*),factExpires(Seconds=3600)] ← ?tnt is this.getTentBasedOnGPSReading()@[renewEvery(Seconds=3600)]. } *.java { private CSValue getTentBasedOnGPSReading() { return ... } }
  • 12. net WSN Application as a Whole wo cen rk- ... reusing CrimeSPOT code tric macro definition and application ComfortLevelMonitor { subsumesOlderFromSameTent(humidityReading,Percent). subsumesOlderFromSameTent(temperatureReading,Celsius). } * { defmacro subsumesOlderFromSameTent($reading,$type): incoming $reading($type =?new)@[from(ID=?id)] subsumes $reading($type =?old)@[from(ID=?otherid)] provided online(Tent=?tent)@[from(ID=?id)], online(Tent=?tent)@[from(ID=?otherid)] }
  • 13. Motivating Example Revisited ... lines of CrimeSPOT code for the entire WSN Application 73
  • 14. Motivating Example Revisited ... TemperatureSensor and HumiditySensor components 1. TemperatureSensor,  HumiditySensor,  HeatingController  { 2.        publishPresenceEvery($onlineInterval). 3. } 4. TemperatureSensor  { 5.        temperatureMapping($readingInterval).         6.        temperatureReading(Celsius=?temp)@[to(MAC=*), 7.                                                                              factExpires($readingInterval)]   8.            <-­‐  ?temp  is  this.getTemperature()@[renewEvery($readingInterval)]. 9.  } 10.   11.  TemperatureSensor.java  { 12.        private  CSValue  getTemperature()  {  return  ...  } 13.  } 14.  HumiditySensor  { 15.        humidityMapping($readingInterval). 16.        humidityReading(Percent=?p)@[to(MAC=*), 17.                                                                  factExpires($readingInterval)] 18.          <-­‐  ?p  is  this.getHumidity()@[renewEvery($readingInterval)]   19.  } 20.   21.  HumiditySensor.java  { 22.        private  CSValue  getHumidity()  {  return  ...  } 23.  }
  • 15. Motivating Example Revisited ... component HeatingController 24. HeatingController  { 25.        incoming  adjustHeating(Level=?new)  subsumes  adjustHeating(Level=?old). 26.             27.        this.adjustHeater 28.            <-­‐  adjustHeating(Level=?h). 29. } 30.   31. HeatingController.java  { 32.    private  CSAction  adjustHeater  =  new  CSAction()  { 33.          public  void  activated(CSVariableBindings  bindings)  {  //adjust  heating  } 34.          public  void  deactivate(CSVariableBindings  bindings)  {  //reset  heating  } 35.    };     36. }
  • 16. Motivating Example Revisited ... component ComfortLevelMonitor 37.    ComfortLevelMonitor  {   38.        temperatureMapping($readingInterval). 39.        humidityMapping($readingInterval). 40.        subsumesOlderFromSameTent(humidityReading,Percent). 41.        subsumesOlderFromSameTent(temperatureReading,Celsius). 42.        incoming  online(Tent=?tnt,Component=?c)@[from(MAC=?m)]   43.        subsumes  online(Tent=?otnt,Component=?c)@[from(MAC=?m)].       44.                         45.        this.logComfortLevel 46.            <-­‐  humidityReading(Percent=?h)@[from(MAC=?hm,ID=?hi)],               47.                  temperatureReading(Celsius=?t)@[from(MAC=?tm,ID=?ti)], 48.                  online(Tent=?tnt)@[from(MAC=?hm,ID=?hi)], 49.                  online(Tent=?tnt)@[from(MAC=?tm,ID=?ti)]. 50.             37.        adjustHeating(Level=?heatingLevel)@[to(MAC=?hcm,ID=?hci), 38.                                                                                factExpires($readingInterval)] 39.            <-­‐  temperatureReading(Celsius=?t)@[from(MAC=?tm,ID=?ti)], 40.                  online(Tent=?tnt)@[from(MAC=?tm,ID=?ti)], 41.                  ?heatingLevel  is  this.computeHeatingLevel((Number)?t), 42.                  online(Component=`HeatingController,Tent=?tnt)@[from(MAC=?hcm,ID=?hci)].   43.    }   44.   45.    ComfortLevelMonitor.java  { 46.      private  CSValue  computeHeatingLevel(Number  t)  {  return  ...  } 47.  }
  • 17. Motivating Example Revisited ... code shared by all components 48.  *.java  { 49.        private  CSValue  getTentBasedOnGPSReading()  {  return  ...  } 50.  } 51.   52.  *  {         53.        defvar  $readingInterval:  Seconds=600. 54.        defvar  $onlineInterval:  Seconds=3600. 55.   56.        defmacro  temperatureMapping(): 57.                mapping  temperatureReading(Celsius=?temp)@[factExpires($readingInterval)]   58.            <=>  Event_101(Integer=?temp). 59.                   60.        defmacro  humidityMapping(): 61.                mapping  humidityReading(Percent=?h)@[factExpires($readingInterval)]   62.            <=>  Event_102(Integer=?h). 63.   64.        defmacro  publishPresenceEvery($time): 65.              online(Tent=?tnt,Component=`$COMPONENT_NAME)@[to(MAC=*),factExpires($time)]     66.                    <-­‐  ?tnt  is  this.getTentBasedOnGPSReading()@[renewEvery($time)]. 67.                   68.        defmacro  subsumesOlderFromSameTent($reading,$type): 69.              incoming  $reading($type=?new)@[from(MAC=?mac)] 70.              subsumes  $reading($type=?old)@[from(MAC=?othermac)] 71.              provided  online(Tent=?tnt)@[from(MAC=?mac)], 72.                online(Tent=?tnt)@[from(MAC=?othermac)]. 73.  }
  • 18. Evaluation ... using CrimeSPOT on top of LooCI on SunSPOT motes 73 lines of code for motivating example LooCI: component deployment, wiring event routing, service discovery 73 node-centric CrimeSPOT: event dispatching, storage, matching expiration, subsumption, causality, exceptions network-centric CrimeSPOT: untangles application logic from interaction rules library of interaction rules validated expressiveness using 6 representative STADiUM applications (R.2.2.4) temperature monitoring, fire detection, flood monitoring, range coverage on average 0.22 mappings, 4.14 interaction rules, 3.72 component methods overhead ∆ROM: +460kB ∆RAM: 3kB / fact, 30kB / worst-case rule with 6 conditions assertion latency: 30ms (LooCI event) 80ms (CrimeSPOT fact)
  • 19. Conclusions ... and future work language for programming WSN interactions minimizes accidental complexity so developer can focus on essential complexity node-centric: declarative rules specify interactions network-centric: which rules govern which components domain-specific: semantics for events that carry sensor readings software engineering characteristics node-centric: interactions untangled from application logic interaction rules straightforward to compose network-centric: library of network configurations towards analyses for application-specific middleware modules (WP3.1) profile application with respect to network and memory usage explicit in code: expirations, intervals