\section{Applications of Cheddar ADL}
\label{applications_of_cheddar_adl}

In this section, we show how Cheddar ADL is used for scheduling 
analysis in the Cheddar context.\\

We implement Cheddar ADL through a XML format. XML tags represent the
different types of components and attributes. Each real-time application
architecture
is specified by a XML file, which must be conform to the DTD 
(Document Type Definition) 
of Cheddar ADL. %(see \cite{Fotsing13} for more details). 
Cheddar tools    % allow to 
check this XML  
file format, verify specific consistency rules, 
and then append an instance
of the matching component into the internal system representation. 

Notice that the Cheddar ADL file does not indicate 
what is the type 
of the scheduling analysis to apply. Users choose
the method through a graphical interface, or by
calling dedicated programs from the Cheddar toolbox. 
A tool is also provided to guide users towards the
feasibility tests that are usable according to the
architecture of their system \cite{gaudel11}.\\

%several feasibility tests, and to do many scheduling simulations, in order to completely 
%study the application.

%\subsection{Example}
Like announced in our requirements, Cheddar ADL should be a gateway 
with another tool in order to perform schedulability analysis.

The figure \ref{interoperability_fig} shows how, in general case, 
an analysis tool with it specific language is used to check an another 
model.

\begin{figure}
	\centering
	\includegraphics[width=11cm,height=5cm]{figures/interoperability}
	\caption{How interoperability with other ADLs is ensured: the particular case of AADL 
	and Cheddar ADL}
	\label{interoperability_fig}
\end{figure}

Using an ADL editor or not, the user produces its own model, which 
is transformed by an ADL Model Translator, in order to generate the 
specific model, compatible with your analysis tool.\\

Especially in our case, we show how Cheddar is integrated into an iteration 
of the development process of a real-time system using AADL inspector, an 
AADL model editor\footnote{AADL inspector is a product of Ellidiss 
Technologies http://www.ellidiss.com}:
\begin{itemize}
	\item The designer models a system using AADL inspector.
	\item The system is then transformed toward the Cheddar ADL used by 
	the analysis tool.
	\\This transformation extracts information relevant to the schedulability 
	analysis only.
	\\The example of figure \ref{example_cheddar_adl} is a result of transformation.
	
	\begin{figure}{}
\begin{lstlisting}{}
<cheddar> 
 ... 
 <core_unit id=" 59" >
   <name>core1</name> 
   <scheduler_type> 
   POSIX_1003_HIGHEST_PRIORITY_FIRST_PROTOCOL 
   </scheduler_type>
   <preemptive_type> PREEMPTIVE </preemptive_type> 
  </core_unit>
  ...
  <multi_cores_processor id=" 61" > 
   <name>processor1</name>
   <processor_type> IDENTICAL_MULTICORES_TYPE 
   </processor_type> 
   <migration_type> TIME_UNIT_MIGRATION_TYPE 
   </migration_type> 
   <cores>
    <core_unit} ref=" 59" /> 
    <core_unit} ref=" 60" />
   </cores>
  </multi_cores_processor>
  ... 
  <periodic_task id=" 63" > 
   <name>T1</name> 
   <cpu_name>processor1</cpu_name> 
   <capacity>2</capacity> 
   <deadline>4</deadline> 
   <start_time>0</start_time> 
   <policy>SCHED_FIFO</policy> 
   <period>4</period> 
   <jitter>0</jitter> 
  </periodic_task>
  ...
  <static_deployment id=" 66" > 
   <name>static_example</name>
   <consumer_entities> 
    <multi_cores_processor ref=" 61" /> 
   </consumer_entities> 
   <resource_entities> 
    <periodic_task ref=" 63" /> 
    <periodic_task ref=" 64" />
    <periodic_task ref=" 65" /> 
   </resource_entities>
   <allocation> 	scheduling_sequence.xml 
   </allocation> 
  </static_deployment> 
  ... 
</cheddar
\end{lstlisting}

\caption{Example of an application specified using Cheddar ADL}
\label{example_cheddar_adl}

\end{figure}

It is composed of a set periodic tasks, with $start_{-}time$ equal to $0$.

The tasks run on a multi-cores processors, with two identical cores, with 
the scheduler $posix_{-}1003_{-}highest_{-}priority_{-}first_{-}protocol$.

One address space, linked to the processor, allows to model logical memory.

Finally, a $static$ $deployment$ is used to give the relationships between the 
multi-cores processors and tasks. It is the off-line scheduling, and 
$scheduling_{-}sequence.xml$ gives the time moments when each task is pre-empted.

	\item The analysis tool performs the schedulability analysis and provides 
	an analysis report.
	\\We give at figure \ref{cheddar_simulation} a Cheddar scheduling simulation of our 
	example, on the hyper-period.
	
	\clearpage

    \begin{figure}[tbph]
    
	\centering
	\includegraphics[width=11cm,height=6cm]{figures/cheddar_simulation}
	\caption{A Cheddar scheduling simulation of our example}
	\label{cheddar_simulation}
	
	\end{figure}
	
	Let us remark that in this case, our application is not feasible.
\end{itemize}
