rcasteran / jarvis4se

JARVIS for Systems Engineers
https://regis-casteran.gitbook.io/jarvis4se/
MIT License
3 stars 1 forks source link

Consumer declaration between function parent and child #5

Closed rcasteran closed 2 years ago

rcasteran commented 2 years ago

Impacted version jarvis4se version: 1.1.1

Describe the bug When a function child consumes a data, its parent is declared also as a consumer. This is true if the data is produced by a function that is not a child of the same parent. Otherwise it is false.

When a function child produces a data, its parent is declared also as a producer. This is true if the data is consumed by a function that is not a child of the same parent. Otherwise it is false.

To Reproduce Execute the following commands:

%%jarvis
with test
F1 is a function
F1a is a function
F1b is a function
F1c is a function
F1d is a function
F1e is a function
F2 is a function
F3 is a function

F1 is composed of F1a
F1 is composed of F1b
F1 is composed of F1c
F1 is composed of F1d
F1 is composed of F1e

a is a data
F1 produces a
F2 consumes a

F1a produces a
F1b consumes a

b is a data
F1c produces b
F1d consumes b

c is a data
F3 produces c
F1e consumes c

show decomposition F1

Expected behavior F1 is a producer of a (because consumed by F2), but not a consumer (because F1b is one of its children) F1 is not a producer nor a consumer of b (internal data to F1) F1 is a consumer of c (because produced by F3), but not a producer (because F3 is not one of its children)

Screenshots Generated diagram

Desktop (please complete the following information):