{"action":"created","comment":{"url":"https://api.github.com/repos/diffblue/cbmc/pulls/comments/92387569","pull_request_review_id":12901083,"id":92387569,"diff_hunk":"@@ -978,6 +980,90 @@ void goto_instrument_parse_optionst::instrument_goto_program()\n   if(cmdline.isset(\"remove-function-pointers\"))\n     do_function_pointer_removal();\n \n+  if(cmdline.isset(\"function-inline\"))\n+  {\n+    std::string function=cmdline.get_value(\"function-inline\");\n+    assert(!function.empty());\n+\n+    do_function_pointer_removal();\n+\n+    status() << \"Inlining calls of function `\" << function << \"'\" << eom;\n+\n+    if(!cmdline.isset(\"log\"))\n+    {\n+      goto_function_inline(\n+        goto_functions,\n+        function,\n+        ns,\n+        ui_message_handler,\n+        true);\n+    }\n+    else\n+    {\n+      std::string filename=cmdline.get_value(\"log\");\n+      bool have_file=!filename.empty() && filename!=\"-\";\n+\n+      jsont result=\n+        goto_function_inline_and_log(\n+          goto_functions,\n+          function,\n+          ns,\n+          ui_message_handler,\n+          true);\n+\n+      if(have_file)\n+      {\n+#ifdef _MSC_VER\n+        std::ofstream of(widen(filename));\n+#else\n+        std::ofstream of(filename);\n+#endif\n+        if(!of)\n+          throw \"failed to open file \"+filename;\n+\n+        of << result;\n+        of.close();\n+      }\n+      else\n+      {\n+        std::cout << result << std::endl;","path":"src/goto-instrument/goto_instrument_parse_options.cpp","position":66,"original_position":66,"commit_id":"9ddfb85c134d2fcd240b51e56808d155cb69fb25","original_commit_id":"9ddfb85c134d2fcd240b51e56808d155cb69fb25","user":{"login":"danpoe","id":6138051,"avatar_url":"https://avatars.githubusercontent.com/u/6138051?v=3","gravatar_id":"","url":"https://api.github.com/users/danpoe","html_url":"https://github.com/danpoe","followers_url":"https://api.github.com/users/danpoe/followers","following_url":"https://api.github.com/users/danpoe/following{/other_user}","gists_url":"https://api.github.com/users/danpoe/gists{/gist_id}","starred_url":"https://api.github.com/users/danpoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpoe/subscriptions","organizations_url":"https://api.github.com/users/danpoe/orgs","repos_url":"https://api.github.com/users/danpoe/repos","events_url":"https://api.github.com/users/danpoe/events{/privacy}","received_events_url":"https://api.github.com/users/danpoe/received_events","type":"User","site_admin":false},"body":"``result`` is a json object and it should be printed no matter the log level.","created_at":"2016-12-14T13:01:44Z","updated_at":"2016-12-14T13:01:44Z","html_url":"https://github.com/diffblue/cbmc/pull/262#discussion_r92387569","pull_request_url":"https://api.github.com/repos/diffblue/cbmc/pulls/262","_links":{"self":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/comments/92387569"},"html":{"href":"https://github.com/diffblue/cbmc/pull/262#discussion_r92387569"},"pull_request":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/262"}}},"pull_request":{"url":"https://api.github.com/repos/diffblue/cbmc/pulls/262","id":90446852,"html_url":"https://github.com/diffblue/cbmc/pull/262","diff_url":"https://github.com/diffblue/cbmc/pull/262.diff","patch_url":"https://github.com/diffblue/cbmc/pull/262.patch","issue_url":"https://api.github.com/repos/diffblue/cbmc/issues/262","number":262,"state":"open","locked":false,"title":"Goto function inlining","user":{"login":"danpoe","id":6138051,"avatar_url":"https://avatars.githubusercontent.com/u/6138051?v=3","gravatar_id":"","url":"https://api.github.com/users/danpoe","html_url":"https://github.com/danpoe","followers_url":"https://api.github.com/users/danpoe/followers","following_url":"https://api.github.com/users/danpoe/following{/other_user}","gists_url":"https://api.github.com/users/danpoe/gists{/gist_id}","starred_url":"https://api.github.com/users/danpoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpoe/subscriptions","organizations_url":"https://api.github.com/users/danpoe/orgs","repos_url":"https://api.github.com/users/danpoe/repos","events_url":"https://api.github.com/users/danpoe/events{/privacy}","received_events_url":"https://api.github.com/users/danpoe/received_events","type":"User","site_admin":false},"body":"- enhanced goto_inlinet to support inlining at the granularity of function calls, specifying whether inlining should be done transitively or non-transitively, and whether to put skip or leave function call on recursion\n- new option --function-inline for goto-instrument to transitively inline all calls a given function makes\n","created_at":"2016-10-21T21:27:12Z","updated_at":"2016-12-14T13:01:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab5df4a3818123ee5ac6963ea07c2e56edb0aea0","assignee":{"login":"danpoe","id":6138051,"avatar_url":"https://avatars.githubusercontent.com/u/6138051?v=3","gravatar_id":"","url":"https://api.github.com/users/danpoe","html_url":"https://github.com/danpoe","followers_url":"https://api.github.com/users/danpoe/followers","following_url":"https://api.github.com/users/danpoe/following{/other_user}","gists_url":"https://api.github.com/users/danpoe/gists{/gist_id}","starred_url":"https://api.github.com/users/danpoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpoe/subscriptions","organizations_url":"https://api.github.com/users/danpoe/orgs","repos_url":"https://api.github.com/users/danpoe/repos","events_url":"https://api.github.com/users/danpoe/events{/privacy}","received_events_url":"https://api.github.com/users/danpoe/received_events","type":"User","site_admin":false},"assignees":[{"login":"danpoe","id":6138051,"avatar_url":"https://avatars.githubusercontent.com/u/6138051?v=3","gravatar_id":"","url":"https://api.github.com/users/danpoe","html_url":"https://github.com/danpoe","followers_url":"https://api.github.com/users/danpoe/followers","following_url":"https://api.github.com/users/danpoe/following{/other_user}","gists_url":"https://api.github.com/users/danpoe/gists{/gist_id}","starred_url":"https://api.github.com/users/danpoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpoe/subscriptions","organizations_url":"https://api.github.com/users/danpoe/orgs","repos_url":"https://api.github.com/users/danpoe/repos","events_url":"https://api.github.com/users/danpoe/events{/privacy}","received_events_url":"https://api.github.com/users/danpoe/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/diffblue/cbmc/pulls/262/commits","review_comments_url":"https://api.github.com/repos/diffblue/cbmc/pulls/262/comments","review_comment_url":"https://api.github.com/repos/diffblue/cbmc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diffblue/cbmc/issues/262/comments","statuses_url":"https://api.github.com/repos/diffblue/cbmc/statuses/9ddfb85c134d2fcd240b51e56808d155cb69fb25","head":{"label":"danpoe:goto-function-inlining","ref":"goto-function-inlining","sha":"9ddfb85c134d2fcd240b51e56808d155cb69fb25","user":{"login":"danpoe","id":6138051,"avatar_url":"https://avatars.githubusercontent.com/u/6138051?v=3","gravatar_id":"","url":"https://api.github.com/users/danpoe","html_url":"https://github.com/danpoe","followers_url":"https://api.github.com/users/danpoe/followers","following_url":"https://api.github.com/users/danpoe/following{/other_user}","gists_url":"https://api.github.com/users/danpoe/gists{/gist_id}","starred_url":"https://api.github.com/users/danpoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpoe/subscriptions","organizations_url":"https://api.github.com/users/danpoe/orgs","repos_url":"https://api.github.com/users/danpoe/repos","events_url":"https://api.github.com/users/danpoe/events{/privacy}","received_events_url":"https://api.github.com/users/danpoe/received_events","type":"User","site_admin":false},"repo":{"id":61132518,"name":"cbmc","full_name":"danpoe/cbmc","owner":{"login":"danpoe","id":6138051,"avatar_url":"https://avatars.githubusercontent.com/u/6138051?v=3","gravatar_id":"","url":"https://api.github.com/users/danpoe","html_url":"https://github.com/danpoe","followers_url":"https://api.github.com/users/danpoe/followers","following_url":"https://api.github.com/users/danpoe/following{/other_user}","gists_url":"https://api.github.com/users/danpoe/gists{/gist_id}","starred_url":"https://api.github.com/users/danpoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpoe/subscriptions","organizations_url":"https://api.github.com/users/danpoe/orgs","repos_url":"https://api.github.com/users/danpoe/repos","events_url":"https://api.github.com/users/danpoe/events{/privacy}","received_events_url":"https://api.github.com/users/danpoe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danpoe/cbmc","description":"C Bounded Model Checker","fork":true,"url":"https://api.github.com/repos/danpoe/cbmc","forks_url":"https://api.github.com/repos/danpoe/cbmc/forks","keys_url":"https://api.github.com/repos/danpoe/cbmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danpoe/cbmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danpoe/cbmc/teams","hooks_url":"https://api.github.com/repos/danpoe/cbmc/hooks","issue_events_url":"https://api.github.com/repos/danpoe/cbmc/issues/events{/number}","events_url":"https://api.github.com/repos/danpoe/cbmc/events","assignees_url":"https://api.github.com/repos/danpoe/cbmc/assignees{/user}","branches_url":"https://api.github.com/repos/danpoe/cbmc/branches{/branch}","tags_url":"https://api.github.com/repos/danpoe/cbmc/tags","blobs_url":"https://api.github.com/repos/danpoe/cbmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danpoe/cbmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danpoe/cbmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/danpoe/cbmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danpoe/cbmc/statuses/{sha}","languages_url":"https://api.github.com/repos/danpoe/cbmc/languages","stargazers_url":"https://api.github.com/repos/danpoe/cbmc/stargazers","contributors_url":"https://api.github.com/repos/danpoe/cbmc/contributors","subscribers_url":"https://api.github.com/repos/danpoe/cbmc/subscribers","subscription_url":"https://api.github.com/repos/danpoe/cbmc/subscription","commits_url":"https://api.github.com/repos/danpoe/cbmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/danpoe/cbmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/danpoe/cbmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/danpoe/cbmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/danpoe/cbmc/contents/{+path}","compare_url":"https://api.github.com/repos/danpoe/cbmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danpoe/cbmc/merges","archive_url":"https://api.github.com/repos/danpoe/cbmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danpoe/cbmc/downloads","issues_url":"https://api.github.com/repos/danpoe/cbmc/issues{/number}","pulls_url":"https://api.github.com/repos/danpoe/cbmc/pulls{/number}","milestones_url":"https://api.github.com/repos/danpoe/cbmc/milestones{/number}","notifications_url":"https://api.github.com/repos/danpoe/cbmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danpoe/cbmc/labels{/name}","releases_url":"https://api.github.com/repos/danpoe/cbmc/releases{/id}","deployments_url":"https://api.github.com/repos/danpoe/cbmc/deployments","created_at":"2016-06-14T15:05:28Z","updated_at":"2016-06-14T15:05:36Z","pushed_at":"2016-12-13T15:47:18Z","git_url":"git://github.com/danpoe/cbmc.git","ssh_url":"git@github.com:danpoe/cbmc.git","clone_url":"https://github.com/danpoe/cbmc.git","svn_url":"https://github.com/danpoe/cbmc","homepage":"http://www.cprover.org/cbmc","size":15274,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"diffblue:master","ref":"master","sha":"f585a44de05e63e38565fdca100e0aa752f51597","user":{"login":"diffblue","id":17216098,"avatar_url":"https://avatars.githubusercontent.com/u/17216098?v=3","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://avatars.githubusercontent.com/u/17216098?v=3","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":"2016-12-11T03:18:33Z","pushed_at":"2016-12-13T18:25:34Z","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":15251,"stargazers_count":23,"watchers_count":23,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":138,"forks":30,"open_issues":138,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/262"},"html":{"href":"https://github.com/diffblue/cbmc/pull/262"},"issue":{"href":"https://api.github.com/repos/diffblue/cbmc/issues/262"},"comments":{"href":"https://api.github.com/repos/diffblue/cbmc/issues/262/comments"},"review_comments":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/262/comments"},"review_comment":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diffblue/cbmc/pulls/262/commits"},"statuses":{"href":"https://api.github.com/repos/diffblue/cbmc/statuses/9ddfb85c134d2fcd240b51e56808d155cb69fb25"}}}}
{"actor":{"display_login":"danpoe"}}