| @@ -122,6 +123,13 @@ def main(): |
| 122 | 123 | cases += [("let", "a", ("+", "x", 3), ("+", "y", ("let", "b", "t", ("*", "a", "b")))), |
| 123 | 124 | ("let", "x", "y", ("if", "t", ("+", "x", 1), ("-", "x", 1)))] |
| 124 | 125 | cases += [generate(rng, 5, ["x", "y", "t"]) for _ in range(117)] |
| 126 | + atoms = (0,1,MASK,'x','y','t') |
| 127 | + exhaustive = list(atoms) |
| 128 | + exhaustive += [(op,a,b) for op in OPERATORS for a,b in itertools.product(atoms,repeat=2)] |
| 129 | + exhaustive += [('if',c,a,b) for c,a,b in itertools.product(atoms,repeat=3)] |
| 130 | + exhaustive += [('let','a',value,body) for value in atoms for body in (*atoms,'a')] |
| 131 | + assert len(exhaustive) == 588 |
| 132 | + cases += exhaustive |
| 125 | 133 | comparisons = 0 |
| 126 | 134 | with tempfile.TemporaryDirectory() as directory: |
| 127 | 135 | path, binary = Path(directory) / "source", Path(directory) / "binary" |