F. Singhoff First version : February 2007
Last update : December 2015
Launching Cheddar and XML project I/O
You get "Can not open file" when loading a XML file into Cheddar : check that the file that you're trying to read contains a number of task/message/processor/resource/buffer less than the number of task/processor/message/buffer/resource the Cheddar's binary you're using can manage. To do this check, have a look on the constants defined in the file config/config.ads of the Cheddar source code.
You get "Simulation error : Parametric file error, File : foo, Can not
open file, Status error". If you want to study an XML project file composed
of an User-defined scheduler, task activation rule or event analyzer,
Cheddar has to be launched from the directory where XML and SC files
Basic Cheddar's services
You run a scheduling on a processor
hosting a Rate Monotonic or a Deadline Monotonic scheduler, but the resulting scheduling
does not match task priority that you gave when you defined tasks.
With these schedulers, the task priority field is ignored.
The scheduling is computed according to the task period (with Rate Monotonic)
and the task deadline (with Deadline Monotonic). If you want to schedule tasks
according to the task priority, choose instead the "Highest Priority First/POSIX 4" scheduler.
You get "Task must be periodic : can not
apply the selected scheduler with this task set". Some schedulers such as "Rate Monotonic"
or "Deadline Monotonic" require that ALL tasks are periodic.
If you want to study a system composed of non periodic task (poisson task,
aperiodic task, ...) with a fixed priority scheduler, you have to select
the "Hight Priority First/POSIX.4" scheduler when you define your processors.
I'm using Cheddar to analyze a very large scheduling. When I try to run
the simulation, the program only let me to simulate less than 1499 time
units. Can I increase this value ?
First, you can not display more than 1500 units of times but you can run larger scheduling
simulation : in this case, you display only a part of the computed scheduling.
This constraint exists to make easier the implementation of the machine-man interface. Anyway,
displaying large schedulings is usually not usefull : people who has to check large scheduling
simulations should do this check with an analysis program, and
not with the scheduling displayed on the screen !
To conclude : if you want to run scheduling simulation larger than 1500,
you can ... but without displaying all the time lines on the window : please read carrefully
the window which is spawn before scheduling simulation, you can see that the scheduling simulation
can be larger than 1500 units of time.
Second, the largest scheduling simulation you can run with Cheddar is
defined by an integer constant into an Ada package called config/framework_config.ads. Of course,
you can increase this constant to run larger scheduling simulation. By default, this constant
is set to 20000 units of time.
If you expect to run very large scheduling simulation, a good idea is to do it
machine-man interface (the cheddar editor)
to decrease memory footprint.
For such a purpose, see the framework_examples/build_schedule_from_xml.adb program which is
an example of scheduling simulation program without the machine man interface.
Can i use float/double task attributes with Cheddar ?
No, you can not and you must not use double. It is not necessary since
you can always work with
integer values. Double scheduling analysis tools are
difficult to implement. Furthermore, double data in a computer are always an
and most of the analysis algorithms simply do not work
Finally, any scheduler or task double properties can be simply expressed in integer without
loose of any accurancy.
Timing properties into Cheddar are expressed in "time units" which can be
seen as micro-second or milli-second or anything else. If you have some double timing properties, please,
convert them towards integer values. For example, if your models have milli-second task periods and
micro-second task capacities, you can express all your task properties in micro-seconds.
Of course, it may lead to larger scheduling simulation ... but the use of double properties will also lead to
to larger scheduling simulation !
To conclude, using double properties only lead to complex and unaccurate scheduling algorithms.
User-defined scheduler, task activation rules or event analyzer
May i define several variables on the same ligne ? No, you can not : each
variable has to be defined on a given ligne of code.
Why the variable used in a for statement is said to be undeclared ?
Because all variables used in a user-defined piece of code have to be defined, even if the
variable is a part of a for statement.
You get "Type error : Uncompatible types".
The type of a constant
or a variable is not compatible with an other one. Check if elements of
your expressions use compatible types.
You get "Type error : Table index error".
The index on a table
type has a wrong type (not integer).
You get "Type error : Task activation rule, Uncompatible types".
An expression referenced in a set statement (which defines a task
activation rule) have to be an integer type or integer table type.
You get "Type error : for expression have to be an integer variable".
In a for, the variable used to scan the TCB table has to be an
You get "Type error : Variables should have the size array size".
In some cases, an expression has to be build with variables which has the same number of item
if the variables are arrays. You also can not mix in some cases scalar variables with array variables .
You get "Type error : invalid return value from return statement".
A return can only return an integer value.
You get "Parsing error : Integer conversion error".
An integer was expected in a expression but give something else.
You get "Parsing error : Boolean conversion error".
A boolean was expected in a expression but give something else.
You get "Parsing error : Double conversion error".
A double was expected in a expression but give something else.
You get "Parsing error : undeclared identifier".
You forgot to declare something.
You get "Parsing error : identifier already declared".
You can not use the same identifier (string constant) for 2 variables or activation
You get "Parsing error : Random operators can not be used in complex
Random operators such as exponential or uniform can only
be used to define task activation rule. When they are used, they can not
be in conjonction with others operators.
You get "Syntax error : " or "Parsing error : ".
The syntax of your parametric scheduler is not correct. Take a look on the
BNF syntax given above.
You get "Variable error : undeclared identifier".
A referenced variable can not be found : do not forget to declared your variable.
You get "Variable error : operation not permitted".
You try to apply an operator on a variable and the two are not compatible.
You get "Statement error : Parametric task only permitted with
You can not define a parametric task on a processor
which is not a parametric one.
You get "Statement error : return statement expected".
An election section must be ended by a return statement.
You get "Statement error : invalid expression type referenced
in a return statement".
A return statement has to use an integer
constant or variable.
You get "Statement error : invalid min_to_index/max_to_index expression
in return statement ".
The variable type in a max_to_index/min_to_index
operator have to be an array of integer type.
You get "Statement error : invalid range type referenced in
a return statement".
The value given in your return statement
is outside the TCB table index range.
You get "Statement error : ".
The statement is forbidden here (ex : a return statement in a start section).
You get "Affectation statement : Uncompatible types".
The type of the left operand is not compatible with the type of the right operand.
You get "syntax error : Variable Declaration Have To Be Done In Start Section.
Do not try to declare variable outside the start section.
Machine man interface
How to customize the font use by Cheddar ?
On Linux, as any GTK application, you can customize the font used by Cheddar by adding a .gtkrc-2.0 file in your home
directory. As an example, the following text put in .gtkrc-2.0 file allows you to have a large font with Cheddar:
You get "fail to load module canberra-gtk-module"
It is a GTK warning and you can simply do not take care of it.
It has no negative effect on Cheddar.
About cheddar_tutorial.vdi, the virtual box which can be used to run Cheddar
Can we change the keyboard layout of this virtual
machine, as it is by default the French keyboard?
The vdi file is an ubuntu operating system and then, you can use any ubuntu services to switch to another keyboard layout.
For example, before login on this machine, you can change the keyboard layout by pushing a small icon in the top right part of the screen
(you can switch to an english keyboard there).
if you want other keyboard layouts, after logging, you must use the administrative tools of ubuntu
What are the login credentials on this machine ?
login : cheddar
passwd : cheddar
When Cheddar crashs, a file named "cheddar_bug.xml" is created. What it is ?
This file contains the project you are editing when the crash occurs.
You can restore your work with this file since it contains all tasks, processors, messages, ...
of your project just before the Cheddar bug.