pyfcstm.bmc.errors
Exception hierarchy for FCSTM bounded model checking queries.
The BMC package keeps query, encoding, and construction failures separate from
parser, solver, and verification-registry concerns. These exceptions are plain
Python errors with stable names so later parser, binder, engine, and adapter
layers can raise structured failures without importing pyfcstm.verify.
Design contracts:
Error classes are intentionally thin and stable so parser, binder, engine, and adapter layers can share them without coupling to each other.
BmcQueryParseErroris reserved for syntax-facing failures before a well-formed query object exists.InvalidBmcQueryremains the structural query-model validation error after AST objects are being built.Query data-model validation uses these BMC-specific exceptions for structural failures, while expression category mix-ups still use normal Python type errors where that is more precise.
The module contains:
BmcError- Base class for all BMC-specific errors.BmcQueryParseError- Syntax, lexical, entry-point, or parse-tree construction error.InvalidBmcQuery- Query model or semantic-query validation error.UnsupportedBmcQuery- Well-formed query that this implementation deliberately does not support yet.InvalidBmcEncoding- Invalid symbolic encoding construction error.InvalidBmcDomain- Invalid BMC model-domain construction error.BmcBuildError- General BMC build or preparation error.
Example:
>>> from pyfcstm.bmc.errors import BmcError, InvalidBmcQuery
>>> try:
... raise InvalidBmcQuery("bad bound")
... except BmcError as err:
... str(err)
'bad bound'
__all__
- pyfcstm.bmc.errors.__all__ = ['BmcError', 'BmcQueryParseError', 'InvalidBmcQuery', 'UnsupportedBmcQuery', 'InvalidBmcEncoding', 'InvalidBmcDomain', 'BmcBuildError']
Built-in mutable sequence.
If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.
BmcError
BmcQueryParseError
- class pyfcstm.bmc.errors.BmcQueryParseError[source]
Raised when
.fbmcqtext or parse trees cannot build BMC AST nodes.This exception covers lexical syntax diagnostics, parser syntax diagnostics, unfinished parsing, unknown text entry points, and parse-tree roots that the listener did not map to a BMC AST object. It deliberately does not cover model-aware validation or query structural validation, which use
InvalidBmcQuery.- Parameters:
message (str) – Human-readable parse failure message.
Example:
>>> err = BmcQueryParseError("syntax error") >>> isinstance(err, BmcError) True