mulang
mulang copied to clipboard
Add variables to expectations
It would be great to be able to add variables on some expectations, to relate them to each other.
For example:
* Declares: $X
$X UsesIf
program Uses: $X
So the user could name the procedure as s/he want.
@flbulgarelli
It would be great to be able to use another inspection as a context for a new one. This would be very useful for Scratch listeners, for example, where it's necessary to check if certain Procedure (or Rule or whatever we decide to use to implement them in Mulang) has some parameters and apply inspections to that context as well.
For example in this case:
With the current tools, we can't define different expectations for this 3 listeners.
Related to #226
With EDL, syntax may look like:
expectation "`Pet` must declare `eat` or `feed`, and someone must send it":
being x like in (`eat`, `feed`):
(within `Pet` declares x) and (somewhere sends x);