{"abstract":"A register swap written with non-blocking assignments copies one value into both registers.","category":"Digital logic simulation","checks":6,"contract":"Input [regs, stmts, cycles]. Each clock step executes stmts [kind, lhs, op, a, b] in order (ops copy/inv/and/xor on 0/1). Blocking ('b') statements update the working state immediately; non-blocking ('nb') statements evaluate their right side at the statement against the working state and queue the update. After all statements, queued updates apply in statement order (last write wins). Every variable, blocking or not, keeps its value into the next step. Return per-step values sorted by variable name.","evaluation_group":"w2-digital-logic-simulation-nonblocking-scheduler","failed_approach":"Writing the pre-step map instead of queueing drops the update entirely.","family":"w2-digital-logic-simulation-nonblocking-scheduler-non-blocking-deferral","id":"FA-89041","implementations":{"attempt":{"sha256":"bd5636278a011606ce5d8bd870c4e1b634e0a8c4edeaa305ed354689d9d36747","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(*args):\n    regs, stmts, cycles = args\n    regs = dict(regs)\n    hist = []\n    def ev(op, a, b, env):\n        if op == 'copy': return env[a]\n        if op == 'inv': return 1 - env[a]\n        if op == 'and': return env[a] & env[b]\n        return env[a] ^ env[b]\n    for _ in range(cycles):\n        cur = dict(regs)\n        nba = []\n        for kind, lhs, op, a, b in stmts:\n            v = ev(op, a, b, cur)\n            if kind == 'b':\n                cur[lhs] = v\n            else:\n                regs[lhs] = v\n        for lhs, v in nba:\n            cur[lhs] = v\n        regs = cur\n        hist.append([regs[k] for k in sorted(regs)])\n    return hist\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 1], [[0, 1]]), ('blocking chain inside one step', [{'a': 1, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[0, 0, 0], [1, 1, 1]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 2], [[0, 0], [1, 1]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 2], [[0, 1], [1, 0]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 3], [[0, 1, 0], [1, 0, 1], [1, 1, 0]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 1], [[0, 1, 1, 1]])], [('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 2], [[0, 1], [1, 0]]), ('blocking chain inside one step', [{'a': 0, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[1, 1, 1], [0, 0, 0]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 3], [[0, 0], [1, 1], [0, 0]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 3], [[0, 1], [1, 0], [0, 1]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 4], [[0, 1, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 2], [[0, 1, 1, 1], [0, 1, 0, 1]])], [('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 3], [[0, 1], [1, 0], [0, 1]]), ('blocking chain inside one step', [{'a': 1, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[0, 0, 0], [1, 1, 1]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 4], [[0, 0], [1, 1], [0, 0], [1, 1]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 4], [[0, 1], [1, 0], [0, 1], [1, 0]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 5], [[0, 1, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1], [0, 1, 1]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 3], [[0, 1, 1, 1], [0, 1, 0, 1], [0, 1, 0, 1]])], [('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 4], [[0, 1], [1, 0], [0, 1], [1, 0]]), ('blocking chain inside one step', [{'a': 0, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[1, 1, 1], [0, 0, 0]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 5], [[0, 0], [1, 1], [0, 0], [1, 1], [0, 0]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 5], [[0, 1], [1, 0], [0, 1], [1, 0], [0, 1]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 6], [[0, 1, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1], [0, 1, 1], [0, 0, 1]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 4], [[0, 1, 1, 1], [0, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1]])], [('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 5], [[0, 1], [1, 0], [0, 1], [1, 0], [0, 1]]), ('blocking chain inside one step', [{'a': 1, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[0, 0, 0], [1, 1, 1]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 6], [[0, 0], [1, 1], [0, 0], [1, 1], [0, 0], [1, 1]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 6], [[0, 1], [1, 0], [0, 1], [1, 0], [0, 1], [1, 0]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 7], [[0, 1, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1], [0, 1, 1], [0, 0, 1], [1, 0, 0]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 5], [[0, 1, 1, 1], [0, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1]])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"02670fc1c17e939cd587732053219cb4019896e8e10a18cd3da4f9217c453d3c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(*args):\n    regs, stmts, cycles = args\n    regs = dict(regs)\n    hist = []\n    def ev(op, a, b, env):\n        if op == 'copy': return env[a]\n        if op == 'inv': return 1 - env[a]\n        if op == 'and': return env[a] & env[b]\n        return env[a] ^ env[b]\n    for _ in range(cycles):\n        cur = dict(regs)\n        nba = []\n        for kind, lhs, op, a, b in stmts:\n            v = ev(op, a, b, cur)\n            if kind == 'b':\n                cur[lhs] = v\n            else:\n                cur[lhs] = v\n        for lhs, v in nba:\n            cur[lhs] = v\n        regs = cur\n        hist.append([regs[k] for k in sorted(regs)])\n    return hist\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 1], [[0, 1]]), ('blocking chain inside one step', [{'a': 1, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[0, 0, 0], [1, 1, 1]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 2], [[0, 0], [1, 1]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 2], [[0, 1], [1, 0]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 3], [[0, 1, 0], [1, 0, 1], [1, 1, 0]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 1], [[0, 1, 1, 1]])], [('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 2], [[0, 1], [1, 0]]), ('blocking chain inside one step', [{'a': 0, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[1, 1, 1], [0, 0, 0]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 3], [[0, 0], [1, 1], [0, 0]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 3], [[0, 1], [1, 0], [0, 1]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 4], [[0, 1, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 2], [[0, 1, 1, 1], [0, 1, 0, 1]])], [('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 3], [[0, 1], [1, 0], [0, 1]]), ('blocking chain inside one step', [{'a': 1, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[0, 0, 0], [1, 1, 1]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 4], [[0, 0], [1, 1], [0, 0], [1, 1]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 4], [[0, 1], [1, 0], [0, 1], [1, 0]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 5], [[0, 1, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1], [0, 1, 1]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 3], [[0, 1, 1, 1], [0, 1, 0, 1], [0, 1, 0, 1]])], [('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 4], [[0, 1], [1, 0], [0, 1], [1, 0]]), ('blocking chain inside one step', [{'a': 0, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[1, 1, 1], [0, 0, 0]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 5], [[0, 0], [1, 1], [0, 0], [1, 1], [0, 0]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 5], [[0, 1], [1, 0], [0, 1], [1, 0], [0, 1]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 6], [[0, 1, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1], [0, 1, 1], [0, 0, 1]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 4], [[0, 1, 1, 1], [0, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1]])], [('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 5], [[0, 1], [1, 0], [0, 1], [1, 0], [0, 1]]), ('blocking chain inside one step', [{'a': 1, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[0, 0, 0], [1, 1, 1]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 6], [[0, 0], [1, 1], [0, 0], [1, 1], [0, 0], [1, 1]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 6], [[0, 1], [1, 0], [0, 1], [1, 0], [0, 1], [1, 0]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 7], [[0, 1, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1], [0, 1, 1], [0, 0, 1], [1, 0, 0]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 5], [[0, 1, 1, 1], [0, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1]])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"c29668fd1d44990c90b555e66a03d99e9cc3218fd264d94680c45001e60254b3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(*args):\n    regs, stmts, cycles = args\n    regs = dict(regs)\n    hist = []\n    def ev(op, a, b, env):\n        if op == 'copy': return env[a]\n        if op == 'inv': return 1 - env[a]\n        if op == 'and': return env[a] & env[b]\n        return env[a] ^ env[b]\n    for _ in range(cycles):\n        cur = dict(regs)\n        nba = []\n        for kind, lhs, op, a, b in stmts:\n            v = ev(op, a, b, cur)\n            if kind == 'b':\n                cur[lhs] = v\n            else:\n                nba.append((lhs, v))\n        for lhs, v in nba:\n            cur[lhs] = v\n        regs = cur\n        hist.append([regs[k] for k in sorted(regs)])\n    return hist\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 1], [[0, 1]]), ('blocking chain inside one step', [{'a': 1, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[0, 0, 0], [1, 1, 1]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 2], [[0, 0], [1, 1]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 2], [[0, 1], [1, 0]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 3], [[0, 1, 0], [1, 0, 1], [1, 1, 0]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 1], [[0, 1, 1, 1]])], [('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 2], [[0, 1], [1, 0]]), ('blocking chain inside one step', [{'a': 0, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[1, 1, 1], [0, 0, 0]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 3], [[0, 0], [1, 1], [0, 0]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 3], [[0, 1], [1, 0], [0, 1]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 4], [[0, 1, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 2], [[0, 1, 1, 1], [0, 1, 0, 1]])], [('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 3], [[0, 1], [1, 0], [0, 1]]), ('blocking chain inside one step', [{'a': 1, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[0, 0, 0], [1, 1, 1]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 4], [[0, 0], [1, 1], [0, 0], [1, 1]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 4], [[0, 1], [1, 0], [0, 1], [1, 0]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 5], [[0, 1, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1], [0, 1, 1]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 3], [[0, 1, 1, 1], [0, 1, 0, 1], [0, 1, 0, 1]])], [('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 4], [[0, 1], [1, 0], [0, 1], [1, 0]]), ('blocking chain inside one step', [{'a': 0, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[1, 1, 1], [0, 0, 0]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 5], [[0, 0], [1, 1], [0, 0], [1, 1], [0, 0]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 5], [[0, 1], [1, 0], [0, 1], [1, 0], [0, 1]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 6], [[0, 1, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1], [0, 1, 1], [0, 0, 1]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 4], [[0, 1, 1, 1], [0, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1]])], [('non-blocking swap', [{'a': 1, 'b': 0}, [['nb', 'a', 'copy', 'b', None], ['nb', 'b', 'copy', 'a', None]], 5], [[0, 1], [1, 0], [0, 1], [1, 0], [0, 1]]), ('blocking chain inside one step', [{'a': 1, 't': 0, 'u': 0}, [['b', 't', 'inv', 'a', None], ['b', 'u', 'copy', 't', None], ['nb', 'a', 'copy', 'u', None]], 2], [[0, 0, 0], [1, 1, 1]]), ('later non-blocking write wins', [{'a': 1, 'c': 0}, [['nb', 'c', 'copy', 'a', None], ['nb', 'c', 'inv', 'a', None], ['nb', 'a', 'inv', 'a', None]], 6], [[0, 0], [1, 1], [0, 0], [1, 1], [0, 0], [1, 1]]), ('blocking temp persists across cycles', [{'t': 0, 'c': 0}, [['nb', 'c', 'copy', 't', None], ['b', 't', 'inv', 't', None]], 6], [[0, 1], [1, 0], [0, 1], [1, 0], [0, 1], [1, 0]]), ('shift register with non-blocking', [{'s0': 1, 's1': 0, 's2': 0}, [['nb', 's1', 'copy', 's0', None], ['nb', 's2', 'copy', 's1', None], ['nb', 's0', 'xor', 's2', 's1']], 7], [[0, 1, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1], [0, 1, 1], [0, 0, 1], [1, 0, 0]]), ('non-blocking reads blocking result', [{'a': 1, 'b': 1, 'y': 0, 'm': 0}, [['b', 'm', 'and', 'a', 'b'], ['nb', 'y', 'xor', 'm', 'y'], ['nb', 'a', 'inv', 'b', None]], 5], [[0, 1, 1, 1], [0, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1]])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic bounded teaching model of one simulator rule set; the contract is stipulated and is not a claim of conformance to any HDL standard or commercial simulator. 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-digital-logic-simulation-nonblocking-scheduler-non-blocking-deferral","generated_at":"2026-09-29T14:51:13.636292+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Event-driven RTL simulation depends on the active/NBA region split; mis-scheduling produces races that do not exist in hardware.","repair":"Queue non-blocking updates and apply them after all statements of the step.","root_cause":"Non-blocking statements write the working state at once instead of queueing the update.","sha256":"1117971ca0d22aee64e3cf555992b8576079479ca3f5919df65f3c7c34e1d05b","title":"Non-blocking assignment updates immediately · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.514,"exit_code":1,"observations":[{"actual":[[1,0]],"check":"non-blocking swap","expected":[[0,1]],"passed":false},{"actual":[[1,0,0],[1,0,0]],"check":"blocking chain inside one step","expected":[[0,0,0],[1,1,1]],"passed":false},{"actual":[[1,0],[1,0]],"check":"later non-blocking write wins","expected":[[0,0],[1,1]],"passed":false},{"actual":[[0,1],[0,0]],"check":"blocking temp persists across cycles","expected":[[0,1],[1,0]],"passed":false},{"actual":[[1,0,0],[1,0,0],[1,0,0]],"check":"shift register with non-blocking","expected":[[0,1,0],[1,0,1],[1,1,0]],"passed":false},{"actual":[[1,1,1,0]],"check":"non-blocking reads blocking result","expected":[[0,1,1,1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"non-blocking swap\", \"actual\": [[1, 0]], \"expected\": [[0, 1]], \"passed\": false}, {\"check\": \"blocking chain inside one step\", \"actual\": [[1, 0, 0], [1, 0, 0]], \"expected\": [[0, 0, 0], [1, 1, 1]], \"passed\": false}, {\"check\": \"later non-blocking write wins\", \"actual\": [[1, 0], [1, 0]], \"expected\": [[0, 0], [1, 1]], \"passed\": false}, {\"check\": \"blocking temp persists across cycles\", \"actual\": [[0, 1], [0, 0]], \"expected\": [[0, 1], [1, 0]], \"passed\": false}, {\"check\": \"shift register with non-blocking\", \"actual\": [[1, 0, 0], [1, 0, 0], [1, 0, 0]], \"expected\": [[0, 1, 0], [1, 0, 1], [1, 1, 0]], \"passed\": false}, {\"check\": \"non-blocking reads blocking result\", \"actual\": [[1, 1, 1, 0]], \"expected\": [[0, 1, 1, 1]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.064,"exit_code":1,"observations":[{"actual":[[0,0]],"check":"non-blocking swap","expected":[[0,1]],"passed":false},{"actual":[[0,0,0],[1,1,1]],"check":"blocking chain inside one step","expected":[[0,0,0],[1,1,1]],"passed":true},{"actual":[[0,0],[1,1]],"check":"later non-blocking write wins","expected":[[0,0],[1,1]],"passed":true},{"actual":[[0,1],[1,0]],"check":"blocking temp persists across cycles","expected":[[0,1],[1,0]],"passed":true},{"actual":[[0,1,1],[0,0,0],[0,0,0]],"check":"shift register with non-blocking","expected":[[0,1,0],[1,0,1],[1,1,0]],"passed":false},{"actual":[[0,1,1,1]],"check":"non-blocking reads blocking result","expected":[[0,1,1,1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"non-blocking swap\", \"actual\": [[0, 0]], \"expected\": [[0, 1]], \"passed\": false}, {\"check\": \"blocking chain inside one step\", \"actual\": [[0, 0, 0], [1, 1, 1]], \"expected\": [[0, 0, 0], [1, 1, 1]], \"passed\": true}, {\"check\": \"later non-blocking write wins\", \"actual\": [[0, 0], [1, 1]], \"expected\": [[0, 0], [1, 1]], \"passed\": true}, {\"check\": \"blocking temp persists across cycles\", \"actual\": [[0, 1], [1, 0]], \"expected\": [[0, 1], [1, 0]], \"passed\": true}, {\"check\": \"shift register with non-blocking\", \"actual\": [[0, 1, 1], [0, 0, 0], [0, 0, 0]], \"expected\": [[0, 1, 0], [1, 0, 1], [1, 1, 0]], \"passed\": false}, {\"check\": \"non-blocking reads blocking result\", \"actual\": [[0, 1, 1, 1]], \"expected\": [[0, 1, 1, 1]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.615,"exit_code":0,"observations":[{"actual":[[0,1]],"check":"non-blocking swap","expected":[[0,1]],"passed":true},{"actual":[[0,0,0],[1,1,1]],"check":"blocking chain inside one step","expected":[[0,0,0],[1,1,1]],"passed":true},{"actual":[[0,0],[1,1]],"check":"later non-blocking write wins","expected":[[0,0],[1,1]],"passed":true},{"actual":[[0,1],[1,0]],"check":"blocking temp persists across cycles","expected":[[0,1],[1,0]],"passed":true},{"actual":[[0,1,0],[1,0,1],[1,1,0]],"check":"shift register with non-blocking","expected":[[0,1,0],[1,0,1],[1,1,0]],"passed":true},{"actual":[[0,1,1,1]],"check":"non-blocking reads blocking result","expected":[[0,1,1,1]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"non-blocking swap\", \"actual\": [[0, 1]], \"expected\": [[0, 1]], \"passed\": true}, {\"check\": \"blocking chain inside one step\", \"actual\": [[0, 0, 0], [1, 1, 1]], \"expected\": [[0, 0, 0], [1, 1, 1]], \"passed\": true}, {\"check\": \"later non-blocking write wins\", \"actual\": [[0, 0], [1, 1]], \"expected\": [[0, 0], [1, 1]], \"passed\": true}, {\"check\": \"blocking temp persists across cycles\", \"actual\": [[0, 1], [1, 0]], \"expected\": [[0, 1], [1, 0]], \"passed\": true}, {\"check\": \"shift register with non-blocking\", \"actual\": [[0, 1, 0], [1, 0, 1], [1, 1, 0]], \"expected\": [[0, 1, 0], [1, 0, 1], [1, 1, 0]], \"passed\": true}, {\"check\": \"non-blocking reads blocking result\", \"actual\": [[0, 1, 1, 1]], \"expected\": [[0, 1, 1, 1]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}