Implemented Language Features
OCL.js implements a subset of the OCL specification. The following sections document all supported expressions, grouped by category.
| Category | Description |
|---|---|
| Collection | Operations on collections: forAll, exists, select, reject, collect, any, and more |
| Context | Context declarations: classifier, operation, and property contexts |
| Expressions | Core expressions: invariants, def, let, if, oclIsTypeOf, and more |
| Gate | Logical operators: and, or, not, xor, implies |
| Literal | Literal value expressions: boolean, number, string, nil |
| Math | Arithmetic operators and functions: +, -, *, /, abs, sqrt, round, and more |
| String | String operations: concat, indexOf, substring, toUpperCase, toLowerCase, and more |