{"action":"closed","number":123,"pull_request":{"url":"https://api.github.com/repos/UCSD-PL/RefScript/pulls/123","id":31587944,"html_url":"https://github.com/UCSD-PL/RefScript/pull/123","diff_url":"https://github.com/UCSD-PL/RefScript/pull/123.diff","patch_url":"https://github.com/UCSD-PL/RefScript/pull/123.patch","issue_url":"https://api.github.com/repos/UCSD-PL/RefScript/issues/123","number":123,"state":"closed","locked":false,"title":"Assignability annotations","user":{"login":"panagosg7","id":1099437,"avatar_url":"https://avatars.githubusercontent.com/u/1099437?v=3","gravatar_id":"","url":"https://api.github.com/users/panagosg7","html_url":"https://github.com/panagosg7","followers_url":"https://api.github.com/users/panagosg7/followers","following_url":"https://api.github.com/users/panagosg7/following{/other_user}","gists_url":"https://api.github.com/users/panagosg7/gists{/gist_id}","starred_url":"https://api.github.com/users/panagosg7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panagosg7/subscriptions","organizations_url":"https://api.github.com/users/panagosg7/orgs","repos_url":"https://api.github.com/users/panagosg7/repos","events_url":"https://api.github.com/users/panagosg7/events{/privacy}","received_events_url":"https://api.github.com/users/panagosg7/received_events","type":"User","site_admin":false},"body":"Addresses #122.\r\n\r\nAdding support for the following annotations:\r\n\r\n* Annotation that is going to be SSA converted, but we want to provide an initial type nonetheless:\r\n```\r\n/*@ local foo :: number */\r\nvar foo = 1;\r\n```\r\n\r\n* Readonly annotation -- Not SSA converted / Not reassigned: As before but with \"better\" syntax: \r\n```\r\n/*@ readonly bar :: number */\r\nvar bar = 1;\r\n```\r\n\r\n* Global variables -- Not SSA / can be reassigned: This is the default case but you can also specify the keyword global:\r\n```\r\n/*@ goo :: number */\r\nvar goo = 1;\r\n// Same as: \r\n/*@ goo :: number */\r\nvar goo = 1;\r\n```\r\n\r\n* If you want to set assignability modifier but do not want to provide a type you can use a `#` at the type position:\r\n```\r\n/*@ global goo :: # */\r\nvar goo = 1;\r\n```\r\nA fresh version of the inferred raw type of the initializing value will be used as the type of the global variable.\r\n\r\n\r\nDue to unsoundness in loop-SSA I restricted `envJoin` to only allow the same exact types at the two branches, so some widening might have to be done beforehand, like here:\r\nhttps://github.com/UCSD-PL/RefScript/blob/assignability_annotations/tests/pos/simple/loop-ssa.ts\r\nThis is where the `local` annotation comes in handy (you can now both provide an annotation and have SSA)\r\n\r\n\r\nAlso, various fixes and cleanup in annotation parsing.\r\n\r\n@bmcfluff : might have to fix some of the rs-benchmarks (sry)","created_at":"2015-03-20T04:40:11Z","updated_at":"2015-03-20T05:05:03Z","closed_at":"2015-03-20T05:05:03Z","merged_at":"2015-03-20T05:05:03Z","merge_commit_sha":"6593c815cf0b36b08fd7b3995792568fdd67fe11","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/UCSD-PL/RefScript/pulls/123/commits","review_comments_url":"https://api.github.com/repos/UCSD-PL/RefScript/pulls/123/comments","review_comment_url":"https://api.github.com/repos/UCSD-PL/RefScript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UCSD-PL/RefScript/issues/123/comments","statuses_url":"https://api.github.com/repos/UCSD-PL/RefScript/statuses/9983b1e901ecebe9c977d1f94ec2eb8fd1d2c920","head":{"label":"UCSD-PL:assignability_annotations","ref":"assignability_annotations","sha":"9983b1e901ecebe9c977d1f94ec2eb8fd1d2c920","user":{"login":"UCSD-PL","id":2380474,"avatar_url":"https://avatars.githubusercontent.com/u/2380474?v=3","gravatar_id":"","url":"https://api.github.com/users/UCSD-PL","html_url":"https://github.com/UCSD-PL","followers_url":"https://api.github.com/users/UCSD-PL/followers","following_url":"https://api.github.com/users/UCSD-PL/following{/other_user}","gists_url":"https://api.github.com/users/UCSD-PL/gists{/gist_id}","starred_url":"https://api.github.com/users/UCSD-PL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UCSD-PL/subscriptions","organizations_url":"https://api.github.com/users/UCSD-PL/orgs","repos_url":"https://api.github.com/users/UCSD-PL/repos","events_url":"https://api.github.com/users/UCSD-PL/events{/privacy}","received_events_url":"https://api.github.com/users/UCSD-PL/received_events","type":"Organization","site_admin":false},"repo":{"id":18645979,"name":"RefScript","full_name":"UCSD-PL/RefScript","owner":{"login":"UCSD-PL","id":2380474,"avatar_url":"https://avatars.githubusercontent.com/u/2380474?v=3","gravatar_id":"","url":"https://api.github.com/users/UCSD-PL","html_url":"https://github.com/UCSD-PL","followers_url":"https://api.github.com/users/UCSD-PL/followers","following_url":"https://api.github.com/users/UCSD-PL/following{/other_user}","gists_url":"https://api.github.com/users/UCSD-PL/gists{/gist_id}","starred_url":"https://api.github.com/users/UCSD-PL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UCSD-PL/subscriptions","organizations_url":"https://api.github.com/users/UCSD-PL/orgs","repos_url":"https://api.github.com/users/UCSD-PL/repos","events_url":"https://api.github.com/users/UCSD-PL/events{/privacy}","received_events_url":"https://api.github.com/users/UCSD-PL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UCSD-PL/RefScript","description":"Refinement Types for Scripting Languages","fork":false,"url":"https://api.github.com/repos/UCSD-PL/RefScript","forks_url":"https://api.github.com/repos/UCSD-PL/RefScript/forks","keys_url":"https://api.github.com/repos/UCSD-PL/RefScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UCSD-PL/RefScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UCSD-PL/RefScript/teams","hooks_url":"https://api.github.com/repos/UCSD-PL/RefScript/hooks","issue_events_url":"https://api.github.com/repos/UCSD-PL/RefScript/issues/events{/number}","events_url":"https://api.github.com/repos/UCSD-PL/RefScript/events","assignees_url":"https://api.github.com/repos/UCSD-PL/RefScript/assignees{/user}","branches_url":"https://api.github.com/repos/UCSD-PL/RefScript/branches{/branch}","tags_url":"https://api.github.com/repos/UCSD-PL/RefScript/tags","blobs_url":"https://api.github.com/repos/UCSD-PL/RefScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UCSD-PL/RefScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UCSD-PL/RefScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/UCSD-PL/RefScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UCSD-PL/RefScript/statuses/{sha}","languages_url":"https://api.github.com/repos/UCSD-PL/RefScript/languages","stargazers_url":"https://api.github.com/repos/UCSD-PL/RefScript/stargazers","contributors_url":"https://api.github.com/repos/UCSD-PL/RefScript/contributors","subscribers_url":"https://api.github.com/repos/UCSD-PL/RefScript/subscribers","subscription_url":"https://api.github.com/repos/UCSD-PL/RefScript/subscription","commits_url":"https://api.github.com/repos/UCSD-PL/RefScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/UCSD-PL/RefScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/UCSD-PL/RefScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/UCSD-PL/RefScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/UCSD-PL/RefScript/contents/{+path}","compare_url":"https://api.github.com/repos/UCSD-PL/RefScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UCSD-PL/RefScript/merges","archive_url":"https://api.github.com/repos/UCSD-PL/RefScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UCSD-PL/RefScript/downloads","issues_url":"https://api.github.com/repos/UCSD-PL/RefScript/issues{/number}","pulls_url":"https://api.github.com/repos/UCSD-PL/RefScript/pulls{/number}","milestones_url":"https://api.github.com/repos/UCSD-PL/RefScript/milestones{/number}","notifications_url":"https://api.github.com/repos/UCSD-PL/RefScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UCSD-PL/RefScript/labels{/name}","releases_url":"https://api.github.com/repos/UCSD-PL/RefScript/releases{/id}","created_at":"2014-04-10T17:51:20Z","updated_at":"2015-03-19T17:08:59Z","pushed_at":"2015-03-20T05:05:03Z","git_url":"git://github.com/UCSD-PL/RefScript.git","ssh_url":"git@github.com:UCSD-PL/RefScript.git","clone_url":"https://github.com/UCSD-PL/RefScript.git","svn_url":"https://github.com/UCSD-PL/RefScript","homepage":null,"size":15501,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":18,"forks":1,"open_issues":18,"watchers":0,"default_branch":"master"}},"base":{"label":"UCSD-PL:master","ref":"master","sha":"16d8c4444bbfc46f722830b014335bb70695b60a","user":{"login":"UCSD-PL","id":2380474,"avatar_url":"https://avatars.githubusercontent.com/u/2380474?v=3","gravatar_id":"","url":"https://api.github.com/users/UCSD-PL","html_url":"https://github.com/UCSD-PL","followers_url":"https://api.github.com/users/UCSD-PL/followers","following_url":"https://api.github.com/users/UCSD-PL/following{/other_user}","gists_url":"https://api.github.com/users/UCSD-PL/gists{/gist_id}","starred_url":"https://api.github.com/users/UCSD-PL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UCSD-PL/subscriptions","organizations_url":"https://api.github.com/users/UCSD-PL/orgs","repos_url":"https://api.github.com/users/UCSD-PL/repos","events_url":"https://api.github.com/users/UCSD-PL/events{/privacy}","received_events_url":"https://api.github.com/users/UCSD-PL/received_events","type":"Organization","site_admin":false},"repo":{"id":18645979,"name":"RefScript","full_name":"UCSD-PL/RefScript","owner":{"login":"UCSD-PL","id":2380474,"avatar_url":"https://avatars.githubusercontent.com/u/2380474?v=3","gravatar_id":"","url":"https://api.github.com/users/UCSD-PL","html_url":"https://github.com/UCSD-PL","followers_url":"https://api.github.com/users/UCSD-PL/followers","following_url":"https://api.github.com/users/UCSD-PL/following{/other_user}","gists_url":"https://api.github.com/users/UCSD-PL/gists{/gist_id}","starred_url":"https://api.github.com/users/UCSD-PL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UCSD-PL/subscriptions","organizations_url":"https://api.github.com/users/UCSD-PL/orgs","repos_url":"https://api.github.com/users/UCSD-PL/repos","events_url":"https://api.github.com/users/UCSD-PL/events{/privacy}","received_events_url":"https://api.github.com/users/UCSD-PL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UCSD-PL/RefScript","description":"Refinement Types for Scripting Languages","fork":false,"url":"https://api.github.com/repos/UCSD-PL/RefScript","forks_url":"https://api.github.com/repos/UCSD-PL/RefScript/forks","keys_url":"https://api.github.com/repos/UCSD-PL/RefScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UCSD-PL/RefScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UCSD-PL/RefScript/teams","hooks_url":"https://api.github.com/repos/UCSD-PL/RefScript/hooks","issue_events_url":"https://api.github.com/repos/UCSD-PL/RefScript/issues/events{/number}","events_url":"https://api.github.com/repos/UCSD-PL/RefScript/events","assignees_url":"https://api.github.com/repos/UCSD-PL/RefScript/assignees{/user}","branches_url":"https://api.github.com/repos/UCSD-PL/RefScript/branches{/branch}","tags_url":"https://api.github.com/repos/UCSD-PL/RefScript/tags","blobs_url":"https://api.github.com/repos/UCSD-PL/RefScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UCSD-PL/RefScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UCSD-PL/RefScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/UCSD-PL/RefScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UCSD-PL/RefScript/statuses/{sha}","languages_url":"https://api.github.com/repos/UCSD-PL/RefScript/languages","stargazers_url":"https://api.github.com/repos/UCSD-PL/RefScript/stargazers","contributors_url":"https://api.github.com/repos/UCSD-PL/RefScript/contributors","subscribers_url":"https://api.github.com/repos/UCSD-PL/RefScript/subscribers","subscription_url":"https://api.github.com/repos/UCSD-PL/RefScript/subscription","commits_url":"https://api.github.com/repos/UCSD-PL/RefScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/UCSD-PL/RefScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/UCSD-PL/RefScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/UCSD-PL/RefScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/UCSD-PL/RefScript/contents/{+path}","compare_url":"https://api.github.com/repos/UCSD-PL/RefScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UCSD-PL/RefScript/merges","archive_url":"https://api.github.com/repos/UCSD-PL/RefScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UCSD-PL/RefScript/downloads","issues_url":"https://api.github.com/repos/UCSD-PL/RefScript/issues{/number}","pulls_url":"https://api.github.com/repos/UCSD-PL/RefScript/pulls{/number}","milestones_url":"https://api.github.com/repos/UCSD-PL/RefScript/milestones{/number}","notifications_url":"https://api.github.com/repos/UCSD-PL/RefScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UCSD-PL/RefScript/labels{/name}","releases_url":"https://api.github.com/repos/UCSD-PL/RefScript/releases{/id}","created_at":"2014-04-10T17:51:20Z","updated_at":"2015-03-19T17:08:59Z","pushed_at":"2015-03-20T05:05:03Z","git_url":"git://github.com/UCSD-PL/RefScript.git","ssh_url":"git@github.com:UCSD-PL/RefScript.git","clone_url":"https://github.com/UCSD-PL/RefScript.git","svn_url":"https://github.com/UCSD-PL/RefScript","homepage":null,"size":15501,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":18,"forks":1,"open_issues":18,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UCSD-PL/RefScript/pulls/123"},"html":{"href":"https://github.com/UCSD-PL/RefScript/pull/123"},"issue":{"href":"https://api.github.com/repos/UCSD-PL/RefScript/issues/123"},"comments":{"href":"https://api.github.com/repos/UCSD-PL/RefScript/issues/123/comments"},"review_comments":{"href":"https://api.github.com/repos/UCSD-PL/RefScript/pulls/123/comments"},"review_comment":{"href":"https://api.github.com/repos/UCSD-PL/RefScript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UCSD-PL/RefScript/pulls/123/commits"},"statuses":{"href":"https://api.github.com/repos/UCSD-PL/RefScript/statuses/9983b1e901ecebe9c977d1f94ec2eb8fd1d2c920"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"bmcfluff","id":4876098,"avatar_url":"https://avatars.githubusercontent.com/u/4876098?v=3","gravatar_id":"","url":"https://api.github.com/users/bmcfluff","html_url":"https://github.com/bmcfluff","followers_url":"https://api.github.com/users/bmcfluff/followers","following_url":"https://api.github.com/users/bmcfluff/following{/other_user}","gists_url":"https://api.github.com/users/bmcfluff/gists{/gist_id}","starred_url":"https://api.github.com/users/bmcfluff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmcfluff/subscriptions","organizations_url":"https://api.github.com/users/bmcfluff/orgs","repos_url":"https://api.github.com/users/bmcfluff/repos","events_url":"https://api.github.com/users/bmcfluff/events{/privacy}","received_events_url":"https://api.github.com/users/bmcfluff/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":8,"additions":672,"deletions":703,"changed_files":51}}