This document describes research on using model-based techniques to generate stress test cases for embedded software. A constraint programming approach is used to model the software system, hardware platform, and performance requirements. The model includes properties of threads, activities, and the scheduling policy. The approach searches for values of tunable parameters, such as delays, that maximize CPU usage while satisfying constraints, in order to evaluate the system under worst-case conditions and help verify that it meets safety standards. The generated test cases effectively stress the system by selecting parameter values that guide the execution towards maximum resource consumption.
Adaptive Clinical Trials: Role of Modelling and Simulation SGS
To increase the efficiency of trials in drug development, optimal experimental design has been used to successfully optimize dose allocation and sampling schedules. Better incremental decisions in Phase I and II result in greater likelihood that the safety and efficacy of the right dose is being studied, for the right indication and in the right patient population. This approach involves a pre-planned adaptation of aspects of study design based on statistical and/or pharmacokinetic/pharmacodynamic (PK/PD) analysis. From a modelling and simulation (M&S) perspective, a prior understanding of concentration (dose)-efficacy and of concentration (dose)-toxicity relationship is needed.
Adaptive Clinical Trials: Role of Modelling and Simulation SGS
To increase the efficiency of trials in drug development, optimal experimental design has been used to successfully optimize dose allocation and sampling schedules. Better incremental decisions in Phase I and II result in greater likelihood that the safety and efficacy of the right dose is being studied, for the right indication and in the right patient population. This approach involves a pre-planned adaptation of aspects of study design based on statistical and/or pharmacokinetic/pharmacodynamic (PK/PD) analysis. From a modelling and simulation (M&S) perspective, a prior understanding of concentration (dose)-efficacy and of concentration (dose)-toxicity relationship is needed.
This presentation enables users to understand basics of Information Theory, Entropy, Binary channels, channel capacity and error condition in easy and detailed manner. Concepts are explained properly using derivations and examples.
The information in this slide is very useful for me to do the assignment regarding the simulation in which we have to report together with the presentation...
An Empirical Study on the Adequacy of Testing in Open Source ProjectsPavneet Singh Kochhar
In this study, we investigate the state-of-the-practice of testing
by measuring code coverage in open-source software projects. We examine over 300 large open-source projects written in Java, to measure the code coverage of their associated test cases.
Constrained Optimization with Genetic Algorithms and Project BonsaiIvo Andreev
Traditional machine learning requires volumes of labelled data that can be time consuming and expensive to produce,”
“Machine teaching leverages the human capability to decompose and explain concepts to train machine learning models
direction (teaching the correct answer is not by showing the data for it, but by using a person to show the answer).
Project Bonsai is a low code platform for intelligent solutions but with a different perspective on data it allows a completely new approach to tasks, especially when the physical world is involved. Under the hood it combines machine teaching, calibration and optimization to create intelligent control systems using simulations. The teaching curriculum is performed using a new language concept - “Inkling” and training a model is easy and interactive.
This presentation introduces the concept of Machine Learning and then discusses how Machine Learning is being used in the Predictive Maintenance domain.
Eric Nyberg's Presentation "From Jeopardy! To Cognitive Agents: Effective Learning in the Wild" on Cognitive Systems Institute Group Speaker Series July 9, 2015
Should I Bug You? Identifying Domain Experts in Software Projects Using Code...Christoph Matthies
Any sufficiently complex software system has experts, who have a deeper understanding of parts of the system than others.
However, it is not always clear who these experts are and which particular parts of the system they can provide help with.
We propose a framework to elicit the expertise of developers and recommend experts by analyzing the development of code complexity measures over time, by author as well as on the component level.
Teams can use this approach to detect those parts of the software for which currently no, or only few experts exist and can take preventive actions to keep the collective code knowledge and ownership high.
We employed the developed approach at a medium-sized company.
The results were evaluated with a survey, comparing the perceived and the computed expertise of developers.
We show that aggregated code metrics can be used to identify experts for different software components.
The identified experts were rated as acceptable candidates by developers in over 90% of all cases.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
PHP Frameworks: I want to break free (IPC Berlin 2024)
Scalable and Cost-Effective Model-Based Software Verification and Testing
1. Scalable and Cost-Effective Model-Based Software
Verification and Testing
University of Luxembourg
Interdisciplinary Centre for Security, Reliability and Trust
Software Verification and Validation Lab (www.svv.lu)
May 17th, 2013
University of California, Irvine
Lionel Briand, IEEE Fellow
FNR PEARL Chair
2. Luxembourg
• Small country and
population
• One of the wealthiest in the
world
• Young university (2003)
and Ph.D. programs (2007)
• ICT security and reliability,
a national research priority
• Priorities implemented as
interdisciplinary centres
• International
• Three official languages:
English, French, German
2
3. SnT Software Verification and Validation Lab
• SnT centre, Est. 2009: Interdisciplinary, ICT security-reliability-trust
• 180 scientists and Ph.D. candidates, 20 industry partners
• SVV Lab: Established January 2012, www.svv.lu
• 15 scientists (Research scientists, associates, and PhD candidates)
• Industry-relevant research on system dependability: security, safety,
reliability
• Four partners: Cetrel, CTIE, Delphi, SES, …
3
4. Research Paradigm
• Research informed by practice
• Well-defined problems in context
• Realistic evaluation
• Long term industrial collaborations
4
5. Acknowledgements
• Shiva Nejati
• Mehrdad Sabetzadeh
• Yvan Labiche
• Andrea Arcuri
• Stefano Di Alesio
• Reza Matinnejad
• Zohaib Iqbal
• Shaukat Ali
• Hadi Hemmati
• Marwa Shousha
• …
5
6. “Model-based”?
• All engineering disciplines rely
on abstraction and therefore
models
• In most cases, it is the only way
to effectively automate testing or
verification
• Models have many other
purposes: Communication,
support requirements and design
• There are many ways to model
systems and their environment
• In a given context, this choice is
driven by the application domain,
standards and practices,
objectives, and skills
6
7. Models in Software Engineering
• Model: An abstract and analyzable description of software artifacts,
created for a purpose
7
Requirements models Architecture
models Behavioural
models
Test
models
• Abstract: Details are omitted. Partial representation. Much smaller and
simpler than the artifact being modeled.
• Analyzable: Leads to task automation
8. Talk Objectives
• Overview of several years of research
• Examples, at various levels of details
• Follows a research paradigm that is uncommon in software engineering
research
• Conducted in collaboration with industry partners in many application
domains: Automotive, energy, telecom …
• Lessons learned regarding scalability and cost-effectiveness
8
9. 9
Objective
Function
Search
Space
Search
Technique
Search to optimize
objective function:
Complete or not,
deterministic or partly
random (stochastic)
Metaheuristics,
constraint solvers
Scalability: A small
part of the search
space is traversed
Model: Guidance to
worst case, high risk
scenarios across space
Heuristics: Extensive
empirical studies are
required
Research Pattern: Models and Search Heuristics
10. Early Work: Search-Based Schedulability
Analysis
L. Briand, Y. Labiche, and M. Shousha, 2003-2006
10
11. • Real-time scheduling theory
– Given priorities, execution time, periods (periodic task), minimum
inter-arrival times (aperiodic task), …
– Is a group of (a)periodic tasks schedulable?
– Theory to determine schedulability
• Independent periodic tasks: Rate Monotonic Algorithm (RMA)
• Aperiodic or dependent tasks: Generalized Completion Time
Theorem (GCTT).
• GCTT assumes
– aperiodic tasks equivalent to periodic tasks
• periods = minimum inter-arrival times
– aperiodic tasks ready to start at time zero
• Execution times are estimates
t2
t2
t2
t2
0
2
4
6
8
10
12
14
16
18
20
minimum
interarrival time: 8
Schedulability Theory
11
12. A Search-based Solution
• Goal: Make no assumptions and find near deadline misses as
well, identify worst case scenarios
• Population-based metaheuristic: Genetic Algorithm
• To automate, based on the system task architecture (UML SPT,
MARTE), the derivation of arrival times for task triggering events
that maximize the chances of critical deadline misses.
12
Aperiodic tasks
Periodic tasks
System
Event 1
Event 2
+
Genetic
Algorithm
=
Arrival times
Event 1
Event 1
Event 2
time
13. Model as Input
13
UML-MARTE
Model
(Task architecture)
GA
Scheduler
(constraint solver)
• Chromosome
• Fitness evaluation
Task priorities
…
Estimated execution time,
Minimum inter-arrival
time,
…
Arrival/
seeding times
Start times,
Pre-emption
14. Objective Function
• Focus on one target task at a time
• Goal: Guide the search towards arrival times causing the greatest
delays in the executions of the target task
• Properties:
– Handle deadline misses
– Consider all task executions, not just worst case execution
– Reward task executions so that many good executions do not wind
up overshadowing one bad execution
14
15. Objective Function II
∑=
−
=
t
jtjt
k
j
de
Chf
1
,,
2)(
t: target task
kt: maximum number of executions of t
e: estimated end time of execution j of target task as determined by
scheduler
d: deadline of execution j of target task
f
e-d
0
15
16. Case Study
• Software Engineering Institute (SEI), Naval Weapons Center and IBM’s
Federal Sector Division
• Hard real-time, realistic avionics application model similar to existing
U.S. Navy and Marine aircrafts
• Eight highest priority tasks deemed schedulable
• Our findings suggest three of eight tasks produce systematic deadline
misses
16
17. 0
0
2
0
0
4
7
0
N/A
N/A
3, 9
N/A
N/A
17, 16, 10, 9
1, 29, 23, 2, 28, 27, 32
N/A
Number
of Misses
Value of
Misses
Weapon Release
Weapon Release Subtask
Radar Tracking Filter
RWR Contact Management
Data Bus Poll Device
Weapon Aiming
Radar Target Update
Navigation Update
Results
18. Conclusions
• We devised a method to generate event seeding times for aperiodic
tasks so as identifying deadline miss scenarios based on task design
information
• Near deadline misses as well! (stress testing)
• Standard modeling notation (UML/SPT/MARTE)
• No dedicated, additional modeling compared to what is expected when
defining a task architecture
• Scalability: GA runs lasted a few minutes on regular PC
• Default GA parameters, as recommended in literature, work well
• Large empirical studies to evaluate the approach (heuristics)
• Similar work with concurrency analysis: Deadlocks, data races, etc.
(Shousha, Briand, Labiche, 2008-2012)
19. Testing Driven by Environment Modeling
Z. Iqbal, A. Arcuri, L. Briand, 2009-2012
19
20. • Three-year project with two industry partners
– Soft real-time systems: deadlines in order of hundreds of
milliseconds
• Jitter of few milliseconds acceptable
– Automation of test cases and oracle generation, environment
simulation
Tomra – Bottle Recycling Machine
WesternGeco – Marine Seismic
Acquisition System
Context
21. • Independent
– Black-box
• Behavior driven by environment
– Environment model
• Software engineers
• No use of Matlab/Simulink
• One model for
– Environment simulator
– Test cases and oracles
• UML profile (+ limited use of
MARTE)
Environment
Simulator
Test cases
Environment Models
Test oracle
Environment
Modeling
and
Simula4on
24. • Test cases are defined by
– Simulation configuration
– Environment configuration
• Environment Configuration
– Number of instances to be created for each component in the
domain model (e.g., the number of sensors)
• Simulator Configuration
– Setting of non-deterministic attribute values
• Test oracle: Environment model error states
– A successful test case is one which leads the environment into
an error state
Test
Cases
25. • Bring the system state to an error state by searching for appropriate
values for non-deterministic environment attributes
• Search heuristics are based on fitness functions assessing how
“close” is the current state to an error state
• Different metaheuristics: Genetic algorithm, (1+1) EA
• Defining the fitness function based on model information was highly
complex: OCL constraints, combination of many heuristics
• Industrial case study and artificial examples showed the heuristic
was effective
– (1+1) EA better than GA
25
Search
Objec4ves
and
Heuris4cs
26. • Evaluates how “good” the simulator configurations are
• Can only be decided after the execution of a test case
• Decided based on heuristics: How close was the test case to …
26
• Approach Level
• reach an error state?
• Branch Distance
• solve the guard on a
branch leading to an error
state?
• defined search heuristics
for OCL expressions*
• Time Distance
• take a time transition that
leads to an error state?
Basic
Ideas
about
the
Fitness
Func4on
* S. Ali, M.Z. Iqbal, A. Arcuri, L. Briand, "Generating Test Data from OCL Constraints with Search Techniques", forthcoming in IEEE
Transactions on Software Engineering
28. System: fire/gas detection and
emergency shutdown
28
Drivers
(Software-Hardware Interface)
Control Modules Alarm Devices
(Hardware)
Multicore Archt.
Real Time Operating System
29. Safety Drivers May Overload the CPU
• Drivers need to bridge the timing gaps
between SW and HW
• SIL 3
• Drivers have flexible design
• Parallel threads communicating in an
asynchronous way
• Period and watchdog threads
• Drivers are subject to real-time constraints to
make sure they do not overuse the CPU time,
e.g., “The processor spare-time should not be
less than 80% at any time”
• Determine how many driver instances to
deploy on a CPU
29
Drivers
(Software-Hardware Interface)
30. 30
Pull Data IODispatch Push Data
Periodic PeriodicWatchDog
Delay
(offset)
Small Delay
Large Delay
T2 consumes a lot of CPU time
T2 may blockT1 and/or T3
T1 T3T2
Deadline misses
CPU overload
Communication protocol
with configurable parameters
Processing
control data
Sending HW
commands
I/O Driver
31. Safety standards
To achieve SIL levels 3-4,
Stress Testing is “Highly
Recommended”
IEC 61508 is a Safety Standard
including guidelines for Performance
Testing
iec.ch
31
32. Search Objective
• Stress test cases: Values for environment-dependent parameters of the
embedded software, e.g., the size of time delays used in software to
synchronize with hardware devices or to receive feedback from the
hardware devices.
• Goal: select delays to maximize the use of the CPU while satisfying
design constraints.
32
33. General Approach: Modeling and Optimization
Constraint
Programming
Modeling
Constraint
Program
Stress Test Cases
(Delay values leading to worst
case CPU time usage)
Performance
Requirements
(objective functions)
System design and
platform Model (UML/MARTE)
INPUT
OUTPUT
CP Engine
(COMET)
INPUT
34. Information Requirements
34
Scheduler
Activity
- preemptive : bool
- min duration(min_d) :int
- max duration (max_d) :int
- delay :int
Processing Unit
- number of cores :int
Global Clock
- time : int
Thread
1.. *
Scheduling
Policy
uses
schedules
1.. *
1
*1
1
*
*
Data dependency ( )
- priority :int
- period (p) :int
- min inter-arrival time (min_ia) :int
- max inter-arrival time (max_ia) :int
ordered
Asynch
0..1
*
*
*
temporal precedence( )
- Start()
- Finish()
- Wait()
- Sleep()
- Resume()
- Trigger()
Buffer
- size : int
0..1
1.. *
- access()
t
triggers
Computing Platform Embedded Software App
allocated
1
1
*
*
Synch
uses
1.. *
0..1
1 *
*
runs *
35. MARTE: Augmented Sequence Diagrams
35
IOTask Push DataMailBox
Some abstractions are design choices:
delays, priorities…
Pull Data
scan
Some others depend on the
environment: arrival times…
Thread
Buffer
Activity
delay
duration
deadline
36. COMET input language
Design properties include: threads,
priorities, activities, durations…
Preemptions at regular time periods
(quanta)
Assume negligible context switching
time compared to time quantum
Platform and design properties are
constants in our Constraint Program
Platform and Design Properties modeled in
UML are provided as input in our Constraint
Program
// 1) Input: Time and Concurrency information
int c = ...; // #Cores
int n = ...; range J = 0..n-1; // #Threads
int priority[J] = ...; // Priorities
// ...
// 2) Output: Scheduling variables
dvar int arrival_time[a in A] in T;
// Actual arrival times
dvar int start[a in A] in est[a]..lst[a];
// Actual start times
dvar int end[a in A] in eet[a]..let[a];
// Actual end times
// ...
// 3) Objective function: Performance Requirement
maximize
sum(a in A)(maxl(0, minl(1,
deadline_miss[a]))); // Deadline misses function
// 4) Constraints: Scheduling policy
subject to {
forall(a in A) {
wf4: start[a] <= end[a];
// Threads should end after their start time
// ...
37. Threads Properties which can be tuned during
testing are the output of our Constraint Program
Tunable Parameters may include
design and real time properties
Tunable Parameters are variables
in our Constraint Program
Some tunable parameters are the
basis for the definition to stress
test cases (e.g., delays), others
are results from scheduling
// 1) Input: Time and Concurrency information
int c = ...; // #Cores
int n = ...; range J = 0..n-1; // #Threads
int priority[J] = ...; // Priorities
// ...
// 2) Output: Scheduling variables
dvar int arrival_time[a in A] in T;
// Actual arrival times
dvar int start[a in A] in est[a]..lst[a];
// Actual start times
dvar int end[a in A] in eet[a]..let[a];
// Actual end times
// ...
// 3) Objective function: Performance Requirement
maximize
sum(a in A)(maxl(0, minl(1,
deadline_miss[a]))); // Deadline misses function
// 4) Constraints: Scheduling policy
subject to {
forall(a in A) {
wf4: start[a] <= end[a];
// Threads should end after their start time
// ...
38. The Performance Requirement is modeled as
an objective function to maximize
We focus on objective functions for
CPU Usage here
Each objective function models a
specific performance requirement
Testing a different performance
requirements only requires to
change the objective function
(constraints)
// 1) Input: Time and Concurrency information
int c = ...; // #Cores
int n = ...; range J = 0..n-1; // #Threads
int priority[J] = ...; // Priorities
// ...
// 2) Output: Scheduling variables
dvar int arrival_time[a in A] in T;
// Actual arrival times
dvar int start[a in A] in est[a]..lst[a];
// Actual start times
dvar int end[a in A] in eet[a]..let[a];
// Actual end times
// ...
// 3) Objective function: Performance Requirement
maximize
sum(a in A)(maxl(0, minl(1,
deadline_miss[a]))); // Deadline misses function
// 4) Constraints: Scheduling policy
subject to {
forall(a in A) {
wf4: start[a] <= end[a];
// Threads should end after their start time
// ...
39. Constraints express relationships
between constants and variables
Constraints are independent and can
be modified to fit different platforms,
for example scheduling algorithm
The Platform scheduler and properties are
modeled through a set of constraints
// 1) Input: Time and Concurrency information
int c = ...; // #Cores
int n = ...; range J = 0..n-1; // #Threads
int priority[J] = ...; // Priorities
// ...
// 2) Output: Scheduling variables
dvar int arrival_time[a in A] in T;
// Actual arrival times
dvar int start[a in A] in est[a]..lst[a];
// Actual start times
dvar int end[a in A] in eet[a]..let[a];
// Actual end times
// ...
// 3) Objective function: Performance Requirement
maximize
sum(a in A)(maxl(0, minl(1,
deadline_miss[a]))); // Deadline misses function
// 4) Constraints: Scheduling policy
subject to {
forall(a in A) {
wf4: start[a] <= end[a];
// Threads should end after their start time
// ...
40. We run an experiment with real data and
two different objective functions
But optimal solutions were found shortly after the search
started, even if the search took a much more time to terminate
It took a significant amount of
time for the search to terminate
Case Study (Driver)
40
(Time) (Time)
Max: 50%
Max: 50%
Max:550 ms
Max:550 ms
termination time termination timemination time termination time
(Value)
(% for cpu usage,
ms for makespan)
of maximizing fmakespan and fusage (Section 4) for both parallel and non-
mplementations.
nts. To identify the suspicious hardware configurations, however, the
41. Conclusions
• We re-express test case generation for CPU
usage requirements as a constraint
optimization problem
• Approach:
– A conceptual model for time abstractions
– Mapping to MARTE
– A constraint optimization formulation of
the problem
– Application of the approach to a real case
study (albeit small)
• Using a constraint solver does not seem to
scale to large numbers of threads
• Currently continues this work with Delphi using
metaheuristic search: 430 tasks, powertrain
systems, AUTOSAR
41
42. Testing Closed Loop Controllers
R. Matinnejad, S. Nejati, L. Briand, T. Bruckmann, C. Poull,
2013
42
43. Complexity
and
amount
of
soDware
used
on
vehicles’
Electronic
Control
Units
(ECUs)
grow
rapidly
More functions
Comfort and variety
Safety and reliability
Faster time-to-market
Less fuel consumption
Greenhouse gas emission laws
43
45. Major
Challenges
in
MiL-‐SiL-‐HiL
Tes4ng
• Manual test case generation
• Complex functions at MiL, and large and integrated
software/embedded systems at HiL
• Lack of precise requirements and testing Objectives
• Hard to interpret the testing results
45
46. MiL
tes4ng
Requirements
The ultimate goal of MiL testing is to
ensure that individual functions
behave correctly and timely on any
hardware configuration
Individual Functions
46
47. Main
differences
between
automo4ve
func4on
tes4ng
and
general
soDware
tes4ng
• Continuous behaviour
• Time matters a lot
• Several configurations
– Huge number of detailed physical measures/ranges/
thresholds captured by calibration values
47
48. A
Taxonomy
of
Automo4ve
Func4ons
ControllingComputation
State-Based ContinuousTransforming Calculating
unit convertors calculating positions,
duty cycles, etc
State machine
controllers
Closed-loop
controllers (PID)
Different testing strategies are required for
different types of functions
48
49. Controller Plant Model and its Requirements
Plant
Model
Controller
(SUT)
Desired value Error
Actual value
System output+
-
=<
~= 0
>=
time time time
DesiredValue&ActualValue
Desired Value
Actual Value
(a) (b) (c)Liveness Smoothness Responsiveness
x
y
z
v
w
49
50. 50
Types
of
Requirements
SBPC function shall guarantee that the flap will move to and will stabilize
at its desired position within xx ms. Further, the flap shall reach within yy%
of its desired position within zz ms. In addition, after reaching vv% close to
the desired position, the flap shall not jump to a position more than ww%
away from its desired position.
(1) functional/liveness (2) responsiveness/performance
(3) smoothness/safety
xx
zz
yy
<ww
50
51. 51
Search
Elements
• Search:
• Inputs: Initial and desired values, configuration parameters
• (1+1) EA
• Search Objective:
• Example requirement that we want to test: liveness
|Desired - Actual(final)|~= 0
For each set of inputs, we evaluate the objective function over the resulting
simulation graphs:
• Result:
• worst case scenarios or values to the input variables that are
more likely to break the requirement at MiL level
• stress test cases based on actual hardware (HiL) 51
52. MiL-Testing of Continuous Controllers
Exploration+
Controller-
plant model
Objective
Functions
Overview
Diagram
Test
Scenarios
List of
Regions
Local Search
Domain
Expert
time
Desired Value
Actual Value
0 1 2
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
Initial Desired
Final Desired
52
54. Random Search vs. (1+1)EA
Example with Responsiveness Analysis
Random (1+1) EA
54
55. • We found much worse scenarios during MiL testing than our partner
had found so far
• They are running them at the HiL level, where testing is much more
expensive: MiL results -> test selection for HiL
• On average, the results of the single-state search showed significant
improvements over the result of the exploration algorithm
• Configuration parameters?
• Need more exploitative or explorative search algorithms in different
subregions
Conclusions
i.e., 31s. Hence, the horizontal axis of the diagrams in Figure 8 shows the number of
iterations instead of the computation time. In addition, we start both random search and
(1+1) EA from the same initial point, i.e., the worst case from the exploration step.
Overall in all the regions, (1+1) EA eventually reaches its plateau at a value higher
than the random search plateau value. Further, (1+1) EA is more deterministic than ran-
dom, i.e., the distribution of (1+1) EA has a smaller variance than that of random search,
especially when reaching the plateau (see Figure 8). In some regions (e.g., Figure 8(d)),
however, random reaches its plateau slightly faster than (1+1) EA, while in some other
regions (e.g. Figure 8(a)), (1+1) EA is faster. We will discuss the relationship between
the region landscape and the performance of (1+1) EA in RQ3.
RQ3. We drew the landscape for the 11 regions in our experiment. For example, Fig-
ure 9 shows the landscape for two selected regions in Figures 7(a) and 7(b). Specifically,
Figure 9(a) shows the landscape for the region in Figure 7(b) where (1+1) EA is faster
than random, and Figure 9(b) shows the landscape for the region in Figure 7(a) where
(1+1) EA is slower than random search.
0.30
0.31
0.32
0.33
0.34
0.35
0.36
0.37
0.38
0.39
0.40
0.70 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.80
0.10
0.11
0.12
0.13
0.14
0.15
0.16
0.17
0.18
0.19
0.20
0.90 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.00
(a) (b)
Fig. 9. Diagrams representing the landscape for two representative HeatMap regions: (a) Land-
scape for the region in Figure 7(b). (b) Landscape for the region in Figure 7(a).
55
56. Minimizing CPU Time Shortage Risks in
Integrated Embedded Software
S. Nejati, M. Adedjouma
L. Briand, T. Bruckmann, C. Poull, 2013
56
57. Today’s
cars
rely
on
integrated
systems
• Modular and independent development
• Huge opportunities for division of labor and
outsourcing
• Need for reliable and effective integration
processes
57
58. An
overview
of
an
integra4on
process
in
the
automo4ve
domain
AUTOSAR Models
sw runnables
sw runnables
AUTOSAR Models
Glue
58
59. AUTOSAR
captures
the
4ming
proper4es
of
the
Runnables
and
their
data
dependencies
Component Type
Port
Runnable
OS Task
- period
Internal behaviour
- priority
- cycle
DataRead/
WriteAccess
Interface
DataSend/
ReceivePoint
1 *
1
*
1
1
11
sw runnables
sw runnables
r
Glue Code
OS
Integrated System
egration Process.
the maximum CPU usage.
gorithms can automatically
um CPU usage is as low as
ximum CPU usage had not
et computation algorithms
, Delphi. In addition, our
ximum CPU usage that are
by a random strategy, that
n. Finally, our approach is
gy.
E AUTOMOTIVE DOMAIN
on modern vehicles’ Elec-
Component Type
Port
Runnable
OS Task
- period
Internal behaviour
- priority
- cycle
DataRead/
WriteAccess
Interface
DataSend/
ReceivePoint
1 *
1
*
1
1
11
Fig. 2. AUTOSAR concepts capturing the timing properties of the runnables
and the data dependencies between them.
/* Declarations for variables, runnables, and dependencies */
...
/* Initializations, constructors and local functions */
...
/* Executing runnables */
Task o1() { /* cycle o1 = 5 ms */
if ( (timer mod r1.period) == 0) do /* timer mod 10 == 0 */
execute runnable r1
if ( (timer mod r2.period) == 0) do /* timer mod 20 == 0 */
execute runnable r2
if ( (timer mod r3.period) == 0) do /* timer mod 100 == 0 */
execute runnable r3
...
}
Task o2() {
...
Fig. 3. Simplified structure of the glue code in Figure 1.
AUTOSAR metamodel [13]. In AUTOSAR, runnables are the
atomic units of computation. They can be viewed as concur-
Runnables Glue Code:
59
60. 60
CPU
Time
Shortage
in
Integrated
Embedded
SoDware
• Challenge
– Many OS tasks and their many runnables run within a limited
available CPU time
• The execution time of the runnables may exceed the OS cycles
• Our goal
– Reducing the maximum CPU time used per time slot to be
able to
• Minimize the hardware cost
• Enable addition of new functions incrementally
• Reduce the possibility of overloading the CPU in practice
5ms 10ms 15ms 20ms 25ms 30ms 35ms 40ms
✗
5ms 10ms 15ms 20ms 25ms 30ms 35ms 40ms
✔
(a)
(b)
Fig. 4. Two possible CPU time usage simulations for an OS task with a 5ms
cycle: (a) Usage with bursts, and (b) Desirable usage.
its corresponding glue code starts by a set of declarations
and definitions for components, runnables, ports, etc. It then
includes the initialization part followed by the execution part.
In the execution part, there is one routine for each OS task.
These routines are called by the scheduler of the underlying
OS in every cycle of their corresponding task. Inside each
OS task routine, the runnables related to that OS task are
called based on their period. For example, in Figure 3, we
assume that the cycle of the task o1 is 5ms, and the period
to dead
run pas
by OS
divisibl
offset v
synchro
suppose
slot bec
and r2
time slo
There
AUTOS
CF1.
time is
allocati
the disk
60
61. 61
We
minimize
the
maximum
CPU
usage
using
runnables
offsets
(delay
:mes)
5ms 10ms 15ms 20ms 25ms 30ms 35ms 40ms
5ms 10ms 15ms 20ms 25ms 30ms 35ms 40ms
✗
✔
Inserting runnables’offsets
Offsets have to be chosen such that
the maximum CPU usage per time slot is minimized, and further,
the runnables respect their period
the runnables respect the OS cycles
the runnnables satisfy their synchronization constraints
61
62. 62
Meta
heuris4c
search
algorithms
Case Study: an automotive software system with 430 runnables
Running the system without offsets
Simulation for the runnables in our case study and
corresponding to the lowest max CPU usage found by HC
5.34 ms
Our optimized offset assignment
2.13 ms
- The objective function is the max CPU usage of a 2s-simulation of runnables
- The search modifies one offset at a time, and updates other offsets only if
timing constraints are violated
- Single-state search algorithms for discrete spaces (HC, Tabu)
- Used restart option to make them more explorative
62
64. 64
Comparing
our
best
search
algorithm
with
Random
search
(a) (b) (c)
(a)
Lowest max CPU usage values computed by HC within 70 ms
over 100 different runs
Lowest max CPU usage values computed by Random
within 70 ms over 100 different runs
Comparing average behavior of Random and HC in computing
lowest max CPU usage values within 70 s and over 100 different runs
64
65. 65
Conclusions
- We developed a number of search
algorithms to compute offset values that
reduce the max CPU time needed
- Our evaluation shows that our approach is
able to generate reasonably good results
for a large automotive system and in a
small amount of time
- Due to large number of runnables and the
orders of magnitude difference in
runnables periods and their execution
times, we were not able to use constraint
solvers
65
66. MDE Projects Overview (< 5 years)
66
Company Domain Objective Notation Automation
ABB Robot controller Testing UML Model traversal for
coverage criteria
Cisco Video conference Testing (robustness) UML profile Metaheuristic
Kongsberg Maritime Fire and gas safety
control system
Certification SysML + req
traceability
Slicing algorithm
Kongsberg Maritime Oil&gas, safety critical
drivers
CPU usage analysis UML+MARTE Constraint Solver
FMC Subsea system Automated
configuration
UML profile Constraint solver
WesternGeco Marine seismic
acquisition
Testing UML profile + MARTE Metaheuristic
DNV Marine and Energy,
certification body
Compliance with safety
standards
UML profile Constraint verification
SES Satellite operator Testing UML profile Metaheuristic
Delphi Automotive systems Testing (safety
+performance)
Matlab/Simulink Metaheuristic
Lux. Tax department Legal & financial Legal Req. QA &
testing
Under investigation Under investigation
67. Conclusions I
• Models
– UML profiles, MARTE, SysML, Matlab/Simulink, AUTOSAR
– Never UML only: always some tailoring required
– Always a specific modeling methodology, i.e., how to use the
notation => semantics
– Driven by
• Information that is needed to guide automation, e.g., search,
optimization
• Appropriate level of abstraction: scalability, cost-effectiveness
• Test/Verification objectives
• Current modeling practices and skills
• Reliance on standards
– Modeling requirements must be “reasonable”, achievable, cost-
effective for engineers
67
68. Conclusions II
• Automation
– Many testing and verification problems can be re-expressed as a
search/optimization problem
– Search-based software engineering: Enabling automation for hard
problems
– But limited, though changing, applications to model-driven
engineering
– Models are needed to guide search and optimization
– Many search techniques: Search algorithm, fitness function …
– It is not easy to choose which one to use for a given problem
– Empirical studies
– Promising results, scalability (incomplete search)
68
69. Discussions
• Constraint solvers (e.g., Comet, ILOG Cplex, SICStus)
– Is there an efficient constraint model for the problem at hand?
– Can effective heuristics be found to order the search be found?
– Better if problem can match a known standard problem, e.g., job
shop scheduling
– Tend to be strongly affected by small changes in the problem, e.g.,
allowing task pre-emption
• Model checking
– Detailed operational models (e.g., state models, CTL),, involving
temporal properties (e.g., CTL)
– Enough details to analyze statically or execute symbolically
– These modeling requirements are usually not realistic in actual
system development
– Originally designed for checking temporal properties, as opposed to
explicit timing properties
69
70. Discussions II
• Metaheuristic search
– Tends to be more versatile, tailorable to a new problem
– Entail lower modeling requirements
– Can provide responses at any time, without systematically and
deterministically searching the same part of the space at every run
– “best solution found within time constraints”, not a proof, no
certainty
– But in practice (complex) models are not fully correct, there is no
certainty
70
71. Selected References
• L. Briand, Y. Labiche, and M. Shousha, “Using genetic algorithms for early
schedulability analysis and stress testing in real-time systems”, Genetic
Programming and Evolvable Machines, vol. 7 no. 2, pp. 145-170, 2006
• M. Shousha, L. Briand, and Y. Labiche, “UML/MARTE Model Analysis Method
for Uncovering Scenarios Leading to Starvation and Deadlocks in Concurrent
Systems”, IEEE Transactions on Software Engineering 38(2), 2012.
• Z. Iqbal, A. Arcuri, L. Briand, “Empirical Investigation of Search Algorithms for
Environment Model-Based Testing of Real-Time Embedded Software”, ACM
ISSTA 2012
• S. Nejati, S. Di Alesio, M. Sabetzadeh, L. Briand, “Modeling and Analysis of
CPU Usage in Safety-Critical Embedded Systems to Support Stress Testing”,
ACM/IEEE MODELS 2012
• Shiva Nejati, Mehrdad Sabetzadeh, Davide Falessi, Lionel C. Briand, Thierry
Coq, “A SysML-based approach to traceability management and design slicing
in support of safety certification: Framework, tool support, and case studies”,
Information & Software Technology 54(6): 569-590 (2012)
• Lionel Briand et al., “Traceability and SysML Design Slices to Support Safety
Inspections: A Controlled Experiment”, forthcoming in ACM Transactions on
Software Engineering and Methodology, 2013
71
72. Selected References (cont.)
• Rajwinder Kaur Panesar-Walawege, Mehrdad Sabetzadeh, Lionel C. Briand:
Supporting the verification of compliance to safety standards via model-driven
engineering: Approach, tool-support and empirical validation. Information &
Software Technology 55(5): 836-864 (2013)
• Razieh Behjati, Tao Yue, Lionel C. Briand, Bran Selic: SimPL: A product-line
modeling methodology for families of integrated control systems. Information &
Software Technology 55(3): 607-629 (2013)
• Hadi Hemmati, Andrea Arcuri, Lionel C. Briand: Achieving scalable model-based
testing through test case diversity. ACM Trans. Softw. Eng. Methodol. 22(1): 6
(2013)
• Nina Elisabeth Holt, Richard Torkar, Lionel C. Briand, Kai Hansen: State-Based
Testing: Industrial Evaluation of the Cost-Effectiveness of Round-Trip Path and
Sneak-Path Strategies. ISSRE 2012: 321-330
• Razieh Behjati, Tao Yue, Lionel C. Briand: A Modeling Approach to Support the
Similarity-Based Reuse of Configuration Data. MoDELS 2012: 497-513
• Shaukat Ali, Lionel C. Briand, Andrea Arcuri, Suneth Walawege: An Industrial
Application of Robustness Testing Using Aspect-Oriented Modeling, UML/
MARTE, and Search Algorithms. MoDELS 2011: 108-122
72