pyfcstm.model

Modeling package initialization and explicit public re-exports.

This module aggregates the public classes, functions, and type aliases used by the pyfcstm.model namespace. The re-export surface is explicit so the top-level model API remains easy to inspect and stable for callers.

The following public components are re-exported here:

  • AstExportable - Abstract base class for AST serialization support

  • PlantUMLExportable - Abstract base class for PlantUML serialization support

  • Expr - Base class for model-layer expressions

  • Integer - Integer literal expression

  • Float - Floating-point literal expression

  • Boolean - Boolean literal expression

  • Op - Base class for operator expressions

  • UnaryOp - Unary operator expression

  • BinaryOp - Binary operator expression

  • ConditionalOp - Ternary conditional expression

  • UFunc - Unary mathematical function expression

  • Variable - Variable reference expression

  • parse_expr_node_to_expr() - Convert DSL AST nodes to model expressions

  • parse_expr_from_string() - Parse DSL expression text into model expressions

  • parse_expr() - Unified expression parser

  • OperationStatement - Base class for operation statements

  • Operation - Assignment operation statement

  • IfBlockBranch - Branch inside an if operation block

  • IfBlock - Conditional operation block

  • Event - State-machine event model

  • Transition - State transition model

  • OnStage - Enter/during/exit action model

  • OnAspect - Aspect-oriented during action model

  • State - Hierarchical state model

  • VarDefine - Variable definition model

  • StateMachine - Root state-machine model

  • parse_dsl_node_to_state_machine() - Build a model from DSL AST

  • DetailLevelLiteral - PlantUML detail level literal type

  • PlantUMLOptionsInput - Accepted PlantUML option input type

  • PlantUMLOptions - PlantUML rendering options

  • format_state_name() - Format state labels for PlantUML

  • format_event_name() - Format event labels for PlantUML

  • escape_plantuml_table_cell() - Escape PlantUML legend/table content

  • should_show_action() - Decide whether an action should be rendered

  • format_action_text() - Format action text for PlantUML output

  • collect_event_transitions() - Collect transitions grouped by event

  • assign_event_colors() - Assign PlantUML colors to events

  • load_state_machine_from_file() - Convenience model loader from file

  • load_state_machine_from_text() - Convenience model loader from DSL text

Example:

>>> from pyfcstm.model import (
...     AstExportable,
...     PlantUMLExportable,
...     StateMachine,
...     load_state_machine_from_text,
... )
>>> isinstance(AstExportable(), AstExportable)
True
>>> isinstance(PlantUMLExportable(), PlantUMLExportable)
True
>>> model = load_state_machine_from_text('state Root;')
>>> isinstance(model, StateMachine)
True

__all__

pyfcstm.model.__all__ = ['AstExportable', 'PlantUMLExportable', 'Expr', 'Integer', 'Float', 'Boolean', 'Op', 'UnaryOp', 'BinaryOp', 'ConditionalOp', 'UFunc', 'Variable', 'parse_expr_node_to_expr', 'parse_expr_from_string', 'parse_expr', 'OperationStatement', 'Operation', 'IfBlockBranch', 'IfBlock', 'Event', 'Transition', 'OnStage', 'OnAspect', 'State', 'VarDefine', 'StateMachine', 'parse_dsl_node_to_state_machine', 'DetailLevelLiteral', 'PlantUMLOptionsInput', 'PlantUMLOptions', 'format_state_name', 'format_event_name', 'escape_plantuml_table_cell', 'should_show_action', 'format_action_text', 'collect_event_transitions', 'assign_event_colors', 'load_state_machine_from_file', 'load_state_machine_from_text']

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.