jacob beal lecture 2 of 5 on spatial computing isc-pif ... · lecture 2 of 5 on spatial computing...
TRANSCRIPT
![Page 1: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/1.jpg)
Continuous Space-Time Programs
Jacob BealLecture 2 of 5 on Spatial Computing
ISC-PIF Summer School, 2009
![Page 2: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/2.jpg)
or: global to local in four easy piecesPointwise Restriction
Feedback Neighborhood
+ restrict
+
741
delay
48
any-hoodnbr
![Page 3: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/3.jpg)
Agenda
● Survey of Spatial Computing Approaches● Amorphous Medium Abstraction● Space-Time Primitives● Compiling from Global to Local
![Page 4: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/4.jpg)
Example: Target Tracking
IntruderGuard
![Page 5: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/5.jpg)
Example: Search & Rescue
I've found a victim!
The rescue bots are on
the way!
![Page 6: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/6.jpg)
Example: Museum Guide
I’ve gotten lost! How can I rejoin
my friends?
I would like to see the Mona Lisa, avoiding the queues...
![Page 7: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/7.jpg)
Example: Mobile Streaming
I want Alice to be able to listen in
on this great conversation
![Page 8: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/8.jpg)
How can we program these?
● Desiderata for approaches:● Simple, easy to understand code● Robust to errors, adapt to changing environment● Scalable to potentially vast numbers of devices● Take advantage of spatial nature of problems
![Page 9: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/9.jpg)
What is a Language?
● Standardized library of parts [Primitives]● Rules for building bigger parts by combining
smaller parts [Composition]● Mechanism for naming parts and treating them
like primitives. [Abstraction]
What is explicit and what is implicit?
![Page 10: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/10.jpg)
A Taxonomy of Approaches
Spatial
DynamicsGeometry
Uniform Viral
Non-Spatial
Non-Composable
![Page 11: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/11.jpg)
A Taxonomy of Approaches
Spatial
DynamicsGeometry
Uniform Viral
Non-Spatial
Non-Composable
![Page 12: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/12.jpg)
Approaches from Local Dynamics
Primitives describe only actions between devices and the neighbors they communicate with.
● Advantages: coherent and correct semantics● Disadvantages: programmer must figure out
how to marshal local dynamics to produce coherent large-area programs
![Page 13: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/13.jpg)
Proto: Computing with Fields
[Beal & Bachrach '06]
(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
DeviceKernel
evaluation
global to localcompilation
discreteapproximation
platformspecificity &optimization
![Page 14: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/14.jpg)
Microbial Colony Language
● Marker diffusion & decay, events● Closely targetted at engineered bacteria
[Weiss et al., '98]
![Page 15: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/15.jpg)
Other Uniform Approaches
● LDP [De Rosa, et al., '08], Meld [Ashley-Rollman '07]
● Distributed logic programs● Local resolution leads to long-distance properties
![Page 16: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/16.jpg)
TOTA: Viral tuples
[Mamei & Zambonelli, '08]
![Page 17: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/17.jpg)
Paintable Computing
● Consistent transfer, view of neighbor data● Code for install, de-install, transfer-granted,
transfer-denied, update[Butera, '02]
![Page 18: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/18.jpg)
Other Viral Approaches
● Smart Messages [Kang et al, '04]
● Execution migrates to nodes of interest, found via self-routing code packets
● RGLL [Sutherland, '03]
● Code for arrival, tick, collision, departure● Communication via collision
![Page 19: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/19.jpg)
Approaches from Geometry
Primitives describe large-scale geometric regions (e.g. “all devices on the left hill”)
● Advantages: coherent, easy to specify large-scale programs
● Disadvantages: generally easy to accidentally specify programs that cannot be executed correctly
![Page 20: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/20.jpg)
MGS
Meristem formation Turing pattern on torus
[Michel, Giavitto, Spicher, 2004]
![Page 21: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/21.jpg)
Regiment
● Streaming collection of data from regions● Spatial primitives:
– K-hop neighborhood– K-nearest nodes
● Composition:– Union/Intersection– Map/Filter
● Distributed execution as a compiler optimization
[Newton & Welsh, '04]
![Page 22: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/22.jpg)
Growing Point Language
● Botanical growing points, chemical tropism● Can construct arbitrary planar graphs
[Coore, '99]
![Page 23: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/23.jpg)
Origami Shape Language
● Geometry and folding sequence● Huzita's 6 axioms (e.g. fold Line-1 onto Line-2)
● Predicts drosophila morphological variation
[Nagpal, '01]
![Page 24: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/24.jpg)
Growing 2D Shapes
● Grows from single point, fills space with cells● Scaffolding garbage collects via apoptosis
[Kondacs, '03]
![Page 25: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/25.jpg)
Other Geometric Approaches
● Spatial Programming [Borcea et al., '04]
● EgoSpaces [Julien & Roman, '06]
● SpatialViews [Ni et al., '03]
● Spidey [Luca & Gian, '06]
● Abstract Regions [Welsh & Mainland, '04]
![Page 26: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/26.jpg)
Non-Composable Approaches
Algorithms and techniques, generally based on geometry, but not part of a system of composable parts
● Advantages: powerful spatial ideas for that are good for inclusion in code libraries
● Disadvantages: developed as stand-alone ideas, and may have limited composability
![Page 27: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/27.jpg)
Field-Based Coordination
[Mamei & Zambonelli, '06]
![Page 28: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/28.jpg)
Self-Healing Gradients
[Clement & Nagpal '03; Butera '02; Beal et al., '08]
![Page 29: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/29.jpg)
Local Check-Schemes
[Yamins, '08]
![Page 30: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/30.jpg)
Other Non-Composable Approaches
● hood [Whitehouse, et. al., '04]
● nesC library for interacting with neighbors
● “Stupid Robot Tricks” [McLurkin '04]
● Swarm behaviors intended mainly for time-wise multiplexing.
● Countless one-shot systems...
![Page 31: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/31.jpg)
Significant Non-Spatial Approaches
● “roll-your-own” (e.g. C/C++)● TinyDB [Madden et al., '05]
● Distributed database queries for sensor networks
● Kairos [Gummadi et al., '05]
● Distributed graph algorithms
● WaveScript [Newton et al., '08]
● Distributed streaming language● Follow-on to Regiment w/o the spatial primitives
![Page 32: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/32.jpg)
Summary
● Many approaches exist to programming pervasive applications for spatial computers
● Only approaches based on local dynamics currently offer predictable composition, correct execution, and spatial primitives
● Challenge: obtaining long-range coherent behavior from local dynamics
![Page 33: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/33.jpg)
Agenda
● Survey of Spatial Computing Approaches● Amorphous Medium Abstraction● Space-Time Primitives● Compiling from Global to Local
![Page 34: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/34.jpg)
Example: Target Tracking
IntruderGuard
![Page 35: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/35.jpg)
Geometric Program: Channel
Desti-nationSource
(cf. Butera)
![Page 36: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/36.jpg)
Geometric Program: Channel
(cf. Butera)
Desti-nationSource
![Page 37: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/37.jpg)
Geometric Program: Channel
(cf. Butera)
Desti-nationSource
![Page 38: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/38.jpg)
Geometric Program: Channel
(cf. Butera)
Desti-nationSource
![Page 39: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/39.jpg)
Why use continuous space?
Simplicity Scaling & Portability Robustness
150 devices2000 devices
![Page 40: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/40.jpg)
Amorphous Medium Approach
![Page 41: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/41.jpg)
Amorphous Medium Approach
![Page 42: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/42.jpg)
Amorphous Medium Approach
Program the space... approximate with a network
?
![Page 43: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/43.jpg)
Amorphous Medium Approach
The discretization hardly matters!
![Page 44: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/44.jpg)
Global v. Local v. Discrete
Compiler
Kernel
Global
Local
Discrete
Program
![Page 45: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/45.jpg)
Amorphous Medium
Continuous space & timeInfinite number of devicesSee neighbors' past state
Approximate with:Discrete network of devicesSignals transmit state
neighborhood
device
![Page 46: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/46.jpg)
Agenda
● Survey of Spatial Computing Approaches● Amorphous Medium Abstraction● Space-Time Primitives● Compiling from Global to Local
![Page 47: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/47.jpg)
Computing with fields
source destination
distance
<=
+
dilate
width
37
10
distance-to distance-to
![Page 48: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/48.jpg)
Four Families of PrimitivesPointwise Restriction
Feedback Neighborhood
+ restrict
+
741
delay
48
any-hoodnbr
![Page 49: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/49.jpg)
Feedback via Configuration Path
● s(t+dt) = f(s(t),dt)● Function can leap from value to value (unlike
derivative, CT-feedback approaches)● Steps can be irregular● Smaller steps = better approximation
time
valu
e
![Page 50: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/50.jpg)
Modulation by Restriction
source destination coord
channel
10
broadcast
10
(5, 7
)
![Page 51: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/51.jpg)
Proto(def distance-to (src) ...)(def distance (src dst) ...)(def dilate (src n) (<= (distance-to src) n))(def channel (src dst width) (let* ((d (distance src dst)) (trail (<= (+ (distance-to src) (distance-to dst)) d))) (dilate trail width)))
neighborhood
device
DeviceKernel
evaluation
global to localcompilation
discreteapproximation
platformspecificity &optimization
Global Local D
iscrete
http://stpg.csail.mit.edu/proto.html
![Page 52: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/52.jpg)
Weaknesses of Proto
Functional programming scares people Programmers can break the abstraction No dynamic allocation of processes No formal proofs available for quality of
approximation in a composed program
(active research on last two)
![Page 53: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/53.jpg)
Implementing Geometric Primitives
Let's go write the code for these...
distance-to broadcast
![Page 54: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/54.jpg)
Agenda
● Survey of Spatial Computing Approaches● Amorphous Medium Abstraction● Space-Time Primitives● Compiling from Global to Local
![Page 55: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/55.jpg)
Global v. Local v. Discrete
Compiler
Kernel
Global
Local
Discrete
Program
![Page 56: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/56.jpg)
Compiling from Global to Local
● Pointwise: no change● Feedback → state update● Restriction → branching & reset● Neighborhood operations → per-neighbor
computation● Functional composition → tree walk & stack ops
![Page 57: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/57.jpg)
Feedback → State Update
(rep t 0 (+ d (dt)))
+delay
dt0
+default
dt0t
set t
![Page 58: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/58.jpg)
Restriction → Branching & Reset
(if (sense 1) (rep t 0 (+ d (dt))) 3)
+delay
dt0
mux
sense 1
3
not
+default
dt0t
set t
3
if
sense 1 all
set t
DEAD
![Page 59: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/59.jpg)
Neighborhood ops → Per-nbr computation
(min-hood (+ (nbr-range) (nbr d)))
min-hood
nbr
d
nbr-range
+
x nbr-range
+
fold-hood
min
lambda (x)
d
![Page 60: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/60.jpg)
Tree-walk linearizes to stack ops
1
+default
dt0t
set t
3
if
sense 1 all
set t
DEAD
2
812
1110
9643
5 7
Most operators act last, branches act second
00: SENSE 101: IF � 0902: REF 1403: LIT 004: DEFAULT05: DT06: PLUS07: SET 1408: JMP 1309: LIT DEAD10: SET 1411: POP12: LIT 313: EXIT14: <DEAD>
Truebranch
Falsebranch
(if (sense 1) (rep t 0 (+ d (dt))) 3)
![Page 61: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/61.jpg)
Summary
Spatial programming approaches based on local dynamics give a good trade-off between expressiveness and abstraction.
Amorphous Medium abstraction simplifies programming of space-filling networks
Four families of space and time operations, make it easy to compile global programs into local actions on an amorphous medium
Geometric metaphors allow complex spatial computing problems to be solved with very short programs.
![Page 62: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/62.jpg)
Tomorrow: Discrete Approximation & Self-Healing
150 devices 2000 devices
![Page 63: Jacob Beal Lecture 2 of 5 on Spatial Computing ISC-PIF ... · Lecture 2 of 5 on Spatial Computing ISC-PIF Summer School, 2009. or: global to local in four easy pieces Pointwise Restriction](https://reader034.vdocument.in/reader034/viewer/2022052102/603c40912644b046b339a030/html5/thumbnails/63.jpg)
Further Questions
● What sort of declarative programming can safely be transformed from global to local?
● Are there programs that cannot be expressed well in continuous space?