{"action":"created","issue":{"url":"https://api.github.com/repos/tuura/concepts/issues/11","labels_url":"https://api.github.com/repos/tuura/concepts/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/tuura/concepts/issues/11/comments","events_url":"https://api.github.com/repos/tuura/concepts/issues/11/events","html_url":"https://github.com/tuura/concepts/issues/11","id":130400031,"number":11,"title":"Translating initialise concepts to STGs","user":{"login":"snowleopard","id":675286,"avatar_url":"https://avatars.githubusercontent.com/u/675286?v=3","gravatar_id":"","url":"https://api.github.com/users/snowleopard","html_url":"https://github.com/snowleopard","followers_url":"https://api.github.com/users/snowleopard/followers","following_url":"https://api.github.com/users/snowleopard/following{/other_user}","gists_url":"https://api.github.com/users/snowleopard/gists{/gist_id}","starred_url":"https://api.github.com/users/snowleopard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowleopard/subscriptions","organizations_url":"https://api.github.com/users/snowleopard/orgs","repos_url":"https://api.github.com/users/snowleopard/repos","events_url":"https://api.github.com/users/snowleopard/events{/privacy}","received_events_url":"https://api.github.com/users/snowleopard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-02-01T15:51:23Z","updated_at":"2016-02-01T18:12:52Z","closed_at":null,"body":"@jrbeaumont and I are looking into the following problem.\r\n\r\nWe have two handshake concepts `left` and `right` with initial states:\r\n```haskell\r\nleft  = handshake00 a b\r\nright = handshake00 c d\r\n```\r\nWe also have a third handshake concept `mid` without an initial state:\r\n```haskell\r\nmid = handshake b c\r\n```\r\n\r\nWe want to be able to compose all three concepts and translate them into an STG in such a way that the `mid` handshake picks up the correct initial state. That is, the following `system` concept\r\n```haskell\r\nsystem = left <> mid <> right\r\n```\r\nshould be equivalent to the concept with explicit initialisation:\r\n```haskell\r\nsystem' = left <> handshake00 b c <> right\r\n```\r\n\r\nWe have been trying to play with possible STGs corresponding to the `mid` concept but so far no complete solutions. This is the thread to discuss possible solutions."},"comment":{"url":"https://api.github.com/repos/tuura/concepts/issues/comments/178106016","html_url":"https://github.com/tuura/concepts/issues/11#issuecomment-178106016","issue_url":"https://api.github.com/repos/tuura/concepts/issues/11","id":178106016,"user":{"login":"snowleopard","id":675286,"avatar_url":"https://avatars.githubusercontent.com/u/675286?v=3","gravatar_id":"","url":"https://api.github.com/users/snowleopard","html_url":"https://github.com/snowleopard","followers_url":"https://api.github.com/users/snowleopard/followers","following_url":"https://api.github.com/users/snowleopard/following{/other_user}","gists_url":"https://api.github.com/users/snowleopard/gists{/gist_id}","starred_url":"https://api.github.com/users/snowleopard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowleopard/subscriptions","organizations_url":"https://api.github.com/users/snowleopard/orgs","repos_url":"https://api.github.com/users/snowleopard/repos","events_url":"https://api.github.com/users/snowleopard/events{/privacy}","received_events_url":"https://api.github.com/users/snowleopard/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T18:12:52Z","updated_at":"2016-02-01T18:12:52Z","body":"Let me upload some STGs here: [example.zip](https://github.com/tuura/concepts/files/112741/example.zip).\r\n\r\nThe archive contains `left.work`, `mid.work` and `right.work` with handshake STGs as described above.\r\n\r\nThe `mid.work` is probably want we want according to the previous comment. It does allow 4 correct behaviours. I obtained it by contracting dummies in the solution with 4 dummies.\r\n\r\nHowever, composing these three STGs still leads to a deadlock after parallel composition. Which is unexpected to me. Any thoughts? Can we eliminate the deadlock in any way? \r\n"}}