SlideShare a Scribd company logo
1 of 52
Download to read offline
June 2010
gearing up for dynamic adaptation to context
Ambience
programming in
Dr. Sebastián González & Prof. Kim Mens
École Polytechnique de Louvain
Université catholique de Louvain
Pôle d’ingénierie informatique
ICTEAM
Thursday 17 June 2010
Programming desktops and servers
2
Thursday 17 June 2010
Programming for Ambient Intelligence
2
Thursday 17 June 2010
Programming for Ambient Intelligence
2
Thursday 17 June 2010
Programming for Ambient Intelligence
2
Thursday 17 June 2010
Programming for Ambient Intelligence
2
Thursday 17 June 2010
Programming for Ambient Intelligence
2
Thursday 17 June 2010
Programming for Ambient Intelligence
2
Thursday 17 June 2010
Programming for Ambient Intelligence
2
Thursday 17 June 2010
... is programming with context in mind
Programming for Ambient Intelligence
2
Thursday 17 June 2010
... is programming with context in mind
Programming for Ambient IntelligenceNew hardware phenomena unveil new opportunities for delivering
specific services according to the physical and logical environment of use
2
Thursday 17 June 2010
Examples
take advantage of room projector for presentation
user task
disable phone ringtone in quiet places
location semantics
decrease playback quality when battery power is low
internal state
peer service
environmental conditions
give more detailed indications when visibility is low
show parking spots and gas stations while driving
3
Thursday 17 June 2010
4
Running Example
call reception behaviour
Thursday 17 June 2010
4
context behaviour
Running Example
call reception behaviour
Thursday 17 June 2010
4
context behaviour
Running Example
call reception behaviour
ringtonedefault
Thursday 17 June 2010
4
context behaviour
Running Example
call reception behaviour
vibrationquiet
Thursday 17 June 2010
off-hook
4
call waiting signal
context behaviour
Running Example
call reception behaviour
Thursday 17 June 2010
unavailable
4
forward call
context behaviour
Running Example
call reception behaviour
Thursday 17 June 2010
4
context behaviour
Running Example
call reception behaviour
quietoff-hook +
Thursday 17 June 2010
4
context behaviour
Running Example
call reception behaviour
quietoff-hook + call waiting signal
Thursday 17 June 2010
class phone {
method receive ( call ) {
if ( phone.isOffHook( ) )
play( phone.callWaitingSignal( ), 2 );
else if ( phone.environment( ).acoustics( ).isQuiet( ) )
phone.vibrate( 5 );
else if ( phone.user( ).isUnavailable( ) )
forwardCall( call, phone.forwardNumber( ) );
else
play( phone.ringTone( ), 10 );
}
conditional statements
Contemporary Solution
5
Thursday 17 June 2010
class phone {
method receive ( call ) {
if ( phone.isOffHook( ) )
play( phone.callWaitingSignal( ), 2 );
else if ( phone.environment( ).acoustics( ).isQuiet( ) )
phone.vibrate( 5 );
else if ( phone.user( ).isUnavailable( ) )
forwardCall( call, phone.forwardNumber( ) );
else
play( phone.ringTone( ), 10 );
}
conditional statements
Tangled
Fixed
Contemporary Solution
5
Scattered
Thursday 17 June 2010
class Phone
{ attribute strategy;
method receive ( call )
{ strategy.receive( call ); } }
special software architecture
Contemporary Solution
6
Thursday 17 June 2010
class UnavailableStrategy
{ method receive ( call ) { ... } }
class QuietStrategy
{ method receive ( call ) { ... } }
class OffHookStrategy
{ method receive ( call ) { ... } }
class DefaultStrategy
{ method receive ( call ) { ... } }
class Phone
{ attribute strategy;
method receive ( call )
{ strategy.receive( call ); } }
UnavailableStrategy
OffHookStrategy
special software architecture
Contemporary Solution
6
QuietStrategy
Phone
DefaultStrategy
Thursday 17 June 2010
class UnavailableStrategy
{ method receive ( call ) { ... } }
class QuietStrategy
{ method receive ( call ) { ... } }
class OffHookStrategy
{ method receive ( call ) { ... } }
class DefaultStrategy
{ method receive ( call ) { ... } }
class Phone
{ attribute strategy;
method receive ( call )
{ strategy.receive( call ); } }
UnavailableStrategy
OffHookStrategy
special software architecture
Contemporary Solution
6
QuietStrategy
Phone
DefaultStrategy
Thursday 17 June 2010
class UnavailableStrategy
{ method receive ( call ) { ... } }
class QuietStrategy
{ method receive ( call ) { ... } }
class OffHookStrategy
{ method receive ( call ) { ... } }
class DefaultStrategy
{ method receive ( call ) { ... } }
class Phone
{ attribute strategy;
method receive ( call )
{ strategy.receive( call ); } }
UnavailableStrategy
OffHookStrategy
special software architecture
Contemporary Solution
6
QuietStrategy
Phone
DefaultStrategy
Infrastructural burden
Anticipated adaptation points
Thursday 17 June 2010
class UnavailableStrategy
{ method receive ( call ) { ... } }
class QuietStrategy
{ method receive ( call ) { ... } }
class OffHookStrategy
{ method receive ( call ) { ... } }
class DefaultStrategy
{ method receive ( call ) { ... } }
class Phone
{ attribute strategy;
method receive ( call )
{ strategy.receive( call ); } }
UnavailableStrategy
OffHookStrategy
special software architecture
Contemporary Solution
6
QuietStrategy
Phone
DefaultStrategy
Infrastructural burden
Anticipated adaptation points
in Ambient Intelligence
dynamic adaptation is commonplace
rather than an occasional need
Thursday 17 June 2010
From programming in
isolation...
Programming languages do not
feature dedicated abstractions to deal
with contexts and corresponding
behavioural adaptations at run time
... to programming
in Ambience
Develop programming abstractions
to permit the natural expression
of adaptable behaviour according
to changing contexts
7
Thursday 17 June 2010
Context Reification
8
current-context
First-class context
Thursday 17 June 2010
Context Reification
8
advertise
telephony
current-context
First-class context
Thursday 17 June 2010
Context Reification
8
advertise
quiet
advertise
telephony
meeting
current-context
First-class context
Thursday 17 June 2010
Context Reification
8
advertise
off-hook
advertise
quiet
advertise
telephony
meeting
current-context
First-class context
Thursday 17 June 2010
Context Reification
8
advertise
off-hook
advertise
quiet
advertise
telephony
meeting
advertise
off-hook+quiet
current-context
First-class context
Thursday 17 June 2010
Context Reification
8
advertise
off-hook
advertise
quiet
advertise
telephony
meeting
advertise
off-hook+quiet
current-context
• partly managed by user
• partly managed by system
First-class context
Thursday 17 June 2010
receive: alices-call on: bobs-phone
9
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ]
Call Reception Behaviour
1
Running Example in Ambience
Thursday 17 June 2010
receive: alices-call on: bobs-phone
9
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ]
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ]
Call Reception Behaviour
1
Running Example in Ambience
Thursday 17 June 2010
receive: alices-call on: bobs-phone
9
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ]
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ]
application logic
Call Reception Behaviour
1
Running Example in Ambience
Thursday 17 June 2010
receive: alices-call on: bobs-phone
9
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ]
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ]
application logic
how do we express adaptations of
base application logic to context?
Call Reception Behaviour
1
Running Example in Ambience
Thursday 17 June 2010
4
10
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ].
advertise: call (phone-call) on: phone (mobile-phone)
[ if: phone is-off-hook
then: [ play: phone call-waiting-signal during: 3 seconds ]
else: [ play: phone ringtone during: 20 seconds ] ].
application logic
1 2
Basic Telephony Behaviour
Thursday 17 June 2010
4
10
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ].
advertise: call (phone-call) on: phone (mobile-phone)
[ if: phone is-off-hook
then: [ play: phone call-waiting-signal during: 3 seconds ]
else: [ play: phone ringtone during: 20 seconds ] ].
application logic
1 2
Basic Telephony Behaviour
Fixed
Thursday 17 June 2010
receive: alices-call on: bobs-phone
advertise: call (phone-call) on: phone (mobile-phone)
[ activate: phone vibrator during: 10 seconds ]
Implicit Context Specialisation
11
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ]
Thursday 17 June 2010
(current-context)
current-activation
in-context: quiet do:
[
]
receive: alices-call on: bobs-phone
advertise: call (phone-call) on: phone (mobile-phone)
[ activate: phone vibrator during: 10 seconds ]
Implicit Context Specialisation
11
implicit explicit
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ]
Thursday 17 June 2010
current-context
current-activation
in-context: quiet do:
[
]
receive: alices-call on: bobs-phone
advertise: call (phone-call) on: phone (mobile-phone)
[ activate: phone vibrator during: 10 seconds ]
Implicit Context Specialisation
11
phone-call mobile-phone
bobs-phone
implicit explicit
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ]
alices-callcurrent-activation
Thursday 17 June 2010
in-context: quiet do:
[
]
receive: alices-call on: bobs-phone
advertise: call (phone-call) on: phone (mobile-phone)
[ activate: phone vibrator during: 10 seconds ]
Implicit Context Specialisation
11
phone-call mobile-phone
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ]
quiet
Thursday 17 June 2010
in-context: quiet do:
[ advertise: call (phone-call) on: phone (mobile-phone)
[ activate: phone vibrator during: 10 seconds ] ]
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ].
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ].
12
application logic
adaptation logic
Context-Specific Behaviour
Thursday 17 June 2010
in-context: quiet do:
[ advertise: call (phone-call) on: phone (mobile-phone)
[ activate: phone vibrator during: 10 seconds ] ]
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ].
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ].
12
straightforward application logic
adaptation logic
Context-Specific Behaviour
Thursday 17 June 2010
in-context: quiet do:
[ advertise: call (phone-call) on: phone (mobile-phone)
[ activate: phone vibrator during: 10 seconds ] ]
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ].
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ].
12
straightforward
non-intrusive
application logic
adaptation logic
Context-Specific Behaviour
Thursday 17 June 2010
in-context: quiet do:
[ advertise: call (phone-call) on: phone (mobile-phone)
[ activate: phone vibrator during: 10 seconds ] ]
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ].
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ].
12
application logic
adaptation logic
Context-Specific Behaviour
Thursday 17 June 2010
in-context: off-hook do:
[ advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone call-waiting-signal during: 3 seconds ] ]
13
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ].
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ].
application logic
application logic
Adapted Telephony Behaviour
Thursday 17 June 2010
in-context: off-hook do:
[ advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone call-waiting-signal during: 3 seconds ] ]
13
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ].
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ].
straightforward application logic
application logic
Adapted Telephony Behaviour
Thursday 17 June 2010
in-context: off-hook do:
[ advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone call-waiting-signal during: 3 seconds ] ]
13
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ].
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ].
straightforward application logic
simplified application logic
Adapted Telephony Behaviour
Thursday 17 June 2010
in-context: off-hook do:
[ advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone call-waiting-signal during: 3 seconds ] ]
13
advertise: call (phone-call) on: phone (mobile-phone)
[ play: phone ringtone during: 20 seconds ].
receive: call (phone-call) on: phone (mobile-phone)
[ advertise: call on: phone.
enqueue: call in: phone incoming-calls ].
application logic
application logic
Adapted Telephony Behaviour
Thursday 17 June 2010

More Related Content

More from kim.mens

Domain Modelling
Domain ModellingDomain Modelling
Domain Modellingkim.mens
 
Object-Oriented Application Frameworks
Object-Oriented Application FrameworksObject-Oriented Application Frameworks
Object-Oriented Application Frameworkskim.mens
 
Towards a Context-Oriented Software Implementation Framework
Towards a Context-Oriented Software Implementation FrameworkTowards a Context-Oriented Software Implementation Framework
Towards a Context-Oriented Software Implementation Frameworkkim.mens
 
Towards a Taxonomy of Context-Aware Software Variabilty Approaches
Towards a Taxonomy of Context-Aware Software Variabilty ApproachesTowards a Taxonomy of Context-Aware Software Variabilty Approaches
Towards a Taxonomy of Context-Aware Software Variabilty Approacheskim.mens
 
Breaking the Walls: A Unified Vision on Context-Oriented Software Engineering
Breaking the Walls: A Unified Vision on Context-Oriented Software EngineeringBreaking the Walls: A Unified Vision on Context-Oriented Software Engineering
Breaking the Walls: A Unified Vision on Context-Oriented Software Engineeringkim.mens
 
Context-oriented programming
Context-oriented programmingContext-oriented programming
Context-oriented programmingkim.mens
 
Basics of reflection
Basics of reflectionBasics of reflection
Basics of reflectionkim.mens
 
Advanced Reflection in Java
Advanced Reflection in JavaAdvanced Reflection in Java
Advanced Reflection in Javakim.mens
 
Basics of reflection in java
Basics of reflection in javaBasics of reflection in java
Basics of reflection in javakim.mens
 
Reflection in Ruby
Reflection in RubyReflection in Ruby
Reflection in Rubykim.mens
 
Introduction to Ruby
Introduction to RubyIntroduction to Ruby
Introduction to Rubykim.mens
 
Introduction to Smalltalk
Introduction to SmalltalkIntroduction to Smalltalk
Introduction to Smalltalkkim.mens
 
A gentle introduction to reflection
A gentle introduction to reflectionA gentle introduction to reflection
A gentle introduction to reflectionkim.mens
 
Managing the Evolution of Information Systems with Intensional Views and Rela...
Managing the Evolution of Information Systems with Intensional Views and Rela...Managing the Evolution of Information Systems with Intensional Views and Rela...
Managing the Evolution of Information Systems with Intensional Views and Rela...kim.mens
 
Usage contracts (presented at SATToSE 2014 in L'Aquila, Italy)
Usage contracts (presented at SATToSE 2014 in L'Aquila, Italy)Usage contracts (presented at SATToSE 2014 in L'Aquila, Italy)
Usage contracts (presented at SATToSE 2014 in L'Aquila, Italy)kim.mens
 
Usage contracts in a nutshell
Usage contracts in a nutshellUsage contracts in a nutshell
Usage contracts in a nutshellkim.mens
 
INGI2252 Software Measures & Maintenance
INGI2252 Software Measures & MaintenanceINGI2252 Software Measures & Maintenance
INGI2252 Software Measures & Maintenancekim.mens
 
Building an Eclipse plugin to recommend changes to developers
Building an Eclipse plugin to recommend changes to developersBuilding an Eclipse plugin to recommend changes to developers
Building an Eclipse plugin to recommend changes to developerskim.mens
 
Research @ RELEASeD (presented at SATTOSE2013)
Research @ RELEASeD (presented at SATTOSE2013)Research @ RELEASeD (presented at SATTOSE2013)
Research @ RELEASeD (presented at SATTOSE2013)kim.mens
 
Active Software Documentation using Soul and IntensiVE
Active Software Documentation using Soul and IntensiVEActive Software Documentation using Soul and IntensiVE
Active Software Documentation using Soul and IntensiVEkim.mens
 

More from kim.mens (20)

Domain Modelling
Domain ModellingDomain Modelling
Domain Modelling
 
Object-Oriented Application Frameworks
Object-Oriented Application FrameworksObject-Oriented Application Frameworks
Object-Oriented Application Frameworks
 
Towards a Context-Oriented Software Implementation Framework
Towards a Context-Oriented Software Implementation FrameworkTowards a Context-Oriented Software Implementation Framework
Towards a Context-Oriented Software Implementation Framework
 
Towards a Taxonomy of Context-Aware Software Variabilty Approaches
Towards a Taxonomy of Context-Aware Software Variabilty ApproachesTowards a Taxonomy of Context-Aware Software Variabilty Approaches
Towards a Taxonomy of Context-Aware Software Variabilty Approaches
 
Breaking the Walls: A Unified Vision on Context-Oriented Software Engineering
Breaking the Walls: A Unified Vision on Context-Oriented Software EngineeringBreaking the Walls: A Unified Vision on Context-Oriented Software Engineering
Breaking the Walls: A Unified Vision on Context-Oriented Software Engineering
 
Context-oriented programming
Context-oriented programmingContext-oriented programming
Context-oriented programming
 
Basics of reflection
Basics of reflectionBasics of reflection
Basics of reflection
 
Advanced Reflection in Java
Advanced Reflection in JavaAdvanced Reflection in Java
Advanced Reflection in Java
 
Basics of reflection in java
Basics of reflection in javaBasics of reflection in java
Basics of reflection in java
 
Reflection in Ruby
Reflection in RubyReflection in Ruby
Reflection in Ruby
 
Introduction to Ruby
Introduction to RubyIntroduction to Ruby
Introduction to Ruby
 
Introduction to Smalltalk
Introduction to SmalltalkIntroduction to Smalltalk
Introduction to Smalltalk
 
A gentle introduction to reflection
A gentle introduction to reflectionA gentle introduction to reflection
A gentle introduction to reflection
 
Managing the Evolution of Information Systems with Intensional Views and Rela...
Managing the Evolution of Information Systems with Intensional Views and Rela...Managing the Evolution of Information Systems with Intensional Views and Rela...
Managing the Evolution of Information Systems with Intensional Views and Rela...
 
Usage contracts (presented at SATToSE 2014 in L'Aquila, Italy)
Usage contracts (presented at SATToSE 2014 in L'Aquila, Italy)Usage contracts (presented at SATToSE 2014 in L'Aquila, Italy)
Usage contracts (presented at SATToSE 2014 in L'Aquila, Italy)
 
Usage contracts in a nutshell
Usage contracts in a nutshellUsage contracts in a nutshell
Usage contracts in a nutshell
 
INGI2252 Software Measures & Maintenance
INGI2252 Software Measures & MaintenanceINGI2252 Software Measures & Maintenance
INGI2252 Software Measures & Maintenance
 
Building an Eclipse plugin to recommend changes to developers
Building an Eclipse plugin to recommend changes to developersBuilding an Eclipse plugin to recommend changes to developers
Building an Eclipse plugin to recommend changes to developers
 
Research @ RELEASeD (presented at SATTOSE2013)
Research @ RELEASeD (presented at SATTOSE2013)Research @ RELEASeD (presented at SATTOSE2013)
Research @ RELEASeD (presented at SATTOSE2013)
 
Active Software Documentation using Soul and IntensiVE
Active Software Documentation using Soul and IntensiVEActive Software Documentation using Soul and IntensiVE
Active Software Documentation using Soul and IntensiVE
 

Recently uploaded

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Ambience In A Nutshell

  • 1. June 2010 gearing up for dynamic adaptation to context Ambience programming in Dr. Sebastián González & Prof. Kim Mens École Polytechnique de Louvain Université catholique de Louvain Pôle d’ingénierie informatique ICTEAM Thursday 17 June 2010
  • 2. Programming desktops and servers 2 Thursday 17 June 2010
  • 3. Programming for Ambient Intelligence 2 Thursday 17 June 2010
  • 4. Programming for Ambient Intelligence 2 Thursday 17 June 2010
  • 5. Programming for Ambient Intelligence 2 Thursday 17 June 2010
  • 6. Programming for Ambient Intelligence 2 Thursday 17 June 2010
  • 7. Programming for Ambient Intelligence 2 Thursday 17 June 2010
  • 8. Programming for Ambient Intelligence 2 Thursday 17 June 2010
  • 9. Programming for Ambient Intelligence 2 Thursday 17 June 2010
  • 10. ... is programming with context in mind Programming for Ambient Intelligence 2 Thursday 17 June 2010
  • 11. ... is programming with context in mind Programming for Ambient IntelligenceNew hardware phenomena unveil new opportunities for delivering specific services according to the physical and logical environment of use 2 Thursday 17 June 2010
  • 12. Examples take advantage of room projector for presentation user task disable phone ringtone in quiet places location semantics decrease playback quality when battery power is low internal state peer service environmental conditions give more detailed indications when visibility is low show parking spots and gas stations while driving 3 Thursday 17 June 2010
  • 13. 4 Running Example call reception behaviour Thursday 17 June 2010
  • 14. 4 context behaviour Running Example call reception behaviour Thursday 17 June 2010
  • 15. 4 context behaviour Running Example call reception behaviour ringtonedefault Thursday 17 June 2010
  • 16. 4 context behaviour Running Example call reception behaviour vibrationquiet Thursday 17 June 2010
  • 17. off-hook 4 call waiting signal context behaviour Running Example call reception behaviour Thursday 17 June 2010
  • 18. unavailable 4 forward call context behaviour Running Example call reception behaviour Thursday 17 June 2010
  • 19. 4 context behaviour Running Example call reception behaviour quietoff-hook + Thursday 17 June 2010
  • 20. 4 context behaviour Running Example call reception behaviour quietoff-hook + call waiting signal Thursday 17 June 2010
  • 21. class phone { method receive ( call ) { if ( phone.isOffHook( ) ) play( phone.callWaitingSignal( ), 2 ); else if ( phone.environment( ).acoustics( ).isQuiet( ) ) phone.vibrate( 5 ); else if ( phone.user( ).isUnavailable( ) ) forwardCall( call, phone.forwardNumber( ) ); else play( phone.ringTone( ), 10 ); } conditional statements Contemporary Solution 5 Thursday 17 June 2010
  • 22. class phone { method receive ( call ) { if ( phone.isOffHook( ) ) play( phone.callWaitingSignal( ), 2 ); else if ( phone.environment( ).acoustics( ).isQuiet( ) ) phone.vibrate( 5 ); else if ( phone.user( ).isUnavailable( ) ) forwardCall( call, phone.forwardNumber( ) ); else play( phone.ringTone( ), 10 ); } conditional statements Tangled Fixed Contemporary Solution 5 Scattered Thursday 17 June 2010
  • 23. class Phone { attribute strategy; method receive ( call ) { strategy.receive( call ); } } special software architecture Contemporary Solution 6 Thursday 17 June 2010
  • 24. class UnavailableStrategy { method receive ( call ) { ... } } class QuietStrategy { method receive ( call ) { ... } } class OffHookStrategy { method receive ( call ) { ... } } class DefaultStrategy { method receive ( call ) { ... } } class Phone { attribute strategy; method receive ( call ) { strategy.receive( call ); } } UnavailableStrategy OffHookStrategy special software architecture Contemporary Solution 6 QuietStrategy Phone DefaultStrategy Thursday 17 June 2010
  • 25. class UnavailableStrategy { method receive ( call ) { ... } } class QuietStrategy { method receive ( call ) { ... } } class OffHookStrategy { method receive ( call ) { ... } } class DefaultStrategy { method receive ( call ) { ... } } class Phone { attribute strategy; method receive ( call ) { strategy.receive( call ); } } UnavailableStrategy OffHookStrategy special software architecture Contemporary Solution 6 QuietStrategy Phone DefaultStrategy Thursday 17 June 2010
  • 26. class UnavailableStrategy { method receive ( call ) { ... } } class QuietStrategy { method receive ( call ) { ... } } class OffHookStrategy { method receive ( call ) { ... } } class DefaultStrategy { method receive ( call ) { ... } } class Phone { attribute strategy; method receive ( call ) { strategy.receive( call ); } } UnavailableStrategy OffHookStrategy special software architecture Contemporary Solution 6 QuietStrategy Phone DefaultStrategy Infrastructural burden Anticipated adaptation points Thursday 17 June 2010
  • 27. class UnavailableStrategy { method receive ( call ) { ... } } class QuietStrategy { method receive ( call ) { ... } } class OffHookStrategy { method receive ( call ) { ... } } class DefaultStrategy { method receive ( call ) { ... } } class Phone { attribute strategy; method receive ( call ) { strategy.receive( call ); } } UnavailableStrategy OffHookStrategy special software architecture Contemporary Solution 6 QuietStrategy Phone DefaultStrategy Infrastructural burden Anticipated adaptation points in Ambient Intelligence dynamic adaptation is commonplace rather than an occasional need Thursday 17 June 2010
  • 28. From programming in isolation... Programming languages do not feature dedicated abstractions to deal with contexts and corresponding behavioural adaptations at run time ... to programming in Ambience Develop programming abstractions to permit the natural expression of adaptable behaviour according to changing contexts 7 Thursday 17 June 2010
  • 35. receive: alices-call on: bobs-phone 9 receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ] Call Reception Behaviour 1 Running Example in Ambience Thursday 17 June 2010
  • 36. receive: alices-call on: bobs-phone 9 receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ] advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ] Call Reception Behaviour 1 Running Example in Ambience Thursday 17 June 2010
  • 37. receive: alices-call on: bobs-phone 9 receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ] advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ] application logic Call Reception Behaviour 1 Running Example in Ambience Thursday 17 June 2010
  • 38. receive: alices-call on: bobs-phone 9 receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ] advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ] application logic how do we express adaptations of base application logic to context? Call Reception Behaviour 1 Running Example in Ambience Thursday 17 June 2010
  • 39. 4 10 receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ]. advertise: call (phone-call) on: phone (mobile-phone) [ if: phone is-off-hook then: [ play: phone call-waiting-signal during: 3 seconds ] else: [ play: phone ringtone during: 20 seconds ] ]. application logic 1 2 Basic Telephony Behaviour Thursday 17 June 2010
  • 40. 4 10 receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ]. advertise: call (phone-call) on: phone (mobile-phone) [ if: phone is-off-hook then: [ play: phone call-waiting-signal during: 3 seconds ] else: [ play: phone ringtone during: 20 seconds ] ]. application logic 1 2 Basic Telephony Behaviour Fixed Thursday 17 June 2010
  • 41. receive: alices-call on: bobs-phone advertise: call (phone-call) on: phone (mobile-phone) [ activate: phone vibrator during: 10 seconds ] Implicit Context Specialisation 11 advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ] Thursday 17 June 2010
  • 42. (current-context) current-activation in-context: quiet do: [ ] receive: alices-call on: bobs-phone advertise: call (phone-call) on: phone (mobile-phone) [ activate: phone vibrator during: 10 seconds ] Implicit Context Specialisation 11 implicit explicit advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ] Thursday 17 June 2010
  • 43. current-context current-activation in-context: quiet do: [ ] receive: alices-call on: bobs-phone advertise: call (phone-call) on: phone (mobile-phone) [ activate: phone vibrator during: 10 seconds ] Implicit Context Specialisation 11 phone-call mobile-phone bobs-phone implicit explicit advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ] alices-callcurrent-activation Thursday 17 June 2010
  • 44. in-context: quiet do: [ ] receive: alices-call on: bobs-phone advertise: call (phone-call) on: phone (mobile-phone) [ activate: phone vibrator during: 10 seconds ] Implicit Context Specialisation 11 phone-call mobile-phone advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ] quiet Thursday 17 June 2010
  • 45. in-context: quiet do: [ advertise: call (phone-call) on: phone (mobile-phone) [ activate: phone vibrator during: 10 seconds ] ] advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ]. receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ]. 12 application logic adaptation logic Context-Specific Behaviour Thursday 17 June 2010
  • 46. in-context: quiet do: [ advertise: call (phone-call) on: phone (mobile-phone) [ activate: phone vibrator during: 10 seconds ] ] advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ]. receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ]. 12 straightforward application logic adaptation logic Context-Specific Behaviour Thursday 17 June 2010
  • 47. in-context: quiet do: [ advertise: call (phone-call) on: phone (mobile-phone) [ activate: phone vibrator during: 10 seconds ] ] advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ]. receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ]. 12 straightforward non-intrusive application logic adaptation logic Context-Specific Behaviour Thursday 17 June 2010
  • 48. in-context: quiet do: [ advertise: call (phone-call) on: phone (mobile-phone) [ activate: phone vibrator during: 10 seconds ] ] advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ]. receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ]. 12 application logic adaptation logic Context-Specific Behaviour Thursday 17 June 2010
  • 49. in-context: off-hook do: [ advertise: call (phone-call) on: phone (mobile-phone) [ play: phone call-waiting-signal during: 3 seconds ] ] 13 advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ]. receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ]. application logic application logic Adapted Telephony Behaviour Thursday 17 June 2010
  • 50. in-context: off-hook do: [ advertise: call (phone-call) on: phone (mobile-phone) [ play: phone call-waiting-signal during: 3 seconds ] ] 13 advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ]. receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ]. straightforward application logic application logic Adapted Telephony Behaviour Thursday 17 June 2010
  • 51. in-context: off-hook do: [ advertise: call (phone-call) on: phone (mobile-phone) [ play: phone call-waiting-signal during: 3 seconds ] ] 13 advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ]. receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ]. straightforward application logic simplified application logic Adapted Telephony Behaviour Thursday 17 June 2010
  • 52. in-context: off-hook do: [ advertise: call (phone-call) on: phone (mobile-phone) [ play: phone call-waiting-signal during: 3 seconds ] ] 13 advertise: call (phone-call) on: phone (mobile-phone) [ play: phone ringtone during: 20 seconds ]. receive: call (phone-call) on: phone (mobile-phone) [ advertise: call on: phone. enqueue: call in: phone incoming-calls ]. application logic application logic Adapted Telephony Behaviour Thursday 17 June 2010