stormvogel.stormpy_utils.magic

Cell magic for writing models directly in notebooks.

Attributes

Functions

parse_program(line, cell, parser_function, name)

Parse a program using stormpy.

prism(line, cell)

Parse a PRISM program from a notebook cell.

jani(line, cell)

Parse a JANI model from a notebook cell.

Module Contents

stormvogel.stormpy_utils.magic.stormpy = None
stormvogel.stormpy_utils.magic.parse_program(line, cell, parser_function, name)

Parse a program using stormpy.

Parameters:
  • line – The IPython magic line argument (variable name to store result).

  • cell – The cell content containing the program source.

  • parser_function – The stormpy parser function to use.

  • name – The magic command name (for error messages).

Returns:

The parsed program.

stormvogel.stormpy_utils.magic.prism(line, cell)

Parse a PRISM program from a notebook cell.

Parameters:
  • line – The variable name to store the parsed program.

  • cell – The cell content containing PRISM code.

Returns:

The parsed PRISM program.

stormvogel.stormpy_utils.magic.jani(line, cell)

Parse a JANI model from a notebook cell.

Parameters:
  • line – The variable name to store the parsed model.

  • cell – The cell content containing JANI code.

Returns:

The parsed JANI model.