PyUseOCL features includes:
- a python-based AST for structural part of “use” models.
The structural content of
.useclass models is made avaible in python in the form of abstract syntax trees. The
pyuseocl.modelAPI provides classes such as
Invariant, etc. PyUseOCL is just based on hand-craft raw surface parser, so the content of operations and invariants is not made available.
an model evaluation API. The result of evaluation
.soilfiles (i.e. object models) against
.usefile (i.e. class model) is made available as a set of python objects (see
support for assertions. Assertions like the following can be added in .soil files as comments:
-- @assert MyClass::MyInvariant1 OK -- @assert MyClass::MyInvariant2 Failed -- @assert MyClass::MyInvariant6 OK
An evaluator is then is available to check which assertions are OK, KO or are failure. If needed, the result is readily available via an API (see
a simple testing framework providing for instance a class