Commit 26af2bc4 authored by Maxime Perrotin's avatar Maxime Perrotin

Add local copies of gpr files from ocarina

Remove dependency on ADA_PROJECT_PATH and use dynamic linking with
Ocarina (default gpr files in Ocarina enfore static linking, but the
build in TASTE is generating shared object)
parent 027ef619
......@@ -32,8 +32,9 @@ ifeq ($(UNAME), Linux)
fi ; \
fi
endif
[ $(ARCH) == 64 ] && EXTRAFLAG="--target=x86_64-linux" ; \
ADA_PROJECT_PATH=`ocarina-config --prefix`/lib/gnat:$$ADA_PROJECT_PATH \
#[ $(ARCH) == 64 ] && EXTRAFLAG="--target=x86_64-linux" ; \
OCARINA_PATH=`ocarina-config --prefix` \
$(gnatpath)gprbuild -x -g $(exec) -p -P aadl_parser.gpr -XBUILD="debug" $$EXTRAFLAG
install:
......@@ -42,8 +43,7 @@ install:
cp taste-aadl-parser `ocarina-config --prefix`/bin/
edit:
ADA_PROJECT_PATH=`ocarina-config --prefix`/lib/gnat:$$ADA_PROJECT_PATH \
gps aadl_parser.gpr
OCARINA_PATH=`ocarina-config --prefix` gps
test:
@$(MAKE) -C test
......
with "ocarina";
with "ocarina/ocarina";
-- with "templates_parser"; -- from libtemplates-parser11.10.1-dev
project AADL_Parser is
......
------------------------------------------------------------------------------
-- --
-- OCARINA COMPONENTS --
-- --
-- O C A R I N A --
-- --
-- P r o j e c t --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 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) --
-- --
------------------------------------------------------------------------------
-- This is the main project file for clients of Ocarina. A client
-- project file should say "with ocarina;", and the ADA_PROJECT_PATH
-- environment variable should be set to point to the directory
-- containing this file.
with "ocarina_core";
with "ocarina_config";
with "ocarina_frontends";
with "ocarina_backends";
with "ocarina_transfo";
project Ocarina is
Home := external ("HOME");
Prefix := external ("OCARINA_PATH", HOME & "/tool-inst/");
for Source_Dirs use (Prefix & "/include/ocarina");
for Object_Dir use Prefix & "/lib/ocarina";
for Externally_Built use "true";
end Ocarina;
------------------------------------------------------------------------------
-- --
-- OCARINA COMPONENTS --
-- --
-- O C A R I N A _ B A C K E N D S --
-- --
-- P r o j e c t --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 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_core";
project Ocarina_Backends is
Home := external ("HOME");
Prefix := external ("OCARINA_PATH", Home & "/tool-inst/");
for Source_files use ();
for Library_Name use "ocarina-backends";
for Library_Dir use Prefix & "/lib";
for Library_Kind use "dynamic";
for Externally_Built use "true";
end Ocarina_Backends;
------------------------------------------------------------------------------
-- --
-- OCARINA COMPONENTS --
-- --
-- O C A R I N A _ C O N F I G --
-- --
-- P r o j e c t --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 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_core";
with "ocarina_frontends";
with "ocarina_backends";
with "ocarina_transfo";
project Ocarina_Config is
Home := external ("HOME");
Prefix := external ("OCARINA_PATH", HOME & "/tool-inst/");
for Source_files use ();
for Library_Name use "ocarina-config";
for Library_Dir use Prefix & "/lib";
for Library_Kind use "dynamic";
for Externally_Built use "true";
end Ocarina_Config;
------------------------------------------------------------------------------
-- --
-- OCARINA COMPONENTS --
-- --
-- O C A R I N A _ C O R E --
-- --
-- P r o j e c t --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 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) --
-- --
------------------------------------------------------------------------------
project Ocarina_Core is
Home := external ("HOME");
Prefix := external ("OCARINA_PATH", HOME & "/tool-inst/");
for Source_files use ();
for Library_Name use "ocarina";
for Library_Dir use Prefix & "/lib";
for Library_Kind use "dynamic";
for Externally_Built use "true";
end Ocarina_Core;
------------------------------------------------------------------------------
-- --
-- OCARINA COMPONENTS --
-- --
-- O C A R I N A _ F R O N T E N D S --
-- --
-- P r o j e c t --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 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_core";
project Ocarina_Frontends is
Home := external ("HOME");
Prefix := external ("OCARINA_PATH", HOME & "/tool-inst/");
for Source_files use ();
for Library_Name use "ocarina-frontends";
for Library_Dir use Prefix & "/lib";
for Library_Kind use "dynamic";
for Externally_Built use "true";
end Ocarina_Frontends;
------------------------------------------------------------------------------
-- --
-- OCARINA COMPONENTS --
-- --
-- O C A R I N A _ T R A N S F O --
-- --
-- P r o j e c t --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 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_core";
with "ocarina_backends";
project Ocarina_Transfo is
Home := external ("HOME");
Prefix := external ("OCARINA_PATH", HOME & "/tool-inst/");
for Source_files use ();
for Library_Name use "ocarina-transfo";
for Library_Dir use Prefix & "/lib";
for Library_Kind use "dynamic";
for Externally_Built use "true";
end Ocarina_Transfo;
......@@ -4,7 +4,6 @@
-- LGPL license, see LICENSE file
pragma Warnings (Off);
with Ada.Strings.Unbounded,
Ada.Characters.Handling,
Ada.Command_Line,
Ada.Text_IO,
Ada.Containers.Indefinite_Vectors,
......@@ -13,26 +12,21 @@ with Ada.Strings.Unbounded,
Locations,
Ocarina.Namet,
Ocarina.Types,
System.Assertions,
Ocarina.Analyzer,
Ocarina.Backends.Properties,
Ocarina.Configuration,
Ocarina.Files,
Ocarina.Options,
Ocarina.Instances,
Ocarina.Instances.Queries,
Ocarina.ME_AADL.AADL_Tree.Nodes,
Ocarina.ME_AADL.AADL_Instances.Entities,
Ocarina.ME_AADL.AADL_Instances.Nodes,
Ocarina.ME_AADL.AADL_Instances.Nutils,
Ocarina.Parser,
Ocarina.FE_AADL.Parser,
Parser_Utils,
Ocarina.Backends.Utils;
Parser_Utils;
use Ada.Strings.Unbounded,
Ada.Text_IO,
Ada.Characters.Handling,
Locations,
Ocarina.Namet,
Ocarina.Types,
......@@ -40,7 +34,6 @@ use Ada.Strings.Unbounded,
Ocarina.Analyzer,
Ocarina.Backends.Properties,
Ocarina.Instances,
Ocarina.Instances.Queries,
Ocarina.ME_AADL,
Ocarina.ME_AADL.AADL_Instances.Entities,
Ocarina.ME_AADL.AADL_Instances.Nodes,
......@@ -51,8 +44,6 @@ use Ada.Strings.Unbounded,
procedure AADL_Parser is
package ATN renames Ocarina.ME_AADL.AADL_Tree.Nodes;
AADL_Language : Name_Id;
Interface_Root : Node_Id := No_Node;
......@@ -62,8 +53,7 @@ procedure AADL_Parser is
OutDir : Integer := 0;
Stack_Val : Integer := 0;
Timer_Resolution : Integer := 0;
Subs : Node_id;
Interface_view : Integer := 0;
Interface_View : Integer := 0;
Concurrency_view : Integer := 0;
Data_View : Integer := 0;
Generate_glue : Boolean := false;
......@@ -73,9 +63,8 @@ procedure AADL_Parser is
procedure Parse_Command_Line;
procedure Process_Deployment_View (My_Root : Node_Id);
-- procedure Process_DataView (My_Root : Node_Id);
procedure Process_Interface_View (My_System : Node_Id);
procedure Browse_Deployment_View_System
(My_System : Node_Id; NodeName : String);
(My_System : Node_Id; NodeName : String) with Unreferenced;
-- Find the bus that is connected to a device through a require
-- access.
......@@ -122,13 +111,6 @@ procedure AADL_Parser is
-- Process_Interface_View --
----------------------------
procedure Process_Interface_View (My_System : Node_Id) is
begin
Exit_On_Error
(No (My_System),
"Internal Error, cannot instantiate model");
-- Set the output directory
-- if OutDir > 0 then
-- C_Set_OutDir (Ada.Command_Line.Argument (Outdir),
......@@ -149,7 +131,6 @@ procedure AADL_Parser is
-- end if;
-- Current_function is read from the list of system subcomponents
end Process_Interface_View;
-----------------------------
-- Process_Deployment_View --
......@@ -311,16 +292,16 @@ procedure AADL_Parser is
procedure Browse_Deployment_View_System
(My_System : Node_Id; NodeName : String) is
Processes : Node_Id;
Processes2 : Node_Id;
Tmp_CI : Node_Id;
Tmp_CI2 : Node_Id;
Ref : Node_Id;
CPU : Node_Id;
CPU_Name : Name_Id := No_Name;
Pkg_Name : Name_Id := No_Name;
CPU_Classifier : Name_Id := No_Name;
CPU_Platform : Supported_Execution_Platform := Platform_None;
-- Processes : Node_Id;
-- Processes2 : Node_Id;
-- Tmp_CI : Node_Id;
-- Tmp_CI2 : Node_Id;
-- Ref : Node_Id;
-- CPU : Node_Id;
-- CPU_Name : Name_Id := No_Name;
-- Pkg_Name : Name_Id := No_Name;
-- CPU_Classifier : Name_Id := No_Name;
-- CPU_Platform : Supported_Execution_Platform := Platform_None;
Conn : Node_Id;
Bound_Bus : Node_Id;
Src_Port : Node_Id;
......@@ -737,7 +718,6 @@ procedure AADL_Parser is
or else Ada.Command_Line.Argument (J) = "-keep-case"
then
Keep_case := true;
null;
elsif Ada.Command_Line.Argument (J) = "--glue"
or else Ada.Command_Line.Argument (J) = "-glue"
......@@ -921,7 +901,7 @@ procedure AADL_Parser is
Set_Str_To_Name_Buffer (Ada.Command_Line.Argument (Data_View));
FN := Ocarina.Files.Search_File (Name_Find);
Exit_On_Error (FN = No_Name, "Cannot find Data View");
Exit_On_Error (FN = No_Name, "[ERROR] Cannot find Data View");
-- C_Set_Dataview
-- (Ada.Command_Line.Argument (Data_View),
-- Ada.Command_Line.Argument (Data_View)'Length);
......@@ -936,7 +916,8 @@ procedure AADL_Parser is
(AADL_Language, Dataview_root, B);
end if;
Exit_On_Error (No (Interface_Root), "Internal error");
Exit_On_Error (No (Interface_Root),
"[ERROR] AADL Parser Internal error");
-- Analyze the tree
......@@ -964,15 +945,9 @@ begin
IV_Root := Root_System (Instantiate_Model (Root => Interface_Root));
AST := AADL_to_Ada_IV (IV_Root);
-- for each of AST.Flat_Functions loop
-- Put_Line ("AST: " & To_String (Each.Full_Prefix.Value_Or (US ("")))
-- & "::" & To_String (Each.Name));
-- end loop;
Debug_Dump_IV (AST);
Process_Interface_View (IV_Root);
-- Now, we are done with the interface view. We now analyze the
-- deployment view.
......
package Parser_Version is
Parser_Release : constant String :=
"f39d2e0 ; Commit Date: Mon Nov 27 13:42:45 2017 ";
"027ef61 ; Commit Date: Mon Nov 27 15:01:23 2017 ";
Ocarina_Version : constant String :=
"Ocarina 2017.x (Working Copy from r0b92ed3)";
end Parser_Version;
\ No newline at end of file
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