SlideShare a Scribd company logo
1 of 40
The Claytronics Project and
Domain-Specific Languages
Nels Beckman
SSSG Presentation
February 6th, 2006
2/6/2006 SSSG Presentation; Claytronics and DSLs 2
Introduction to the Claytronics Project
• Goal: Use large numbers
of nano-scale robots to
create synthetic reality.
• Think the ‘Holodeck’
from Star Trek.
• Other people and objects
created entirely from
nano-scale robots.
2/6/2006 SSSG Presentation; Claytronics and DSLs 3
Introduction to the Claytronics Project
• Catoms: the robotic
substrate of the
Claytronics project
• Bands of electro-
magnets provide
locomotion
• Infrared sensors allow
for communication
• Metal contact rings route
power throughout
ensemble
2/6/2006 SSSG Presentation; Claytronics and DSLs 4
Introduction to the Claytronics Project
• Movements amongst
catoms produces
movement of
macroscopic structure
• Like a hologram, but you
can touch and interact
with it
2/6/2006 SSSG Presentation; Claytronics and DSLs 5
Introduction to the Claytronics Project
• Movements amongst
catoms produces
movement of
macroscopic structure
• Like a hologram, but you
can touch and interact
with it
2/6/2006 SSSG Presentation; Claytronics and DSLs 6
Introduction to the Claytronics Project
• Current State of Claytronics
– 2D Physical Prototypes, order of 2” diameter
– Applications written and tested in simulator
2/6/2006 SSSG Presentation; Claytronics and DSLs 7
Introduction to the Claytronics Project
• Project needs expertise in many areas
– Electrical Engineering
• Design and Manufacture of Nano-scale robots
– Physics
• Structural support and movement
– Robots/AI
• Motion planning, collective actuation, grasping
– Software Engineering
2/6/2006 SSSG Presentation; Claytronics and DSLs 8
Claytronics: Interesting Problems for
Software Engineers
• Millions of concurrent nodes imply:
– High likelihood of bug discovery
– Necessity of localized algorithms
– Single application for all nodes
– Nodes switching roles
– Node failure is inevitable
2/6/2006 SSSG Presentation; Claytronics and DSLs 9
Melt: A Claytronics Application
• My Task: Program a distributed ‘Melt’
application in the Claytronics simulator
• Idea:
– Go from 3D structure to flat plane of catoms
– Bring down catoms safely, don’t drop them
– Do so without global knowledge of locations
– Use C++, the language supported by the simulator
2/6/2006 SSSG Presentation; Claytronics and DSLs 10
Melt: A Claytronics Application
• Idea: Catoms that are the
ground find empty
spaces…
2/6/2006 SSSG Presentation; Claytronics and DSLs 11
Melt: A Claytronics Application
• Ground-floor catom
finds and ‘locks’ a
different catom, handing
off directions to empty
space.
nextMove
Catom: 5
FID: 4
2/6/2006 SSSG Presentation; Claytronics and DSLs 12
Melt: A Claytronics Application
• Message is propagated.
Locked catoms form a
path.
nextMove
Catom: 8
FID: 3
2/6/2006 SSSG Presentation; Claytronics and DSLs 13
Melt: A Claytronics Application
• Finally, message can no
longer propagate…
nextMove
Catom: 1
FID: 6
2/6/2006 SSSG Presentation; Claytronics and DSLs 14
Melt: A Claytronics Application
• And final catom begins
to move…
Next
Move?
2/6/2006 SSSG Presentation; Claytronics and DSLs 15
Melt: A Claytronics Application
• And finally catom begins
to move…
Catom:8
FID: 3
2/6/2006 SSSG Presentation; Claytronics and DSLs 16
Melt: A Video
2/6/2006 SSSG Presentation; Claytronics and DSLs 17
From here on…
• What I learned
• What makes programming applications difficult
• What static guarantees might we like to make
• How a domain-specific language might help
2/6/2006 SSSG Presentation; Claytronics and DSLs 18
What makes programming catoms
difficult?
• Issues common to all distributed systems
• Issues specific to Claytronics
2/6/2006 SSSG Presentation; Claytronics and DSLs 19
What makes programming catoms
difficult?
• Timing Issues/Race Conditions
• Situation: Catoms must make decisions based on
local information
– Difficult even with sequentially executing catoms
• But we have concurrently executing catoms
– The world can change immensely between decision
point and execution point
– Developer is forced to enumerate all possible
environment changes
2/6/2006 SSSG Presentation; Claytronics and DSLs 20
What makes programming catoms
difficult?
• Timing Issues/Race Conditions
• Example:
Void onEmptySpaceReply(Message _msg) {
if(_msg->getEmptySpace() == -1) {
//...
}
else {
int empty_space = _msg->getEmptySpace();
if( hostPointer->getNeighbor(0) != null ) {
send(hostPointer->getNeighbor(0),empty_space);
}
}}
• Common to Most Distributed Systems
2/6/2006 SSSG Presentation; Claytronics and DSLs 21
What makes programming catoms
difficult?
• Timing Issues/Race Conditions
• Example:
Void onEmptySpaceReply(Message _msg) {
if(_msg->getEmptySpace() == -1) {
//...
}
else {
int empty_space = _msg->getEmptySpace();
if( hostPointer->getNeighbor(0) != null ) {
send(hostPointer->getNeighbor(0),empty_space);
}
}}
• Common to Most Distributed Systems
Space could
become avail.
Not a huge
issue.
2/6/2006 SSSG Presentation; Claytronics and DSLs 22
What makes programming catoms
difficult?
• Timing Issues/Race Conditions
• Example:
Void onEmptySpaceReply(Message _msg) {
if(_msg->getEmptySpace() == -1) {
//...
}
else {
int empty_space = _msg->getEmptySpace();
if( hostPointer->getNeighbor(0) != null ) {
send(hostPointer->getNeighbor(0),empty_space);
}
}}
• Common to Most Distributed Systems
Space could
become
occupied. Cause
for some
concern.
2/6/2006 SSSG Presentation; Claytronics and DSLs 23
What makes programming catoms
difficult?
• Timing Issues/Race Conditions
• Example:
Void onEmptySpaceReply(Message _msg) {
if(_msg->getEmptySpace() == -1) {
//...
}
else {
int empty_space = _msg->getEmptySpace();
if( hostPointer->getNeighbor(0) != null ) {
send(hostPointer->getNeighbor(0),empty_space);
}
}}
• Common to Most Distributed Systems
Neighbor could
die, my message
will go into the
void.
2/6/2006 SSSG Presentation; Claytronics and DSLs 24
What makes programming catoms
difficult?
• Language doesn’t support all styles of design
equally
• Situation: I desire to program in a mostly
reactive, state-based style
– Natural for many types of Claytronics applications
– Helps support the fact that one piece of code must
work in different catom situations
2/6/2006 SSSG Presentation; Claytronics and DSLs 25
What makes programming catoms
difficult?
• Language doesn’t support all styles of design equally
• Examples:
– Floor Catom: Catom on floor
– Sky Catom: Catom waiting for a request to extend
– Path Head: Catom actively extending the path
– Mover: Catom moving down to the ground
– Locked Catom: Member of a path
• All respond to different messages, perform different
actions
2/6/2006 SSSG Presentation; Claytronics and DSLs 26
What makes programming catoms
difficult?
• Language doesn’t support all styles of design
equally
• Result:
– Jumble of if/else/case statements, nested many
layers deep
– To receive messages, I must register message handler
methods… Behavior results from code spread
amongst several methods
2/6/2006 SSSG Presentation; Claytronics and DSLs 27
What makes programming catoms
difficult?
• Programming for emergent behavior
• Situation: I want a cube to melt but I can only
program single catoms to move.
– There is no traceability between the code I am
writing and the behavior of the ensemble
– Small code changes have a tremendous effect on the
result
2/6/2006 SSSG Presentation; Claytronics and DSLs 28
What makes programming catoms
difficult?
• Invalid/Unanticipated States
• Situation:
– Catoms have a tendency to arrive at unintended
states
– It is difficult to predict multiple paths of execution
– I want to think about one or two catoms at a time,
but all catoms affect me
2/6/2006 SSSG Presentation; Claytronics and DSLs 29
What makes programming catoms
difficult?
• Invalid/Unanticipated
States
• Example:
– In order for all catoms to
be brought down to the
ground, paths must go in
every direction, not just
up and down.
Cube of catoms, side-
view.
2/6/2006 SSSG Presentation; Claytronics and DSLs 30
What makes programming catoms
difficult?
• Invalid/Unanticipated
States
• Example:
– In order for all catoms to
be brought down to the
ground, paths must go in
every direction, not just
up and down.
Cube of catoms, side-
view.
2/6/2006 SSSG Presentation; Claytronics and DSLs 31
What makes programming catoms
difficult?
• Invalid/Unanticipated
States
• Example:
– After I implemented this
functionality, I had a
problem. Often the
catoms in the middle of
the cube would not come
down.
Cube of catoms, top-
down view
2/6/2006 SSSG Presentation; Claytronics and DSLs 32
What makes programming catoms
difficult?
• Invalid/Unanticipated
States
• Example:
– Catoms were making
paths around the catoms
that really needed them,
and then getting stuck.
Cube of catoms, top-
down view
2/6/2006 SSSG Presentation; Claytronics and DSLs 33
What makes programming catoms
difficult?
• Invalid/Unanticipated States
• Result:
– Not a hard problem to fix
– Hard problem to find
– Hard problem to anticipate
– A complex set of messages and circumstances can
lead to strange situations
– Analyzing the message/state path of any one catom
would not show me the problem
2/6/2006 SSSG Presentation; Claytronics and DSLs 34
Static Guarantees?
• There are certain properties of our code that it
would be very helpful to determine statically
– Any message received by a catom will eventually be
handled
– The code you’ve written does indeed correspond to
the emergent behavior you desire
– The physical failure of one catom doesn’t cause
other catoms wait forever
– Other distributed system properties; no deadlock,
livelock, race conditions…
2/6/2006 SSSG Presentation; Claytronics and DSLs 35
First-Cut Solutions
• Model-checking
• Existing models and best-practices from
embedded/distributed systems community
– Strategies for avoiding/detecting deadlock
• Better development tools
– Visual Debugging
– Timelines of catom messages and state transitions
2/6/2006 SSSG Presentation; Claytronics and DSLs 36
Domain-Specific Languages
• Mean different things to different people
– Allow programmers to use the basic lingo of the
domain (catoms, features, surfaces, holes)
• This approach has a tendency to load the language with
lots of very specific constructs
– Close mapping from the thought process to the
implementation
2/6/2006 SSSG Presentation; Claytronics and DSLs 37
Domain-Specific Language
• What might a Claytronics DSL look like?
• Match programming language with basic style
common to domain
– State-based style seems to be commonly used
– Language could allow definitions of states, actions,
events and transitions
– Languages exist for this purpose
2/6/2006 SSSG Presentation; Claytronics and DSLs 38
Domain-Specific Language
• What might a Claytronics DSL look like?
• Define emergent behavior
– Program at the level of importance, the emergent
behavior
– Let the compiler handle the rest
– Eg.
 
))
,
(
,
(
)
,
(
.
,
)
,
(
)
(
.
catom
space
reserved
g
agree
catom
space
near
st
nodes
g
catom
space
near
space
empty
st
space
catom





2/6/2006 SSSG Presentation; Claytronics and DSLs 39
Domain-Specific Language
• What might a Claytronics DSL look like?
• Allow for transactions
– Voting and agreement are reoccurring themes
– Help the programmer deal with race conditions
• Important Questions
– What can and cannot be ‘rolled-back?’
– Should transactions be local or distributed?
2/6/2006 SSSG Presentation; Claytronics and DSLs 40
End

More Related Content

Similar to Claytronics_and_DSLs.ppt

K Grothe - What's New With CubeSats? - AIAA OC ASAT 2017
K Grothe - What's New With CubeSats? - AIAA OC ASAT 2017K Grothe - What's New With CubeSats? - AIAA OC ASAT 2017
K Grothe - What's New With CubeSats? - AIAA OC ASAT 2017Karen Grothe
 
Challenging Web-Scale Graph Analytics with Apache Spark
Challenging Web-Scale Graph Analytics with Apache SparkChallenging Web-Scale Graph Analytics with Apache Spark
Challenging Web-Scale Graph Analytics with Apache SparkDatabricks
 
Challenging Web-Scale Graph Analytics with Apache Spark with Xiangrui Meng
Challenging Web-Scale Graph Analytics with Apache Spark with Xiangrui MengChallenging Web-Scale Graph Analytics with Apache Spark with Xiangrui Meng
Challenging Web-Scale Graph Analytics with Apache Spark with Xiangrui MengDatabricks
 
Web-Scale Graph Analytics with Apache Spark with Tim Hunter
Web-Scale Graph Analytics with Apache Spark with Tim HunterWeb-Scale Graph Analytics with Apache Spark with Tim Hunter
Web-Scale Graph Analytics with Apache Spark with Tim HunterDatabricks
 
(Some) pitfalls of distributed learning
(Some) pitfalls of distributed learning(Some) pitfalls of distributed learning
(Some) pitfalls of distributed learningYves Raimond
 
QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more...
QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more...QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more...
QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more...Thoughtworks
 
OpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoDataOpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoDataHarry Wood
 
OpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoDataOpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoDatagssg
 
Schema Evolution Patterns - Velocity SJ 2019
Schema Evolution Patterns - Velocity SJ 2019Schema Evolution Patterns - Velocity SJ 2019
Schema Evolution Patterns - Velocity SJ 2019Alex Rasmussen
 
Blue Waters and Resource Management - Now and in the Future
 Blue Waters and Resource Management - Now and in the Future Blue Waters and Resource Management - Now and in the Future
Blue Waters and Resource Management - Now and in the Futureinside-BigData.com
 
OpenMapTiles: Vector tiles from OpenStreetMap
OpenMapTiles: Vector tiles from OpenStreetMapOpenMapTiles: Vector tiles from OpenStreetMap
OpenMapTiles: Vector tiles from OpenStreetMapPetr Pridal
 
Introducing Moonbeam: A Smart Contract Parachain with Ethereum Compatibility
Introducing Moonbeam: A Smart Contract Parachain with Ethereum CompatibilityIntroducing Moonbeam: A Smart Contract Parachain with Ethereum Compatibility
Introducing Moonbeam: A Smart Contract Parachain with Ethereum CompatibilityPureStake
 
GemStone Update 2023
GemStone Update 2023GemStone Update 2023
GemStone Update 2023ESUG
 
Gl tf siggraph-2013
Gl tf siggraph-2013Gl tf siggraph-2013
Gl tf siggraph-2013Khaled MAMOU
 
Building a Multi-Region Cluster at Target (Aaron Ploetz, Target) | Cassandra ...
Building a Multi-Region Cluster at Target (Aaron Ploetz, Target) | Cassandra ...Building a Multi-Region Cluster at Target (Aaron Ploetz, Target) | Cassandra ...
Building a Multi-Region Cluster at Target (Aaron Ploetz, Target) | Cassandra ...DataStax
 
Towards a Lightweight Multi-Cloud DSL for Elastic and Transferable Cloud-nati...
Towards a Lightweight Multi-Cloud DSL for Elastic and Transferable Cloud-nati...Towards a Lightweight Multi-Cloud DSL for Elastic and Transferable Cloud-nati...
Towards a Lightweight Multi-Cloud DSL for Elastic and Transferable Cloud-nati...Nane Kratzke
 
RVC: A Multi-Decoder CAL Composer Tool
RVC: A Multi-Decoder CAL Composer ToolRVC: A Multi-Decoder CAL Composer Tool
RVC: A Multi-Decoder CAL Composer ToolMDC_UNICA
 

Similar to Claytronics_and_DSLs.ppt (20)

Crocotta R&D - Virtual Universe
Crocotta R&D - Virtual UniverseCrocotta R&D - Virtual Universe
Crocotta R&D - Virtual Universe
 
K Grothe - What's New With CubeSats? - AIAA OC ASAT 2017
K Grothe - What's New With CubeSats? - AIAA OC ASAT 2017K Grothe - What's New With CubeSats? - AIAA OC ASAT 2017
K Grothe - What's New With CubeSats? - AIAA OC ASAT 2017
 
Challenging Web-Scale Graph Analytics with Apache Spark
Challenging Web-Scale Graph Analytics with Apache SparkChallenging Web-Scale Graph Analytics with Apache Spark
Challenging Web-Scale Graph Analytics with Apache Spark
 
Challenging Web-Scale Graph Analytics with Apache Spark with Xiangrui Meng
Challenging Web-Scale Graph Analytics with Apache Spark with Xiangrui MengChallenging Web-Scale Graph Analytics with Apache Spark with Xiangrui Meng
Challenging Web-Scale Graph Analytics with Apache Spark with Xiangrui Meng
 
Web-Scale Graph Analytics with Apache Spark with Tim Hunter
Web-Scale Graph Analytics with Apache Spark with Tim HunterWeb-Scale Graph Analytics with Apache Spark with Tim Hunter
Web-Scale Graph Analytics with Apache Spark with Tim Hunter
 
(Some) pitfalls of distributed learning
(Some) pitfalls of distributed learning(Some) pitfalls of distributed learning
(Some) pitfalls of distributed learning
 
QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more...
QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more...QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more...
QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more...
 
OpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoDataOpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoData
 
OpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoDataOpenStreetMap : Open Licensed GeoData
OpenStreetMap : Open Licensed GeoData
 
Schema Evolution Patterns - Velocity SJ 2019
Schema Evolution Patterns - Velocity SJ 2019Schema Evolution Patterns - Velocity SJ 2019
Schema Evolution Patterns - Velocity SJ 2019
 
Report
ReportReport
Report
 
Blue Waters and Resource Management - Now and in the Future
 Blue Waters and Resource Management - Now and in the Future Blue Waters and Resource Management - Now and in the Future
Blue Waters and Resource Management - Now and in the Future
 
OpenMapTiles: Vector tiles from OpenStreetMap
OpenMapTiles: Vector tiles from OpenStreetMapOpenMapTiles: Vector tiles from OpenStreetMap
OpenMapTiles: Vector tiles from OpenStreetMap
 
Introducing Moonbeam: A Smart Contract Parachain with Ethereum Compatibility
Introducing Moonbeam: A Smart Contract Parachain with Ethereum CompatibilityIntroducing Moonbeam: A Smart Contract Parachain with Ethereum Compatibility
Introducing Moonbeam: A Smart Contract Parachain with Ethereum Compatibility
 
(not= DSL macros)
(not= DSL macros)(not= DSL macros)
(not= DSL macros)
 
GemStone Update 2023
GemStone Update 2023GemStone Update 2023
GemStone Update 2023
 
Gl tf siggraph-2013
Gl tf siggraph-2013Gl tf siggraph-2013
Gl tf siggraph-2013
 
Building a Multi-Region Cluster at Target (Aaron Ploetz, Target) | Cassandra ...
Building a Multi-Region Cluster at Target (Aaron Ploetz, Target) | Cassandra ...Building a Multi-Region Cluster at Target (Aaron Ploetz, Target) | Cassandra ...
Building a Multi-Region Cluster at Target (Aaron Ploetz, Target) | Cassandra ...
 
Towards a Lightweight Multi-Cloud DSL for Elastic and Transferable Cloud-nati...
Towards a Lightweight Multi-Cloud DSL for Elastic and Transferable Cloud-nati...Towards a Lightweight Multi-Cloud DSL for Elastic and Transferable Cloud-nati...
Towards a Lightweight Multi-Cloud DSL for Elastic and Transferable Cloud-nati...
 
RVC: A Multi-Decoder CAL Composer Tool
RVC: A Multi-Decoder CAL Composer ToolRVC: A Multi-Decoder CAL Composer Tool
RVC: A Multi-Decoder CAL Composer Tool
 

Recently uploaded

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 

Recently uploaded (20)

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 

Claytronics_and_DSLs.ppt

  • 1. The Claytronics Project and Domain-Specific Languages Nels Beckman SSSG Presentation February 6th, 2006
  • 2. 2/6/2006 SSSG Presentation; Claytronics and DSLs 2 Introduction to the Claytronics Project • Goal: Use large numbers of nano-scale robots to create synthetic reality. • Think the ‘Holodeck’ from Star Trek. • Other people and objects created entirely from nano-scale robots.
  • 3. 2/6/2006 SSSG Presentation; Claytronics and DSLs 3 Introduction to the Claytronics Project • Catoms: the robotic substrate of the Claytronics project • Bands of electro- magnets provide locomotion • Infrared sensors allow for communication • Metal contact rings route power throughout ensemble
  • 4. 2/6/2006 SSSG Presentation; Claytronics and DSLs 4 Introduction to the Claytronics Project • Movements amongst catoms produces movement of macroscopic structure • Like a hologram, but you can touch and interact with it
  • 5. 2/6/2006 SSSG Presentation; Claytronics and DSLs 5 Introduction to the Claytronics Project • Movements amongst catoms produces movement of macroscopic structure • Like a hologram, but you can touch and interact with it
  • 6. 2/6/2006 SSSG Presentation; Claytronics and DSLs 6 Introduction to the Claytronics Project • Current State of Claytronics – 2D Physical Prototypes, order of 2” diameter – Applications written and tested in simulator
  • 7. 2/6/2006 SSSG Presentation; Claytronics and DSLs 7 Introduction to the Claytronics Project • Project needs expertise in many areas – Electrical Engineering • Design and Manufacture of Nano-scale robots – Physics • Structural support and movement – Robots/AI • Motion planning, collective actuation, grasping – Software Engineering
  • 8. 2/6/2006 SSSG Presentation; Claytronics and DSLs 8 Claytronics: Interesting Problems for Software Engineers • Millions of concurrent nodes imply: – High likelihood of bug discovery – Necessity of localized algorithms – Single application for all nodes – Nodes switching roles – Node failure is inevitable
  • 9. 2/6/2006 SSSG Presentation; Claytronics and DSLs 9 Melt: A Claytronics Application • My Task: Program a distributed ‘Melt’ application in the Claytronics simulator • Idea: – Go from 3D structure to flat plane of catoms – Bring down catoms safely, don’t drop them – Do so without global knowledge of locations – Use C++, the language supported by the simulator
  • 10. 2/6/2006 SSSG Presentation; Claytronics and DSLs 10 Melt: A Claytronics Application • Idea: Catoms that are the ground find empty spaces…
  • 11. 2/6/2006 SSSG Presentation; Claytronics and DSLs 11 Melt: A Claytronics Application • Ground-floor catom finds and ‘locks’ a different catom, handing off directions to empty space. nextMove Catom: 5 FID: 4
  • 12. 2/6/2006 SSSG Presentation; Claytronics and DSLs 12 Melt: A Claytronics Application • Message is propagated. Locked catoms form a path. nextMove Catom: 8 FID: 3
  • 13. 2/6/2006 SSSG Presentation; Claytronics and DSLs 13 Melt: A Claytronics Application • Finally, message can no longer propagate… nextMove Catom: 1 FID: 6
  • 14. 2/6/2006 SSSG Presentation; Claytronics and DSLs 14 Melt: A Claytronics Application • And final catom begins to move… Next Move?
  • 15. 2/6/2006 SSSG Presentation; Claytronics and DSLs 15 Melt: A Claytronics Application • And finally catom begins to move… Catom:8 FID: 3
  • 16. 2/6/2006 SSSG Presentation; Claytronics and DSLs 16 Melt: A Video
  • 17. 2/6/2006 SSSG Presentation; Claytronics and DSLs 17 From here on… • What I learned • What makes programming applications difficult • What static guarantees might we like to make • How a domain-specific language might help
  • 18. 2/6/2006 SSSG Presentation; Claytronics and DSLs 18 What makes programming catoms difficult? • Issues common to all distributed systems • Issues specific to Claytronics
  • 19. 2/6/2006 SSSG Presentation; Claytronics and DSLs 19 What makes programming catoms difficult? • Timing Issues/Race Conditions • Situation: Catoms must make decisions based on local information – Difficult even with sequentially executing catoms • But we have concurrently executing catoms – The world can change immensely between decision point and execution point – Developer is forced to enumerate all possible environment changes
  • 20. 2/6/2006 SSSG Presentation; Claytronics and DSLs 20 What makes programming catoms difficult? • Timing Issues/Race Conditions • Example: Void onEmptySpaceReply(Message _msg) { if(_msg->getEmptySpace() == -1) { //... } else { int empty_space = _msg->getEmptySpace(); if( hostPointer->getNeighbor(0) != null ) { send(hostPointer->getNeighbor(0),empty_space); } }} • Common to Most Distributed Systems
  • 21. 2/6/2006 SSSG Presentation; Claytronics and DSLs 21 What makes programming catoms difficult? • Timing Issues/Race Conditions • Example: Void onEmptySpaceReply(Message _msg) { if(_msg->getEmptySpace() == -1) { //... } else { int empty_space = _msg->getEmptySpace(); if( hostPointer->getNeighbor(0) != null ) { send(hostPointer->getNeighbor(0),empty_space); } }} • Common to Most Distributed Systems Space could become avail. Not a huge issue.
  • 22. 2/6/2006 SSSG Presentation; Claytronics and DSLs 22 What makes programming catoms difficult? • Timing Issues/Race Conditions • Example: Void onEmptySpaceReply(Message _msg) { if(_msg->getEmptySpace() == -1) { //... } else { int empty_space = _msg->getEmptySpace(); if( hostPointer->getNeighbor(0) != null ) { send(hostPointer->getNeighbor(0),empty_space); } }} • Common to Most Distributed Systems Space could become occupied. Cause for some concern.
  • 23. 2/6/2006 SSSG Presentation; Claytronics and DSLs 23 What makes programming catoms difficult? • Timing Issues/Race Conditions • Example: Void onEmptySpaceReply(Message _msg) { if(_msg->getEmptySpace() == -1) { //... } else { int empty_space = _msg->getEmptySpace(); if( hostPointer->getNeighbor(0) != null ) { send(hostPointer->getNeighbor(0),empty_space); } }} • Common to Most Distributed Systems Neighbor could die, my message will go into the void.
  • 24. 2/6/2006 SSSG Presentation; Claytronics and DSLs 24 What makes programming catoms difficult? • Language doesn’t support all styles of design equally • Situation: I desire to program in a mostly reactive, state-based style – Natural for many types of Claytronics applications – Helps support the fact that one piece of code must work in different catom situations
  • 25. 2/6/2006 SSSG Presentation; Claytronics and DSLs 25 What makes programming catoms difficult? • Language doesn’t support all styles of design equally • Examples: – Floor Catom: Catom on floor – Sky Catom: Catom waiting for a request to extend – Path Head: Catom actively extending the path – Mover: Catom moving down to the ground – Locked Catom: Member of a path • All respond to different messages, perform different actions
  • 26. 2/6/2006 SSSG Presentation; Claytronics and DSLs 26 What makes programming catoms difficult? • Language doesn’t support all styles of design equally • Result: – Jumble of if/else/case statements, nested many layers deep – To receive messages, I must register message handler methods… Behavior results from code spread amongst several methods
  • 27. 2/6/2006 SSSG Presentation; Claytronics and DSLs 27 What makes programming catoms difficult? • Programming for emergent behavior • Situation: I want a cube to melt but I can only program single catoms to move. – There is no traceability between the code I am writing and the behavior of the ensemble – Small code changes have a tremendous effect on the result
  • 28. 2/6/2006 SSSG Presentation; Claytronics and DSLs 28 What makes programming catoms difficult? • Invalid/Unanticipated States • Situation: – Catoms have a tendency to arrive at unintended states – It is difficult to predict multiple paths of execution – I want to think about one or two catoms at a time, but all catoms affect me
  • 29. 2/6/2006 SSSG Presentation; Claytronics and DSLs 29 What makes programming catoms difficult? • Invalid/Unanticipated States • Example: – In order for all catoms to be brought down to the ground, paths must go in every direction, not just up and down. Cube of catoms, side- view.
  • 30. 2/6/2006 SSSG Presentation; Claytronics and DSLs 30 What makes programming catoms difficult? • Invalid/Unanticipated States • Example: – In order for all catoms to be brought down to the ground, paths must go in every direction, not just up and down. Cube of catoms, side- view.
  • 31. 2/6/2006 SSSG Presentation; Claytronics and DSLs 31 What makes programming catoms difficult? • Invalid/Unanticipated States • Example: – After I implemented this functionality, I had a problem. Often the catoms in the middle of the cube would not come down. Cube of catoms, top- down view
  • 32. 2/6/2006 SSSG Presentation; Claytronics and DSLs 32 What makes programming catoms difficult? • Invalid/Unanticipated States • Example: – Catoms were making paths around the catoms that really needed them, and then getting stuck. Cube of catoms, top- down view
  • 33. 2/6/2006 SSSG Presentation; Claytronics and DSLs 33 What makes programming catoms difficult? • Invalid/Unanticipated States • Result: – Not a hard problem to fix – Hard problem to find – Hard problem to anticipate – A complex set of messages and circumstances can lead to strange situations – Analyzing the message/state path of any one catom would not show me the problem
  • 34. 2/6/2006 SSSG Presentation; Claytronics and DSLs 34 Static Guarantees? • There are certain properties of our code that it would be very helpful to determine statically – Any message received by a catom will eventually be handled – The code you’ve written does indeed correspond to the emergent behavior you desire – The physical failure of one catom doesn’t cause other catoms wait forever – Other distributed system properties; no deadlock, livelock, race conditions…
  • 35. 2/6/2006 SSSG Presentation; Claytronics and DSLs 35 First-Cut Solutions • Model-checking • Existing models and best-practices from embedded/distributed systems community – Strategies for avoiding/detecting deadlock • Better development tools – Visual Debugging – Timelines of catom messages and state transitions
  • 36. 2/6/2006 SSSG Presentation; Claytronics and DSLs 36 Domain-Specific Languages • Mean different things to different people – Allow programmers to use the basic lingo of the domain (catoms, features, surfaces, holes) • This approach has a tendency to load the language with lots of very specific constructs – Close mapping from the thought process to the implementation
  • 37. 2/6/2006 SSSG Presentation; Claytronics and DSLs 37 Domain-Specific Language • What might a Claytronics DSL look like? • Match programming language with basic style common to domain – State-based style seems to be commonly used – Language could allow definitions of states, actions, events and transitions – Languages exist for this purpose
  • 38. 2/6/2006 SSSG Presentation; Claytronics and DSLs 38 Domain-Specific Language • What might a Claytronics DSL look like? • Define emergent behavior – Program at the level of importance, the emergent behavior – Let the compiler handle the rest – Eg.   )) , ( , ( ) , ( . , ) , ( ) ( . catom space reserved g agree catom space near st nodes g catom space near space empty st space catom     
  • 39. 2/6/2006 SSSG Presentation; Claytronics and DSLs 39 Domain-Specific Language • What might a Claytronics DSL look like? • Allow for transactions – Voting and agreement are reoccurring themes – Help the programmer deal with race conditions • Important Questions – What can and cannot be ‘rolled-back?’ – Should transactions be local or distributed?
  • 40. 2/6/2006 SSSG Presentation; Claytronics and DSLs 40 End