Dear Harald,
Thanks a lot for the answers. I appreciate it, and wish you a good christmas.
Still few things are unclear to me:
1. How to model and use local variables inside runnable?
a. I thought that LocalModelLabels could be used for that but from your reply I understand that these are mainly used for conditions on switches, loops, etc.
b. Should I use Labels for that? If yes, then how to model some basic arithmetic operations, such as var3 = var1 + var2;
2. How to model the read and write of a data from component port, to use it inside a runnable?
a. E.g. int myLocalVar = readDataFromPort(port)
b. I thought that SenderReceiverCommunication (SRC) can be used for that.
i. In Amalthea metamodel, SRC points to Label, but not to port. Interestingly, in APP4MC, it is possible to specify the Port for reading/writing, which would make sense to me. I guess there is some inconsistency. You said there is no relation between components and behavior. However, in app4mc, there is.
For example, based on these questions. I am thinking that SR communication gets data from port and assign it to a Label (and vice versa). And If I add a new element to meta-model, to make an assignment from label to local mode label(and vice versa). Then I can define behavior using Local Mode Labels and local conditions, arithmetic operations as value sources. What do you think?
Thank you and wish you a productive day.
Best regards,
Ibrahim Özcan