|Re: Extending OCL standard library with function returning Sequence(T) [message #491012 is a reply to message #490917]
||Mon, 12 October 2009 19:25
| Ed Willink
Registered: July 2009
Thanks for the enthusiastic response.
The prototype is probably fairly easy. Java provides good regexp
functionality, that just needs invoking appropriately.
The original Issue 10561 was
"The Object Constraint Language (OCL) is an integral part of the Unified
Modeling Language (UML) and is often used separately as a general
constraint specification language in software development tools. For
example, OCL is incorporated in the Generic Modeling Environment (GME)
developed by the Institute of Software Integrated Systems (ISIS) of
Vanderbilt University (http://www.isis.vanderbilt.edu/default.asp The
GME implementation extends the OCL standard to include Regular
Expressions. A Regular Expression is a pattern that describes (or
matches) a set of strings where the pattern is itself a string and
conforms to a specific syntax. Regular Expressions are ideal for
expressing format constraints on OCL String values. Moreover, Regular
Expressions are widely used, familiar to many software developers and
complement the OCL’s already powerful constraint specification syntax.
Unfortunately, Regular Expressions are not currently supported in OCL
Version 2.0. Augmenting the OCL standard with Regular Expressions will
improve OCL’s constraint specification capabilities for String values
with a powerful, familiar notation and would also codify existing
practice as manifested in tools such as GME. Please consider the
inclusion of Regular Expression support in future releases of the Object
Constraint Language (OCL) specification."
The main task is to propose how OCL should be extended to support regex.
?? library functions, ?? new operators, ?? I haven't read the
GME reference so maybe they've solved it.
Once you have an elegant way to access regex you need to determine
how/if it reacts with other language features, e.g. regex of an Integer,
OrderedSet(String), Tuple, ... internationalisation, ..
Finally you (well someone) need to write the revised specification.
This requires some "replace .... by .... " instructions.
is an example. The OCL spec is now an Open Office document, so use
of Open Office makes cut and paste easier.
[You don't have to do everything; if you get far enough you may motivate
someone else to finish off.]
Pierre Gaufillet wrote:
> Hi Ed,
> I'll be pleased to help.
> Please send me an example of such a specification/prototype and I will
> complete it.
>> Hi Pierre
>> Provision of regex has been raised as OCL Issue 10561 and was
>> enthusiastically received. We just need a specification and a
>> prototype. If you have anything that you can contribute we may
>> be able to make some progress and have regex for OCL 2.3.
>> Ed Willink
Powered by FUDForum
. Page generated in 0.02114 seconds