SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie [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
 

Ähnlich wie [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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

Kürzlich hochgeladen (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

[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