Features¶
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. Thepyuseocl.modelAPI provides classes such asClass,Attribute,Association,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 (seepyuseocl.evaluation).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
pyuseocl.assertion)a simple testing framework providing for instance a class
TestSuite.