FAILURE MAP
← Case archive

FA-3421 / Lexical grammars / Open access

A dotted name admits empty identifiers · case 01

A dotted name admits empty identifiers.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The recognizer uses '[A-Za-z0-9_.]+', which admits or omits a token shape forbidden by the stated grammar.

VERIFIED REPAIR

Implement the complete stated contract, including the boundary fixtures: Accept dot-separated ASCII identifiers, each starting with letter or underscore.

Unsuccessful approach: The candidate grammar '[A-Za-z_][A-Za-z0-9_.]*' still disagrees with the explicit boundary fixtures.

Case contract

Accept dot-separated ASCII identifiers, each starting with letter or underscore.

Why this case matters

A local executable model for consumers of structured text; oracle values are authored literals, not outputs copied from the repaired implementation.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        return bool(re.fullmatch('[A-Za-z0-9_.]+',x))
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('a..b'), False)
check('boundary 2', solve('a.1'), False)
check('boundary 3', solve('_a.b2'), True)
check('boundary 4', solve('a'), True)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
boundary 1TrueFalseFailed
boundary 2TrueFalseFailed
boundary 3TrueTruePassed
boundary 4TrueTruePassed

SHA-256 / 00c0ac60437b507525ee26f6b5d3d89ac219978be625e2b4c15c156a0c6918fc

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        return bool(re.fullmatch('[A-Za-z_][A-Za-z0-9_.]*',x))
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('a..b'), False)
check('boundary 2', solve('a.1'), False)
check('boundary 3', solve('_a.b2'), True)
check('boundary 4', solve('a'), True)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
boundary 1TrueFalseFailed
boundary 2TrueFalseFailed
boundary 3TrueTruePassed
boundary 4TrueTruePassed

SHA-256 / 14cef15e0fd6651ce184a9c57780d0bda6b472a50f6b6818664f14697b228f4c

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        return bool(re.fullmatch('[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*',x))
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('a..b'), False)
check('boundary 2', solve('a.1'), False)
check('boundary 3', solve('_a.b2'), True)
check('boundary 4', solve('a'), True)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
boundary 1FalseFalsePassed
boundary 2FalseFalsePassed
boundary 3TrueTruePassed
boundary 4TrueTruePassed

SHA-256 / 9800a03a81f68fc5346d44dc58efb583543a2eaba9794c845ce9251ca896cc92

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:37:25.603339+00:00.

Case digest / 2ed04854d14e69d7b9307eab677deb335ed3f32ec11311575db30d77f788a78f