AADL Inspector/Cheddar labs

Frank Singhoff, Lab-STICC UMR CNRS 6285/Université de Bretagne Occidentale
Pierre Dissaux, Ellidiss Tech.

This set of exercises show how to use AADLInspector to run scheduling analysis with Cheddar.
The slides of the lecture to do those exercises can be downloaded here .

Installation procedure

To do the following exercises, you need AADLInspector. You can either download and install AADLInspector from http://www.ellidiss.com/downloads on your laptop (for Windows or Linux targets only). You can also use a virtual machine (vdi file named "cheddar_tutorial.vdi") if you are able to run Virtual Box. The cheddar_tutorial.vdi file is there . When launched, you must log to the machine with "cheddar" as login name (same string for the password). Then, to have AADLInspector in your path, run the following command:

source TEST_AI/ai.bash

Running procedure

For windows target, just click on the AADLInspector icon. For Linux station, use the following command:


Exercise 1, demo of the basic AADLInspector analysis features

The objective of this first exercise is to discover the basic analysis options of the tool.
  1. Download the following AADL model.
  2. Save those files in a specific folder. Those files are composing an AADLInspector project: the file .aic allows AADLInspector to load all AADL files composing your model from the menu File/Load.
  3. From File/Load, load the project.
  4. With the Static analysis/Parse and Instanciante LMP button, verify the AADL model. What is the root component of this model ? Give the instance model graph.
  5. To perform a scheduling analysis, the processor component has to be extended with few properties. Add to the cpu_leon2 component the following properties:
       Scheduling_protocol => (rate_monotonic_protocol);
  6. Compute the scheduling of this thread set with Cheddar by the button Timing Analysis/Simulation timelines (Cheddar). From this simulation, compute with Cheddar the response times of the threads by the button Simulation Tests (Cheddar).
  7. Compute theoretical worst case thread response times, always with Cheddar but with the button Timing Analysis/Theoretical Tests (Cheddar).
  8. Open the task response thread summary panel.
  9. Do a simulation with Marzhin.
  10. Explain why we have different response times for each thread on this panel?
  11. Update the Scheduling_protocol property for subcomponent cpu with value posix_1003_highest_priority_first_protocol
  12. Do again the questions 6, 7 and 8.

Exercise 2, first handouts with AADLInspector

In this exercise, we will model and analyze a set of threads writing or reading data from a shared memory area. We will assume that the shared memory area is modeled by a data component. Writing or reading an element will be modeled by the access of the data component in mutual exclusion. The objective of this exercise is to gradually build and analyze such model. In the first question, we will define two independant threads, i.e. we do not model the shared memory area. In the next question, we intend to model several readers and writers, always independents. Finally, in the last question, we extend the second version of the model with the thread communications.

Question 1 :

Let assume this sample of AADL model:
package sampling_coms


  thread writer
  end writer;

  thread reader
  end reader;

  thread implementation reader.impl
  end reader.impl;

  thread implementation writer.impl
  end writer.impl;

  process application
  end application;

  process implementation application.impl
  end application.impl;

  processor cpu
  end cpu;

  system smpl
  end smpl;

  system implementation smpl.impl
    process1 : process application.impl;
    cpu1     : processor cpu;
    Actual_Processor_Binding => (reference(cpu1)) applies to process1;
  end smpl.impl;

end sampling_coms;

  1. Change the definition of the threads and the process above in order to:
  2. Check correctness of the model with LMP.
  3. In order to perform scheduling analysis, extend your modele with the following property:

  4. Perform the scheduling analysis with AADLInspector.

Question 2 :

  1. From the model of the previous question and without introducing new component type, extend the model in order to declare 3 writers and 2 readers with the following properties:
  2. Verify your model by simulations with AADLInspector.

Question 3 :

In order to model the thread communications, we now extend the previous model with a data component.
  1. Change your previous model by adding a data component and the required connections to the threads. For this data component, define the following property:
       Concurrency_Control_Protocol => PCP;

  2. Once updated, analyze your model with AADLInspector to locate locks and unlocks of the data component.

Exercise 3, Mars Path Finder, analysis of a model with shared data

This exercise is extracted from [Cottet00] and is about a simplified architecture model of the Mars Pathfinder mission. In this exercise, you must look for a design mistake and propose a solution for it. In 1997, Mars Pathfinder casts a mobile robot called Sojourner on Mars. This mobile robot was controled by a multitask software running on a VxWorks target. This software was composed of the following tasks:

Tasks Priorities Periods/Deadlines Executime time
SCHED_BUS 1 125 ms 25 ms
DATA 2 125 ms 25 ms
CONTROL 3 250 ms 25 ms
RADIO 4 250 ms 25 ms
VIDEO 5 250 ms 25 ms
MESURE 6 5000 ms 50 ms
FORECAST 7 5000 ms Between 50 ms and 75 ms

  1. During the mission of Mars PathFinder, operators noticed that some deadlines were missed, leading to frequent reboots of the hardware. Design an AADL model to discover what are the missed deadlines and why those threads where not able to meet their deadlines.
  2. How to solve this issue? Apply it on your AADL model.

Exercise 4, Rosace, analysis of a model with data flow

This exercise shows how to synchronize dataflows and control flows in a simplified Flight Control System (see the figure bellow from [Pagetti14] and the AADL model inspired from this article).

Question 1 :

Question 2 :

Question 3 :


[Cottet00] F. Cottet, J. Delacroix, C. Kaiser, and Z. Mammeri. Ordonnancement temps réel. Hermès, 2000.

[Pagetti14] The ROSACE Case Study: From Simulink Specification to Multi/Many-Core Execution, Claire Pagetti, David Saussiéy, Romain Gratia, Eric Noulard, Pierre Siron. RTAS 2014 conference.