SNAL Sensor Networks Application Language

52
SNAL Sensor Networks Application Language Alvise Bonivento Mentor: Prof. Sangiovanni- Vincentelli 290N project, Fall 04

description

SNAL Sensor Networks Application Language. Alvise Bonivento Mentor: Prof. Sangiovanni-Vincentelli 290N project, Fall 04. Design Flow. Describe Application. Independent from network architecture. Specs. Formal description of system requirements. CLEAR SEMANTIC. MATHEMATICAL MODEL. - PowerPoint PPT Presentation

Transcript of SNAL Sensor Networks Application Language

Page 1: SNAL Sensor Networks Application Language

SNALSensor Networks Application

LanguageAlvise Bonivento

Mentor: Prof. Sangiovanni-Vincentelli

290N project, Fall 04

Page 2: SNAL Sensor Networks Application Language

Specs

Synthesis

Formal description of system requirements

Platform

ImplementationVerification

Formal description of hardware performance

Refine constraintsAbstract performance

Meet in the middleOptimize

MATHEMATICAL MODEL

CLEAR SEMANTIC

Describe Application

Independent from network architecture

Design Flow

Page 3: SNAL Sensor Networks Application Language

Design Flow

Specs

Synthesis

Formal description of system requirements

Platform

ImplementationVerification

Formal description of hardware performance

Refine constraintsAbstract performance

Meet in the middleOptimize

MATHEMATICAL MODEL

CLEAR SEMANTIC

Describe Application

Independent from network architecture

Page 4: SNAL Sensor Networks Application Language

A Service-based Application Interface

Application Interface (AI)AI Platform

Application Space

Architecture Space

Platform Mapping

PlatformDesignExport

Application Instance

Platform Instance

• Universal: independent on the Implementation on any present and future Sensor Network Platform

• Service-based: standard set of Services and Interface Primitives available to Applications

• Analogy with Internet Sockets

Page 5: SNAL Sensor Networks Application Language

• Query Parameters (temperature, light, sound...)

• Query Class (accuracy, resolution, maximum latency, tagging requirements, priority, quantifiers, operations, security)

• QueryID (descriptor)

• Response type (one-time, periodic, notification of events)

• Reliability

Query Service

Controller

Query Service

S1

S2

int QSRequestWrite int QSResponseRead

QS allows a controller to obtain the state of a group of components

Application

ApplicationInterface SNSP

Page 6: SNAL Sensor Networks Application Language

Command Service

Controller

Command Service

A1

A2

int CSRequestWriteint CSAckRead

CS allows a controller to set the state of a group of components

Application

ApplicationInterface SNSP

Page 7: SNAL Sensor Networks Application Language

Concepts– Attributes (used for naming)

– Regions (zone, neighborhood)

– Organizations

– Selectors, Logic operators, Quantifiers

Concept Repository Service

CRS maintains a repository containing the lists of capabilities of the network and the concepts that are supported

• Allows to maintain agreement on concepts also in dynamic network operation• Network interoperability

temperature, pressure…kitchen, hall, yard…PG&E, Police...

C

C

Page 8: SNAL Sensor Networks Application Language

Design Flow

Specs

Synthesis

Formal description of system requirements

Platform

ImplementationVerification

Formal description of hardware performance

Refine constraintsAbstract performance

Meet in the middleOptimize

MATHEMATICAL MODEL

CLEAR SEMANTIC

Describe Application

Independent from network architecture

Page 9: SNAL Sensor Networks Application Language

SNALSensor Network Application Language

Goals• Allow user to describe the network in terms of logical components queries and services• Capture these specifications and produce a set of constraints• Simulate WSN applications

• Whenever an abstraction of the protocol stack and the hardware platform is available

Composition• MoC• Primitives

Characteristics• Publish/Subscribe• Scenario Based• Component Oriented

Page 10: SNAL Sensor Networks Application Language

Components and Connections

• Three types of “Logical Components”:– Virtual Controller– Virtual Sensor– Virtual Actuator

• One “Service Component”– CRS: Concept Repository Service

• Connections– From VC to VC– From VC to VS– From VC to VA

Page 11: SNAL Sensor Networks Application Language

Virtual Controller

VS

VC

CRS

VS

Page 12: SNAL Sensor Networks Application Language

Virtual Controller

VS

VC

CRS

VS

query

Page 13: SNAL Sensor Networks Application Language

Virtual Controller

VS

VC

CRS

VS

Causality

Page 14: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

Page 15: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

Page 16: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

Ask to CRS for interpretation

Page 17: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

Page 18: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

Advance SensingSatisfying Query Requirements

Page 19: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

Advance SensingSatisfying Query Requirements

Page 20: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

1.Humidity samplesRate R1 until T1

query1

Page 21: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

1.Humidity samplesRate R1 until T1

Page 22: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

1.Humidity samplesRate R1 until T1

query2 2.Humidity samplesRate R2 until T2

Page 23: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

Sensor keeps advancing

1.Humidity samplesRate R1 until T1

2.Humidity samplesRate R2 until T2

Page 24: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

1.Humidity samplesRate R1 until T1

2.Humidity samplesRate R2 until T2

Query3

3.Humidity samplesRate R3 until T3

AndR3>R2>R1T2>T3>T1

Page 25: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

Too late !!

Backtrack sensing

BLOCK READ

Page 26: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

Page 27: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

Page 28: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

Page 29: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

1.Humidity samplesRate R1 until T1

3.Humidity samplesRate R3 until T3

AndR3>R1T3>T1

Page 30: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

1.Humidity samplesRate R1 until T1

3.Humidity samplesRate R3 until T3

AndR3>R1T3>T1

Advance Sensing ConservativelySense at R3 until T1

Intersection of Requirements

Page 31: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

1.Humidity samplesRate R1 until T1

3.Humidity samplesRate R3 until T3

AndR3>R1T3>T1

Advance Sensing ConservativelySense at R3 until T1

Intersection of Requirements

Page 32: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

Page 33: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

Page 34: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

What if there is no token coming?• The VC does not need to query the VS anymore• The VC never had to query the VS

Page 35: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

1. The VC does not need to query the VS anymore:

Page 36: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

1. The VC does not need to query the VS anymore:

Meaning “any behavior from now on it’s ok”

Page 37: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

1. The VC does not need to query the VS anymore:

Meaning “any behavior from now on it’s ok”

It is never consumed!!!

Page 38: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

1. The VC does not need to query the VS anymore:

Meaning “any behavior from now on it’s ok”

It is never consumed!!!

When all the input channel have the VS stops executing

Page 39: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

2. The VC never needed to send a Query

Page 40: SNAL Sensor Networks Application Language

Virtual Sensor

VS

VC

CRS

VC

2. The VC never needed to send a Query

No need for this connection

Page 41: SNAL Sensor Networks Application Language

Virtual Actuator

• Same as the Virtual Sensor !!– Commands instead of Queries– Responds with Acknowledgements (if

required)

Page 42: SNAL Sensor Networks Application Language

Implications of Block Read

• Block Read– Allows to capture all the scenarios correctly– Generates sensing requirements

• Overhead– Captures specifications, no communication overhead– No delay introduced

• Expressivity– Forces the logical architecture to have the VC as the

Master and VS and VA as slaves. But that is what we wanted!!

Page 43: SNAL Sensor Networks Application Language

Reactive Network

VC1 VC2

VS1 VS2

Waits for the reply from VS2 to decide if sending a query to VS1

Waits for the reply from VS1 to decide if sending a query to VS2

Page 44: SNAL Sensor Networks Application Language

Reactive Network

VC1 VC2

VS1 VS2

Waits for the reply from VS2 to decide if sending a query to VS1

Waits for the reply from VS1 to decide if sending a query to VS2

Deadlock

Page 45: SNAL Sensor Networks Application Language

Reactive Network

VC1 VC2

VS1 VS2

Waits for the reply from VS2 to decide if sending a query to VS1

Waits for the reply from VS1 to decide if sending a query to VS2

Deadlock

We need to capture this scenario

Page 46: SNAL Sensor Networks Application Language

Reactive Network

VC1 VC2

VS1 VS2

If (reply ==x)Then send Query to VS1Else don’t send …

If (reply ==x)Then send Query to VS2Else don’t send …

Page 47: SNAL Sensor Networks Application Language

Reactive Network

VC1 VC2

VS1 VS2

If (reply ==x)Then send Query to VS1Else don’t send …

If (reply ==x)Then send Query to VS2Else don’t send …

Capture branching

Page 48: SNAL Sensor Networks Application Language

Reactive Network

VC1 VC2

VS1 VS2

If (reply ==x)Then send Query to VS1Else don’t send …

If (reply ==y)Then send Query to VS2Else don’t send …

Capture branching

Extra connection to separate branches

Page 49: SNAL Sensor Networks Application Language

Reactive Network

VC1 VC2

VS1 VS2

If (reply ==x)Then send Query to VS1Else don’t send …

If (reply ==y)Then send Query to VS2Else don’t send …

Capture branching

Extra connection to separate branches

Eventually

Page 50: SNAL Sensor Networks Application Language

Formulation

• Tiered MoC

• Complex tag system

• KPN flavor

• Publish/Subscribe

• Components as threaded processes

• Serving a Query … consuming a token

• TSM description

Page 51: SNAL Sensor Networks Application Language

Refinement

• Task and Interface Process

VC

VCTask

VCIntfc

Orthogonalization of concerns:• Computation vs. Communication• Simplify synthesis

Page 52: SNAL Sensor Networks Application Language

Conclusions

• MoC to support SNAL– Domain specific for WSN– Captures all scenarios introducing multiports– Publish/Subscribe– First step for synthesis

• Future Work– Integrating into Metropolis