{"abstract":"Before any reset or capture the register reports 0 instead of unknown.","category":"Digital logic simulation","checks":7,"contract":"Input: samples [clk, d, en, rst_n] at successive instants. q starts as \"x\". Active-low rst_n==0 forces q=0 immediately regardless of clock. Otherwise a rising clock edge (previous sample clk 0, this sample clk 1; the first sample is never an edge) with en==1 loads d. The previous clock value is tracked on every sample, including while reset is asserted. Return q after each sample.","evaluation_group":"w2-digital-logic-simulation-dff-async-reset","failed_approach":"Using None emits null instead of the contract's 'x' marker.","family":"w2-digital-logic-simulation-dff-async-reset-power-up-state","id":"FA-88931","implementations":{"attempt":{"sha256":"b0cd3cd0bcfb4f2c12cd4e2a8748a97d0e48c73b10a7a714311264e55a919345","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(samples):\n    out = []\n    q = None\n    prev = None\n    for c, d, en, rst_n in samples:\n        edge = prev == 0 and c == 1\n        prev = c\n        if rst_n == 0:\n            q = 0\n        elif edge and en == 1:\n            q = d\n        out.append(q)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 1, 1, 1]]], ['x', 'x', 1]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1]]], ['x', 1, 0, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 1]]], ['x', 1, 1, 1, 1])], [('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 0]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1], [0, 1, 1, 1]]], ['x', 1, 0, 0, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1, 1, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1, 1, 0])], [('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 1, 1, 1]]], ['x', 'x', 1]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0]]], ['x', 1, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0, 0, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1]]], ['x', 1, 1, 1])], [('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 0]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1]]], ['x', 1, 0, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0, 0, 0, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 1]]], ['x', 1, 1, 1, 1])], [('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 1, 1, 1]]], ['x', 'x', 1]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1], [0, 1, 1, 1]]], ['x', 1, 0, 0, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0, 0, 0, 0, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1, 1, 0])]]\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":"bed9eeee4370ee8730325938b12820f90e61e02f6c330db6c73d012767456f09","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(samples):\n    out = []\n    q = 0\n    prev = None\n    for c, d, en, rst_n in samples:\n        edge = prev == 0 and c == 1\n        prev = c\n        if rst_n == 0:\n            q = 0\n        elif edge and en == 1:\n            q = d\n        out.append(q)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 1, 1, 1]]], ['x', 'x', 1]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1]]], ['x', 1, 0, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 1]]], ['x', 1, 1, 1, 1])], [('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 0]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1], [0, 1, 1, 1]]], ['x', 1, 0, 0, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1, 1, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1, 1, 0])], [('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 1, 1, 1]]], ['x', 'x', 1]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0]]], ['x', 1, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0, 0, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1]]], ['x', 1, 1, 1])], [('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 0]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1]]], ['x', 1, 0, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0, 0, 0, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 1]]], ['x', 1, 1, 1, 1])], [('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 1, 1, 1]]], ['x', 'x', 1]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1], [0, 1, 1, 1]]], ['x', 1, 0, 0, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0, 0, 0, 0, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1, 1, 0])]]\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":"b0768d8ec9763c6963ba8f4bbe67cbf2fff5fa5e9896180871f216d4384e9edb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(samples):\n    out = []\n    q = 'x'\n    prev = None\n    for c, d, en, rst_n in samples:\n        edge = prev == 0 and c == 1\n        prev = c\n        if rst_n == 0:\n            q = 0\n        elif edge and en == 1:\n            q = d\n        out.append(q)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 1, 1, 1]]], ['x', 'x', 1]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1]]], ['x', 1, 0, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 1]]], ['x', 1, 1, 1, 1])], [('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 0]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1], [0, 1, 1, 1]]], ['x', 1, 0, 0, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1, 1, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1, 1, 0])], [('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 1, 1, 1]]], ['x', 'x', 1]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0]]], ['x', 1, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0, 0, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1]]], ['x', 1, 1, 1])], [('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 0]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1]]], ['x', 1, 0, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0, 0, 0, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 1]]], ['x', 1, 1, 1, 1])], [('uninitialized flop holds x until first edge', [[[0, 1, 1, 1], [0, 0, 1, 1], [1, 1, 1, 1]]], ['x', 'x', 1]), ('async reset between edges', [[[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1], [0, 1, 1, 1]]], ['x', 1, 0, 0, 0]), ('reset held low while clock rises', [[[0, 0, 1, 0], [1, 1, 1, 0], [0, 1, 1, 0], [1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]]], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]), ('reset released during clock high', [[[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 0, 0, 0, 0, 0]), ('falling edges do not capture', [[[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 'x', 1, 1, 1, 0, 0, 0, 0, 0]), ('clock held high does not recapture', [[[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1]), ('enable low holds value', [[[0, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 1], [1, 0, 1, 1]]], ['x', 1, 1, 1, 1, 0])]]\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-dff-async-reset-power-up-state","generated_at":"2026-09-29T14:51:12.714630+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Register models in cycle simulators must distinguish asynchronous from synchronous control and detect true clock edges.","repair":"Start q as 'x' until reset or a capture defines it.","root_cause":"The initial register state is a definite 0.","sha256":"50ca2a155d24a7a1c7dfe29475b3d5c717766405e068d4d74510ceebad7e3a6c","title":"Flop powers up as logic zero · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.377,"exit_code":1,"observations":[{"actual":[null,null,1],"check":"uninitialized flop holds x until first edge","expected":["x","x",1],"passed":false},{"actual":[null,1,0,0],"check":"async reset between edges","expected":["x",1,0,0],"passed":false},{"actual":[0,0,0,0,0,1],"check":"reset held low while clock rises","expected":[0,0,0,0,0,1],"passed":true},{"actual":[null,0,0,0,0,0],"check":"reset released during clock high","expected":["x",0,0,0,0,0],"passed":false},{"actual":[null,null,1,1,1,0],"check":"falling edges do not capture","expected":["x","x",1,1,1,0],"passed":false},{"actual":[null,1,1,1],"check":"clock held high does not recapture","expected":["x",1,1,1],"passed":false},{"actual":[null,1,1,1,1],"check":"enable low holds value","expected":["x",1,1,1,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"uninitialized flop holds x until first edge\", \"actual\": [null, null, 1], \"expected\": [\"x\", \"x\", 1], \"passed\": false}, {\"check\": \"async reset between edges\", \"actual\": [null, 1, 0, 0], \"expected\": [\"x\", 1, 0, 0], \"passed\": false}, {\"check\": \"reset held low while clock rises\", \"actual\": [0, 0, 0, 0, 0, 1], \"expected\": [0, 0, 0, 0, 0, 1], \"passed\": true}, {\"check\": \"reset released during clock high\", \"actual\": [null, 0, 0, 0, 0, 0], \"expected\": [\"x\", 0, 0, 0, 0, 0], \"passed\": false}, {\"check\": \"falling edges do not capture\", \"actual\": [null, null, 1, 1, 1, 0], \"expected\": [\"x\", \"x\", 1, 1, 1, 0], \"passed\": false}, {\"check\": \"clock held high does not recapture\", \"actual\": [null, 1, 1, 1], \"expected\": [\"x\", 1, 1, 1], \"passed\": false}, {\"check\": \"enable low holds value\", \"actual\": [null, 1, 1, 1, 1], \"expected\": [\"x\", 1, 1, 1, 1], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.615,"exit_code":1,"observations":[{"actual":[0,0,1],"check":"uninitialized flop holds x until first edge","expected":["x","x",1],"passed":false},{"actual":[0,1,0,0],"check":"async reset between edges","expected":["x",1,0,0],"passed":false},{"actual":[0,0,0,0,0,1],"check":"reset held low while clock rises","expected":[0,0,0,0,0,1],"passed":true},{"actual":[0,0,0,0,0,0],"check":"reset released during clock high","expected":["x",0,0,0,0,0],"passed":false},{"actual":[0,0,1,1,1,0],"check":"falling edges do not capture","expected":["x","x",1,1,1,0],"passed":false},{"actual":[0,1,1,1],"check":"clock held high does not recapture","expected":["x",1,1,1],"passed":false},{"actual":[0,1,1,1,1],"check":"enable low holds value","expected":["x",1,1,1,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"uninitialized flop holds x until first edge\", \"actual\": [0, 0, 1], \"expected\": [\"x\", \"x\", 1], \"passed\": false}, {\"check\": \"async reset between edges\", \"actual\": [0, 1, 0, 0], \"expected\": [\"x\", 1, 0, 0], \"passed\": false}, {\"check\": \"reset held low while clock rises\", \"actual\": [0, 0, 0, 0, 0, 1], \"expected\": [0, 0, 0, 0, 0, 1], \"passed\": true}, {\"check\": \"reset released during clock high\", \"actual\": [0, 0, 0, 0, 0, 0], \"expected\": [\"x\", 0, 0, 0, 0, 0], \"passed\": false}, {\"check\": \"falling edges do not capture\", \"actual\": [0, 0, 1, 1, 1, 0], \"expected\": [\"x\", \"x\", 1, 1, 1, 0], \"passed\": false}, {\"check\": \"clock held high does not recapture\", \"actual\": [0, 1, 1, 1], \"expected\": [\"x\", 1, 1, 1], \"passed\": false}, {\"check\": \"enable low holds value\", \"actual\": [0, 1, 1, 1, 1], \"expected\": [\"x\", 1, 1, 1, 1], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.885,"exit_code":0,"observations":[{"actual":["x","x",1],"check":"uninitialized flop holds x until first edge","expected":["x","x",1],"passed":true},{"actual":["x",1,0,0],"check":"async reset between edges","expected":["x",1,0,0],"passed":true},{"actual":[0,0,0,0,0,1],"check":"reset held low while clock rises","expected":[0,0,0,0,0,1],"passed":true},{"actual":["x",0,0,0,0,0],"check":"reset released during clock high","expected":["x",0,0,0,0,0],"passed":true},{"actual":["x","x",1,1,1,0],"check":"falling edges do not capture","expected":["x","x",1,1,1,0],"passed":true},{"actual":["x",1,1,1],"check":"clock held high does not recapture","expected":["x",1,1,1],"passed":true},{"actual":["x",1,1,1,1],"check":"enable low holds value","expected":["x",1,1,1,1],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"uninitialized flop holds x until first edge\", \"actual\": [\"x\", \"x\", 1], \"expected\": [\"x\", \"x\", 1], \"passed\": true}, {\"check\": \"async reset between edges\", \"actual\": [\"x\", 1, 0, 0], \"expected\": [\"x\", 1, 0, 0], \"passed\": true}, {\"check\": \"reset held low while clock rises\", \"actual\": [0, 0, 0, 0, 0, 1], \"expected\": [0, 0, 0, 0, 0, 1], \"passed\": true}, {\"check\": \"reset released during clock high\", \"actual\": [\"x\", 0, 0, 0, 0, 0], \"expected\": [\"x\", 0, 0, 0, 0, 0], \"passed\": true}, {\"check\": \"falling edges do not capture\", \"actual\": [\"x\", \"x\", 1, 1, 1, 0], \"expected\": [\"x\", \"x\", 1, 1, 1, 0], \"passed\": true}, {\"check\": \"clock held high does not recapture\", \"actual\": [\"x\", 1, 1, 1], \"expected\": [\"x\", 1, 1, 1], \"passed\": true}, {\"check\": \"enable low holds value\", \"actual\": [\"x\", 1, 1, 1, 1], \"expected\": [\"x\", 1, 1, 1, 1], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}