{"action":"created","comment":{"url":"https://api.github.com/repos/diffblue/cbmc/pulls/comments/168693263","pull_request_review_id":97102672,"id":168693263,"diff_hunk":"@@ -1212,36 +1222,85 @@ void debug_model(\n   stream << messaget::eom;\n }\n \n+sparse_arrayt::sparse_arrayt(const with_exprt &expr)\n+{\n+  auto ref = std::ref(static_cast<const exprt &>(expr));\n+  while(can_cast_expr<with_exprt>(ref.get()))\n+  {\n+    const auto &with_expr = expr_dynamic_cast<with_exprt>(ref.get());\n+    const auto current_index = numeric_cast_v<std::size_t>(with_expr.where());\n+    entries.emplace_back(current_index, with_expr.new_value());\n+    ref = with_expr.old();\n+  }\n+\n+  INVARIANT(\n+    ref.get().id() == ID_array_of, \"'with_exprt' should contain 'array_of'\");","path":"src/solvers/refinement/string_refinement.cpp","position":null,"original_position":87,"commit_id":"4ce6173d94eb621c251cfe9361cb3eeef9996753","original_commit_id":"059cfc61155e58beeea15ef0de36c0501a07f37f","user":{"login":"romainbrenguier","id":11854194,"avatar_url":"https://avatars2.githubusercontent.com/u/11854194?v=4","gravatar_id":"","url":"https://api.github.com/users/romainbrenguier","html_url":"https://github.com/romainbrenguier","followers_url":"https://api.github.com/users/romainbrenguier/followers","following_url":"https://api.github.com/users/romainbrenguier/following{/other_user}","gists_url":"https://api.github.com/users/romainbrenguier/gists{/gist_id}","starred_url":"https://api.github.com/users/romainbrenguier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainbrenguier/subscriptions","organizations_url":"https://api.github.com/users/romainbrenguier/orgs","repos_url":"https://api.github.com/users/romainbrenguier/repos","events_url":"https://api.github.com/users/romainbrenguier/events{/privacy}","received_events_url":"https://api.github.com/users/romainbrenguier/received_events","type":"User","site_admin":false},"body":"Yes that's right, this is a precondition of this function rather than an invariant of the program. I've updated this and the comment of the functions. ","created_at":"2018-02-16T08:06:30Z","updated_at":"2018-02-16T08:06:30Z","html_url":"https://github.com/diffblue/cbmc/pull/1829#discussion_r168693263","pull_request_url":"https://api.github.com/repos/diffblue/cbmc/pulls/1829","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/comments/168693263"},"html":{"href":"https://github.com/diffblue/cbmc/pull/1829#discussion_r168693263"},"pull_request":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/1829"}},"in_reply_to_id":168503113},"pull_request":{"url":"https://api.github.com/repos/diffblue/cbmc/pulls/1829","id":168891742,"html_url":"https://github.com/diffblue/cbmc/pull/1829","diff_url":"https://github.com/diffblue/cbmc/pull/1829.diff","patch_url":"https://github.com/diffblue/cbmc/pull/1829.patch","issue_url":"https://api.github.com/repos/diffblue/cbmc/issues/1829","number":1829,"state":"open","locked":false,"title":"Refactor substitute_array_access method of string solver [TG-2138]","user":{"login":"romainbrenguier","id":11854194,"avatar_url":"https://avatars2.githubusercontent.com/u/11854194?v=4","gravatar_id":"","url":"https://api.github.com/users/romainbrenguier","html_url":"https://github.com/romainbrenguier","followers_url":"https://api.github.com/users/romainbrenguier/followers","following_url":"https://api.github.com/users/romainbrenguier/following{/other_user}","gists_url":"https://api.github.com/users/romainbrenguier/gists{/gist_id}","starred_url":"https://api.github.com/users/romainbrenguier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainbrenguier/subscriptions","organizations_url":"https://api.github.com/users/romainbrenguier/orgs","repos_url":"https://api.github.com/users/romainbrenguier/repos","events_url":"https://api.github.com/users/romainbrenguier/events{/privacy}","received_events_url":"https://api.github.com/users/romainbrenguier/received_events","type":"User","site_admin":false},"body":"This refactoring makes the transformation clearer and more efficient.\r\n\r\nIt has been split into several methods which each deal with one type of expression.\r\nA sparse_array_class has been added to make the way we interpret arrays obtained from the underlying solver more explicit.\r\nInstead of the result of the underlying solver being transformed to a concrete array and then converted to an if_expression, it is now converted to a sparse array, which can avoid an unnecessarily inflating the resulting \"if\"-expression.  \r\n\r\nThe PR also adds a unit test for the sparse_array class.","created_at":"2018-02-13T16:26:31Z","updated_at":"2018-02-16T08:06:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1c913ca716705827681f0baa52035a925669686","assignee":null,"assignees":[],"requested_reviewers":[{"login":"peterschrammel","id":4222448,"avatar_url":"https://avatars3.githubusercontent.com/u/4222448?v=4","gravatar_id":"","url":"https://api.github.com/users/peterschrammel","html_url":"https://github.com/peterschrammel","followers_url":"https://api.github.com/users/peterschrammel/followers","following_url":"https://api.github.com/users/peterschrammel/following{/other_user}","gists_url":"https://api.github.com/users/peterschrammel/gists{/gist_id}","starred_url":"https://api.github.com/users/peterschrammel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterschrammel/subscriptions","organizations_url":"https://api.github.com/users/peterschrammel/orgs","repos_url":"https://api.github.com/users/peterschrammel/repos","events_url":"https://api.github.com/users/peterschrammel/events{/privacy}","received_events_url":"https://api.github.com/users/peterschrammel/received_events","type":"User","site_admin":false},{"login":"allredj","id":25150403,"avatar_url":"https://avatars3.githubusercontent.com/u/25150403?v=4","gravatar_id":"","url":"https://api.github.com/users/allredj","html_url":"https://github.com/allredj","followers_url":"https://api.github.com/users/allredj/followers","following_url":"https://api.github.com/users/allredj/following{/other_user}","gists_url":"https://api.github.com/users/allredj/gists{/gist_id}","starred_url":"https://api.github.com/users/allredj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allredj/subscriptions","organizations_url":"https://api.github.com/users/allredj/orgs","repos_url":"https://api.github.com/users/allredj/repos","events_url":"https://api.github.com/users/allredj/events{/privacy}","received_events_url":"https://api.github.com/users/allredj/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/diffblue/cbmc/pulls/1829/commits","review_comments_url":"https://api.github.com/repos/diffblue/cbmc/pulls/1829/comments","review_comment_url":"https://api.github.com/repos/diffblue/cbmc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diffblue/cbmc/issues/1829/comments","statuses_url":"https://api.github.com/repos/diffblue/cbmc/statuses/4ce6173d94eb621c251cfe9361cb3eeef9996753","head":{"label":"romainbrenguier:refactor/substitute_array_access#TG-2138","ref":"refactor/substitute_array_access#TG-2138","sha":"4ce6173d94eb621c251cfe9361cb3eeef9996753","user":{"login":"romainbrenguier","id":11854194,"avatar_url":"https://avatars2.githubusercontent.com/u/11854194?v=4","gravatar_id":"","url":"https://api.github.com/users/romainbrenguier","html_url":"https://github.com/romainbrenguier","followers_url":"https://api.github.com/users/romainbrenguier/followers","following_url":"https://api.github.com/users/romainbrenguier/following{/other_user}","gists_url":"https://api.github.com/users/romainbrenguier/gists{/gist_id}","starred_url":"https://api.github.com/users/romainbrenguier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainbrenguier/subscriptions","organizations_url":"https://api.github.com/users/romainbrenguier/orgs","repos_url":"https://api.github.com/users/romainbrenguier/repos","events_url":"https://api.github.com/users/romainbrenguier/events{/privacy}","received_events_url":"https://api.github.com/users/romainbrenguier/received_events","type":"User","site_admin":false},"repo":{"id":64766217,"name":"cbmc","full_name":"romainbrenguier/cbmc","owner":{"login":"romainbrenguier","id":11854194,"avatar_url":"https://avatars2.githubusercontent.com/u/11854194?v=4","gravatar_id":"","url":"https://api.github.com/users/romainbrenguier","html_url":"https://github.com/romainbrenguier","followers_url":"https://api.github.com/users/romainbrenguier/followers","following_url":"https://api.github.com/users/romainbrenguier/following{/other_user}","gists_url":"https://api.github.com/users/romainbrenguier/gists{/gist_id}","starred_url":"https://api.github.com/users/romainbrenguier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainbrenguier/subscriptions","organizations_url":"https://api.github.com/users/romainbrenguier/orgs","repos_url":"https://api.github.com/users/romainbrenguier/repos","events_url":"https://api.github.com/users/romainbrenguier/events{/privacy}","received_events_url":"https://api.github.com/users/romainbrenguier/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/romainbrenguier/cbmc","description":"C Bounded Model Checker","fork":true,"url":"https://api.github.com/repos/romainbrenguier/cbmc","forks_url":"https://api.github.com/repos/romainbrenguier/cbmc/forks","keys_url":"https://api.github.com/repos/romainbrenguier/cbmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/romainbrenguier/cbmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/romainbrenguier/cbmc/teams","hooks_url":"https://api.github.com/repos/romainbrenguier/cbmc/hooks","issue_events_url":"https://api.github.com/repos/romainbrenguier/cbmc/issues/events{/number}","events_url":"https://api.github.com/repos/romainbrenguier/cbmc/events","assignees_url":"https://api.github.com/repos/romainbrenguier/cbmc/assignees{/user}","branches_url":"https://api.github.com/repos/romainbrenguier/cbmc/branches{/branch}","tags_url":"https://api.github.com/repos/romainbrenguier/cbmc/tags","blobs_url":"https://api.github.com/repos/romainbrenguier/cbmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/romainbrenguier/cbmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/romainbrenguier/cbmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/romainbrenguier/cbmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/romainbrenguier/cbmc/statuses/{sha}","languages_url":"https://api.github.com/repos/romainbrenguier/cbmc/languages","stargazers_url":"https://api.github.com/repos/romainbrenguier/cbmc/stargazers","contributors_url":"https://api.github.com/repos/romainbrenguier/cbmc/contributors","subscribers_url":"https://api.github.com/repos/romainbrenguier/cbmc/subscribers","subscription_url":"https://api.github.com/repos/romainbrenguier/cbmc/subscription","commits_url":"https://api.github.com/repos/romainbrenguier/cbmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/romainbrenguier/cbmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/romainbrenguier/cbmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/romainbrenguier/cbmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/romainbrenguier/cbmc/contents/{+path}","compare_url":"https://api.github.com/repos/romainbrenguier/cbmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/romainbrenguier/cbmc/merges","archive_url":"https://api.github.com/repos/romainbrenguier/cbmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/romainbrenguier/cbmc/downloads","issues_url":"https://api.github.com/repos/romainbrenguier/cbmc/issues{/number}","pulls_url":"https://api.github.com/repos/romainbrenguier/cbmc/pulls{/number}","milestones_url":"https://api.github.com/repos/romainbrenguier/cbmc/milestones{/number}","notifications_url":"https://api.github.com/repos/romainbrenguier/cbmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/romainbrenguier/cbmc/labels{/name}","releases_url":"https://api.github.com/repos/romainbrenguier/cbmc/releases{/id}","deployments_url":"https://api.github.com/repos/romainbrenguier/cbmc/deployments","created_at":"2016-08-02T14:57:13Z","updated_at":"2017-06-22T09:24:59Z","pushed_at":"2018-02-16T08:05:30Z","git_url":"git://github.com/romainbrenguier/cbmc.git","ssh_url":"git@github.com:romainbrenguier/cbmc.git","clone_url":"https://github.com/romainbrenguier/cbmc.git","svn_url":"https://github.com/romainbrenguier/cbmc","homepage":"http://www.cprover.org/cbmc","size":34066,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"string-solver-experiments"}},"base":{"label":"diffblue:develop","ref":"develop","sha":"78fbf087ba162e65fd84c896538bc74da894f2d8","user":{"login":"diffblue","id":17216098,"avatar_url":"https://avatars0.githubusercontent.com/u/17216098?v=4","gravatar_id":"","url":"https://api.github.com/users/diffblue","html_url":"https://github.com/diffblue","followers_url":"https://api.github.com/users/diffblue/followers","following_url":"https://api.github.com/users/diffblue/following{/other_user}","gists_url":"https://api.github.com/users/diffblue/gists{/gist_id}","starred_url":"https://api.github.com/users/diffblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diffblue/subscriptions","organizations_url":"https://api.github.com/users/diffblue/orgs","repos_url":"https://api.github.com/users/diffblue/repos","events_url":"https://api.github.com/users/diffblue/events{/privacy}","received_events_url":"https://api.github.com/users/diffblue/received_events","type":"Organization","site_admin":false},"repo":{"id":51877056,"name":"cbmc","full_name":"diffblue/cbmc","owner":{"login":"diffblue","id":17216098,"avatar_url":"https://avatars0.githubusercontent.com/u/17216098?v=4","gravatar_id":"","url":"https://api.github.com/users/diffblue","html_url":"https://github.com/diffblue","followers_url":"https://api.github.com/users/diffblue/followers","following_url":"https://api.github.com/users/diffblue/following{/other_user}","gists_url":"https://api.github.com/users/diffblue/gists{/gist_id}","starred_url":"https://api.github.com/users/diffblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diffblue/subscriptions","organizations_url":"https://api.github.com/users/diffblue/orgs","repos_url":"https://api.github.com/users/diffblue/repos","events_url":"https://api.github.com/users/diffblue/events{/privacy}","received_events_url":"https://api.github.com/users/diffblue/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diffblue/cbmc","description":"C Bounded Model Checker","fork":false,"url":"https://api.github.com/repos/diffblue/cbmc","forks_url":"https://api.github.com/repos/diffblue/cbmc/forks","keys_url":"https://api.github.com/repos/diffblue/cbmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diffblue/cbmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diffblue/cbmc/teams","hooks_url":"https://api.github.com/repos/diffblue/cbmc/hooks","issue_events_url":"https://api.github.com/repos/diffblue/cbmc/issues/events{/number}","events_url":"https://api.github.com/repos/diffblue/cbmc/events","assignees_url":"https://api.github.com/repos/diffblue/cbmc/assignees{/user}","branches_url":"https://api.github.com/repos/diffblue/cbmc/branches{/branch}","tags_url":"https://api.github.com/repos/diffblue/cbmc/tags","blobs_url":"https://api.github.com/repos/diffblue/cbmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diffblue/cbmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diffblue/cbmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/diffblue/cbmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diffblue/cbmc/statuses/{sha}","languages_url":"https://api.github.com/repos/diffblue/cbmc/languages","stargazers_url":"https://api.github.com/repos/diffblue/cbmc/stargazers","contributors_url":"https://api.github.com/repos/diffblue/cbmc/contributors","subscribers_url":"https://api.github.com/repos/diffblue/cbmc/subscribers","subscription_url":"https://api.github.com/repos/diffblue/cbmc/subscription","commits_url":"https://api.github.com/repos/diffblue/cbmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/diffblue/cbmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/diffblue/cbmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/diffblue/cbmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/diffblue/cbmc/contents/{+path}","compare_url":"https://api.github.com/repos/diffblue/cbmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diffblue/cbmc/merges","archive_url":"https://api.github.com/repos/diffblue/cbmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diffblue/cbmc/downloads","issues_url":"https://api.github.com/repos/diffblue/cbmc/issues{/number}","pulls_url":"https://api.github.com/repos/diffblue/cbmc/pulls{/number}","milestones_url":"https://api.github.com/repos/diffblue/cbmc/milestones{/number}","notifications_url":"https://api.github.com/repos/diffblue/cbmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diffblue/cbmc/labels{/name}","releases_url":"https://api.github.com/repos/diffblue/cbmc/releases{/id}","deployments_url":"https://api.github.com/repos/diffblue/cbmc/deployments","created_at":"2016-02-16T23:03:52Z","updated_at":"2018-02-06T19:52:55Z","pushed_at":"2018-02-16T08:05:32Z","git_url":"git://github.com/diffblue/cbmc.git","ssh_url":"git@github.com:diffblue/cbmc.git","clone_url":"https://github.com/diffblue/cbmc.git","svn_url":"https://github.com/diffblue/cbmc","homepage":"http://www.cprover.org/cbmc","size":28062,"stargazers_count":96,"watchers_count":96,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":88,"mirror_url":null,"archived":false,"open_issues_count":325,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":88,"open_issues":325,"watchers":96,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/1829"},"html":{"href":"https://github.com/diffblue/cbmc/pull/1829"},"issue":{"href":"https://api.github.com/repos/diffblue/cbmc/issues/1829"},"comments":{"href":"https://api.github.com/repos/diffblue/cbmc/issues/1829/comments"},"review_comments":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/1829/comments"},"review_comment":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/1829/commits"},"statuses":{"href":"https://api.github.com/repos/diffblue/cbmc/statuses/4ce6173d94eb621c251cfe9361cb3eeef9996753"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"romainbrenguier"}}