Commit 3012f606 authored by Maxime Perrotin's avatar Maxime Perrotin

Demonstrate support of multiple instances in TASTE

Tada!!!
parent 7f0c2d56
PACKAGE process_package_proxy
PUBLIC
WITH process_package;
WITH AI;
SYSTEM deploymentview
EXTENDS process_package::deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.final
EXTENDS process_package::deploymentview.final
PROPERTIES
AI::root_system => "SELECTED";
Priority => 2 APPLIES TO x86_partition.function2;
Priority => 2 APPLIES TO x86_partition.function3;
END deploymentview.final;
END process_package_proxy;
TASTE-Dataview DEFINITIONS ::= BEGIN
MyInteger[]
MyReal[]
MyBool[]
MyEnum[]
MySeq[]
MyChoice[]
MySeqOf[]
MyOctStr[]
END
\ No newline at end of file
TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
-- ASN.1 Type definitions must start with an uppercase
-- Field names in records (SEQUENCE) must start with a lowercase
-- Underscores are not allowed: use dash (hyphen)
-- Simple types:
MyInteger ::= INTEGER (0..255)
MyReal ::= REAL (0.0 .. 1000.0)
MyBool ::= BOOLEAN
MyEnum ::= ENUMERATED { hello, world, how-are-you }
-- Complex types:
MySeq ::= SEQUENCE {
input-data MyInteger,
output-data MyInteger,
validity ENUMERATED { valid, invalid }
}
MyChoice ::= CHOICE {
a BOOLEAN,
b MySeq
}
MySeqOf ::= SEQUENCE (SIZE (2)) OF MyEnum
MyOctStr ::= OCTET STRING (SIZE (3))
-- You can also declare constants
myVar MySeqOf ::= { hello, world }
END
---------------------------------------------------
-- AADL2.1
-- TASTE type deploymentview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE deploymentview::DV::Node1
PUBLIC
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS x86_partition
END x86_partition;
PROCESS IMPLEMENTATION x86_partition.others
END x86_partition.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::Function1;
WITH interfaceview::IV::mygui;
WITH interfaceview::IV::Function2;
WITH interfaceview::IV::Function3;
WITH ocarina_processors_x86;
WITH deploymentview::DV::Node1;
WITH Taste;
WITH Deployment;
WITH interfaceview::IV;
WITH TASTE_DV_Properties;
SYSTEM Node1
END Node1;
SYSTEM IMPLEMENTATION Node1.others
SUBCOMPONENTS
IV_Function1 : SYSTEM interfaceview::IV::Function1::Function1.others {
Taste::FunctionName => "Function1";
};
IV_mygui : SYSTEM interfaceview::IV::mygui::mygui.others {
Taste::FunctionName => "mygui";
};
IV_Function2 : SYSTEM interfaceview::IV::Function2::Function2.others {
Taste::FunctionName => "Function2";
};
IV_Function3 : SYSTEM interfaceview::IV::Function3::Function3.others {
Taste::FunctionName => "Function3";
};
x86_partition : PROCESS deploymentview::DV::Node1::x86_partition.others {
Taste::coordinates => "106102 64781 138458 87480";
Deployment::Port_Number => 0;
};
x86_linux : PROCESSOR ocarina_processors_x86::x86.linux {
Taste::coordinates => "102057 58295 142503 90723";
};
PROPERTIES
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_Function1;
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_mygui;
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_Function2;
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_Function3;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO x86_partition;
END Node1.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "97001 49030 147559 95355";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.0";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("../../../tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
---------------------------------------------------
-- AADL2.1
-- TASTE type interfaceview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE interfaceview::IV::Function1
PUBLIC
WITH interfaceview::IV::mygui;
WITH interfaceview::IV::Function2;
WITH interfaceview::IV::Function3;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_toto
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_toto;
SUBPROGRAM IMPLEMENTATION PI_toto.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 22 ms;
END PI_toto.others;
SUBPROGRAM RI_doSomething
FEATURES
p0 : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
END RI_doSomething;
SUBPROGRAM IMPLEMENTATION RI_doSomething.others
END RI_doSomething.others;
SUBPROGRAM RI_Hello1
FEATURES
a : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
END RI_Hello1;
SUBPROGRAM IMPLEMENTATION RI_Hello1.others
END RI_Hello1.others;
SUBPROGRAM RI_Hello2
FEATURES
a : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
END RI_Hello2;
SUBPROGRAM IMPLEMENTATION RI_Hello2.others
END RI_Hello2.others;
SYSTEM Function1
FEATURES
PI_toto : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1::PI_toto.others {
Taste::coordinates => "85008 60788";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 1000 ms;
Taste::Deadline => 133 ms;
Taste::InterfaceName => "toto";
};
RI_doSomething : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::mygui::PI_doSomething.others {
Taste::coordinates => "122515 63374";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "doSomething";
Taste::labelInheritance => "true";
};
RI_Hello1 : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Function2::PI_Hello.others {
Taste::coordinates => "122515 80663";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "Hello1";
Taste::labelInheritance => "true";
};
RI_Hello2 : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Function3::PI_Hello.others {
Taste::coordinates => "117812 86067";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "Hello2";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (SDL);
Taste::Active_Interfaces => any;
END Function1;
SYSTEM IMPLEMENTATION Function1.others
END Function1.others;
END interfaceview::IV::Function1;
PACKAGE interfaceview::IV::mygui
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_doSomething
FEATURES
p0 : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_doSomething;
SUBPROGRAM IMPLEMENTATION PI_doSomething.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_doSomething.others;
SUBPROGRAM PI_blah
FEATURES
a : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 2;
END PI_blah;
SUBPROGRAM IMPLEMENTATION PI_blah.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_blah.others;
SYSTEM mygui
FEATURES
PI_doSomething : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::mygui::PI_doSomething.others {
Taste::coordinates => "137448 64433";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "doSomething";
};
PI_blah : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::mygui::PI_blah.others {
Taste::coordinates => "166019 84067";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "blah";
};
PROPERTIES
Source_Language => (GUI);
Taste::Active_Interfaces => any;
END mygui;
SYSTEM IMPLEMENTATION mygui.others
END mygui.others;
END interfaceview::IV::mygui;
PACKAGE interfaceview::IV::Generic_A
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_Hello
FEATURES
a : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_Hello;
SUBPROGRAM IMPLEMENTATION PI_Hello.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_Hello.others;
SUBPROGRAM RI_go_out
FEATURES
a : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
END RI_go_out;
SUBPROGRAM IMPLEMENTATION RI_go_out.others
END RI_go_out.others;
SYSTEM Generic_A
FEATURES
PI_Hello : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Generic_A::PI_Hello.others {
Taste::coordinates => "87947 108054";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "Hello";
};
RI_go_out : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Generic_A::RI_go_out.others {
Taste::coordinates => "109346 108054";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "go_out";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (SDL);
Taste::Active_Interfaces => any;
END Generic_A;
SYSTEM IMPLEMENTATION Generic_A.others
END Generic_A.others;
END interfaceview::IV::Generic_A;
PACKAGE interfaceview::IV::Function2
PUBLIC
WITH interfaceview::IV::mygui;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_Hello
FEATURES
a : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_Hello;
SUBPROGRAM IMPLEMENTATION PI_Hello.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_Hello.others;
SUBPROGRAM RI_go_out
FEATURES
a : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
END RI_go_out;
SUBPROGRAM IMPLEMENTATION RI_go_out.others
END RI_go_out.others;
SYSTEM Function2
FEATURES
PI_Hello : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function2::PI_Hello.others {
Taste::coordinates => "135802 91829";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "Hello";
};
RI_go_out : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::mygui::PI_blah.others {
Taste::coordinates => "157201 91241";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "go_out";
Taste::labelInheritance => "false";
};
PROPERTIES
Source_Language => (SDL);
Taste::Active_Interfaces => any;
END Function2;
SYSTEM IMPLEMENTATION Function2.others
END Function2.others;
END interfaceview::IV::Function2;
PACKAGE interfaceview::IV::Function3
PUBLIC
WITH interfaceview::IV::mygui;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_Hello
FEATURES
a : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_Hello;
SUBPROGRAM IMPLEMENTATION PI_Hello.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_Hello.others;
SUBPROGRAM RI_go_out
FEATURES
a : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
END RI_go_out;
SUBPROGRAM IMPLEMENTATION RI_go_out.others
END RI_go_out.others;
SYSTEM Function3
FEATURES
PI_Hello : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function3::PI_Hello.others {
Taste::coordinates => "135567 111817";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "Hello";
};
RI_go_out : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::mygui::PI_blah.others {
Taste::coordinates => "156966 111817";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "go_out";
Taste::labelInheritance => "false";
};
PROPERTIES
Source_Language => (SDL);
Taste::Active_Interfaces => any;
END Function3;
SYSTEM IMPLEMENTATION Function3.others
END Function3.others;
END interfaceview::IV::Function3;
PACKAGE interfaceview::IV
PUBLIC
WITH interfaceview::IV::Function1;
WITH interfaceview::IV::mygui;
WITH interfaceview::IV::Generic_A;
WITH interfaceview::IV::Function2;
WITH interfaceview::IV::Function3;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SYSTEM interfaceview
END interfaceview;
SYSTEM IMPLEMENTATION interfaceview.others
SUBCOMPONENTS
Function1 : SYSTEM interfaceview::IV::Function1::Function1.others {
Taste::coordinates => "85008 56084 122515 86067";
};
mygui : SYSTEM interfaceview::IV::mygui::mygui.others {
Taste::coordinates => "137448 57377 175190 84067";
};
Generic_A : SYSTEM interfaceview::IV::Generic_A::Generic_A.others {
Taste::coordinates => "87947 102174 109346 119575";
TASTE_IV_Properties::is_Component_Type => TRUE;
Taste::Fill_Color => "#D8C600";
};
Function2 : SYSTEM interfaceview::IV::Function2::Function2.others {
Taste::coordinates => "135802 85949 157201 103350";
TASTE_IV_Properties::is_Component_Type => FALSE;
TASTE_IV_Properties::is_instance_of => "Generic_A";
};
Function3 : SYSTEM interfaceview::IV::Function3::Function3.others {
Taste::coordinates => "135567 105937 156966 123338";
TASTE_IV_Properties::is_Component_Type => FALSE;
TASTE_IV_Properties::is_instance_of => "Generic_A";
};
CONNECTIONS
mygui_PI_doSomething_Function1_RI_doSomething : SUBPROGRAM ACCESS mygui.PI_doSomething -> Function1.RI_doSomething {
Taste::coordinates => "122515 63374 129981 63374 129981 64433 137448 64433";
};
Function2_PI_Hello_Function1_RI_Hello1 : SUBPROGRAM ACCESS Function2.PI_Hello -> Function1.RI_Hello1 {
Taste::coordinates => "122515 80663 129158 80663 129158 91829 135802 91829";
};
Function3_PI_Hello_Function1_RI_Hello2 : SUBPROGRAM ACCESS Function3.PI_Hello -> Function1.RI_Hello2 {
Taste::coordinates => "117812 86067 117812 111817 135567 111817";
};
mygui_PI_blah_Function2_RI_go_out : SUBPROGRAM ACCESS mygui.PI_blah -> Function2.RI_go_out {
Taste::coordinates => "157201 91241 166019 91241 166019 84067";
};
mygui_PI_blah_Function3_RI_go_out : SUBPROGRAM ACCESS mygui.PI_blah -> Function3.RI_go_out {
Taste::coordinates => "156966 111817 166019 111817 166019 84067";
};
END interfaceview.others;
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.0";
END interfaceview::IV;
#!/bin/bash -e
# This script will build your TASTE system.
# You should not change this file as it was automatically generated.
# If you need additional preprocessing, there are three hook files
# that you can provide and that are called dring the build:
# user_init_pre.sh, user_init_post.sh and user_init_last.sh
# These files will never get overwritten by TASTE.'
# Inside these files you may set some environment variables:
# C_INCLUDE_PATH=/usr/include/xenomai/analogy/:${C_INCLUDE_PATH}
# unset USE_POHIC
CWD=$(pwd)
if [ -t 1 ] ; then
COLORON="\e[1m\e[32m"
COLOROFF="\e[0m"
else
COLORON=""
COLOROFF=""
fi
INFO="${COLORON}[INFO]${COLOROFF}"
if [ -f user_init_pre.sh ]
then
echo -e "${INFO} Executing user-defined init script"
source user_init_pre.sh
fi
# Use PolyORB-HI-C runtime
USE_POHIC=1
# Detect models from Ellidiss tools v2, and convert them to 1.3
INTERFACEVIEW=InterfaceView.aadl
grep "version => \"2" InterfaceView.aadl >/dev/null && {
echo -e "${INFO} Converting interface view from V2 to V1.3"
TASTE --load-interface-view InterfaceView.aadl --export-interface-view-to-1_3 __iv_1_3.aadl
INTERFACEVIEW=__iv_1_3.aadl
};
if [ -z "$DEPLOYMENTVIEW" ]
then
DEPLOYMENTVIEW=DeploymentView.aadl
fi
# Detect models from Ellidiss tools v2, and convert them to 1.3
grep "version => \"2" "$DEPLOYMENTVIEW" >/dev/null && {
echo -e "${INFO} Converting deployment view from V2 to V1.3"
TASTE --load-deployment-view "$DEPLOYMENTVIEW" --export-deployment-view-to-1_3 __dv_1_3.aadl
DEPLOYMENTVIEW=__dv_1_3.aadl
};
SKELS="./"
# Check if Dataview references existing files
mono $(which taste-extract-asn-from-design.exe) -i "$INTERFACEVIEW" -j /tmp/dv.asn
# Generate code for OpenGEODE function function1
cd "$SKELS"/function1 && opengeode --toAda function1.pr system_structure.pr && cd $OLDPWD
# Generate code for OpenGEODE function generic_a
cd "$SKELS"/generic_a && opengeode --toAda generic_a.pr system_structure.pr && cd $OLDPWD
# Generate code for function function2 (instance of OpenGEODE function generic_a)
cd "$SKELS"/function2 && opengeode --toAda system_structure.pr ../generic_a/generic_a.pr && rm -f generic_a.ad* && cd $OLDPWD
# Generate code for function function3 (instance of OpenGEODE function generic_a)
cd "$SKELS"/function3 && opengeode --toAda system_structure.pr ../generic_a/generic_a.pr && rm -f generic_a.ad* && cd $OLDPWD
cd "$SKELS" && rm -f function1.zip && zip function1 function1/* && cd $OLDPWD
cd "$SKELS" && rm -f generic_a.zip && zip generic_a generic_a/* && cd $OLDPWD
cd "$SKELS" && rm -f function2.zip && zip function2 function2/* && cd $OLDPWD
cd "$SKELS" && rm -f function3.zip && zip function3 function3/* && cd $OLDPWD
[ ! -z "$CLEANUP" ] && rm -rf binary*
if [ -f ConcurrencyView.pro ]
then
ORCHESTRATOR_OPTIONS+=" -w ConcurrencyView.pro "
elif [ -f ConcurrencyView_Properties.aadl ]
then
ORCHESTRATOR_OPTIONS+=" -w ConcurrencyView_Properties.aadl "
fi
if [ -f user_init_post.sh ]
then
echo -e "${INFO} Executing user-defined post-init script"
source user_init_post.sh
fi
if [ ! -z "$USE_POHIC" ]
then
OUTPUTDIR=binary.c
ORCHESTRATOR_OPTIONS+=" -p "
elif [ ! -z "$USE_POHIADA" ]
then
OUTPUTDIR=binary.ada
else
OUTPUTDIR=binary
fi
cd "$CWD" && assert-builder-ocarina.py \
--fast \
--debug \
--aadlv2 \
--keep-case \
--interfaceView "$INTERFACEVIEW" \
--deploymentView "$DEPLOYMENTVIEW" \
-o "$OUTPUTDIR" \
--subAda function1:"$SKELS"/function1.zip \
--with-extra-Ada-code generic_a:"$SKELS"/generic_a \
--subAda function2:"$SKELS"/function2.zip \