|
2 | 2 |
|
3 | 3 | A representation of OCL expression in Java. |
4 | 4 |
|
| 5 | +This table represents a detailed overview of supported Object Constraint Language (OCL) operators in our implementation `OCL2PSQL`. It consists of several categories, in which contains 2 columns: the operator (on the left) and the syntax example (on the right). |
| 6 | + |
| 7 | +##### Class operations |
| 8 | +||| |
| 9 | +|--------------------------|---| |
| 10 | +|`allInstances` | *class*.`allInstances()` | |
| 11 | +|`attributes` | *var*.`att` | |
| 12 | +|`association ends` | *var*.`assoc` | |
| 13 | + |
| 14 | +##### Constants operations |
| 15 | +||| |
| 16 | +|--------------------------|---| |
| 17 | +|`Boolean Literal` | `{TRUE, FALSE}`| |
| 18 | +|`Integer Literal` | `{..., -2, 1, 0, 1, 2, ...}`| |
| 19 | +|`String Literal` | `'string'`| |
| 20 | + |
| 21 | +##### Boolean operations |
| 22 | +||| |
| 23 | +|--------------------------|---| |
| 24 | +|`not` | `NOT` *bool-expr* | |
| 25 | +|`and`, `or`| *bool-expr* `logic-operator` *bool-expr'*| |
| 26 | +| =, <>, >, <, ≥, ≤ | *bool-expr* `compare-operator` *bool-expr'*| |
| 27 | + |
| 28 | +##### Iterative operations |
| 29 | +||| |
| 30 | +|--------------------------|---| |
| 31 | +|`collect` | *source-expr* -> `collect`(*var* | *body-expr*) | |
| 32 | +|`forAll` | *source-expr* -> `forAll`(*var* | *bool-expr*) | |
| 33 | +|`exists` | *source-expr* -> `exists`(*var* | *bool-expr*) | |
| 34 | +|`select` | *source-expr* -> `select`(*var* | *bool-expr*) | |
| 35 | +|`reject` | *source-expr* -> `reject`(*var* | *bool-expr*) | |
| 36 | +|`size` | *source-expr* -> `size()`| |
| 37 | +|`isEmpty` | *source-expr* -> `isEmpty()`| |
| 38 | +|`notEmpty` | *source-expr* -> `notEmpty()`| |
| 39 | +|`isUnique` | *source-expr* -> `isUnique()`| |
| 40 | +|`flatten`[<sup>1</sup>] | *source-expr* -> `flatten()`| |
| 41 | + |
| 42 | +###### [<sup>1</sup>] For the time being, this can operate *ONLY* after the `collect` operation |
| 43 | +[<sup>1</sup>]:#-For |
0 commit comments