Mercurial > repos > icfp2013
changeset 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 | 1dcf26c070fe |
children | a8db0f4039aa 96b2fcb746bf |
files | src/solver.tp |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
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