How to use EType "Sequence" [message #633954] |
Tue, 19 October 2010 23:36  |
Eclipse User |
|
|
|
I design a stack.ecore and stack.ocl.
stack.ocl showing~
context Stack:: Stack():
post: stack = Sequence{}
context Stack::push(element: Integer):
post: stack = stack@pre->prepend(element)
context Stack::pop():
pre: stack@pre->size() > 0
post: stack = stack@pre->
subSequence(2, stack@pre->size())
context Stack::peek(): Integer
pre: stack@pre->size() > 0
post: result = stack@pre->first()
context Stack::size(): Integer
post: result = stack@pre->size()
and then i want to finish stack.ecore
i suddenly found ecore has no EType "Sequence"
i look for Package org.eclipse.ocl.ecore
it reallys had "SequenceType"
or how to extend it. thanks a lot
hutzu
|
|
|
|
Powered by
FUDForum. Page generated in 0.05220 seconds