mulang icon indicating copy to clipboard operation
mulang copied to clipboard

Add variables to expectations

Open NadiaFinzi opened this issue 6 years ago • 3 comments

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

NadiaFinzi avatar Jul 23 '18 18:07 NadiaFinzi

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:

scratch-proc

With the current tools, we can't define different expectations for this 3 listeners.

luchotc avatar Jan 08 '19 20:01 luchotc

Related to #226

flbulgarelli avatar Feb 04 '19 20:02 flbulgarelli

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);

flbulgarelli avatar Jun 24 '19 22:06 flbulgarelli