Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
342acd22
Commit
342acd22
authored
Jul 14, 2019
by
Maxime Perrotin
Browse files
Add C code for test case
parent
68ccc86a
Changes
6
Hide whitespace changes
Inline
Side-by-side
templates/concurrency_view/aadl_1_nodes/trigger.tmplt
View file @
342acd22
...
...
@@ -6,4 +6,4 @@
@@-- POHIC
@@-- Debug
@@-- No_Stdlib
TRU
E
FALS
E
templates/concurrency_view/aadl_2_threads/system.tmplt
View file @
342acd22
...
...
@@ -33,7 +33,7 @@ public
@@
END_TABLE
@@
@@--
POHIC
-
only
:
declare
protected
objects
to
have
runtime
mutex
@@
IF
@@
@
_Use_POHIC_
@
@@--
@@
IF
@@
@
_Use_POHIC_
@
data
Taste_Protected
properties
Concurrency_Control_Protocol
=>
Protected_Access
;
...
...
@@ -43,7 +43,7 @@ data implementation Taste_Protected.Object
properties
Concurrency_Control_Protocol
=>
Protected_Access
;
end
Taste_Protected
.
Object
;
@@
END_IF
@@
@@--
@@
END_IF
@@
@
_Nodes_
@
...
...
test/test-cv/Makefile
View file @
342acd22
KAZOO
=
../../kazoo
all
:
test-parse
make
-C
output.ada
cp
obsw.pr output.ada/obsw/SDL/src
make
-C
output.ada
&&
\
cp
input_data/obsw.pr output.ada/obsw/SDL/src
&&
\
cp
input_data/gnc.c output.ada/gnc/C/src
&&
\
cd
output.ada/concurrency_view
&&
\
ocarina
-x
main.aadl
&&
\
make
-f
Makefile.taste
c
:
test-parse-c
#
Polyorb_HI_C output
make
-C
output.pohic
&&
\
cp
obsw.pr output.pohic/obsw/SDL/src
&&
\
cp
input_data/obsw.pr output.pohic/obsw/SDL/src
&&
\
cp
input_data/gnc.c output.pohic/gnc/C/src
&&
\
cd
output.pohic/concurrency_view
&&
\
ocarina
-x
main.aadl
&&
\
make
-f
Makefile.taste
...
...
test/test-cv/input_data/gnc.c
0 → 100644
View file @
342acd22
/* Body file for function GNC
* Generated by TASTE on 2019-07-14 08:11:44
* You can edit this file, it will not be overwritten
* Provided interfaces : guidance
* Required interfaces :
* User-defined properties for this function:
* |_ Taste::Active_Interfaces = any
* |_ Taste::coordinates = 142673 57006 169917 79368
* Timers :
*/
#include
"gnc.h"
#include
<stdio.h>
void
gnc_startup
()
{
// Write your initialisation code, but DO NOT CALL REQUIRED INTERFACES
puts
(
"[GNC] Startup"
);
}
void
gnc_PI_guidance
(
const
asn1SccT_UInt32
*
IN_a
,
asn1SccT_Boolean
*
OUT_result
)
{
puts
(
"[GNC] Guidance function called"
);
*
OUT_result
=
(
42
==
*
IN_a
);
}
test/test-cv/obsw.pr
→
test/test-cv/
input_data/
obsw.pr
View file @
342acd22
/* CIF PROCESS (250, 150), (150, 75) */
process Obsw;
/* CIF TEXT (504, 123), (2
75
, 153) */
/* CIF TEXT (504, 123), (2
82
, 153) */
-- Text area for declarations and comments
dcl p t_boolean;
dcl inp t_uint32 := 42;
/* CIF ENDTEXT */
/* CIF START (320, 10), (70, 35) */
START;
...
...
@@ -13,17 +15,21 @@ process Obsw;
NEXTSTATE Wait;
/* CIF state (320, 115), (70, 35) */
state Wait;
/* CIF input (
235
, 170), (78, 35) */
/* CIF input (
199
, 170), (78, 35) */
input Run(p);
/* CIF output (
231
, 225), (86, 35) */
/* CIF output (
195
, 225), (86, 35) */
output Result(42);
/* CIF NEXTSTATE (23
9
, 275), (70, 35) */
/* CIF NEXTSTATE (2
0
3, 275), (70, 35) */
NEXTSTATE wait;
/* CIF input (369, 170), (70, 35) */
input Pulse;
/* CIF PROCEDURECALL (327, 225), (152, 35) */
call writeln('[SDL] Pulse');
/* CIF NEXTSTATE (369, 280), (70, 35) */
/* CIF PROCEDURECALL (341, 225), (125, 35) */
call guidance (inp, p);
/* CIF PROCEDURECALL (313, 275), (181, 35) */
call writeln('[SDL] Result: ', p);
/* CIF task (291, 330), (224, 35) */
task inp := if inp = 42 then 0 else 42 fi;
/* CIF NEXTSTATE (369, 380), (70, 35) */
NEXTSTATE wait;
endstate;
/* CIF state (450, 10), (70, 35) */
...
...
test/test6/Makefile
View file @
342acd22
...
...
@@ -4,9 +4,7 @@ all: test-parse
cd
output
&&
make
test-parse
:
clean
$(KAZOO)
--gw
\
--debug
\
-o
output
$(KAZOO)
--gw
--debug
-o
output
clean
:
rm
-rf
output
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment