RFC-0042 @@fsm — Conformance Test Coverage

Auto-generated map from the RFC’s *Validation Tests section to the backing tests in framec/src.*
Enforced by framec/tests/fsm_conformance_coverage.rs — the build fails if any ✅ ID below loses its backing test.

Summary

  • 91 RFC conformance IDs
  • 89 backed by an executing test
  • 2 documented deferrals (see end)

Runtime tests (codegen/fsm_python.rs, pipeline/compiler.rs) generate recognizer source and execute it through python3, asserting accepted/return_value/cursor. Front-end tests (fsm_parser/fsm_validator/fsm_regex) assert parse results and diagnostic codes. The Python backend is the reference; the other 16 backends have their own fsm_<lang>.rs execution tests.

Construction and structure (§3)

ID Title Backing test(s) Status
FSM-TEST-001 Minimal fsm compiles fsm_test_001_minimal (codegen/fsm_python.rs)
fsm_block_emitted_python_runs (pipeline/compiler.rs)
FSM-TEST-002 Missing return type rejected fsm_test_002_matched_builtin (codegen/fsm_python.rs)
FSM-TEST-003 Missing default rejected e705_missing_default (fsm_parser/mod.rs)
FSM-TEST-004 Implicit start state with one match call_with_probe_arg (fsm_parser/mod.rs)
call_expression_parses_via_child (fsm_parser/mod.rs)
FSM-TEST-005 Auto-domain field accessible as self.text fsm_test_005_self_text (codegen/fsm_python.rs)
FSM-TEST-006 Explicit labeled state with transition fsm_test_006_transitions (codegen/fsm_python.rs)
rust_transitions_and_capture (codegen/fsm_rust.rs)
FSM-TEST-007 Stage label and capture fsm_test_007_capture (codegen/fsm_python.rs)
stage_label_and_capture_ref (fsm_parser/mod.rs)
FSM-TEST-008 Unlabeled state cannot be referenced e704_capture_ref_unlabeled_state (fsm_validator/mod.rs)
FSM-TEST-009 State-arg sigil rejected in fsm header e701_sigil_in_header (fsm_parser/mod.rs)
FSM-TEST-010 Input parameter type validation e713_bad_input_type (fsm_validator/mod.rs)
FSM-TEST-011 Explicit override of parameter-derived domain field domain_default_expression (fsm_parser/mod.rs)
FSM-TEST-012 Type mismatch in explicit redeclaration e707_domain_param_type_mismatch (fsm_validator/mod.rs)
FSM-TEST-013 Two consecutive unlabeled states rejected e704_second_unlabeled_state (fsm_validator/mod.rs)
FSM-TEST-014 Numeric label valid fsm_test_014_numeric_label_valid (fsm_parser/mod.rs)

Block ordering (§3.3)

ID Title Backing test(s) Status
FSM-TEST-020 Canonical order compiles fsm_test_020_canonical_order_compiles (fsm_parser/mod.rs)
FSM-TEST-021 Domain before states rejected e710_domain_before_actions (fsm_parser/mod.rs)
FSM-TEST-022 Actions before states rejected e710_state_after_block (fsm_parser/mod.rs)
FSM-TEST-023 Duplicate domain block rejected e711_duplicate_domain (fsm_parser/mod.rs)

Frame statement syntax (§3.6)

ID Title Backing test(s) Status
FSM-TEST-030 Multi-statement block with semicolons fsm_test_030_action_block_semicolons (codegen/fsm_python.rs)
fsm_test_030_full (fsm_parser/mod.rs)
FSM-TEST-031 Multi-statement block whitespace-separated fsm_test_031_action_block_whitespace (codegen/fsm_python.rs)
FSM-TEST-032 If/else statement fsm_test_032_if_else (codegen/fsm_python.rs)
action_block_if_else (fsm_parser/mod.rs)
FSM-TEST-033 Bare name does not refer to domain e703_bare_name_not_domain (fsm_validator/mod.rs)

Typing and variable scope (§4.1, §4.2)

ID Title Backing test(s) Status
FSM-TEST-100 Undeclared variable read e703_undeclared_read (fsm_validator/mod.rs)
e704_undeclared_write (fsm_validator/mod.rs)
FSM-TEST-101 Undeclared variable write e704_undeclared_write (fsm_validator/mod.rs)
FSM-TEST-102 Type mismatch on bare-expression @@:return deferred — E706 return-type mismatch — no @@fsm type system in v0.1
FSM-TEST-103 Domain field initializer references parameter fsm_test_103_domain_init_references_param (fsm_validator/mod.rs)
FSM-TEST-104 Domain variable missing initializer e705_domain_field_no_initializer (fsm_parser/mod.rs)
FSM-TEST-105 Parameter accessible as self.name in body relational_with_call_and_member (fsm_parser/mod.rs)

Actions section (§3.7)

ID Title Backing test(s) Status
FSM-TEST-120 Action callable from match fsm_test_120_action_callable (codegen/fsm_python.rs)
FSM-TEST-121 Action with domain access fsm_test_121_action_domain_access (codegen/fsm_python.rs)
action_block_call_statement (fsm_parser/mod.rs)
FSM-TEST-122 Transition in action rejected e712_transition_in_action_body (fsm_parser/mod.rs)
FSM-TEST-123 Action callable from embedding action fsm_test_123_every_transition_embed (codegen/fsm_python.rs)
rust_embed_every_transition (codegen/fsm_rust.rs)

Match and exhaustiveness (§4.3)

ID Title Backing test(s) Status
FSM-TEST-200 Failable match without failure_branch rejected e701_fallible_match_without_failure_branch (fsm_validator/mod.rs)
FSM-TEST-201 Unfailable match without failure_branch allowed e701_not_fired_for_nullable_match (fsm_validator/mod.rs)
FSM-TEST-202 Explicit failure branch fsm_test_400_static_transitions (codegen/fsm_python.rs)
FSM-TEST-203 Terminal match without transition fsm_test_001_minimal (codegen/fsm_python.rs)

Alphabets (§6.1)

ID Title Backing test(s) Status
FSM-TEST-250 Byte alphabet fsm_test_250_byte_alphabet (fsm_regex/mod.rs)
FSM-TEST-251 Char alphabet e713_accepts_char_and_token (fsm_validator/mod.rs)
FSM-TEST-252 Char alphabet rejects byte escape fsm_test_252_char_rejects_byte_escape (fsm_regex/mod.rs)
FSM-TEST-253 Token alphabet fsm_test_253_token_alphabet (codegen/fsm_python.rs)
e713_accepts_char_and_token (fsm_validator/mod.rs)
FSM-TEST-254 Token alphabet rejects character class fsm_test_254_token_rejects_char_class (fsm_regex/mod.rs)

Regex dialect (§6)

ID Title Backing test(s) Status
FSM-TEST-300 Backreference rejected fsm_test_300_backreference_rejected (fsm_regex/mod.rs)
FSM-TEST-301 Recursion rejected fsm_test_301_recursion_rejected (fsm_regex/mod.rs)
FSM-TEST-302 Lookahead rejected fsm_test_302_lookahead_rejected (fsm_regex/mod.rs)
FSM-TEST-303 Character class compiles fsm_test_303_character_class_compiles (fsm_regex/mod.rs)
FSM-TEST-304 Alternation precedence fsm_test_304_alternation_precedence (codegen/fsm_python.rs)
FSM-TEST-305 Bounded repetition fsm_test_305_bounded_repetition_compiles (fsm_regex/mod.rs)
FSM-TEST-306 Greedy quantifier semantics fsm_test_306b_lazy_quantifier_rejected (fsm_regex/mod.rs)
FSM-TEST-307 Unicode class requires opt-in e720_unicode_class_requires_optin (fsm_validator/mod.rs)
fsm_unicode_class (codegen/fsm_python.rs)
FSM-TEST-309 Escaped slash literal regex_escaped_slash (fsm_parser/mod.rs)
FSM-TEST-310 Empty regex rejected rejects_empty_with_e723 (fsm_regex/mod.rs)
FSM-TEST-311 DFA size limit e721_when_dfa_exceeds_limit (fsm_regex/mod.rs)
FSM-TEST-312 Anchors fsm_test_312_start_anchor (codegen/fsm_python.rs)
rust_start_anchor (codegen/fsm_rust.rs)
FSM-TEST-313 Interior anchor (Pike VM) interior_anchor_runs_on_pike_vm (codegen/fsm_python.rs)
rust_interior_anchor_runs_on_pike_vm (codegen/fsm_rust.rs)
FSM-TEST-314 Word boundary on char (Pike VM) word_boundary_runs_on_pike_vm (codegen/fsm_python.rs)
rust_word_boundary_runs_on_pike_vm (codegen/fsm_rust.rs)
FSM-TEST-315 Inline flags (?i)/(?s)/(?m) inline_flag_caseless/inline_flag_dotall/inline_flag_multiline/inline_flag_scoped (codegen/fsm_python.rs)
rust_inline_flags (codegen/fsm_rust.rs)
inline_flag_* (fsm_regex/parser.rs)

Transitions and targets (§3.5.4, §4.4)

ID Title Backing test(s) Status
FSM-TEST-400 Static transition fsm_test_400_static_transitions (codegen/fsm_python.rs)
states_and_transitions (fsm_parser/mod.rs)
FSM-TEST-401 Stage-address transition target fsm_test_401_stage_ref_target (codegen/fsm_python.rs)
stage_ref_transition_target (fsm_parser/mod.rs)
FSM-TEST-402 Conditional target fsm_test_402_conditional_target (codegen/fsm_python.rs)
rust_conditional_target (codegen/fsm_rust.rs)
FSM-TEST-403 Reference to undeclared state e731_undeclared_state (fsm_validator/mod.rs)
FSM-TEST-404 Reference to undeclared stage e732_undeclared_stage (fsm_validator/mod.rs)
FSM-TEST-405 Conditional with no matching condition warns w701_conditional_without_failure (fsm_validator/mod.rs)
FSM-TEST-406 Missing when guard on cond_alt rejected conditional_missing_when_errors (fsm_parser/mod.rs)
FSM-TEST-407 Constant-true when guard warns w705_constant_true_when (fsm_validator/mod.rs)

Runtime semantics (§5)

ID Title Backing test(s) Status
FSM-TEST-500 Construction with full match fsm_test_006_transitions (codegen/fsm_python.rs)
FSM-TEST-501 Construction with no match fsm_test_002_matched_builtin (codegen/fsm_python.rs)
FSM-TEST-502 Cursor advances on match fsm_test_007_capture (codegen/fsm_python.rs)
FSM-TEST-503 Stage capture exposes matched bytes fsm_test_007_capture (codegen/fsm_python.rs)
FSM-TEST-504 Input parameter accessible as self. fsm_test_005_self_text (codegen/fsm_python.rs)

Embedding actions (§3.5.5)

ID Title Backing test(s) Status
FSM-TEST-600 Entry and per-element actions embed_start_captures_entry_cursor (codegen/fsm_python.rs)
FSM-TEST-601 Final-state action embed_accept_fires_on_accepting_states (codegen/fsm_python.rs)
FSM-TEST-602 EOF action fsm_test_602_eof_action (codegen/fsm_python.rs)
FSM-TEST-603 Leave-final action fsm_test_603_leave_final_action (codegen/fsm_python.rs)
rust_embed_leave_final (codegen/fsm_rust.rs)

Composition (§8)

ID Title Backing test(s) Status
FSM-TEST-700 Mode C composition fsm_mode_c_call_out (pipeline/compiler.rs)
fsm_mode_c_chained (pipeline/compiler.rs)
FSM-TEST-701 Mode C bytes-and-return fsm_mode_c_call_out (pipeline/compiler.rs)
FSM-TEST-702 Mode C type mismatch deferred — E706 Mode C type mismatch — no @@fsm type system in v0.1
FSM-TEST-703 Mode C alphabet mismatch e731_mode_c_alphabet_mismatch (fsm_validator/mod.rs)
FSM-TEST-704 Mode C dynamic dispatch rejected e732_mode_c_dynamic_dispatch (fsm_validator/mod.rs)

Edge cases

ID Title Backing test(s) Status
FSM-TEST-1000 Empty input fsm_test_001_minimal (codegen/fsm_python.rs)
FSM-TEST-1001 Input exactly matching fsm_test_001_minimal (codegen/fsm_python.rs)
FSM-TEST-1002 Input longer than match fsm_test_007_capture (codegen/fsm_python.rs)
FSM-TEST-1003 Input strictly prefix of match fsm_test_1003_prefix_of_match_rejected (codegen/fsm_python.rs)
FSM-TEST-1004 Anchored match with leading non-match fsm_test_312_start_anchor (codegen/fsm_python.rs)
FSM-TEST-1005 Zero-length match fsm_test_1005_zero_length_match (codegen/fsm_python.rs)
FSM-TEST-1006 @@:matched before any stage completes fsm_test_1006_matched_before_stage (codegen/fsm_python.rs)

Additional diagnostic coverage

ID Title Backing test(s) Status
FSM-TEST-1100 Malformed declaration (missing fsm name) fsm_test_1100_missing_name (fsm_parser/mod.rs)
generic_error_is_e700 (fsm_parser/mod.rs)
FSM-TEST-1101 Malformed declaration (missing body braces) fsm_test_1101_missing_body_braces (fsm_parser/mod.rs)
generic_error_is_e700 (fsm_parser/mod.rs)
FSM-TEST-1102 Stage label collision within a state e730_duplicate_stage_label (fsm_validator/mod.rs)
FSM-TEST-1103 Unused parameter warning w702_unused_parameter (fsm_validator/mod.rs)
FSM-TEST-1104 Unused domain variable warning w703_unused_domain_field (fsm_validator/mod.rs)
FSM-TEST-1105 DFA size approaching limit warning (module reference) (fsm_regex/size_check.rs)

Deferrals (tracked in the enforcement allowlist)

These 2 IDs have no backing test by design; each is an explicit, justified entry in the allowlist so it stays visible rather than silently uncovered. Both require an @@fsm-level type system, which v0.1 deliberately omits (type errors are deferred to the host language’s compiler).

ID Reason
FSM-TEST-102 E706 return-type mismatch — no @@fsm type system in v0.1
FSM-TEST-702 E706 Mode C type mismatch — no @@fsm type system in v0.1

Running the tests

cargo test --lib fsm                        # all @@fsm unit + execution tests (500)
cargo test --test fsm_conformance_coverage  # the coverage guard
cargo test                                  # full suite (1259 tests)