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 supportPlantUMLExportable- Abstract base class for PlantUML serialization supportExpr- Base class for model-layer expressionsInteger- Integer literal expressionFloat- Floating-point literal expressionBoolean- Boolean literal expressionOp- Base class for operator expressionsUnaryOp- Unary operator expressionBinaryOp- Binary operator expressionConditionalOp- Ternary conditional expressionUFunc- Unary mathematical function expressionVariable- Variable reference expressionparse_expr_node_to_expr()- Convert DSL AST nodes to model expressionsparse_expr_from_string()- Parse DSL expression text into model expressionsparse_expr()- Unified expression parserOperationStatement- Base class for operation statementsOperation- Assignment operation statementIfBlockBranch- Branch inside anifoperation blockIfBlock- Conditional operation blockEvent- State-machine event modelTransition- State transition modelOnStage- Enter/during/exit action modelOnAspect- Aspect-oriented during action modelState- Hierarchical state modelVarDefine- Variable definition modelStateMachine- Root state-machine modelparse_dsl_node_to_state_machine()- Build a model from DSL ASTDetailLevelLiteral- PlantUML detail level literal typePlantUMLOptionsInput- Accepted PlantUML option input typePlantUMLOptions- PlantUML rendering optionsformat_state_name()- Format state labels for PlantUMLformat_event_name()- Format event labels for PlantUMLescape_plantuml_table_cell()- Escape PlantUML legend/table contentshould_show_action()- Decide whether an action should be renderedformat_action_text()- Format action text for PlantUML outputcollect_event_transitions()- Collect transitions grouped by eventassign_event_colors()- Assign PlantUML colors to eventsload_state_machine_from_file()- Convenience model loader from fileload_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
- pyfcstm.model.base
- pyfcstm.model.expr
- pyfcstm.model.imports
- pyfcstm.model.load
- pyfcstm.model.model
- pyfcstm.model.plantuml
__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.