Commit b26ec36a authored by yoogx's avatar yoogx

Merge branch 'ocarina_svn_enis'

parents 9f89dde3 c0aa7c2d
......@@ -470,9 +470,9 @@ if test ${dotests} = "true" ; then
# failures=`expr ${failures} + 1`
else
./`basename ${file} .adb` >${actual_output} 2>&1
command="./`basename ${file} .adb`"
result=$?
OCARINA_PATH="`which ocarina`" ./`basename ${file} .adb` >${actual_output} 2>&1
command="./`basename ${file} .adb`"
result=$?
if test -r ${expected_output} ; then
${scriptdir}/tools/compare.py \
......
This diff is collapsed.
......@@ -57,11 +57,14 @@ TREE_PIDL_SPECS = src/core/tree/ocarina-me_aadl-aadl_tree-nodes.idl \
src/core/tree/ocarina-me_aadl-aadl_instances-nodes.idl \
src/core/tree/ocarina-me_aadl_ba-ba_tree-nodes.idl \
src/core/tree/ocarina-me_real-real_tree-nodes.idl \
src/core/tree/ocarina-me_ao4aadl-ao4aadl_tree-nodes.idl \
src/core/tree/ocarina-me_aadl_ema-ema_tree-nodes.idl \
src/backends/ocarina-backends-ada_tree-nodes.idl \
src/backends/ocarina-backends-c_tree-nodes.idl \
src/backends/ocarina-backends-asn1_tree-nodes.idl \
src/backends/ocarina-backends-xml_tree-nodes.idl \
src/backends/ocarina-backends-pn-nodes.idl \
src/backends/ocarina-backends-lnt-nodes.idl \
src/backends/ocarina-backends-mast_tree-nodes.idl
TREE_ADA_SPECS = ${addprefix $(top_builddir)/, $(TREE_PIDL_SPECS:.idl=.ads)}
......
......@@ -6,7 +6,7 @@
-- --
-- P r o j e c t --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2016 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -39,6 +39,8 @@ project Ocarina.Frontends is
for Source_Dirs use
(Src_Dir & "/aadl",
Src_Dir & "/aadl_ba",
Src_Dir & "/aadl_ema",
Src_Dir & "/ao4aadl",
Src_Dir & "/real");
for Object_Dir use Build_Dir & "/objects";
for Library_Dir use Build_Dir & "/libs";
......
package ErrorLibrary
public
annex EMV2 {**
error types
CommonErrors: type set { ServiceError, TimingRelatedError, ValueRelatedError, ReplicationError,
ConcurrencyError};
--service related errors
ServiceError: type;
ItemOmission: type extends ServiceError;
ServiceOmission: type extends ServiceError;
SequenceOmission: type extends ServiceError;
TransientServiceOmission: type extends SequenceOmission;
LateServiceStart: type extends SequenceOmission;
EarlyServiceTermination: type extends SequenceOmission;
BoundedOmissionInterval: type extends SequenceOmission;
ItemComission: type extends ServiceError;
ServiceCommission: type extends ServiceError;
SequenceCommission: type extends ServiceError;
EarlyServiceStart: type extends SequenceCommission;
LateServiceTermination: type extends SequenceCommission;
--timing related errors
TimingRelatedError: type set {ItemTimingError, SequenceTimingError, ServiceTimingError};
-- Item timing errors
ItemTimingError: type;
EarlyDelivery: type extends ItemTimingError;
LateDelivery: type extends ItemTimingError;
--Rate/sequence timing errors
SequenceTimingError: type;
HighRate: type extends SequenceTimingError;
LowRate: type extends SequenceTimingError;
RateJitter: type extends SequenceTimingError;
-- Service timing error
ServiceTimingError: type;
DelayedService: type extends ServiceTimingError;
EarlyService: type extends ServiceTimingError;
-- aliases for timing errors
TimingError renames type ItemTimingError; -- legacy
RateError renames type SequenceTimingError;
EarlyData renames type HighRate;
LateData renames type LowRate;
ServiceTimeShift renames type ServiceTimingError;
--value related errors
ValueRelatedError: type set {ItemValueError, SequenceValueError, ServiceValueError};
-- item value errors
ItemValueError: type;
UndetectableValueError: type extends ItemValueError;
DetectableValueError: type extends ItemValueError;
OutOfRange: type extends DetectableValueError;
BelowRange: type extends OutOfRange;
AboveRange: type extends OutOfRange;
OutOfBounds: type extends DetectableValueError;
-- sequence errors
SequenceValueError: type;
BoundedValueChange: type extends SequenceError;
StuckValue: type extends SequenceError;
OutOfOrder: type extends SequenceError;
ServiceValueError: type;
OutOfCalibration: type extends ServiceValueError;
-- Common aliases for value related errors
ValueError renames type ItemValueError;
IncorrectValue renames type ItemValueError;
ValueCorruption renames type ItemValueError;
BadValue renames type ItemValueError;
SequenceError renames type SequenceValueError;
SubtleValueError renames type UndetectableValueError;
BenignValueError renames type DetectableValueError;
SubtleValueCorruption renames type DetectableValueError;
-- Detectability (Benign/Subtle) represent a characteristic of error types
--replication errors
ReplicationError: type;
AsymmetricReplicatesError: type extends ReplicationError;
AsymmetricValue: type extends AsymmetricReplicatesError;
AsymmetricApproximateValue: type extends AsymmetricValue;
AsymmetricExactValue: type extends AsymmetricValue;
AsymmetricTiming: type extends AsymmetricReplicatesError;
AsymmetricOmission: type extends AsymmetricReplicatesError;
AsymmetricItemOmission: type extends AsymmetricOmission;
AsymmetricServiceOmission: type extends AsymmetricOmission;
SymmetricReplicatesError: type extends ReplicationError;
SymmetricValue: type extends SymmetricReplicatesError;
SymmetricApproximateValue: type extends SymmetricValue;
SymmetricExactValue: type extends SymmetricValue;
SymmetricTiming: type extends SymmetricReplicatesError;
SymmetricOmission: type extends SymmetricReplicatesError;
SymmetricItemOmission: type extends SymmetricOmission;
SymmetricServiceOmission: type extends SymmetricOmission;
-- aliases for replication
InconsistentValue renames type AsymmetricValue;
InconsistentTiming renames type AsymmetricTiming;
InconsistentOmission renames type AsymmetricOmission;
InconsistentItemOmission renames type AsymmetricItemOmission;
InconsistentServiceOmission renames type AsymmetricServiceOmission;
AsymmetricTransmissive renames type AsymmetricValue;
--concurrency errors
ConcurrencyError: type;
RaceCondition: type extends ConcurrencyError;
ReadWriteRace: type extends RaceCondition;
WriteWriteRace: type extends RaceCondition;
MutExError: type extends ConcurrencyError;
Deadlock: type extends MutExError;
Starvation: type extends MutExError;
--authorization and authentication errors
AuthorizationError: type;
AuthenticationError: type;
end types;
**};
end ErrorLibrary;
property set Replication_Properties is
-- description of the context, requirements and goal of the replication
Description : aadlstring applies to (system, process, thread, processor, device);
-- Specification of the replica number
Replica_Number : aadlinteger applies to ( system, process, thread, processor, device);
-- Min_Nbr_Replica: A constant that represents the minimal number of replica.
Min_Nbr_Replica : constant aadlinteger => 3 ;
-- Max_Nbr_Replica: A constant that represents the maximal number of replica.
Max_Nbr_Replica : constant aadlinteger => 7 ;
-- Identifiers of the different generated replica
Replica_Identifiers : list of aadlstring applies to (system, process, thread, processor, device);
--Replication type
-- Passive Replication: one replica has two behaviors (primary and backup behaviors)
-- Active Replication: all replica have the same behavior and there is a consensus algorithm to vote between them
Replication_Types: type enumeration (ACTIVE , PASSIVE);
Replica_Type : Replication_Properties::Replication_Types applies to (system, process, thread, processor, device);
-- the consensus algorithm source text
Consensus_Algorithm_Source_Text: aadlString applies to (port, data access, system, processor, device);
-- to refer to a subprogram or thread classifier
Consensus_Algorithm_Class : classifier (subprogram) applies to (port, data access, system, processor, device);
-- to refera subprogram or a thread instance
Consensus_Algorithm_Ref : reference (subprogram) applies to (port, data access, system, processor, device);
end Replication_Properties;
......@@ -28,6 +28,8 @@ AADL_V2_PROPERTIES = $(srcdir)/AADLv2/aadl_project.aadl \
$(srcdir)/AADLv2/pok_properties.aadl \
$(srcdir)/AADLv2/programming_properties.aadl \
$(srcdir)/AADLv2/base_types.aadl \
$(srcdir)/AADLv2/replication_properties.aadl \
$(srcdir)/AADLv2/errorlibrary.aadl \
$(srcdir)/AADLv2/taste_properties.aadl \
$(srcdir)/AADLv2/transformations.aadl
......
......@@ -62,4 +62,18 @@ property set Ocarina_Config is
Timeout_Property : Time applies to (system);
-- The timeout used to stop an execution
Annex_Type : type enumeration
(annex_all,
annex_none,
behavior_specification,
real_specification,
emv2);
-- Designates the list of annexes supported in ocarina. annex_all
-- and annex_none designate respectively all supported annexes
-- and none of them for properties that accept this kind of
-- designation.
Enable_Annexes : list of Ocarina_Config::Annex_Type applies to (system);
-- List of annexes to be enabled in the parsed model
end Ocarina_Config;
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2016 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -193,11 +193,11 @@ package body Ocarina.Backends.Expander is
end if;
Append_Node_To_List
(Make_Node_Container (L),
(Make_Node_Container (L, Extra_Item (K)),
Sources (N));
Append_Node_To_List
(Make_Node_Container (N),
(Make_Node_Container (N, Extra_Item (K)),
Destinations (L));
end if;
......@@ -227,11 +227,11 @@ package body Ocarina.Backends.Expander is
end if;
Append_Node_To_List
(Make_Node_Container (L),
(Make_Node_Container (L, Extra_Item (K)),
Destinations (N));
Append_Node_To_List
(Make_Node_Container (N),
(Make_Node_Container (N, Extra_Item (K)),
Sources (L));
end if;
......
This diff is collapsed.
------------------------------------------------------------------------------
-- --
-- OCARINA COMPONENTS --
-- --
-- O C A R I N A . B A C K E N D S . L N T . C O M P O N E N T S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2016 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. Ocarina is distributed in the hope that it will be useful, but --
-- WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- Ocarina is maintained by the TASTE project --
-- (taste-users@lists.tuxfamily.org) --
-- --
------------------------------------------------------------------------------
with Ocarina.Backends.Lnt.Nodes;
use Ocarina.Backends.Lnt.Nodes;
package Ocarina.Backends.Lnt.Components is
function Make_Module_Definition
(Defining_Identifier : Node_Id;
Modules : List_Id := No_List;
Predefined_Functions : List_Id := No_List;
Module_Pragma : List_Id := No_List;
Definitions : List_Id := No_List)
return Node_Id;
function Make_Type_Def
(Defining_Identifier : Node_Id;
Type_Exp : Node_Id;
Type_Pragma : List_Id := No_List;
Predefined_Functions : List_Id := No_List)
return Node_Id;
function Make_Type_Exp
(Defining_Identifier : Node_Id := No_Node;
Type_constructors : List_Id := No_List;
Is_Set : boolean := false;
Is_Sorted_Set : boolean := false;
Is_List : boolean := false;
Is_Sorted_List : boolean := false;
Is_Array : boolean := false;
Is_Range : boolean := false;
RangeLNT : Node_Id := No_Node)
return Node_Id;
function Make_RangeLNT
(Low_Bound : Node_Id;
High_Bound : Node_Id) return Node_Id;
function Make_Type_Constructor
(Defining_Identifier : Node_Id;
Constructor_Parameters : List_Id := No_List;
Constructor_Pragma : List_Id := No_List)
return Node_Id;
function Make_Parameter_Specification
(Parameter_Var : Node_Id;
Parameter_Type : Node_Id;
Parameter_Mode : Mode_Id := Mode_In)
return Node_Id;
function Make_Function_Definition
(Defining_Identifier : Node_Id;
Function_Parameters : List_Id := No_List;
Function_Return_Type : Node_Id := No_Node;
Function_Exceptions : List_Id := No_List;
Function_Pragma : List_Id := No_List;
Statements : List_Id)
return Node_Id;
function Make_Actual_Parameter
(Expression : Node_Id;
Is_Out : boolean := false;
Is_InOut : boolean := false)
return Node_Id;
function Make_Null_Statement return Node_Id;
function Make_Return_Statement
(Expression : Node_Id := No_Node;
Is_Function : boolean := false)
return Node_Id;
function Make_Predefined_Function
(Predefined_Function : Node_Kind;
Is_With_Clause : boolean := false)
return Node_Id;
function Make_Assignment_Statement
(Variable_Identifier : Node_Id;
Expression : Node_Id)
return Node_Id;
function Make_Array_Element_Assignment_Statement
(Defining_Identifier : Node_Id;
Expression_Index : Node_Id;
Expression : Node_Id)
return Node_Id;
function Make_Case_Statement
(Expression : Node_Id;
Variable_Declarations : List_Id := No_List;
Case_Statement_Alternatives : List_Id)
return Node_Id;
function Make_Case_Statement_Alternative
(Pattern_List : List_Id := No_List;
Statements : List_Id)
return Node_Id;
function Make_If_Statement
(Condition : Node_Id;
Then_Statements : List_Id;
Elsif_Statements : List_Id := No_List;
Else_Statements : List_Id := No_List)
return Node_Id;
function Make_Elsif_Statement
(Condition : Node_Id;
Then_Statements : List_Id)
return Node_Id;
function Make_Loop_Statement
(Statements : List_Id)
return Node_Id;
function Make_While_Statement
(Expression : Node_Id;
Statements : List_Id)
return Node_Id;
function Make_Var_Declaration
(Defining_Identifier : Node_Id;
Var_Type : Node_Id)
return Node_Id;
function Make_Var_Statement
(Variable_Declarations : List_Id;
Statements : List_Id)
return Node_Id;
function Make_Nat (Value : Integer) return Node_Id;
function Make_Expressions (Expression_List : List_Id)
return Node_Id;
function Make_Parenthesized_Expression (Expression : Node_Id)
return Node_Id;
function Make_Function_Call_Expression
(Defining_Identifier : Node_Id;
Parameters : List_Id := No_List)
return Node_Id;
function Make_Infix_Function_Call_Expression
(Operator : Node_Id;
Left_Part : Node_Id := No_Node;
Right_Part : Node_Id)
return Node_Id;
function Make_Field_Selection_Expression
(Expression : Node_Id;
Field : Node_Id)
return Node_Id;
function Make_Field_Update_Expression
(Expression : Node_Id;
Field_Association : List_Id)
return Node_Id;
function Make_Element_Association
(Index : Node_Id;
Expression : Node_Id)
return Node_Id;
function Make_Array_Elt_Access_Expression
(Index : Node_Id;
Expression : Node_Id)
return Node_Id;
function Make_Pattern
(Sub_Pattern : Node_Id := No_Node;
Pattern_Type : Node_Id := No_Node;
Is_Any : boolean := false;
Is_Of : boolean := false)
return Node_Id;
function Make_Patterns (Pattern_List : List_Id)
return Node_Id;
function Make_Parenthesized_Pattern (Pattern : Node_Id)
return Node_Id;
function Make_Constructed_Pattern
(Defining_Identifier : Node_Id;
Parameters : List_Id := No_List)
return Node_Id;
function Make_Channel
(Defining_Identifier : Node_Id;
Gate_Profiles : List_Id)
return Node_Id;
function Make_Gate_Profile
(Gate_Types : List_Id)
return Node_Id;
function Make_Process_Definition
(Corresponding_Component : Node_Id := No_Node;
Defining_Identifier : Node_Id;
Process_Parameters : List_Id := No_List;
Process_Gate_Declarations : List_Id := No_List;
Process_Exceptions : List_Id := No_List;
Process_Pragma : List_Id := No_List;
Statements : List_Id)
return Node_Id;
function Make_Gate_Declaration
(Channel_Name : Node_Id := No_Node;
Gate : Node_Id;
Is_Any : boolean := false)
return Node_Id;
function Make_Stop_Statement return Node_Id;
function Make_Process_Instantiation_Statement
(Defining_Identifier : Node_Id;
Actual_Gates : List_Id := No_List;
Actual_Parameters : List_Id := No_List;
Is_Sporadic : boolean := false)
return Node_Id;
function Make_Communication_Statement
(Defining_Identifier : Node_Id;
Offers : List_Id := No_List;
Has_Where : boolean := false;
Expression : Node_Id := No_Node)
return Node_Id;
function Make_Offer_Statement
(Expression : Node_Id := No_Node;
Pattern : Node_Id;
Is_Input : boolean := false)
return Node_Id;
function Make_Select_Statement
(Select_Statement_Alternatives : List_Id)
return Node_Id;
function Make_Select_Statement_Alternative
(Statements : List_Id)
return Node_Id;
function Make_Parallel_Composition_Statement
(Global_Synchronisation_Gates : List_Id := No_List;
Interface_Synchronisations : List_Id)
return Node_Id;
function Make_Interface_Synchronisation
(Interface_Synchronisation_Gates : List_Id := No_List;
Statements : List_Id)
return Node_Id;
function Make_Module_Pragma
(P_Type : Node_Kind;
N_Constant : Integer)
return Node_Id;