Sismic

Latest version: v1.6.8

Safety actively analyzes 682404 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 11

0.21.0

-------------------

Changes for ``interpreter.Interpreter`` class:

- (Removed) ``_select_eventless_transition`` which is a special case of ``_select_transition``.
- (Added) ``_select_event``, extracted from ``execute_once``.
- (Added) ``_filter_transitions``, extracted from ``_select_transition``.
- (Changed) ``_execute_step`` is now ``_apply_step``.
- (Changed) ``_compute_stabilization_step`` is now ``_create_stabilization_step`` and accepts a list of state names
- (Changed) ``_compute_transitions_step`` is now ``_create_steps``.
- (Changed) Except for the ``statechart`` parameter, all the parameters for ``Interpreter``'s constructor can now be
only provided by name.
- (Fixed) Contracts on a transition are checked (if not explicitly disabled) even if the transition has no *action*.
- (Fixed) ``Evaluator.execute_action`` is called even if the transition has no *action*.
- (Fixed) States are added/removed from the active configuration as soon as they are entered/exited.
Previously, the configuration was only updated at the end of the step (and could possibly lead to inaccurate results
when using ``active(name)`` in a ``PythonEvaluator``).

The default ``PythonEvaluator`` class has been completely rewritten:

- (Changed) Code contained in states and/or transitions is now executed with a local context instead of a
global one. The local context of a state is built upon the local context of its parent, and so one until the local
context of the statechart is reached. This should facilitate the use of dummy variables in nested states
and transitions.
- (Changed) The code is now compiled (once) before is evaluation/execution. This should increase performance.
- (Changed) The frozen context of a state (ie. ``__old__``) is now computed only if contracts are checked, and only
if at least one invariant or one postcondition exists.
- (Changed) The ``initial_context`` parameter of ``Evaluator``'s constructor can now only be provided by name.
- (Changed) The ``additional_context`` parameter of ``Evaluator._evaluate_code`` and ``Evaluator._execute_code`` can
now only be provided by name.

Miscellaneous:

- (Fixed) Step *I load the statechart* now executes (once) the statechart in order to put it into a stable
initial configuration (regression introduced in 0.20.0).

0.20.5

-------------------

- (Added) Type hinting (see PEP484 and mypy-lang project)

0.20.4

-------------------

- (Changed) Statechart testers are now called property statechart.
- (Changed) Property statechart can describe *desirable* and *undesirable* properties.

0.20.3

-------------------

- (Changed) Step *Event x should be fired* now checks sent events from the beginning of the test, not only for the last
executed step.
- (Fixed) Internal events that are sequentially sent are now sequentially consumed (and not anymore in reverse order).

0.20.2

-------------------

- (Fixed) ``interpreter.log_trace`` does not anymore log empty macro step.

0.20.1

-------------------

- (Added) A *step ended* event at the end of each step in a tester story.
- (Changed) The name of the events and attributes that are exposed in a tester story has changed.
Consult the documentation for more information.

Page 9 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.