Open ChuckLutz opened 6 months ago
Hello again,
I note that, given that the "factorial" example is still loaded AND the object "r" of type "Rec" exists, then entering "r.fac(3)" in the "Evaluate OCL expression" window, it does work ("Result:" shows "6 : Integer"). I am able to click the "Browser" button in tat dialog to see the entire nested call tree.
Trying to generate a sequence diagram at the same time, however, does not produce anything. Thanks, Chuck
Hi Chuck, I'm glad to hear you like USE.
There are different ways to define operations in USE:
Side-effect free query operations
These are the operations defined by an OCL expression, like fac
in the example. These oeprations can directly be called from other OCl expressions (like it is done in the post condition) or using the query command (startet with ? on the shell or entered directly in the OCL evaluation window.
Called query operations to not show up in the sequence diagram. Maybe this should be changed in future releases.
Operations with side-effects without a body
These operations are "simulated" by the commands !openter
and opexit
. Here concrete scenarios can be "executed" by changing the system state with commands like set
, create
, delete
, ...
The operations "called" this way show up in the sequence diagram.
Operations with side-effects with a body These operations can be defined using s tiny imperative language called SOIL.
However, adding the possibility to show query operations in the sequence diagram might be a good idea. But I see some challenges:
!?
or something like this.
Hi folks, I am new to USE and working through the manual's examples. I think it is a fantastic tool!
Describe the bug I am trying to work through the "Nested Operation Calls" portion of the manual, and USE is reporting an error that seems to indicate a new limitation (perhaps) or (hopefully) implies that there is some new way to invoke operations that are defined as OCL expressions.
To Reproduce Steps to reproduce the behavior:
Expected behavior The command line should show something similar to "precondition `pre1' is true" as shown in the link from step 2 above.
Desktop (please complete the following information):
Additional context The source line showing the error appears to be here, but I didn't see any immediate hint pointing to how I should instead have tried to invoke the operation.