Mercurial > repos > icfp2013
diff src/solver.tp @ 40:1cadb591eef1
Fix bug that was causing the solver to not find certain matches
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 11 Aug 2013 00:37:34 -0700 |
parents | cde3f5943cd4 |
children | e795f7179456 |
line wrap: on
line diff
--- a/src/solver.tp Sat Aug 10 23:35:05 2013 -0700 +++ b/src/solver.tp Sun Aug 11 00:37:34 2013 -0700 @@ -89,6 +89,10 @@ } } } + } else: { + if: _hasFirst? { + res append: _first + } } res } @@ -139,6 +143,10 @@ matches <- info findMatches: (resp outputs) at: 0 noSuccess <- true cur <- 0 + if: (matches length) = 0 { + print: "No matches? :(\n" + print: info + } while: { noSuccess && cur < (matches length) } do: { prog root!: (matches get: cur) gresp <- (requests guess: progId (string: prog)) sendWithKey: authKey