pyuseocl.converter¶
Simple converter from canonical USE OCL expression (expressions returned by USE after parsing) to pyalaocl expression. This is currently mostly a draft. The conversion is not fully tested.
Classes
UseOCLConverter |
UseOCLConverter¶
-
class
pyuseocl.converter.
UseOCLConverter
[source]¶ -
useCommand
= 'use'¶
-
iterators
= ('select', 'reject', 'forAll', 'exists', 'one', 'any', 'isUnique', 'closure', 'collect', 'collectNested')¶
-
collectionOperators0
= ('size', 'sum', 'max', 'min', 'asSet', 'asBag', 'asSequence')¶
-
oclExpressionReplacements
= ((' = ', ' == '), (' implies ', ' |implies| '), (' xor ', ' ^ '), (' div ', ' / '), ('->notEmpty', ' is not None'), ('->isEmpty', ' is None'), ('->(size|sum|max|min|asSet|asBag|asSequence)', '.\\1()'), ('->(select|reject|forAll|exists|one|any|isUnique|closure|collect|collectNested)\\(\\$([a-z0-9]+) : \\w+ \\| ', '.\\1(lambda \\2: '), ('\\$e', 'e'), ('\\$(elem[0-9]+)', '\\1'))¶
-