From c93ff8a1b8ec7ecddf4ce3597a2e6849457b34b2 Mon Sep 17 00:00:00 2001 From: Maxime Perrotin Date: Fri, 6 Sep 2019 10:38:33 +0100 Subject: [PATCH] Don't generate a thread for unconnected PIs --- src/taste-aadl_parser.adb | 11 +++++++++++ test/test6/InterfaceView.aadl | 4 ++-- test/test6/Makefile | 5 ++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/taste-aadl_parser.adb b/src/taste-aadl_parser.adb index c02c6a5..c0821aa 100644 --- a/src/taste-aadl_parser.adb +++ b/src/taste-aadl_parser.adb @@ -429,6 +429,16 @@ package body TASTE.AADL_Parser is end if; for PI of F.Provided loop + -- Ignore interfaces that are not called by anyone + if PI.RCM /= Cyclic_Operation + and PI.Remote_Interfaces.Length = 0 + then + Put_Info ("Ignoring unconnected interface " + & To_String (PI.Name) & " in function " + & To_String (F.Name)); + goto next_pi; + end if; + declare New_PI : Protected_Block_PI := (Name => PI.Name, PI => PI, @@ -482,6 +492,7 @@ package body TASTE.AADL_Parser is New_Item => Thread); end; end if; + <> end loop; Block.Required := F.Required; -- Add the block to the Concurrency View diff --git a/test/test6/InterfaceView.aadl b/test/test6/InterfaceView.aadl index f59f59b..99f6ace 100644 --- a/test/test6/InterfaceView.aadl +++ b/test/test6/InterfaceView.aadl @@ -475,8 +475,8 @@ SYSTEM GUI FEATURES PI_update_positions : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::GUI::PI_update_positions.others { Taste::coordinates => "221993 82276"; - Taste::RCMoperationKind => unprotected; - Taste::RCMperiod => 0 ms; + Taste::RCMoperationKind => cyclic; + Taste::RCMperiod => 1000 ms; Taste::Deadline => 0 ms; Taste::InterfaceName => "update_positions"; }; diff --git a/test/test6/Makefile b/test/test6/Makefile index f871aaa..a0d04b2 100644 --- a/test/test6/Makefile +++ b/test/test6/Makefile @@ -4,7 +4,10 @@ all: test-parse $(MAKE) -C output.pohic test-parse: clean - $(KAZOO) --gw -p --debug --glue -o output.pohic + $(KAZOO) --gw -p --glue -o output.pohic + +buildsupport_pohic: + buildsupport -o output.buildsupport.pohic -p --aadlv2 --glue -i InterfaceView.aadl -c DeploymentView.aadl -d DataView.aadl ../common/ocarina_components.aadl ../common/TASTE_IV_Properties.aadl ../common/TASTE_DV_Properties.aadl clean: rm -rf output -- GitLab