{"action":"closed","number":76,"pull_request":{"url":"https://api.github.com/repos/boogie-org/boogie/pulls/76","id":153510308,"html_url":"https://github.com/boogie-org/boogie/pull/76","diff_url":"https://github.com/boogie-org/boogie/pull/76.diff","patch_url":"https://github.com/boogie-org/boogie/pull/76.patch","issue_url":"https://api.github.com/repos/boogie-org/boogie/issues/76","number":76,"state":"closed","locked":false,"title":"Fix predication for procedure calls","user":{"login":"jeroenk","id":875724,"avatar_url":"https://avatars3.githubusercontent.com/u/875724?v=4","gravatar_id":"","url":"https://api.github.com/users/jeroenk","html_url":"https://github.com/jeroenk","followers_url":"https://api.github.com/users/jeroenk/followers","following_url":"https://api.github.com/users/jeroenk/following{/other_user}","gists_url":"https://api.github.com/users/jeroenk/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroenk/subscriptions","organizations_url":"https://api.github.com/users/jeroenk/orgs","repos_url":"https://api.github.com/users/jeroenk/repos","events_url":"https://api.github.com/users/jeroenk/events{/privacy}","received_events_url":"https://api.github.com/users/jeroenk/received_events","type":"User","site_admin":false},"body":"If a predicated procedure was called with the predicate\r\nset to false, it would havoc the return values, because\r\nin that case the return values were never assigned in the\r\npredicated procedure. This lead to problems with command\r\nsequences such as:\r\n\r\n  p := true;\r\n  x := foo(p);\r\n  x := bar(!p);\r\n\r\nwhere the parameter of both procedures is the predicate.\r\nInstead preserving x, the call to bar would havoc x. To\r\nmitigate this problem, pass the assigned variables to the\r\npredicated procedures, and use the passed value to preserve\r\nthe assigned variables in the case the predicate was false.\r\n\r\nThe above is achieved by transforming, e.g., the procedure\r\n\r\nprocedure bar() returns (ret : T)\r\n{\r\n  entry:\r\n    [some code]\r\n\r\n  [some blocks]\r\n}\r\n\r\ninto\r\n\r\nprocedure bar(_P : bool, _Vret : T) returns (ret : T);\r\n  ensures !_P ==> _Vret == ret;\r\n\r\nimplementation bar(_P : bool, _Vret : T) returns (ret : T)\r\n{\r\n  entry:\r\n    ret := (if _P then ret else _Vret);\r\n    [predicated version of some code]\r\n\r\n  [predicated version of some blocks]\r\n}","created_at":"2017-11-19T19:04:45Z","updated_at":"2017-11-30T20:29:17Z","closed_at":"2017-11-30T20:29:17Z","merged_at":"2017-11-30T20:29:17Z","merge_commit_sha":"bcebc6f8d71363b5659848a5aa05c6a5039a400b","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/boogie-org/boogie/pulls/76/commits","review_comments_url":"https://api.github.com/repos/boogie-org/boogie/pulls/76/comments","review_comment_url":"https://api.github.com/repos/boogie-org/boogie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/boogie-org/boogie/issues/76/comments","statuses_url":"https://api.github.com/repos/boogie-org/boogie/statuses/fbce55f4e6f507e65a666520ae2e98ae397427be","head":{"label":"jeroenk:pred-fix","ref":"pred-fix","sha":"fbce55f4e6f507e65a666520ae2e98ae397427be","user":{"login":"jeroenk","id":875724,"avatar_url":"https://avatars3.githubusercontent.com/u/875724?v=4","gravatar_id":"","url":"https://api.github.com/users/jeroenk","html_url":"https://github.com/jeroenk","followers_url":"https://api.github.com/users/jeroenk/followers","following_url":"https://api.github.com/users/jeroenk/following{/other_user}","gists_url":"https://api.github.com/users/jeroenk/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroenk/subscriptions","organizations_url":"https://api.github.com/users/jeroenk/orgs","repos_url":"https://api.github.com/users/jeroenk/repos","events_url":"https://api.github.com/users/jeroenk/events{/privacy}","received_events_url":"https://api.github.com/users/jeroenk/received_events","type":"User","site_admin":false},"repo":{"id":111323440,"name":"boogie","full_name":"jeroenk/boogie","owner":{"login":"jeroenk","id":875724,"avatar_url":"https://avatars3.githubusercontent.com/u/875724?v=4","gravatar_id":"","url":"https://api.github.com/users/jeroenk","html_url":"https://github.com/jeroenk","followers_url":"https://api.github.com/users/jeroenk/followers","following_url":"https://api.github.com/users/jeroenk/following{/other_user}","gists_url":"https://api.github.com/users/jeroenk/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroenk/subscriptions","organizations_url":"https://api.github.com/users/jeroenk/orgs","repos_url":"https://api.github.com/users/jeroenk/repos","events_url":"https://api.github.com/users/jeroenk/events{/privacy}","received_events_url":"https://api.github.com/users/jeroenk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jeroenk/boogie","description":"Boogie","fork":true,"url":"https://api.github.com/repos/jeroenk/boogie","forks_url":"https://api.github.com/repos/jeroenk/boogie/forks","keys_url":"https://api.github.com/repos/jeroenk/boogie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeroenk/boogie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeroenk/boogie/teams","hooks_url":"https://api.github.com/repos/jeroenk/boogie/hooks","issue_events_url":"https://api.github.com/repos/jeroenk/boogie/issues/events{/number}","events_url":"https://api.github.com/repos/jeroenk/boogie/events","assignees_url":"https://api.github.com/repos/jeroenk/boogie/assignees{/user}","branches_url":"https://api.github.com/repos/jeroenk/boogie/branches{/branch}","tags_url":"https://api.github.com/repos/jeroenk/boogie/tags","blobs_url":"https://api.github.com/repos/jeroenk/boogie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeroenk/boogie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeroenk/boogie/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeroenk/boogie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeroenk/boogie/statuses/{sha}","languages_url":"https://api.github.com/repos/jeroenk/boogie/languages","stargazers_url":"https://api.github.com/repos/jeroenk/boogie/stargazers","contributors_url":"https://api.github.com/repos/jeroenk/boogie/contributors","subscribers_url":"https://api.github.com/repos/jeroenk/boogie/subscribers","subscription_url":"https://api.github.com/repos/jeroenk/boogie/subscription","commits_url":"https://api.github.com/repos/jeroenk/boogie/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeroenk/boogie/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeroenk/boogie/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeroenk/boogie/issues/comments{/number}","contents_url":"https://api.github.com/repos/jeroenk/boogie/contents/{+path}","compare_url":"https://api.github.com/repos/jeroenk/boogie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeroenk/boogie/merges","archive_url":"https://api.github.com/repos/jeroenk/boogie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeroenk/boogie/downloads","issues_url":"https://api.github.com/repos/jeroenk/boogie/issues{/number}","pulls_url":"https://api.github.com/repos/jeroenk/boogie/pulls{/number}","milestones_url":"https://api.github.com/repos/jeroenk/boogie/milestones{/number}","notifications_url":"https://api.github.com/repos/jeroenk/boogie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeroenk/boogie/labels{/name}","releases_url":"https://api.github.com/repos/jeroenk/boogie/releases{/id}","deployments_url":"https://api.github.com/repos/jeroenk/boogie/deployments","created_at":"2017-11-19T19:02:31Z","updated_at":"2017-11-19T19:02:35Z","pushed_at":"2017-11-19T19:03:48Z","git_url":"git://github.com/jeroenk/boogie.git","ssh_url":"git@github.com:jeroenk/boogie.git","clone_url":"https://github.com/jeroenk/boogie.git","svn_url":"https://github.com/jeroenk/boogie","homepage":"http://research.microsoft.com/en-us/projects/boogie/","size":95121,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"boogie-org:master","ref":"master","sha":"63de8b442914a044223d546eb4c2a1db003ada6d","user":{"login":"boogie-org","id":11760572,"avatar_url":"https://avatars3.githubusercontent.com/u/11760572?v=4","gravatar_id":"","url":"https://api.github.com/users/boogie-org","html_url":"https://github.com/boogie-org","followers_url":"https://api.github.com/users/boogie-org/followers","following_url":"https://api.github.com/users/boogie-org/following{/other_user}","gists_url":"https://api.github.com/users/boogie-org/gists{/gist_id}","starred_url":"https://api.github.com/users/boogie-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boogie-org/subscriptions","organizations_url":"https://api.github.com/users/boogie-org/orgs","repos_url":"https://api.github.com/users/boogie-org/repos","events_url":"https://api.github.com/users/boogie-org/events{/privacy}","received_events_url":"https://api.github.com/users/boogie-org/received_events","type":"Organization","site_admin":false},"repo":{"id":33259867,"name":"boogie","full_name":"boogie-org/boogie","owner":{"login":"boogie-org","id":11760572,"avatar_url":"https://avatars3.githubusercontent.com/u/11760572?v=4","gravatar_id":"","url":"https://api.github.com/users/boogie-org","html_url":"https://github.com/boogie-org","followers_url":"https://api.github.com/users/boogie-org/followers","following_url":"https://api.github.com/users/boogie-org/following{/other_user}","gists_url":"https://api.github.com/users/boogie-org/gists{/gist_id}","starred_url":"https://api.github.com/users/boogie-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boogie-org/subscriptions","organizations_url":"https://api.github.com/users/boogie-org/orgs","repos_url":"https://api.github.com/users/boogie-org/repos","events_url":"https://api.github.com/users/boogie-org/events{/privacy}","received_events_url":"https://api.github.com/users/boogie-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/boogie-org/boogie","description":"Boogie","fork":false,"url":"https://api.github.com/repos/boogie-org/boogie","forks_url":"https://api.github.com/repos/boogie-org/boogie/forks","keys_url":"https://api.github.com/repos/boogie-org/boogie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boogie-org/boogie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boogie-org/boogie/teams","hooks_url":"https://api.github.com/repos/boogie-org/boogie/hooks","issue_events_url":"https://api.github.com/repos/boogie-org/boogie/issues/events{/number}","events_url":"https://api.github.com/repos/boogie-org/boogie/events","assignees_url":"https://api.github.com/repos/boogie-org/boogie/assignees{/user}","branches_url":"https://api.github.com/repos/boogie-org/boogie/branches{/branch}","tags_url":"https://api.github.com/repos/boogie-org/boogie/tags","blobs_url":"https://api.github.com/repos/boogie-org/boogie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boogie-org/boogie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boogie-org/boogie/git/refs{/sha}","trees_url":"https://api.github.com/repos/boogie-org/boogie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boogie-org/boogie/statuses/{sha}","languages_url":"https://api.github.com/repos/boogie-org/boogie/languages","stargazers_url":"https://api.github.com/repos/boogie-org/boogie/stargazers","contributors_url":"https://api.github.com/repos/boogie-org/boogie/contributors","subscribers_url":"https://api.github.com/repos/boogie-org/boogie/subscribers","subscription_url":"https://api.github.com/repos/boogie-org/boogie/subscription","commits_url":"https://api.github.com/repos/boogie-org/boogie/commits{/sha}","git_commits_url":"https://api.github.com/repos/boogie-org/boogie/git/commits{/sha}","comments_url":"https://api.github.com/repos/boogie-org/boogie/comments{/number}","issue_comment_url":"https://api.github.com/repos/boogie-org/boogie/issues/comments{/number}","contents_url":"https://api.github.com/repos/boogie-org/boogie/contents/{+path}","compare_url":"https://api.github.com/repos/boogie-org/boogie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boogie-org/boogie/merges","archive_url":"https://api.github.com/repos/boogie-org/boogie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boogie-org/boogie/downloads","issues_url":"https://api.github.com/repos/boogie-org/boogie/issues{/number}","pulls_url":"https://api.github.com/repos/boogie-org/boogie/pulls{/number}","milestones_url":"https://api.github.com/repos/boogie-org/boogie/milestones{/number}","notifications_url":"https://api.github.com/repos/boogie-org/boogie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boogie-org/boogie/labels{/name}","releases_url":"https://api.github.com/repos/boogie-org/boogie/releases{/id}","deployments_url":"https://api.github.com/repos/boogie-org/boogie/deployments","created_at":"2015-04-01T16:46:31Z","updated_at":"2017-11-14T15:04:32Z","pushed_at":"2017-11-30T20:29:17Z","git_url":"git://github.com/boogie-org/boogie.git","ssh_url":"git@github.com:boogie-org/boogie.git","clone_url":"https://github.com/boogie-org/boogie.git","svn_url":"https://github.com/boogie-org/boogie","homepage":"http://research.microsoft.com/en-us/projects/boogie/","size":95128,"stargazers_count":114,"watchers_count":114,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"open_issues_count":32,"license":{"key":"ms-pl","name":"Microsoft Public License","spdx_id":"MS-PL","url":"https://api.github.com/licenses/ms-pl"},"forks":39,"open_issues":32,"watchers":114,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/boogie-org/boogie/pulls/76"},"html":{"href":"https://github.com/boogie-org/boogie/pull/76"},"issue":{"href":"https://api.github.com/repos/boogie-org/boogie/issues/76"},"comments":{"href":"https://api.github.com/repos/boogie-org/boogie/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/boogie-org/boogie/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/boogie-org/boogie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/boogie-org/boogie/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/boogie-org/boogie/statuses/fbce55f4e6f507e65a666520ae2e98ae397427be"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"afd","id":4739677,"avatar_url":"https://avatars0.githubusercontent.com/u/4739677?v=4","gravatar_id":"","url":"https://api.github.com/users/afd","html_url":"https://github.com/afd","followers_url":"https://api.github.com/users/afd/followers","following_url":"https://api.github.com/users/afd/following{/other_user}","gists_url":"https://api.github.com/users/afd/gists{/gist_id}","starred_url":"https://api.github.com/users/afd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afd/subscriptions","organizations_url":"https://api.github.com/users/afd/orgs","repos_url":"https://api.github.com/users/afd/repos","events_url":"https://api.github.com/users/afd/events{/privacy}","received_events_url":"https://api.github.com/users/afd/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":50,"deletions":11,"changed_files":2}}
{"actor":{"display_login":"afd"}}