{"action":"closed","issue":{"url":"https://api.github.com/repos/chocoteam/choco3/issues/313","labels_url":"https://api.github.com/repos/chocoteam/choco3/issues/313/labels{/name}","comments_url":"https://api.github.com/repos/chocoteam/choco3/issues/313/comments","events_url":"https://api.github.com/repos/chocoteam/choco3/issues/313/events","html_url":"https://github.com/chocoteam/choco3/issues/313","id":87898161,"number":313,"title":"Iterating over a trivial solver","user":{"login":"JLiangWaterloo","id":1310718,"avatar_url":"https://avatars.githubusercontent.com/u/1310718?v=3","gravatar_id":"","url":"https://api.github.com/users/JLiangWaterloo","html_url":"https://github.com/JLiangWaterloo","followers_url":"https://api.github.com/users/JLiangWaterloo/followers","following_url":"https://api.github.com/users/JLiangWaterloo/following{/other_user}","gists_url":"https://api.github.com/users/JLiangWaterloo/gists{/gist_id}","starred_url":"https://api.github.com/users/JLiangWaterloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JLiangWaterloo/subscriptions","organizations_url":"https://api.github.com/users/JLiangWaterloo/orgs","repos_url":"https://api.github.com/users/JLiangWaterloo/repos","events_url":"https://api.github.com/users/JLiangWaterloo/events{/privacy}","received_events_url":"https://api.github.com/users/JLiangWaterloo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-13T01:17:46Z","updated_at":"2015-06-13T13:49:26Z","closed_at":"2015-06-13T13:49:26Z","body":"I've always iterated the solutions using the following idiom:\r\n```java\r\nSolver s = ...;\r\nif (s.findSolution()) {\r\n    do {\r\n        // Do something\r\n    } while (s.nextSolution());\r\n}\r\n```\r\n\r\nHowever, with the latest develop branch the following code will throw an exception:\r\n```java\r\nSolver s = new Solver();\r\ns.post(ICF.arithm(s.ONE(), \"!=\", s.ZERO()));\r\nif (s.findSolution()) {\r\n    do {\r\n    } while (s.nextSolution());\r\n}\r\n```\r\n\r\nThe \"s.nextSolution()\" will throw an exception because \"The entire search space has been explored.\" While this is certainly true, it is rather annoying because it prevents the above idiom from working in these special cases."}}