Commit e438a919 authored by yoogx's avatar yoogx

* Add generation of Ada 2012 and SPARK 2014 aspects for

          PolyORB-HI/Ada.

          As part of this change, the Job function of thread is now a procedure

          For openaadl/ocarina#132
parent 92057e35
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.10.
.TH OCARINA "1" "mars 2016" "Ocarina 2.0w" "User Commands"
.TH OCARINA "1" "mars 2018" "Ocarina 2017.x" "User Commands"
.SH NAME
Ocarina \- manual page for Ocarina 2.0w
Ocarina \- manual page for Ocarina 2017.x
.SH SYNOPSIS
.B ocarina-config
[\fIOPTIONS\fR]
......
<!-- Creator : groff version 1.19.2 -->
<!-- CreationDate: Fri Mar 4 09:18:49 2016 -->
<!-- CreationDate: Sat Mar 3 22:09:49 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
......@@ -33,7 +33,7 @@
<p style="margin-left:11%; margin-top: 1em">Ocarina &minus;
manual page for Ocarina 2.0w</p>
manual page for Ocarina 2017.x</p>
<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>
......
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.10.
.TH OCARINA "1" "mars 2016" "Ocarina 2.0w (Working Copy from rb472173)" "User Commands"
.TH OCARINA "1" "mars 2018" "Ocarina 2017.x (Working Copy from rc134071)" "User Commands"
.SH NAME
Ocarina \- manual page for Ocarina 2.0w (Working Copy from rb472173)
Ocarina \- manual page for Ocarina 2017.x (Working Copy from rc134071)
.SH SYNOPSIS
.B ocarina
[\fIswitches\fR] \fI<aadl_files>\fR
......@@ -60,6 +60,9 @@ Generate code using Ocarina backend 'ARG'
\fB\-\-list\-backends\fR
List available backends
.TP
\fB\-\-spark2014\fR
Generate SPARK2014 annotations
.TP
\fB\-b\fR
Compile generated code
.TP
......@@ -73,7 +76,7 @@ Set POK flavor (arinc653/deos/pok/vxworks)
Run Ocarina in terminal interactive mode
.TP
\fB\-real_theorem\fR ARG
Name of the main theorem to evaluate
Name of the main REAL theorem to evaluate
.TP
\fB\-real_lib\fR ARG
Add external library of REAL theorems
......@@ -96,7 +99,7 @@ Generate ASN1 deployment file (PolyORB\-HI\-C only)
\fB\-perf\fR
Enable profiling with gprof (PolyORB\-HI\-C only)
.SH COPYRIGHT
Copyright \(co 2003\-2009 Telecom ParisTech, 2010\-2016 ESA & ISAE
Copyright \(co 2003\-2009 Telecom ParisTech, 2010\-2018 ESA & ISAE
Build date:
.SH "SEE ALSO"
The full documentation for
......
<!-- Creator : groff version 1.19.2 -->
<!-- CreationDate: Fri Mar 4 09:18:50 2016 -->
<!-- CreationDate: Sat Mar 3 22:09:49 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
......@@ -34,8 +34,8 @@
<p style="margin-left:11%; margin-top: 1em">Ocarina &minus;
manual page for Ocarina 2.0w (Working Copy from
rb472173)</p>
manual page for Ocarina 2017.x (Working Copy from
rc134071)</p>
<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>
......@@ -270,6 +270,12 @@ Ocarina backend &rsquo;ARG&rsquo;</p></td>
<p style="margin-left:22%;">List available backends</p>
<p style="margin-left:11%;"><b>&minus;&minus;spark2014</b></p>
<p style="margin-left:22%;">Generate SPARK2014
annotations</p>
<table width="100%" border=0 rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
......@@ -337,8 +343,8 @@ terminal interactive mode</p></td>
<p style="margin-left:11%;"><b>&minus;real_theorem</b>
ARG</p>
<p style="margin-left:22%;">Name of the main theorem to
evaluate</p>
<p style="margin-left:22%;">Name of the main REAL theorem
to evaluate</p>
<p style="margin-left:11%;"><b>&minus;real_lib</b> ARG</p>
......@@ -425,7 +431,7 @@ with gprof (PolyORB&minus;HI&minus;C only)</p></td>
<p style="margin-left:11%; margin-top: 1em">Copyright
&copy; 2003&minus;2009 Telecom ParisTech, 2010&minus;2016
&copy; 2003&minus;2009 Telecom ParisTech, 2010&minus;2018
ESA &amp; ISAE Build date:</p>
<a name="SEE ALSO"></a>
......
......@@ -18,11 +18,12 @@ Usage: ocarina [switches] <aadl_files>
-x Parse AADL file as an AADL scenario file
-g ARG Generate code using Ocarina backend 'ARG'
--list-backends List available backends
--spark2014 Generate SPARK2014 annotations
-b Compile generated code
-z Clean code generated
-k ARG Set POK flavor (arinc653/deos/pok/vxworks)
-t Run Ocarina in terminal interactive mode
-real_theorem ARG Name of the main theorem to evaluate
-real_theorem ARG Name of the main REAL theorem to evaluate
-real_lib ARG Add external library of REAL theorems
-real_continue_eval Continue evaluation of REAL theorems after first failure (REAL backend)
-boundt_process ARG Generate .tpo file for process ARG (Bound-T backend)
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2017 ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2018 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- --
......@@ -1289,6 +1289,20 @@ package body Ocarina.Backends.PO_HI_Ada.Mapping is
"Interrogators");
end Map_Interrogators_Name;
-----------------------------
-- Map_Refined_Global_Name --
-----------------------------
function Map_Refined_Global_Name (E : Node_Id) return Node_Id is
begin
pragma Assert (AAU.Is_Thread (E));
Get_Name_String (Map_Interrogators_Name (E));
Add_Char_To_Name_Buffer ('.');
Get_Name_String_And_Append (PN (P_Elaborated_Variables));
return Make_Defining_Identifier (Name_Find, False);
end Map_Refined_Global_Name;
----------------------
-- Map_Deliver_Name --
----------------------
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2018 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- --
......@@ -57,6 +57,8 @@ package Ocarina.Backends.PO_HI_Ada.Mapping is
function Map_Ada_Priority (P : Unsigned_Long_Long) return Node_Id;
-- Maps the given AADL priority into an Ada priority
function Map_Refined_Global_Name (E : Node_Id) return Node_Id;
function Map_Marshallers_Name (E : Node_Id) return Name_Id;
-- Maps a name for the marshallers package instantiation generated
-- for node E.
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2017 ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2018 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- --
......@@ -156,12 +156,14 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is
RE_Error, -- Po..HI.Port_Kinds.Error
RE_Stream_Element_Array, -- Po..HI.Streams.Stream_Element_Array
RE_Stream_Element_Offset, -- Po..HI.Stream_Element_Offset
RE_Write, -- Polyorb_HI.Messages.Write
RE_Header_Size, -- Polyorb_HI.Messages.Header_Size
RE_Message_Type, -- Polyorb_HI.Messages.Message_Type
RE_Reallocate, -- Polyorb_HI.Messages.Reallocate
RE_Sender, -- Polyorb_HI.Messages.Sender
RE_Encapsulate, -- Polyorb_HI.Messages.Encapsulate
RE_Write, -- PolyORB_HI.Messages.Write
RE_Header_Size, -- PolyORB_HI.Messages.Header_Size
RE_Message_Type, -- PolyORB_HI.Messages.Message_Type
RE_Reallocate, -- PolyORB_HI.Messages.Reallocate
RE_Sender, -- PolyORB_HI.Messages.Sender
RE_Encapsulate, -- PolyORB_HI.Messages.Encapsulate
RE_Not_Empty, -- PolyORB_HI.Messages.Not_Empty
RE_Valid, -- PolyORB_HI.Messages.Valid
RE_Naming_Entry, -- PolyORB_HI.Transport.Naming_Entry
RE_To_HI_String, -- PolyORB_HI.Utils.To_HI_String
RE_Naming_Table_Type, -- PolyORB_HI.Utils.Naming_Table_Type
......@@ -258,6 +260,8 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is
RE_Reallocate => RU_PolyORB_HI_Messages,
RE_Sender => RU_PolyORB_HI_Messages,
RE_Encapsulate => RU_PolyORB_HI_Messages,
RE_Not_Empty => RU_PolyORB_HI_Messages,
RE_Valid => RU_PolyORB_HI_Messages,
RE_Naming_Entry => RU_PolyORB_HI_Utils,
RE_To_HI_String => RU_PolyORB_HI_Utils,
RE_Naming_Table_Type => RU_PolyORB_HI_Utils,
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2018 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- --
......@@ -49,6 +49,8 @@ package Ocarina.Backends.PO_HI_Ada is
procedure Set_ASN1_Deployment (Use_It : Boolean);
Add_SPARK2014_Annotations : aliased Boolean := False;
private
Ada_Root : Node_Id;
-- The root of the Ada trees
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2015-2017 ESA & ISAE. --
-- Copyright (C) 2015-2018 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- --
......@@ -48,6 +48,7 @@ with Ocarina.FE_REAL.Parser; use Ocarina.FE_REAL.Parser;
with Ocarina.Scripts; use Ocarina.Scripts;
with Ocarina.Analyzer.REAL; use Ocarina.Analyzer.REAL;
with Ocarina.Backends.POK_C;
with Ocarina.Backends.PO_HI_Ada;
package body Ocarina.Cmd_Line is
......@@ -274,6 +275,13 @@ package body Ocarina.Cmd_Line is
Define_Switch (Ocarina_Options, Long_Switch => "--list-backends",
Help => "List available backends");
-- --spark2014 flag
Define_Switch
(Ocarina_Options,
Ocarina.Backends.PO_HI_Ada.Add_SPARK2014_Annotations'Access,
Long_Switch => "--spark2014",
Help => "Generate SPARK2014 annotations");
-- -b flag
Define_Switch (Ocarina_Options,
Backends.Compile_Generated_Sources'Access, "-b",
......
......@@ -18,6 +18,7 @@ Usage: ocarina [switches] <aadl_files>
-x Parse AADL file as an AADL scenario file
-g ARG Generate code using Ocarina backend 'ARG'
--list-backends List available backends
--spark2014 Generate SPARK2014 annotations
-b Compile generated code
-z Clean code generated
-k ARG Set POK flavor (arinc653/deos/pok/vxworks)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment