{"action":"created","comment":{"url":"https://api.github.com/repos/diffblue/cbmc/pulls/comments/141002257","pull_request_review_id":65146537,"id":141002257,"diff_hunk":"@@ -0,0 +1,228 @@\n+/*******************************************************************\\\n+\n+Module: Coverage Instrumentation\n+\n+Author: Daniel Kroening\n+\n+\\*******************************************************************/\n+\n+/// \\file\n+/// Filters for the Coverage Instrumentation\n+\n+#include \"cover_filter.h\"\n+\n+#include <json/json_parser.h>\n+\n+#include <util/message.h>\n+\n+/// Filter out functions that are not considered provided by the user\n+/// \\param identifier: a function name\n+/// \\param goto_function: a goto function\n+/// \\return: returns true if function is considered user-provided\n+bool internal_functions_filtert::operator()(\n+  const irep_idt &identifier,\n+  const goto_functionst::goto_functiont &goto_function) const\n+{\n+  if(identifier==goto_functionst::entry_point())\n+    return false;\n+\n+  if(identifier==(CPROVER_PREFIX \"initialize\"))\n+    return false;\n+\n+  if(goto_function.is_hidden())\n+    return false;\n+\n+  // ignore Java array built-ins\n+  if(has_prefix(id2string(identifier), \"java::array\"))\n+    return false;\n+\n+  // ignore if built-in library\n+  if(!goto_function.body.instructions.empty() &&\n+     goto_function.body.instructions.front().source_location.is_built_in())\n+    return false;\n+\n+  return true;\n+}\n+\n+/// Filter functions whose name match the regex\n+/// \\param identifier: a function name\n+/// \\param goto_function: a goto function\n+/// \\return: returns true if the function name matches\n+bool include_pattern_filtert::operator()(\n+  const irep_idt &identifier,\n+  const goto_functionst::goto_functiont &goto_function) const\n+{\n+  std::smatch string_matcher;\n+  return std::regex_match(\n+    id2string(identifier), string_matcher, regex_matcher);\n+}\n+\n+/// Call a goto_program non-trivial if it has: * Any declarations * At least 2","path":"src/goto-instrument/cover_filter.cpp","position":60,"original_position":60,"commit_id":"f17599e78ffd53553e58e4aa610a326b86cdc0b7","original_commit_id":"f17599e78ffd53553e58e4aa610a326b86cdc0b7","user":{"login":"smowton","id":283483,"avatar_url":"https://avatars3.githubusercontent.com/u/283483?v=4","gravatar_id":"","url":"https://api.github.com/users/smowton","html_url":"https://github.com/smowton","followers_url":"https://api.github.com/users/smowton/followers","following_url":"https://api.github.com/users/smowton/following{/other_user}","gists_url":"https://api.github.com/users/smowton/gists{/gist_id}","starred_url":"https://api.github.com/users/smowton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smowton/subscriptions","organizations_url":"https://api.github.com/users/smowton/orgs","repos_url":"https://api.github.com/users/smowton/repos","events_url":"https://api.github.com/users/smowton/events{/privacy}","received_events_url":"https://api.github.com/users/smowton/received_events","type":"User","site_admin":false},"body":"Line-break bulleted list","created_at":"2017-09-26T09:22:17Z","updated_at":"2017-09-26T09:43:30Z","html_url":"https://github.com/diffblue/cbmc/pull/1419#discussion_r141002257","pull_request_url":"https://api.github.com/repos/diffblue/cbmc/pulls/1419","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/comments/141002257"},"html":{"href":"https://github.com/diffblue/cbmc/pull/1419#discussion_r141002257"},"pull_request":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/1419"}}},"pull_request":{"url":"https://api.github.com/repos/diffblue/cbmc/pulls/1419","id":142763969,"html_url":"https://github.com/diffblue/cbmc/pull/1419","diff_url":"https://github.com/diffblue/cbmc/pull/1419.diff","patch_url":"https://github.com/diffblue/cbmc/pull/1419.patch","issue_url":"https://api.github.com/repos/diffblue/cbmc/issues/1419","number":1419,"state":"open","locked":false,"title":"Refactor coverage instrumentation","user":{"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},"body":"Splits cover.cpp into several files and class-ifies various instrumenters and filters applied\r\n\r\nCompanions:\r\n* https://github.com/diffblue/test-gen/pull/1063\r\n* https://github.com/diffblue/symex/pull/2\r\n\r\ndepends/subsumes https://github.com/diffblue/cbmc/pull/1348","created_at":"2017-09-24T18:03:28Z","updated_at":"2017-09-26T09:43:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4904f2a427b40d54cdd072542cccb339a5480d11","assignee":null,"assignees":[],"requested_reviewers":[{"login":"thk123","id":638608,"avatar_url":"https://avatars3.githubusercontent.com/u/638608?v=4","gravatar_id":"","url":"https://api.github.com/users/thk123","html_url":"https://github.com/thk123","followers_url":"https://api.github.com/users/thk123/followers","following_url":"https://api.github.com/users/thk123/following{/other_user}","gists_url":"https://api.github.com/users/thk123/gists{/gist_id}","starred_url":"https://api.github.com/users/thk123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thk123/subscriptions","organizations_url":"https://api.github.com/users/thk123/orgs","repos_url":"https://api.github.com/users/thk123/repos","events_url":"https://api.github.com/users/thk123/events{/privacy}","received_events_url":"https://api.github.com/users/thk123/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/diffblue/cbmc/pulls/1419/commits","review_comments_url":"https://api.github.com/repos/diffblue/cbmc/pulls/1419/comments","review_comment_url":"https://api.github.com/repos/diffblue/cbmc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diffblue/cbmc/issues/1419/comments","statuses_url":"https://api.github.com/repos/diffblue/cbmc/statuses/f17599e78ffd53553e58e4aa610a326b86cdc0b7","head":{"label":"peterschrammel:refactor/cover-instrument","ref":"refactor/cover-instrument","sha":"f17599e78ffd53553e58e4aa610a326b86cdc0b7","user":{"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},"repo":{"id":55680594,"name":"cbmc","full_name":"peterschrammel/cbmc","owner":{"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},"private":false,"html_url":"https://github.com/peterschrammel/cbmc","description":"C Bounded Model Checker","fork":true,"url":"https://api.github.com/repos/peterschrammel/cbmc","forks_url":"https://api.github.com/repos/peterschrammel/cbmc/forks","keys_url":"https://api.github.com/repos/peterschrammel/cbmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peterschrammel/cbmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peterschrammel/cbmc/teams","hooks_url":"https://api.github.com/repos/peterschrammel/cbmc/hooks","issue_events_url":"https://api.github.com/repos/peterschrammel/cbmc/issues/events{/number}","events_url":"https://api.github.com/repos/peterschrammel/cbmc/events","assignees_url":"https://api.github.com/repos/peterschrammel/cbmc/assignees{/user}","branches_url":"https://api.github.com/repos/peterschrammel/cbmc/branches{/branch}","tags_url":"https://api.github.com/repos/peterschrammel/cbmc/tags","blobs_url":"https://api.github.com/repos/peterschrammel/cbmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peterschrammel/cbmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peterschrammel/cbmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/peterschrammel/cbmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peterschrammel/cbmc/statuses/{sha}","languages_url":"https://api.github.com/repos/peterschrammel/cbmc/languages","stargazers_url":"https://api.github.com/repos/peterschrammel/cbmc/stargazers","contributors_url":"https://api.github.com/repos/peterschrammel/cbmc/contributors","subscribers_url":"https://api.github.com/repos/peterschrammel/cbmc/subscribers","subscription_url":"https://api.github.com/repos/peterschrammel/cbmc/subscription","commits_url":"https://api.github.com/repos/peterschrammel/cbmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/peterschrammel/cbmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/peterschrammel/cbmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/peterschrammel/cbmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/peterschrammel/cbmc/contents/{+path}","compare_url":"https://api.github.com/repos/peterschrammel/cbmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peterschrammel/cbmc/merges","archive_url":"https://api.github.com/repos/peterschrammel/cbmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peterschrammel/cbmc/downloads","issues_url":"https://api.github.com/repos/peterschrammel/cbmc/issues{/number}","pulls_url":"https://api.github.com/repos/peterschrammel/cbmc/pulls{/number}","milestones_url":"https://api.github.com/repos/peterschrammel/cbmc/milestones{/number}","notifications_url":"https://api.github.com/repos/peterschrammel/cbmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peterschrammel/cbmc/labels{/name}","releases_url":"https://api.github.com/repos/peterschrammel/cbmc/releases{/id}","deployments_url":"https://api.github.com/repos/peterschrammel/cbmc/deployments","created_at":"2016-04-07T09:12:29Z","updated_at":"2016-04-07T09:12:36Z","pushed_at":"2017-09-25T08:11:49Z","git_url":"git://github.com/peterschrammel/cbmc.git","ssh_url":"git@github.com:peterschrammel/cbmc.git","clone_url":"https://github.com/peterschrammel/cbmc.git","svn_url":"https://github.com/peterschrammel/cbmc","homepage":"http://www.cprover.org/cbmc","size":25338,"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":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"diffblue:develop","ref":"develop","sha":"875d5541130eac77c77cc978c0ac1983a9ce7fd7","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":"2017-09-20T20:23:31Z","pushed_at":"2017-09-26T09:41:27Z","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":24477,"stargazers_count":72,"watchers_count":72,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":69,"mirror_url":null,"open_issues_count":261,"forks":69,"open_issues":261,"watchers":72,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/1419"},"html":{"href":"https://github.com/diffblue/cbmc/pull/1419"},"issue":{"href":"https://api.github.com/repos/diffblue/cbmc/issues/1419"},"comments":{"href":"https://api.github.com/repos/diffblue/cbmc/issues/1419/comments"},"review_comments":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/1419/comments"},"review_comment":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/1419/commits"},"statuses":{"href":"https://api.github.com/repos/diffblue/cbmc/statuses/f17599e78ffd53553e58e4aa610a326b86cdc0b7"}},"author_association":"OWNER"}}
{"actor":{"display_login":"smowton"}}