VerbalizePatterns

This page can be downloaded from the MDrivenDesigner and act as patterns for verbalization of OCL expressions. Divider between pattern and translation is 3 stars padded by a space.

STARTMARKER

[SELF:<NAME>:<T>] *** From the current context (of type <T> )

[MULTI:<NAME>:<COLLECTION(T)>] *** take the multilink named <NAME> that holds objects of type <T>

[ITERATION:select:<LOOPVARNAME>:<LOOPVARTYPE>:(<ARG_1>):<COLLECTION(T)>] *** filter the list by going over all objects, in each iteration we call the current object <LOOPVARNAME> and check <ARG_1> - keep the objects that evaluate to true - the result is a reduced list of objects of <T>

[ITERATION:<NAME>:<LOOPVARNAME>:<LOOPVARTYPE>:(<ARG_1>):<COLLECTION(T)>]

[LOOPVAR:<NAME>:<LOOPVARNAME>:<T>] *** current object of iteration <LOOPVARNAME> of type <T>

[ATTRIBUTE:<NAME>:<T>] *** take the attribut <NAME> that has the type <T>

[OPERATION:>:(<ARG_1>):<T>] *** if it is larger (>) than <ARG_1>

[OPERATION:<:(<ARG_1>):<T>] *** check if it is smaller (<) than <ARG_1>

[OPERATION:or:(<ARG_1>):<T>] *** or (or) the following is true: <ARG_1>

[CONST:<NAME>:<CONSTVALUE>:<T>] *** <CONSTVALUE> (of type <T>)

[TYPE:<NAME>:<T>] *** From type <NAME>

[OPERATION:<NAME>:(<ARG_1>):<T>] *** apply operation <NAME> with argument <ARG_1>, it will return a value of type <T>

[VAR:<NAME>:System.Boolean] *** value of <NAME>

[VAR:<NAME>:<T>] *** value of <NAME>

[VAR:<NAME>:<COLLECTION(T)>] *** <NAME> is a list of <T> objects

[OPERATION:if:(<ARG_1>,<ARG_2>):<T>] *** if true then <ARG_1> else <ARG_2>

[OPERATION::=:(<ARG_1>):<T>] *** and assign it to the result of <ARG_1>

[OPERATION:=:(<ARG_1>):<T>] *** and check if it is equal to <ARG_1>

[OPERATION:;:(<ARG_1>):<T>] *** . <ARG_1>

[LET:<NAME>:<LOOPVARTYPE>:<LETASSIGNEXP>:<LETACTEXP>:<T>] *** let <NAME> represent the result of <LETASSIGNEXP> in this expression <LETACTEXP>

This page was edited 47 days ago on 02/10/2024. What links here