{"action":"created","issue":{"url":"https://api.github.com/repos/overturetool/overture/issues/446","labels_url":"https://api.github.com/repos/overturetool/overture/issues/446/labels{/name}","comments_url":"https://api.github.com/repos/overturetool/overture/issues/446/comments","events_url":"https://api.github.com/repos/overturetool/overture/issues/446/events","html_url":"https://github.com/overturetool/overture/issues/446","id":77868043,"number":446,"title":"The interpreter fails to report a type invariant violation","user":{"login":"peterwvj","id":5388919,"avatar_url":"https://avatars.githubusercontent.com/u/5388919?v=3","gravatar_id":"","url":"https://api.github.com/users/peterwvj","html_url":"https://github.com/peterwvj","followers_url":"https://api.github.com/users/peterwvj/followers","following_url":"https://api.github.com/users/peterwvj/following{/other_user}","gists_url":"https://api.github.com/users/peterwvj/gists{/gist_id}","starred_url":"https://api.github.com/users/peterwvj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterwvj/subscriptions","organizations_url":"https://api.github.com/users/peterwvj/orgs","repos_url":"https://api.github.com/users/peterwvj/repos","events_url":"https://api.github.com/users/peterwvj/events{/privacy}","received_events_url":"https://api.github.com/users/peterwvj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/overturetool/overture/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/overturetool/overture/labels/Mergable","name":"Mergable","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/overturetool/overture/milestones/24","html_url":"https://github.com/overturetool/overture/milestones/v2.2.6","labels_url":"https://api.github.com/repos/overturetool/overture/milestones/24/labels","id":1041644,"number":24,"title":"v2.2.6","description":"","creator":{"login":"ldcouto","id":582801,"avatar_url":"https://avatars.githubusercontent.com/u/582801?v=3","gravatar_id":"","url":"https://api.github.com/users/ldcouto","html_url":"https://github.com/ldcouto","followers_url":"https://api.github.com/users/ldcouto/followers","following_url":"https://api.github.com/users/ldcouto/following{/other_user}","gists_url":"https://api.github.com/users/ldcouto/gists{/gist_id}","starred_url":"https://api.github.com/users/ldcouto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldcouto/subscriptions","organizations_url":"https://api.github.com/users/ldcouto/orgs","repos_url":"https://api.github.com/users/ldcouto/repos","events_url":"https://api.github.com/users/ldcouto/events{/privacy}","received_events_url":"https://api.github.com/users/ldcouto/received_events","type":"User","site_admin":false},"open_issues":35,"closed_issues":5,"state":"open","created_at":"2015-03-27T13:05:31Z","updated_at":"2015-05-19T09:16:53Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-05-19T00:30:44Z","updated_at":"2015-05-19T11:18:55Z","closed_at":null,"body":"Given the spec below. If you execute `Run()` the interpreter fails to see that `x` represents an illegal value. Note that the type invariant for type `C` strictly requires values of this type to be the character value `'a'`. Still, executing `Run()` yields `'b'` and no errors are reported.\r\n\r\nIt's the same for Overture and VDMJ.\r\n~~~\r\nmodule Entry\r\n\r\nexports all\r\ndefinitions\r\n\r\ntypes\r\n\r\nC = char\r\ninv c == c = 'a';\r\n  \r\noperations\r\n\r\nRun : () ==> ?\r\nRun () ==\r\nlet x : C = 'b' \r\nin \r\n  return x;\r\n\r\nend Entry\r\n~~~\r\nYou can do something similar with a type definition based on `bool`, i.e.\r\n~~~\r\nTrue = bool\r\ninv b == b = true'\r\n~~~"},"comment":{"url":"https://api.github.com/repos/overturetool/overture/issues/comments/103447230","html_url":"https://github.com/overturetool/overture/issues/446#issuecomment-103447230","issue_url":"https://api.github.com/repos/overturetool/overture/issues/446","id":103447230,"user":{"login":"peterwvj","id":5388919,"avatar_url":"https://avatars.githubusercontent.com/u/5388919?v=3","gravatar_id":"","url":"https://api.github.com/users/peterwvj","html_url":"https://github.com/peterwvj","followers_url":"https://api.github.com/users/peterwvj/followers","following_url":"https://api.github.com/users/peterwvj/following{/other_user}","gists_url":"https://api.github.com/users/peterwvj/gists{/gist_id}","starred_url":"https://api.github.com/users/peterwvj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterwvj/subscriptions","organizations_url":"https://api.github.com/users/peterwvj/orgs","repos_url":"https://api.github.com/users/peterwvj/repos","events_url":"https://api.github.com/users/peterwvj/events{/privacy}","received_events_url":"https://api.github.com/users/peterwvj/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T11:18:55Z","updated_at":"2015-05-19T11:18:55Z","body":"Excellent Nick - thanks for the explanation too!"}}