UML&OCL Modeling Languages
OCL Primer (3)
use> ? let u=Tuple{n:'john',a:22} in (u.a>=18) and not (u.n='')
use> \
> ? let
> u1=Tuple{n:'john',a:22},
> u2=Tuple{n:'kate',a:20},
> u=Set{u1,u2}
> in u->collect(a)
> .
> ... How to get the mean age ?
Thus, OCL knows objects (represented by tuples) and classes (i.e. sets of objects).
Now, its more easy to use the GUI (and load pre-defined models as explained later):
let ps=Set{Tuple{n:'john',a:22},Tuple{n:'kate',a:20}},
as=ps->collect(a)
in as->sum()/as->size()
thiry laurent ensisa uha alsace mulhouse france unified modeling modelisation language constraint object objet UML OCL
thiry laurent ensisa uha alsace mulhouse france unified modeling modelisation language constraint object objet UML OCL
thiry laurent ensisa uha alsace mulhouse france unified modeling modelisation language constraint object objet UML OCL
thiry laurent ensisa uha alsace mulhouse france unified modeling modelisation language constraint object objet UML OCL
thiry laurent ensisa uha alsace mulhouse france unified modeling modelisation language constraint object objet UML OCL
thiry laurent ensisa uha alsace mulhouse france unified modeling modelisation language constraint object objet UML OCL
thiry laurent ensisa uha alsace mulhouse france unified modeling modelisation language constraint object objet UML OCL
thiry laurent ensisa uha alsace mulhouse france unified modeling modelisation language constraint object objet UML OCL
thiry laurent ensisa uha alsace mulhouse france unified modeling modelisation language constraint object objet UML OCL
thiry laurent ensisa uha alsace mulhouse france unified modeling modelisation language constraint object objet UML OCL
thiry laurent ensisa uha alsace mulhouse france unified modeling modelisation language constraint object objet UML OCL