Aggregate Programming Part 1: Mo0va0on & Field Calculus - - PowerPoint PPT Presentation

aggregate programming part 1 mo0va0on field calculus
SMART_READER_LITE
LIVE PREVIEW

Aggregate Programming Part 1: Mo0va0on & Field Calculus - - PowerPoint PPT Presentation

Aggregate Programming Part 1: Mo0va0on & Field Calculus Jacob Beal SFM16: QUANTICOL June 2016 A generative approach to safety Restrict your development environment


slide-1
SLIDE 1

Aggregate ¡Programming ¡ Part ¡1: ¡Mo0va0on ¡& ¡Field ¡Calculus ¡

Jacob ¡Beal ¡

SFM16: ¡QUANTICOL ¡ June ¡2016 ¡

slide-2
SLIDE 2

A generative approach to safety

Restrict your development environment… … to contain only resilient distributed systems.

sensors& local&func,ons& actuators&

Applica'on* Code* Developer* APIs* Field*Calculus* Constructs* Resilient* Coordina'on* Operators* Device* Capabili'es* built&ins)

rep nbr if T G if C

built&ins)

communica,on& state& restric,on&

Percep,on&

summarize average regionMax …

Ac,on& State& Collec,ve&Behavior&

distanceTo broadcast partition … timer lowpass recentTrue … collectivePerception collectiveSummary managementRegions …

Crowd&Management&

dangerousDensity crowdTracking crowdWarning safeDispersal

slide-3
SLIDE 3

Dealing with challenging platforms

Emerging ¡Computa4onal ¡ Pla6orms ¡

neighborhood ¡ device ¡

Computa4onal ¡Field ¡ Programming ¡Models ¡ Inherently ¡Resilient ¡ Distributed ¡Systems ¡

Pay ¡a ¡liAle ¡efficiency, ¡get ¡a ¡lot ¡of ¡programmability ¡and ¡resilience ¡

slide-4
SLIDE 4

Traditional Monolithic Computing

The venerable von Neumann model is breaking down in several ways…

slide-5
SLIDE 5

The End of Moore’s Law

High-performance computing = mesh

Intel ¡Xeon ¡Phi: ¡61 ¡cores ¡ Xilinx ¡Virtex-­‑7: ¡2M ¡Logic ¡cells ¡

slide-6
SLIDE 6

Networked Devices Everywhere

6 ¡

slide-7
SLIDE 7

New Computational Materials

  • Synthetic Biology:

[Medford] ¡ [Weiss] ¡ [Levskaya] ¡ [Hasty] ¡ Other ¡emerging ¡areas ¡too, ¡including ¡nanoassembly, ¡ac5ve ¡materials… ¡

slide-8
SLIDE 8

Fundamentally different models

How can we program aggregates adaptively & efficiently? Are there commonalities that cross substrates?

High ¡Dispersion ¡ Moderate ¡FLOPs ¡ Isolate ¡Systems ¡ Extremely ¡High ¡FLOPs ¡ High ¡ResoluVon ¡Sense/Act ¡ Abysmal ¡FLOPs ¡

slide-9
SLIDE 9

Example: Services for Mass Events

9 ¡

slide-10
SLIDE 10

Example: Managing Crowd Danger

slide-11
SLIDE 11

Dangerous ¡Density ¡Warning ¡ Dispersal ¡Advice ¡ Crowd ¡Es0ma0on ¡ Conges0on-­‑Aware ¡Naviga0on ¡

Device-Centric Programming

  • Explicit design of adaptation and communication
  • Complex per-device multi-service application
  • Intractable to ensure correct behavior
slide-12
SLIDE 12

Dangerous ¡Density ¡Warning ¡ Dispersal ¡Advice ¡ Crowd ¡Es0ma0on ¡ Conges0on-­‑Aware ¡Naviga0on ¡

Aggregate Programming

  • Implicit adaptation and communication
  • Code each collective service independently
  • Compose via scope and information flow
slide-13
SLIDE 13

Aggregate Programming

slide-14
SLIDE 14

sensors& local&func,ons& actuators&

Applica'on* Code* Developer* APIs* Field*Calculus* Constructs* Resilient* Coordina'on* Operators* Device* Capabili'es* built&ins)

rep nbr if T G if C

built&ins)

communica,on& state& restric,on&

Percep,on&

summarize average regionMax …

Ac,on& State& Collec,ve&Behavior&

distanceTo broadcast partition … timer lowpass recentTrue … collectivePerception collectiveSummary managementRegions …

Crowd&Management&

dangerousDensity crowdTracking crowdWarning safeDispersal

Aggregate Programming Stack

slide-15
SLIDE 15

Example: Mesh-Network Cell Phones

15 ¡

slide-16
SLIDE 16

Geometric Program: Channel

(cf. ¡Butera) ¡ DesV-­‑ ¡ naVon ¡ Source ¡

16 ¡

slide-17
SLIDE 17

Computing with fields

source destination distance-to distance distance-to <= + dilate width 37 ¡ 10 ¡

17 ¡

slide-18
SLIDE 18

(Higher Order) Field Calculus

Communica0on ¡ Domain ¡Change ¡ State ¡

[Viroli ¡et ¡al., ¡‘13, ¡Damiani ¡et ¡al., ¡‘15] ¡

Variable ¡ Abstract ¡& ¡Call ¡ Func0ons ¡ Local ¡Ops ¡ Literal ¡Value ¡

slide-19
SLIDE 19

Field Calculus Example

(def distance-to (region) (rep d infinity (mux region (min-hood (+ (nbr d) (nbr-range)))))) Let’s go examine this in simulation…

slide-20
SLIDE 20

Field Calculus is Space-Time Universal

Space-time Universal = arbitrarily good approximation of any causal, finitely-approximable computation

[Beal, ¡’10; ¡Beal ¡et ¡al., ¡SCW ¡14] ¡

!"#$% &'()$% !"#$% &'()$% !"#$% &'()$%

!"#$%&'!"()*+&##,$&-%+&..$/0!1&2/"'+

!"#$% &'()$%

!"

!"#$% &'()$%

!"

!"#$% &'()$%

!" #$%"

#$&"

&$'"

%$&"

#"

#$'"

&$(" #$(" %$(" '$("

Specifica0on: ¡

Acausal ¡ Non-­‑approximable ¡

slide-21
SLIDE 21

Instantiation: Proto

(def gradient (src) ...) (def distance (src dst) ...) (def dilate (src n) (<= (gradient src) n)) (def channel (src dst width) (let* ((d (distance src dst)) (trail (<= (+ (gradient src) (gradient dst)) d))) (dilate trail width)))

neighborhood ¡ device ¡

Device ¡ Kernel ¡ evalua0on ¡ global ¡to ¡local ¡ compila0on ¡ discrete ¡ approxima0on ¡ plaJorm ¡ specificity ¡& ¡

  • p0miza0on ¡

Global ¡ ¡ ¡ ¡Local ¡ ¡ ¡Discrete ¡

[Beal ¡& ¡Bachrach, ¡'06] ¡

http://proto.bbn.com/

slide-22
SLIDE 22

Instantiation: Protelis

  • Java-hosted & integrated
  • Java-like syntax
  • Eclipse support

Daemon'Device' Protelis'Parser' Protelis'Device' Environment' Variables' Protelis' Interpreter' Protelis)Program) Service' Manager' Daemon' Networked' Service'

Start/Stop' Signals' Status,' Sockets' Other& Services& Other& Managers&

Enterprise& Server&

Protelis)Parser) Protelis)Device) Environment) Variables) Protelis) Interpreter) Protelis)Program)

Other& Devices&

Simulated*Device* Protelis*Parser* Protelis*Device* Environment* Variables* Protelis* Interpreter* Protelis)Program) Simulated* Environment* Simula8on* Builder* Simula/on)Script) Alchemist* Simulator* Simulated* Network*

Architecture: ¡ [Pianini, ¡Viroli, ¡& ¡Beal, ¡SAC ¡‘15] ¡

slide-23
SLIDE 23

Using Protelis in your projects

http://protelis.org

slide-24
SLIDE 24

Summary

  • Aggregate programming addresses emerging

networked computation challenges by separating challenges and raising to a more natural abstraction level

  • Field calculus is a simple, universal model for

aggregate programming

  • Protelis is a field calculus implementation

integrated with Java