From fa1c606e56ad6509b62b80e31879e5e41171c9bf Mon Sep 17 00:00:00 2001 From: Nick Drozd Date: Thu, 2 May 2024 20:49:46 -0400 Subject: [PATCH] Run reasoner on everything --- test/prog_data.py | 31 +++++++++++++++++++++++++++++++ test/test_turing.py | 29 ++++++++++++++++------------- 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/test/prog_data.py b/test/prog_data.py index dacf336b..ad8b3341 100644 --- a/test/prog_data.py +++ b/test/prog_data.py @@ -851,6 +851,8 @@ "1RB 2LC 3LA 0RD 3LE 2RB 0RB 1LE 1RD 2LA ... ... 1RF 0LA 1RD 2LA 2RF 3RF 1LG ... 1LA 0RF 3LA 0RD 2RB 3RB 1LE 1LH 3LE 3LH ... 1RB": 3, # Spinout + "1RB 1RC 0RC 1RC 0LA 1LB 2LC 2RA 1LB": 3, + "1RB 1RC 0LC 1RD 1LB 1LE 1RD 0RA 1LA 0LE": 3, "1RB 0RC 1LC 0LD 1RE 0LD 0LC 1LB 0RE 1RA": 3, "1RB 1LC 1RD 0RA 0LC 1LE 1LA 0RE 0LA 1RB": 3, # 10^1089 @@ -1102,6 +1104,7 @@ "1RB 2LB 1LC 1LA 2RB 1RB ... 2LA 0LC", "1RB 2RA 1LC 2LB 0RB 2LA 1LA 0LB 1LA", "1RB 2RA 1LC 2LB 0RB 2LA 2RB 0LB 1LA", + "1RB 2RC 1LA 2LA 1RB 0RB 2RB 2RA 1LC", "1RB 2LB 4LB 3LA ... 1LA 3RA 3LB 0LB 0RA", @@ -1183,6 +1186,8 @@ "1RB 3LA 1LA 1RA 2LB 2RA 0RB 3RB", # QH 77, xmas "1RB 2LA 2RB 1LA 3LB 3RA 2RB 0RB", # QH 14, xmas + "1RB 3LA 1LA 4LA 1RA 2LB 2RA ... 0RA 0RB", + "1RB 4LA 1LA ... 2RB 2LB 3LA 1LB 2RA 0RB", "1RB ... 0RC 1RC 0RD 0RC 1RE 1LA 0RF 0RE 1LF 1LD", "1RB 0LD 1RC 0RF 1LC 1LA 0LE ... 1LF 0RB 0RC 0RE", @@ -1313,6 +1318,10 @@ "1RB 1LE 0RC 1LD 1RD 0RD 1RE 1RC 0LA 1LB", # 10^46 } +MACRO_SPINOUT: set[str] = { + "1RB ... 1RC 0RF 1RD 0LF 1LE 0RC 1LD 0RE 1LC 1RA", +} + BLANKERS = ( {prog: None for prog in DO_BLANK} | SPINOUT_BLANK @@ -2076,6 +2085,28 @@ for prog in progs } +HALTERS = set( + HALT + | HALT_SLOW + | PROVER_HALT +) | DO_HALT + +SPINNERS = set( + SPINOUT + | SPINOUT_SLOW + | SPINOUT_BLANK + | SPINOUT_BLANK_SLOW + | PROVER_SPINOUT +) | DO_SPIN_OUT + +RECURS = set( + RECUR_COMPACT + | RECUR_DIFFUSE + | RECUR_SLOW + | RECUR_TOO_SLOW + | QUASIHALT +) | PROVER_QUASIHALT + ## test program ###################################################### PROGS: dict[ diff --git a/test/test_turing.py b/test/test_turing.py index cd9b4c93..99f341d1 100644 --- a/test/test_turing.py +++ b/test/test_turing.py @@ -225,6 +225,7 @@ def test_blank(self): def test_false_negatives(self): for prog in CANT_HALT_FALSE_NEGATIVES: + self.assertNotIn(prog, HALTERS) self.assert_could_halt(prog) for prog in CANT_BLANK_FALSE_NEGATIVES: @@ -232,34 +233,36 @@ def test_false_negatives(self): self.assert_could_blank(prog) for prog in CANT_SPIN_OUT_FALSE_NEGATIVES: - self.assertNotIn( - prog, - SPINOUT - | SPINOUT_SLOW - | SPINOUT_BLANK - | SPINOUT_BLANK_SLOW) - + self.assertNotIn(prog, SPINNERS) self.assert_could_spin_out(prog) def test_halt(self): - for prog in DO_HALT | set(HALT_SLOW): + for prog in HALTERS: self.assert_could_halt(prog) + for prog in SPINNERS | RECURS: + self.assert_cant_halt(prog) + def test_spinout(self): - for prog in DO_SPIN_OUT | set(SPINOUT_SLOW): + for prog in SPINNERS: self.assert_simple(prog) + + if prog in MACRO_SPINOUT: + continue + self.assert_could_spin_out(prog) - for prog in DONT_SPIN_OUT: + for prog in DONT_SPIN_OUT | HALTERS | RECURS: self.assert_cant_spin_out(prog) def test_recur(self): - # pylint: disable-next = line-too-long - for prog in RECUR_COMPACT | RECUR_DIFFUSE | RECUR_SLOW | RECUR_TOO_SLOW: + for prog in RECURS: self.assert_cant_halt(prog) - self.assert_cant_blank(prog) self.assert_cant_spin_out(prog) + if prog not in BLANKERS: + self.assert_cant_blank(prog) + def test_holdouts(self): for cat in ('42h', '24h'): for prog in read_holdouts(cat):