SlideShare a Scribd company logo
1 of 32
Download to read offline
Nicolás Cardozo1 Kim Mens2
1Systems and Computing Engineering department - Universidad de los Andes, Bogotá - Colombia
2ICTEAM - UCLouvain, Louvain-la-Neuve - Belgium
kim.mens@uclouvain.be, n.cardozo@uniandes.edu.co
@ncardoz
Programming language
implementations for context-
oriented self-adaptive systems
INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION
Journal of Information and Software Technology
Volume 143, March 2022
Nicolás Cardozo1 Kim Mens2
1Systems and Computing Engineering department - Universidad de los Andes, Bogotá - Colombia
2ICTEAM - UCLouvain, Louvain-la-Neuve - Belgium
kim.mens@uclouvain.be, n.cardozo@uniandes.edu.co
@ncardoz
Programming language
implementations for context-
oriented self-adaptive systems
3
Adaptation
system behavior
3
Adaptation
system behavior
context
3
Adaptation
system behavior
context
self
3
Adaptation
system behavior
context
self
internal
system
Adaptation
3
Adaptation
system behavior
context
self
external
MAPE-K
system
Adaptor
Adaptation
internal
system
Adaptation
4
External adaptation engines
Internal adaptation engines
• Inflexible
• Tightly couple with the system implementation
• Modular
• Customizable
• Reusable
Adaptation
5
Internal adaptation engines
smart
open
resilient
extensible
highly-available
customizable
modular
fi
ne-grained
concise
understandable
Adaptation
6
Context-oriented programming
@implementation Poi
NSString *name;
-(NSString*) name {
return [NSString stringWithFormat:@"INIT_ERROR-%@", @"name"];
}
@end
6
Context-oriented programming
@implementation Poi
NSString *name;
-(NSString*) name {
NSString *query = [NSString stringWithFormat:@"SELECT name FROM Poi WITH
language = %@ AND id_poi = %d", @"en", [self poiId ]];
NSArray *res = [[NSArray alloc] initWithArray:[[self dbManager]
|loadDataFromDB:query]];
return [res objectAtIndex:0];
}
@end
6
Context-oriented programming
@implementation Poi
NSString *name;
-(NSString*) name {
return [NSString stringWithFormat:@"INIT_ERROR-%@", @"name"];
}
@end
7
Context-oriented programming
Contexts as first-class
entities of the system
Behavioral variations
as fine-grained
(partial) statements
isolated from the
system
activation and
deactivation
mechanisms to
compose and
withdraw system
behavior
@context English @contexts English
-(NSString*) name {
…
}
@activate(English)
@deactivate(English)
8
Context-dependent method dispatch
(defmethod display-poi-info (poi)
(print “basic poi info”))
Use dispatch mechanisms to direct messages to the
appropriate implementation according to the context
Ambience - [Gonzalez et al. JUC 2008]
8
Context-dependent method dispatch
Use dispatch mechanisms to direct messages to the
appropriate implementation according to the context
(with-context (@wifi)
)
(defmethod display-poi-info (poi)
(format t “~a n
Description: ~a ”
(name poi)
(detail-description poi))
Ambience - [Gonzalez et al. JUC 2008]
8
Context-dependent method dispatch
Use dispatch mechanisms to direct messages to the
appropriate implementation according to the context
(with-context (@wifi)
)
(defgeneric display-poi-info (poi)
...)
Ambience - [Gonzalez et al. JUC 2008]
8
Context-dependent method dispatch
Use dispatch mechanisms to direct messages to the
appropriate implementation according to the context
(with-context (@wifi)
)
(defmethod display-poi-info (poi)
(print “basic poi info”))
(defgeneric display-poi-info (poi)
...)
amos::send
Ambience - [Gonzalez et al. JUC 2008]
8
Context-dependent method dispatch
Use dispatch mechanisms to direct messages to the
appropriate implementation according to the context
(with-context (@wifi)
)
(defmethod display-poi-info (@wifi poi)
(format t “~a n
Description: ~a”
(name poi)
(detail-description poi))
(defgeneric display-poi-info (poi)
...) amos::send
amos::prepend-slot
(activate @wifi)
Ambience - [Gonzalez et al. JUC 2008]
9
Method replacement mechanisms
At the MOP level, switch method implementations between base
and adaptive behavior
void displayPOI (POI poi) {
NSString *res = @“%@ ”
NSLog(res, poi.description);
}
Subjective-C - [Gonzalez et al. SLE 2010]
9
Method replacement mechanisms
At the MOP level, switch method implementations between base
and adaptive behavior
void displayPOI (POI poi) {
NSString *res = @“%@ ”
NSLog(res, poi.description);
}
displayPOI NSString *res = @“%@”
NSLog(res, poi.description);
SEL
IMP
Subjective-C - [Gonzalez et al. SLE 2010]
9
Method replacement mechanisms
At the MOP level, switch method implementations between base
and adaptive behavior
void displayPOI (POI poi) {
NSString *res = @“%@ ”
NSLog(res, poi.description);
}
displayPOI
NSString *res = @“%@ n Description:
%@ ”
NSLog(res, poi.name,
poi.longDescription());
NSString *res = @“%@”
NSLog(res, poi.description);
@contexts Wifi
void displayPOI (POI poi) {
NSString *res = @“%@ n Description: %@ ”
NSLog(res, poi.name, poi.longDescription());
}
SEL
IMP
Subjective-C - [Gonzalez et al. SLE 2010]
9
Method replacement mechanisms
At the MOP level, switch method implementations between base
and adaptive behavior
void displayPOI (POI poi) {
NSString *res = @“%@ ”
NSLog(res, poi.description);
}
displayPOI NSString *res = @“%@ n Description:
%@ ”
NSLog(res, poi.name,
poi.longDescription());
NSString *res = @“%@”
NSLog(res, poi.description);
@contexts Wifi
void displayPOI (POI poi) {
NSString *res = @“%@ n Description: %@ ”
NSLog(res, poi.name, poi.longDescription());
}
@activate(Wifi)
SEL
IMP
Subjective-C - [Gonzalez et al. SLE 2010]
10
Fine-grained composition
Fine-grained module to be composed as appropriate for
specific situations
POI
- description
- displayPOI
- name
Context Traits - [Gonzalez et al. AOSD 2013]
10
Fine-grained composition
Fine-grained module to be composed as appropriate for
specific situations
POI
- description
- displayPOI
- name
Wi
fi
<<trait>>
- description
- displayPOI
Wifi.activate()
Context Traits - [Gonzalez et al. AOSD 2013]
10
Fine-grained composition
Fine-grained module to be composed as appropriate for
specific situations
POI
- description
- displayPOI
- name
Wi
fi
<<trait>>
- description
- displayPOI
+
POI
- description
- displayPOI
- name
=
Wifi.activate()
Context Traits - [Gonzalez et al. AOSD 2013]
11
Evaluation
1. Expressiveness
2. Modularity
3. Performance of adaptation selection
12
Modularity evaluation
Ambience
(LOC 793)
Common Lisp
(LOC 734)
Subjective-C
(LOC 3011)
Objective-C
(LOC 3265)
Context Traits
(LOC 1242)
ECMAScript
(LOC 1320)
0 25 50 75 100
17.73
3.14
6.95
4.22
23.84
10.97
29.62
35.91
19.69
17.48
54.22
50.32
52.65
60.95
73.35
78.31
21.93
38.71
Application Logic Adaptation Logic Adaptation Management
12
Modularity evaluation
Ambience
(LOC 793)
Common Lisp
(LOC 734)
Subjective-C
(LOC 3011)
Objective-C
(LOC 3265)
Context Traits
(LOC 1242)
ECMAScript
(LOC 1320)
0 25 50 75 100
17.73
3.14
6.95
4.22
23.84
10.97
29.62
35.91
19.69
17.48
54.22
50.32
52.65
60.95
73.35
78.31
21.93
38.71
Application Logic Adaptation Logic Adaptation Management
Reduction in both the adaptation logic (~10%) and
(more substantially) its management (>40%)
13
Performance evaluation
log
time
(in
milliseconds)
0.010
1.000
100.000
10000.000
1000000.000
Number of contexts
10 50 100 500 1000 2500 5000 10000
ifs
strategy
ambience
log
time
(in
milliseconds)
0.100
1.000
10.000
100.000
1000.000
Number of contexts
10 50 100 500 1000 2500 5000
ifs
strategy
context traits
log
time
(in
milliseconds)
0.0100000
1.0000000
100.0000000
10000.0000000
Number of contexts
10 50 100 500 1000 2500 5000 10000 25000 50000
ifs
strategy
subjective-c
13
Performance evaluation
log
time
(in
milliseconds)
0.010
1.000
100.000
10000.000
1000000.000
Number of contexts
10 50 100 500 1000 2500 5000 10000
ifs
strategy
ambience
log
time
(in
milliseconds)
0.100
1.000
10.000
100.000
1000.000
Number of contexts
10 50 100 500 1000 2500 5000
ifs
strategy
context traits
log
time
(in
milliseconds)
0.0100000
1.0000000
100.0000000
10000.0000000
Number of contexts
10 50 100 500 1000 2500 5000 10000 25000 50000
ifs
strategy
subjective-c
Adaptation activations impact the use of adaptations,
upon message sends, or context changes
14
Conclusion
External adaptation engines
Internal adaptation engines
• Modular
• Customizable
• Reusable
• Smart
• Open
• Resilient
• Extensible
• Highly-available
• Customizable
• Modular
• Fine-grained
• Concise
• Understandable
@FLAGlab in all media channels
Journal of Information and Software Technology
Volume 143, March 2022
Programming language
implementations for context-oriented
self-adaptive systems
Nicolás Cardozo1 Kim Mens2
1Systems and Computing Engineering department - Universidad de los Andes, Bogotá - Colombia
2ICTEAM - UCLouvain, Louvain-la-Neuve - Belgium
kim.mens@uclouvain.be, n.cardozo@uniandes.edu.co @ncardoz

More Related Content

Similar to [JIST] Programming language implementations for context-oriented self-adaptive systems

Model executability within the GEMOC Studio
Model executability within the GEMOC StudioModel executability within the GEMOC Studio
Model executability within the GEMOC StudioBenoit Combemale
 
Agile and compliant firewall ACL configuration management for DevOps
Agile and compliant firewall ACL configuration management for DevOpsAgile and compliant firewall ACL configuration management for DevOps
Agile and compliant firewall ACL configuration management for DevOpsJ On The Beach
 
Reifying the concurrency concern into xDSML specifications
Reifying the concurrency concern into xDSML specificationsReifying the concurrency concern into xDSML specifications
Reifying the concurrency concern into xDSML specificationsBenoit Combemale
 
ScriptRock Robotics Testing
ScriptRock Robotics TestingScriptRock Robotics Testing
ScriptRock Robotics TestingCloudCheckr
 
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB
 
An Integrated Prototyping Environment For Programmable Automation
An Integrated Prototyping Environment For Programmable AutomationAn Integrated Prototyping Environment For Programmable Automation
An Integrated Prototyping Environment For Programmable AutomationMeshDynamics
 
Import golang; struct microservice
Import golang; struct microserviceImport golang; struct microservice
Import golang; struct microserviceGiulio De Donato
 
Prometheus – a next-gen Monitoring System
Prometheus – a next-gen Monitoring SystemPrometheus – a next-gen Monitoring System
Prometheus – a next-gen Monitoring SystemFabian Reinartz
 
20100512 Workflow Ramage
20100512 Workflow Ramage20100512 Workflow Ramage
20100512 Workflow RamageSteven Ramage
 
Self-Tuning and Managing Services
Self-Tuning and Managing ServicesSelf-Tuning and Managing Services
Self-Tuning and Managing ServicesReza Rahimi
 
Eclipse Con Europe 2014 How to use DAWN Science Project
Eclipse Con Europe 2014 How to use DAWN Science ProjectEclipse Con Europe 2014 How to use DAWN Science Project
Eclipse Con Europe 2014 How to use DAWN Science ProjectMatthew Gerring
 
Building Your Robot using AWS Robomaker
Building Your Robot using AWS RobomakerBuilding Your Robot using AWS Robomaker
Building Your Robot using AWS RobomakerAlex Barbosa Coqueiro
 
Machine learning, WTF!?
Machine learning, WTF!? Machine learning, WTF!?
Machine learning, WTF!? Alê Borba
 
Emergent Middleware to Support Interoperability in Mobile Collaborative Appli...
Emergent Middleware to Support Interoperability in Mobile Collaborative Appli...Emergent Middleware to Support Interoperability in Mobile Collaborative Appli...
Emergent Middleware to Support Interoperability in Mobile Collaborative Appli...iCOMMUNITY
 
Neomades crosscompilation
Neomades crosscompilationNeomades crosscompilation
Neomades crosscompilationiCOMMUNITY
 
Computernetworkingkurosech9 091011003335-phpapp01
Computernetworkingkurosech9 091011003335-phpapp01Computernetworkingkurosech9 091011003335-phpapp01
Computernetworkingkurosech9 091011003335-phpapp01AislanSoares
 
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...Amit Sheth
 
EEDC - Apache Pig
EEDC - Apache PigEEDC - Apache Pig
EEDC - Apache Pigjavicid
 

Similar to [JIST] Programming language implementations for context-oriented self-adaptive systems (20)

React native
React nativeReact native
React native
 
Model executability within the GEMOC Studio
Model executability within the GEMOC StudioModel executability within the GEMOC Studio
Model executability within the GEMOC Studio
 
Agile and compliant firewall ACL configuration management for DevOps
Agile and compliant firewall ACL configuration management for DevOpsAgile and compliant firewall ACL configuration management for DevOps
Agile and compliant firewall ACL configuration management for DevOps
 
Reifying the concurrency concern into xDSML specifications
Reifying the concurrency concern into xDSML specificationsReifying the concurrency concern into xDSML specifications
Reifying the concurrency concern into xDSML specifications
 
ScriptRock Robotics Testing
ScriptRock Robotics TestingScriptRock Robotics Testing
ScriptRock Robotics Testing
 
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
 
An Integrated Prototyping Environment For Programmable Automation
An Integrated Prototyping Environment For Programmable AutomationAn Integrated Prototyping Environment For Programmable Automation
An Integrated Prototyping Environment For Programmable Automation
 
Import golang; struct microservice
Import golang; struct microserviceImport golang; struct microservice
Import golang; struct microservice
 
Prometheus – a next-gen Monitoring System
Prometheus – a next-gen Monitoring SystemPrometheus – a next-gen Monitoring System
Prometheus – a next-gen Monitoring System
 
Resume sandeep chakraborty
Resume sandeep chakrabortyResume sandeep chakraborty
Resume sandeep chakraborty
 
20100512 Workflow Ramage
20100512 Workflow Ramage20100512 Workflow Ramage
20100512 Workflow Ramage
 
Self-Tuning and Managing Services
Self-Tuning and Managing ServicesSelf-Tuning and Managing Services
Self-Tuning and Managing Services
 
Eclipse Con Europe 2014 How to use DAWN Science Project
Eclipse Con Europe 2014 How to use DAWN Science ProjectEclipse Con Europe 2014 How to use DAWN Science Project
Eclipse Con Europe 2014 How to use DAWN Science Project
 
Building Your Robot using AWS Robomaker
Building Your Robot using AWS RobomakerBuilding Your Robot using AWS Robomaker
Building Your Robot using AWS Robomaker
 
Machine learning, WTF!?
Machine learning, WTF!? Machine learning, WTF!?
Machine learning, WTF!?
 
Emergent Middleware to Support Interoperability in Mobile Collaborative Appli...
Emergent Middleware to Support Interoperability in Mobile Collaborative Appli...Emergent Middleware to Support Interoperability in Mobile Collaborative Appli...
Emergent Middleware to Support Interoperability in Mobile Collaborative Appli...
 
Neomades crosscompilation
Neomades crosscompilationNeomades crosscompilation
Neomades crosscompilation
 
Computernetworkingkurosech9 091011003335-phpapp01
Computernetworkingkurosech9 091011003335-phpapp01Computernetworkingkurosech9 091011003335-phpapp01
Computernetworkingkurosech9 091011003335-phpapp01
 
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
 
EEDC - Apache Pig
EEDC - Apache PigEEDC - Apache Pig
EEDC - Apache Pig
 

More from Universidad de los Andes

An expressive and modular layer activation mechanism for Context-Oriented Pro...
An expressive and modular layer activation mechanism for Context-Oriented Pro...An expressive and modular layer activation mechanism for Context-Oriented Pro...
An expressive and modular layer activation mechanism for Context-Oriented Pro...Universidad de los Andes
 
[FTfJP23] Points-to Analysis for Context-oriented Javascript Programs
[FTfJP23] Points-to Analysis for Context-oriented Javascript Programs[FTfJP23] Points-to Analysis for Context-oriented Javascript Programs
[FTfJP23] Points-to Analysis for Context-oriented Javascript ProgramsUniversidad de los Andes
 
[CAIN'23] Prevalence of Code Smells in Reinforcement Learning Projects
[CAIN'23] Prevalence of Code Smells in Reinforcement Learning Projects[CAIN'23] Prevalence of Code Smells in Reinforcement Learning Projects
[CAIN'23] Prevalence of Code Smells in Reinforcement Learning ProjectsUniversidad de los Andes
 
[CIbSE2023] Cross-language clone detection for Mobile Apps
[CIbSE2023] Cross-language clone detection for Mobile Apps[CIbSE2023] Cross-language clone detection for Mobile Apps
[CIbSE2023] Cross-language clone detection for Mobile AppsUniversidad de los Andes
 
[JPDC,JCC@LMN22] Ad hoc systems Management and specification with distributed...
[JPDC,JCC@LMN22] Ad hoc systems Management and specification with distributed...[JPDC,JCC@LMN22] Ad hoc systems Management and specification with distributed...
[JPDC,JCC@LMN22] Ad hoc systems Management and specification with distributed...Universidad de los Andes
 
[CCC'21] Evaluation of Work Stealing Algorithms
[CCC'21] Evaluation of Work Stealing Algorithms[CCC'21] Evaluation of Work Stealing Algorithms
[CCC'21] Evaluation of Work Stealing AlgorithmsUniversidad de los Andes
 
Generating Adaptations from the System Execution using Reinforcement Learning...
Generating Adaptations from the System Execution using Reinforcement Learning...Generating Adaptations from the System Execution using Reinforcement Learning...
Generating Adaptations from the System Execution using Reinforcement Learning...Universidad de los Andes
 
Language Abstractions and Techniques for Developing Collective Adaptive Syste...
Language Abstractions and Techniques for Developing Collective Adaptive Syste...Language Abstractions and Techniques for Developing Collective Adaptive Syste...
Language Abstractions and Techniques for Developing Collective Adaptive Syste...Universidad de los Andes
 
Does Neuron Coverage Matter for Deep Reinforcement Learning? A preliminary study
Does Neuron Coverage Matter for Deep Reinforcement Learning? A preliminary studyDoes Neuron Coverage Matter for Deep Reinforcement Learning? A preliminary study
Does Neuron Coverage Matter for Deep Reinforcement Learning? A preliminary studyUniversidad de los Andes
 
Learning run-time composition of interacting adaptations
Learning run-time composition of interacting adaptationsLearning run-time composition of interacting adaptations
Learning run-time composition of interacting adaptationsUniversidad de los Andes
 
CQL: declarative language for context activation
CQL: declarative language for context activationCQL: declarative language for context activation
CQL: declarative language for context activationUniversidad de los Andes
 
Generating software adaptations using machine learning
Generating software adaptations using machine learningGenerating software adaptations using machine learning
Generating software adaptations using machine learningUniversidad de los Andes
 
[Bachelor_project] Asignación de exámenes finales
[Bachelor_project] Asignación de exámenes finales[Bachelor_project] Asignación de exámenes finales
[Bachelor_project] Asignación de exámenes finalesUniversidad de los Andes
 
Programming language techniques for adaptive software
Programming language techniques for adaptive softwareProgramming language techniques for adaptive software
Programming language techniques for adaptive softwareUniversidad de los Andes
 
Peace COrP: Learning to solve conflicts between contexts
Peace COrP: Learning to solve conflicts between contextsPeace COrP: Learning to solve conflicts between contexts
Peace COrP: Learning to solve conflicts between contextsUniversidad de los Andes
 

More from Universidad de los Andes (18)

An expressive and modular layer activation mechanism for Context-Oriented Pro...
An expressive and modular layer activation mechanism for Context-Oriented Pro...An expressive and modular layer activation mechanism for Context-Oriented Pro...
An expressive and modular layer activation mechanism for Context-Oriented Pro...
 
[FTfJP23] Points-to Analysis for Context-oriented Javascript Programs
[FTfJP23] Points-to Analysis for Context-oriented Javascript Programs[FTfJP23] Points-to Analysis for Context-oriented Javascript Programs
[FTfJP23] Points-to Analysis for Context-oriented Javascript Programs
 
[CAIN'23] Prevalence of Code Smells in Reinforcement Learning Projects
[CAIN'23] Prevalence of Code Smells in Reinforcement Learning Projects[CAIN'23] Prevalence of Code Smells in Reinforcement Learning Projects
[CAIN'23] Prevalence of Code Smells in Reinforcement Learning Projects
 
[CIbSE2023] Cross-language clone detection for Mobile Apps
[CIbSE2023] Cross-language clone detection for Mobile Apps[CIbSE2023] Cross-language clone detection for Mobile Apps
[CIbSE2023] Cross-language clone detection for Mobile Apps
 
Keeping Up! with LaTeX
Keeping Up! with LaTeXKeeping Up! with LaTeX
Keeping Up! with LaTeX
 
[JPDC,JCC@LMN22] Ad hoc systems Management and specification with distributed...
[JPDC,JCC@LMN22] Ad hoc systems Management and specification with distributed...[JPDC,JCC@LMN22] Ad hoc systems Management and specification with distributed...
[JPDC,JCC@LMN22] Ad hoc systems Management and specification with distributed...
 
[CCC'21] Evaluation of Work Stealing Algorithms
[CCC'21] Evaluation of Work Stealing Algorithms[CCC'21] Evaluation of Work Stealing Algorithms
[CCC'21] Evaluation of Work Stealing Algorithms
 
Generating Adaptations from the System Execution using Reinforcement Learning...
Generating Adaptations from the System Execution using Reinforcement Learning...Generating Adaptations from the System Execution using Reinforcement Learning...
Generating Adaptations from the System Execution using Reinforcement Learning...
 
Language Abstractions and Techniques for Developing Collective Adaptive Syste...
Language Abstractions and Techniques for Developing Collective Adaptive Syste...Language Abstractions and Techniques for Developing Collective Adaptive Syste...
Language Abstractions and Techniques for Developing Collective Adaptive Syste...
 
Does Neuron Coverage Matter for Deep Reinforcement Learning? A preliminary study
Does Neuron Coverage Matter for Deep Reinforcement Learning? A preliminary studyDoes Neuron Coverage Matter for Deep Reinforcement Learning? A preliminary study
Does Neuron Coverage Matter for Deep Reinforcement Learning? A preliminary study
 
Learning run-time composition of interacting adaptations
Learning run-time composition of interacting adaptationsLearning run-time composition of interacting adaptations
Learning run-time composition of interacting adaptations
 
Distributed context Petri nets
Distributed context Petri netsDistributed context Petri nets
Distributed context Petri nets
 
CQL: declarative language for context activation
CQL: declarative language for context activationCQL: declarative language for context activation
CQL: declarative language for context activation
 
Generating software adaptations using machine learning
Generating software adaptations using machine learningGenerating software adaptations using machine learning
Generating software adaptations using machine learning
 
[Bachelor_project] Asignación de exámenes finales
[Bachelor_project] Asignación de exámenes finales[Bachelor_project] Asignación de exámenes finales
[Bachelor_project] Asignación de exámenes finales
 
Programming language techniques for adaptive software
Programming language techniques for adaptive softwareProgramming language techniques for adaptive software
Programming language techniques for adaptive software
 
Peace COrP: Learning to solve conflicts between contexts
Peace COrP: Learning to solve conflicts between contextsPeace COrP: Learning to solve conflicts between contexts
Peace COrP: Learning to solve conflicts between contexts
 
Emergent Software Services
Emergent Software ServicesEmergent Software Services
Emergent Software Services
 

Recently uploaded

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 

Recently uploaded (20)

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 

[JIST] Programming language implementations for context-oriented self-adaptive systems

  • 1. Nicolás Cardozo1 Kim Mens2 1Systems and Computing Engineering department - Universidad de los Andes, Bogotá - Colombia 2ICTEAM - UCLouvain, Louvain-la-Neuve - Belgium kim.mens@uclouvain.be, n.cardozo@uniandes.edu.co @ncardoz Programming language implementations for context- oriented self-adaptive systems INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION
  • 2. Journal of Information and Software Technology Volume 143, March 2022 Nicolás Cardozo1 Kim Mens2 1Systems and Computing Engineering department - Universidad de los Andes, Bogotá - Colombia 2ICTEAM - UCLouvain, Louvain-la-Neuve - Belgium kim.mens@uclouvain.be, n.cardozo@uniandes.edu.co @ncardoz Programming language implementations for context- oriented self-adaptive systems
  • 8. 4 External adaptation engines Internal adaptation engines • Inflexible • Tightly couple with the system implementation • Modular • Customizable • Reusable Adaptation
  • 10. 6 Context-oriented programming @implementation Poi NSString *name; -(NSString*) name { return [NSString stringWithFormat:@"INIT_ERROR-%@", @"name"]; } @end
  • 11. 6 Context-oriented programming @implementation Poi NSString *name; -(NSString*) name { NSString *query = [NSString stringWithFormat:@"SELECT name FROM Poi WITH language = %@ AND id_poi = %d", @"en", [self poiId ]]; NSArray *res = [[NSArray alloc] initWithArray:[[self dbManager] |loadDataFromDB:query]]; return [res objectAtIndex:0]; } @end
  • 12. 6 Context-oriented programming @implementation Poi NSString *name; -(NSString*) name { return [NSString stringWithFormat:@"INIT_ERROR-%@", @"name"]; } @end
  • 13. 7 Context-oriented programming Contexts as first-class entities of the system Behavioral variations as fine-grained (partial) statements isolated from the system activation and deactivation mechanisms to compose and withdraw system behavior @context English @contexts English -(NSString*) name { … } @activate(English) @deactivate(English)
  • 14. 8 Context-dependent method dispatch (defmethod display-poi-info (poi) (print “basic poi info”)) Use dispatch mechanisms to direct messages to the appropriate implementation according to the context Ambience - [Gonzalez et al. JUC 2008]
  • 15. 8 Context-dependent method dispatch Use dispatch mechanisms to direct messages to the appropriate implementation according to the context (with-context (@wifi) ) (defmethod display-poi-info (poi) (format t “~a n Description: ~a ” (name poi) (detail-description poi)) Ambience - [Gonzalez et al. JUC 2008]
  • 16. 8 Context-dependent method dispatch Use dispatch mechanisms to direct messages to the appropriate implementation according to the context (with-context (@wifi) ) (defgeneric display-poi-info (poi) ...) Ambience - [Gonzalez et al. JUC 2008]
  • 17. 8 Context-dependent method dispatch Use dispatch mechanisms to direct messages to the appropriate implementation according to the context (with-context (@wifi) ) (defmethod display-poi-info (poi) (print “basic poi info”)) (defgeneric display-poi-info (poi) ...) amos::send Ambience - [Gonzalez et al. JUC 2008]
  • 18. 8 Context-dependent method dispatch Use dispatch mechanisms to direct messages to the appropriate implementation according to the context (with-context (@wifi) ) (defmethod display-poi-info (@wifi poi) (format t “~a n Description: ~a” (name poi) (detail-description poi)) (defgeneric display-poi-info (poi) ...) amos::send amos::prepend-slot (activate @wifi) Ambience - [Gonzalez et al. JUC 2008]
  • 19. 9 Method replacement mechanisms At the MOP level, switch method implementations between base and adaptive behavior void displayPOI (POI poi) { NSString *res = @“%@ ” NSLog(res, poi.description); } Subjective-C - [Gonzalez et al. SLE 2010]
  • 20. 9 Method replacement mechanisms At the MOP level, switch method implementations between base and adaptive behavior void displayPOI (POI poi) { NSString *res = @“%@ ” NSLog(res, poi.description); } displayPOI NSString *res = @“%@” NSLog(res, poi.description); SEL IMP Subjective-C - [Gonzalez et al. SLE 2010]
  • 21. 9 Method replacement mechanisms At the MOP level, switch method implementations between base and adaptive behavior void displayPOI (POI poi) { NSString *res = @“%@ ” NSLog(res, poi.description); } displayPOI NSString *res = @“%@ n Description: %@ ” NSLog(res, poi.name, poi.longDescription()); NSString *res = @“%@” NSLog(res, poi.description); @contexts Wifi void displayPOI (POI poi) { NSString *res = @“%@ n Description: %@ ” NSLog(res, poi.name, poi.longDescription()); } SEL IMP Subjective-C - [Gonzalez et al. SLE 2010]
  • 22. 9 Method replacement mechanisms At the MOP level, switch method implementations between base and adaptive behavior void displayPOI (POI poi) { NSString *res = @“%@ ” NSLog(res, poi.description); } displayPOI NSString *res = @“%@ n Description: %@ ” NSLog(res, poi.name, poi.longDescription()); NSString *res = @“%@” NSLog(res, poi.description); @contexts Wifi void displayPOI (POI poi) { NSString *res = @“%@ n Description: %@ ” NSLog(res, poi.name, poi.longDescription()); } @activate(Wifi) SEL IMP Subjective-C - [Gonzalez et al. SLE 2010]
  • 23. 10 Fine-grained composition Fine-grained module to be composed as appropriate for specific situations POI - description - displayPOI - name Context Traits - [Gonzalez et al. AOSD 2013]
  • 24. 10 Fine-grained composition Fine-grained module to be composed as appropriate for specific situations POI - description - displayPOI - name Wi fi <<trait>> - description - displayPOI Wifi.activate() Context Traits - [Gonzalez et al. AOSD 2013]
  • 25. 10 Fine-grained composition Fine-grained module to be composed as appropriate for specific situations POI - description - displayPOI - name Wi fi <<trait>> - description - displayPOI + POI - description - displayPOI - name = Wifi.activate() Context Traits - [Gonzalez et al. AOSD 2013]
  • 26. 11 Evaluation 1. Expressiveness 2. Modularity 3. Performance of adaptation selection
  • 27. 12 Modularity evaluation Ambience (LOC 793) Common Lisp (LOC 734) Subjective-C (LOC 3011) Objective-C (LOC 3265) Context Traits (LOC 1242) ECMAScript (LOC 1320) 0 25 50 75 100 17.73 3.14 6.95 4.22 23.84 10.97 29.62 35.91 19.69 17.48 54.22 50.32 52.65 60.95 73.35 78.31 21.93 38.71 Application Logic Adaptation Logic Adaptation Management
  • 28. 12 Modularity evaluation Ambience (LOC 793) Common Lisp (LOC 734) Subjective-C (LOC 3011) Objective-C (LOC 3265) Context Traits (LOC 1242) ECMAScript (LOC 1320) 0 25 50 75 100 17.73 3.14 6.95 4.22 23.84 10.97 29.62 35.91 19.69 17.48 54.22 50.32 52.65 60.95 73.35 78.31 21.93 38.71 Application Logic Adaptation Logic Adaptation Management Reduction in both the adaptation logic (~10%) and (more substantially) its management (>40%)
  • 29. 13 Performance evaluation log time (in milliseconds) 0.010 1.000 100.000 10000.000 1000000.000 Number of contexts 10 50 100 500 1000 2500 5000 10000 ifs strategy ambience log time (in milliseconds) 0.100 1.000 10.000 100.000 1000.000 Number of contexts 10 50 100 500 1000 2500 5000 ifs strategy context traits log time (in milliseconds) 0.0100000 1.0000000 100.0000000 10000.0000000 Number of contexts 10 50 100 500 1000 2500 5000 10000 25000 50000 ifs strategy subjective-c
  • 30. 13 Performance evaluation log time (in milliseconds) 0.010 1.000 100.000 10000.000 1000000.000 Number of contexts 10 50 100 500 1000 2500 5000 10000 ifs strategy ambience log time (in milliseconds) 0.100 1.000 10.000 100.000 1000.000 Number of contexts 10 50 100 500 1000 2500 5000 ifs strategy context traits log time (in milliseconds) 0.0100000 1.0000000 100.0000000 10000.0000000 Number of contexts 10 50 100 500 1000 2500 5000 10000 25000 50000 ifs strategy subjective-c Adaptation activations impact the use of adaptations, upon message sends, or context changes
  • 31. 14 Conclusion External adaptation engines Internal adaptation engines • Modular • Customizable • Reusable • Smart • Open • Resilient • Extensible • Highly-available • Customizable • Modular • Fine-grained • Concise • Understandable
  • 32. @FLAGlab in all media channels Journal of Information and Software Technology Volume 143, March 2022 Programming language implementations for context-oriented self-adaptive systems Nicolás Cardozo1 Kim Mens2 1Systems and Computing Engineering department - Universidad de los Andes, Bogotá - Colombia 2ICTEAM - UCLouvain, Louvain-la-Neuve - Belgium kim.mens@uclouvain.be, n.cardozo@uniandes.edu.co @ncardoz