{"action":"created","issue":{"url":"https://api.github.com/repos/rxie25/PLT2016Spring/issues/96","repository_url":"https://api.github.com/repos/rxie25/PLT2016Spring","labels_url":"https://api.github.com/repos/rxie25/PLT2016Spring/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/rxie25/PLT2016Spring/issues/96/comments","events_url":"https://api.github.com/repos/rxie25/PLT2016Spring/issues/96/events","html_url":"https://github.com/rxie25/PLT2016Spring/issues/96","id":153682693,"number":96,"title":"equation graph should allow recursive calls per LRM","user":{"login":"jzacsh","id":156228,"avatar_url":"https://avatars.githubusercontent.com/u/156228?v=3","gravatar_id":"","url":"https://api.github.com/users/jzacsh","html_url":"https://github.com/jzacsh","followers_url":"https://api.github.com/users/jzacsh/followers","following_url":"https://api.github.com/users/jzacsh/following{/other_user}","gists_url":"https://api.github.com/users/jzacsh/gists{/gist_id}","starred_url":"https://api.github.com/users/jzacsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzacsh/subscriptions","organizations_url":"https://api.github.com/users/jzacsh/orgs","repos_url":"https://api.github.com/users/jzacsh/repos","events_url":"https://api.github.com/users/jzacsh/events{/privacy}","received_events_url":"https://api.github.com/users/jzacsh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rxie25/PLT2016Spring/labels/plt:%20semantic%20anlysis","name":"plt: semantic anlysis","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/rxie25/PLT2016Spring/milestones/5","html_url":"https://github.com/rxie25/PLT2016Spring/milestones/LRM%20Feature%20Complete","labels_url":"https://api.github.com/repos/rxie25/PLT2016Spring/milestones/5/labels","id":1696745,"number":5,"title":"LRM Feature Complete","description":"We should probably be done by the last day of classes with all our *actual* coding. ie: our compiler should match our LRM in 14 days.","creator":{"login":"jzacsh","id":156228,"avatar_url":"https://avatars.githubusercontent.com/u/156228?v=3","gravatar_id":"","url":"https://api.github.com/users/jzacsh","html_url":"https://github.com/jzacsh","followers_url":"https://api.github.com/users/jzacsh/followers","following_url":"https://api.github.com/users/jzacsh/following{/other_user}","gists_url":"https://api.github.com/users/jzacsh/gists{/gist_id}","starred_url":"https://api.github.com/users/jzacsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzacsh/subscriptions","organizations_url":"https://api.github.com/users/jzacsh/orgs","repos_url":"https://api.github.com/users/jzacsh/repos","events_url":"https://api.github.com/users/jzacsh/events{/privacy}","received_events_url":"https://api.github.com/users/jzacsh/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":28,"state":"open","created_at":"2016-04-11T05:32:48Z","updated_at":"2016-05-11T22:21:11Z","due_on":"1970-01-01T05:00:00Z","closed_at":null},"comments":5,"created_at":"2016-05-08T23:10:06Z","updated_at":"2016-05-11T22:21:11Z","closed_at":"2016-05-11T22:21:11Z","body":"per our LRM, there is *one* specific case where an equation can look like it depends on itself: IFF it is the return value (ie: it is a statement that is itself just a single expression). eg:\r\n\r\n```sh\r\ngcd = {\r\n  // ...\r\n  gcd; // recursively call self\r\n}\r\n```\r\n\r\n## Solution\r\nThis is probably trivial to fix if anyone wants to take it on. The edge-case _(that we want to allow a cyclical dependency)_ needs to be added for consideration that\r\n\r\nThe [`R.exprRelator`][exprel] should have some notion it passes around (currently passes a tuple of two items, so this would mean adding a third item) as to whether or not it is looking at an expression *inside* an expression (ie: a **recursive** call to `exprRelator`). This would allow us to know if [`A.id(...)` match][id] is OK to be cyclical\r\n\r\nNote that the `gcd = {...}` high-level analysis is not done by the usual [`R.exprRelator`'s `A.Assign` matcher][exprel], but is called from the outside, and [**only provided** the `A.multi_eq` body, here][multi_eqbody]\r\n\r\n[exprel]: https://github.com/rxie25/PLT2016Spring/blob/346d251e1b6e7582d73e8c7172a1a1a75062dfac/src/relation.ml#L90-99\r\n[id]: https://github.com/rxie25/PLT2016Spring/blob/346d251e1b6e7582d73e8c7172a1a1a75062dfac/src/relation.ml#L85\r\n[multi_eqbody]: https://github.com/rxie25/PLT2016Spring/blob/346d251e1b6e7582d73e8c7172a1a1a75062dfac/src/relation.ml#L146"},"comment":{"url":"https://api.github.com/repos/rxie25/PLT2016Spring/issues/comments/218607868","html_url":"https://github.com/rxie25/PLT2016Spring/issues/96#issuecomment-218607868","issue_url":"https://api.github.com/repos/rxie25/PLT2016Spring/issues/96","id":218607868,"user":{"login":"jzacsh","id":156228,"avatar_url":"https://avatars.githubusercontent.com/u/156228?v=3","gravatar_id":"","url":"https://api.github.com/users/jzacsh","html_url":"https://github.com/jzacsh","followers_url":"https://api.github.com/users/jzacsh/followers","following_url":"https://api.github.com/users/jzacsh/following{/other_user}","gists_url":"https://api.github.com/users/jzacsh/gists{/gist_id}","starred_url":"https://api.github.com/users/jzacsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzacsh/subscriptions","organizations_url":"https://api.github.com/users/jzacsh/orgs","repos_url":"https://api.github.com/users/jzacsh/repos","events_url":"https://api.github.com/users/jzacsh/events{/privacy}","received_events_url":"https://api.github.com/users/jzacsh/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T22:21:11Z","updated_at":"2016-05-11T22:21:11Z","body":"fixed by db91716"}}