Formal Formal Component Component Models Models for for Context - - PowerPoint PPT Presentation

formal formal component component models models for for
SMART_READER_LITE
LIVE PREVIEW

Formal Formal Component Component Models Models for for Context - - PowerPoint PPT Presentation

Formal Formal Component Component Models Models for for Context Context Awareness Awareness Deploy FP7 MatsNeovius andKaisaSere FMCO2008 boAkademi FacultyofTechnology, 1 22.10.2008


slide-1
SLIDE 1

Formal Formal Component Component Models Models for for Context Context Awareness Awareness

FMCO2008 22.10.2008

Deploy FP7 MatsNeovius andKaisaSere

1 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

slide-2
SLIDE 2

Outline Outline of

  • fthis

this talk talk

Motivation Informaldefinitions Problem

– Modelling contextawaresystem – Treatingthecontextsascomponents – Treatingthecontextsascomponents – Proposedframeworkforsolvingtheproblem

ActionSystemsataglimpse Contextinactionsystems Example:fictionary driverlesscar Conclusion&furtherwork

2 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

slide-3
SLIDE 3

Motivation Motivation

  • Inordertoproviderigour onSW,formalmethodssuffice

However,inordertoproviderigour onasystem, environmentmustbeconsidered

– Whyisthisofinterest

  • forexample,ifthecarbreaksdowntheproblemisnot
  • forexample,ifthecarbreaksdowntheproblemisnot

malfunctionedSWorerroneoustreatingofsensor reading,themainproblemis abrokencar.

– Inasystem,theenvironmentisadecisivefactor, weneedtointroduceit“formally”

  • Considerirrationalityandforcethedesignertotreatand

includewhichandhowforinstancesensorreadingsare acquiredandcalculatedwith

3 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

slide-4
SLIDE 4

Informaldefinitions Informaldefinitions

Context (when talking about contextaware)

  • [Dey,others]

Component

  • [Szyperski]

4 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

slide-5
SLIDE 5

Problem Problem – modelling

modelling a acontext context aware aware system system

Howisanelementarycontextutilised in thecontextawareSW

(Elementarycontextdenotesforinstanceasensorreading)

– Needtospecifythe”utiliserinterface” – Needtospecifythe”utiliserinterface”

Howiscontextprocessedtoprovide increasedinformation

– Compositionofelementarycontexts – Needtospecifytheinterfacebetweenthe processingentities

5 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

slide-6
SLIDE 6

Problem Problem – Treating

Treating contexts contexts as ascomponents components

Avoidamonolithicconstructionsforthe sakeofindependentdeploymentandreuse Informationbuildsbottomup

– Elementarycontextsformthebasisfor – Elementarycontextsformthebasisfor contextawareSW

  • Compositionofcontexts

6 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

Accelerate ok(given speeding isprohibited)? acquire :velocity∧ speed_limit improve :velocity >speed_limit → speeding :=true provide :speeding

slide-7
SLIDE 7

Problem Problem – solution

solution

Treatcontextasaservicetoitsutiliser

– Utiliser abletoacquireinformation wheneverdesired(triggeredbysomething, maybeacontext) maybeacontext)

  • Suchaswhenresolvingwhetherornotto

accelerate(previousslide)

– Weconsidereachsocalledelementary contextasacomponentinitsownright

7 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

slide-8
SLIDE 8

Problem Problem – solution

solution view view

Contextutiliser /application

– Reliesonsomecontextservice(s)

  • Proactive(orreactive)

8 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

slide-9
SLIDE 9

Problem Problem – solution

solution view view

Contextutiliser /application

– Reliesonsomecontextservices

  • Proactiveorreactive

Contextservice

– Reliesonasetofcontextprocessors – Reliesonasetofcontextprocessors

  • Providesananswertosomequestion

9 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

slide-10
SLIDE 10

Problem Problem – solution

solution view view

Contextprocessor

– Atriad,CD||CI||CP

  • CD– acquiremetrics
  • CI– applyalgorithm
  • CP– provideametricwhoseinformationhavebeenincreased
  • CP– provideametricwhoseinformationhavebeenincreased

10 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

slide-11
SLIDE 11

Problem Problem – solution

solution view view, ,all all together together

Inspired by: Henricksen andIndulska,”Modelling andUsing Imperfect Context Information”,CoMoRea 2004. Shehzad,Ngo,Pham,Lee”Formal modeling inContext aware systems” CAMUSframework andContextual informtaion hierarchy 11 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

slide-12
SLIDE 12

Action Actionsystems systems ata ataglimpse glimpse

Statebasedformalism,basedonDijkstra’s guardedcommandlanguage

– Apredicate(guard)enablesastatement (body)g→ S (body)g→ S

  • Atomicity
  • Nondeterminism
  • Parallelism

12 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

=|[ import imp_list; export exp_list :=e0; var var_list :=v0; proc list ofpr.name (par.name.list)=<{impl}>; dog1 → S1[]…[]gn → Sn od ]|

slide-13
SLIDE 13

Specialisations Specialisations ofaction

  • factionsystems

systems

Contextisnonchangeable

– Newdeclarationsof

  • read_only :publishedbysomeotherAS
  • publish:read_only inotherAS
  • publish:read_only inotherAS
  • context:elementary

context(s)

13 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

ℬ =|[ context c import j; export f :=f0; read_only r; publish p:=p0; var w:=w0; proc ; dog1 → S1 []…[]gn → Sn od ]|

slide-14
SLIDE 14

Specialisations Specialisations toaction toactionsystems systems cont cont

Introducingcontextintheutiliser @

– Def.@:g1 → S1@=g1 ∧ g → S1; S where g andS isdefined inactionsystem interface – Actionsystem

  • ℬutiliser =|[
  • – Actionsystem

interface function as theinterface forthe context service (relying oncontext processors)

14 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

ℬutiliser =|[ import j; export f :=f0; var w:=w0; proc ; dog1 → S1@T []…[]gn → Sn …od ]|@interface

slide-15
SLIDE 15

Specialisations Specialisations toaction toactionsystems systems cont cont

Introducingcontextintheutiliser @

– Def.@:g1 → S1@=g1 ∧ g → S1; S where g andS isdefined inactionsystem interface

  • =|[

ℬutiliser =|[

15 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

interface =|[ read_only rr; import ir; export er; var vr; procProc_name (par.name.list) ={<impl>}; do… T: gT →ST

  • d |]

ℬutiliser =|[ import j; export f :=f0; var w:=w0; proc ; dog1 → S1@T []…[]gn → Sn …od ]|@interface

slide-16
SLIDE 16

A Acontext context processor processor – making

making information information

ℐ =|[contextε; importλ; read_only x; exportq; publishy; var b; procnonce(x)=f (x):x’; ≔ =|[contextε; importD; read_only y; exports; publishz; var h; proc ; ≔ =|[contextc; importϕ; read_only m; exportt; publishx; var a; proc ;

16 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

procnonce(x)=f2(x):x’; do ω→y≔ f1(nonce(x))λ []¬ω →V []γ

  • d

]| proc ; do ψ →z ≔ f(y) []¬ψ →U []δ

  • d

]| proc ; do g →S (x :=E) []¬g →T []β

  • d

]|

slide-17
SLIDE 17

A Acontext context processor processor

composed composed Composition possible assuming

– Thelocal variables are disjoint

||ℐ|| =|[ contextc ⋃ ε; import(ϕ ∪ λ∪ D \ e); read_only m; exporte :=t ∪ q ∪ s; publishz; ∪ ∪ ∪ ∪

17 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

∪ ∪ publishz; var v:=a ∪ b ∪ h ∪ x ∪ y; procnonce(x)=<{impl}>; … do β[] γ []δ[]T[]V[]U[]B1 [] B2 []…[]Bn;

  • d

]|

slide-18
SLIDE 18

Example Example: :non non speeding speeding car car

Asmartcarthatdoesnotallow accelerationifspeeding

– Demandscomparisonofvelocityvs. speedLimit speedLimit

  • Seeminglyeasybutwhatisneededtocalculate

velocity(assumingspeed limit isclear cut)

– velocity = (wheel_height,wheel_rpm,π)

18 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

slide-19
SLIDE 19

Example Example:the :thecontext context utiliser utiliser

istheutiliser isthe contextinterface

– g → S callsonaction labled Acc in – ActionAcc calls on

=|[import j; export f :=f0; read_only ; var w:=w0; proc ; do A []g →S @Acc[]…[]A

  • – ActionAcc calls on

resolving procedure speeding – According to definitionof@, g → S = g ∧ g→ S ;S

19 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

A1 []g2→S2@Acc[]…[]An

  • d ]|@

=|[ procSpeeding(vel:Int,spLi:Int)= vel ≤spLi →return:=true read_only velocity,speedLimit; var vel ≔ velocity,spLi ≔ speedLimit; do … Acc:Speeding(vel,spLi)=true→skip

  • d ]|
slide-20
SLIDE 20

Example Example: :making making velocity velocity

Contextprocessorℰ publishes and calculatesitgiventhat

– wheel_rpm,rim_dia

ℰ||ℐ|| =|[… context c; publishvelocity; read_only k; var v; … ProcCalcVel(rpm:Int,rim:Int,tyre:Int)

andtyre_height is providedbyread_only

  • rbysensed

elementarycontexts (̟isaconstant)

  • wheel_rpm,rim_dia,

tyre_height ∈ {k∪ c}

20 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.

ProcCalcVel(rpm:Int,rim:Int,tyre:Int) =v:=rpm*π*(rim+tyre) do CalcVel(wheel_rpm,rim_dia, tyre_height)→ velocity ≔ v; …

  • d

]|

slide-21
SLIDE 21

Conclusions Conclusions

Conclusions

– Each elementary context istreated asa component

  • Specified interface
  • Independently deployed
  • Independently deployed
  • Composed by third parties

– Wehavegivenaformalsyntaxforthisandshowed therelevanceandimplicationofthis

  • With anexample
  • Motivated with words – remember thebroken car

21 FMCO2008 22.10.2008 Åbo Akademi – FacultyofTechnology, DepartmentofInformationTechnologies.

slide-22
SLIDE 22

Future Future work work

Futureworkinthiscase

– Howdoesthisrelatetorefinement

Futureworkonamoregenerallevel

– Canwetreatcomposedcomponentsinseparationand whatcanwetellaboutthem whatcanwetellaboutthem – Canweformallymodelonlyasubsetofasystemand whatcanwesayaboutitinthatcase

22 FMCO2008 22.10.2008 ÅboAkademi– FacultyofTechnology, DepartmentofInformationTechnologies.