{"action":"created","issue":{"url":"https://api.github.com/repos/Echtzeitsysteme/java-refactoring-ttc/issues/35","labels_url":"https://api.github.com/repos/Echtzeitsysteme/java-refactoring-ttc/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/Echtzeitsysteme/java-refactoring-ttc/issues/35/comments","events_url":"https://api.github.com/repos/Echtzeitsysteme/java-refactoring-ttc/issues/35/events","html_url":"https://github.com/Echtzeitsysteme/java-refactoring-ttc/issues/35","id":72704067,"number":35,"title":"Proposed VIATRA solution and some clarifications","user":{"login":"szarnyasg","id":1402801,"avatar_url":"https://avatars.githubusercontent.com/u/1402801?v=3","gravatar_id":"","url":"https://api.github.com/users/szarnyasg","html_url":"https://github.com/szarnyasg","followers_url":"https://api.github.com/users/szarnyasg/followers","following_url":"https://api.github.com/users/szarnyasg/following{/other_user}","gists_url":"https://api.github.com/users/szarnyasg/gists{/gist_id}","starred_url":"https://api.github.com/users/szarnyasg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szarnyasg/subscriptions","organizations_url":"https://api.github.com/users/szarnyasg/orgs","repos_url":"https://api.github.com/users/szarnyasg/repos","events_url":"https://api.github.com/users/szarnyasg/events{/privacy}","received_events_url":"https://api.github.com/users/szarnyasg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-02T21:44:08Z","updated_at":"2015-05-04T15:51:35Z","closed_at":"2015-05-04T15:51:35Z","body":"We (@steindani, @abelhegedus) are working on a solution for the extended version of the case and would like to get some feedback whether we’re on the right track. Our tooling does not support bi-directional transformations so the solution would look like this:\r\n\r\n1. Parse the source code to an abstract syntax tree graph (using JDT)\r\n2. Use visitors to transform the syntax graph to an EMF model conforming the proposed Type Graph metamodel.\r\n3. Transform the EMF model to the refactored EMF model (using VIATRA). \r\n4. Keep the JDT syntax graph and the EMF model in sync (using VIATRA).\r\n5. Transform the syntax graph to source code (using JDT).\r\n\r\nWe have the following questions:\r\na. This approach uses the proposed type graph and provides a way to solve the challenges, but it seems a bit over-engineered and requires a lot of code to implement. Do you see this as a well-designed solution for the case?\r\n\r\nb. It is not entirely clear how the solution should produce code with statements (capable of printing to the console) without storing and thus moving (pulling up) the statements in the proposed type graph?\r\n\r\nc. If we are only allowed to work with the information stored in the type graph, should we discard the ASG (reverse-engineered with JDT), and when we’re done with the M2M transformation of the type graph, build a new JDT model and use it to serialize the solution to the test? "},"comment":{"url":"https://api.github.com/repos/Echtzeitsysteme/java-refactoring-ttc/issues/comments/98763082","html_url":"https://github.com/Echtzeitsysteme/java-refactoring-ttc/issues/35#issuecomment-98763082","issue_url":"https://api.github.com/repos/Echtzeitsysteme/java-refactoring-ttc/issues/35","id":98763082,"user":{"login":"SvenPeldszus","id":2663702,"avatar_url":"https://avatars.githubusercontent.com/u/2663702?v=3","gravatar_id":"","url":"https://api.github.com/users/SvenPeldszus","html_url":"https://github.com/SvenPeldszus","followers_url":"https://api.github.com/users/SvenPeldszus/followers","following_url":"https://api.github.com/users/SvenPeldszus/following{/other_user}","gists_url":"https://api.github.com/users/SvenPeldszus/gists{/gist_id}","starred_url":"https://api.github.com/users/SvenPeldszus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SvenPeldszus/subscriptions","organizations_url":"https://api.github.com/users/SvenPeldszus/orgs","repos_url":"https://api.github.com/users/SvenPeldszus/repos","events_url":"https://api.github.com/users/SvenPeldszus/events{/privacy}","received_events_url":"https://api.github.com/users/SvenPeldszus/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T15:51:35Z","updated_at":"2015-05-04T15:51:35Z","body":"We appreciate your efforts and can assure you that you are on the right track.\r\n\r\n> 1.   Parse the source code to an abstract syntax tree graph (using JDT)\r\n   2. Use visitors to transform the syntax graph to an EMF model conforming the proposed Type Graph metamodel.\r\n   3. Transform the EMF model to the refactored EMF model (using VIATRA).\r\n   4. Keep the JDT syntax graph and the EMF model in sync (using VIATRA).\r\n   5. Transform the syntax graph to source code (using JDT).\r\n\r\nThe procedure of your solution is very close to our solution and the other ones known to us. The synchronization part is the \"heart\" of any solution and of course we don´t know how you´ve implemented that part and how often you back-propagate the changes from the PG to the AST. However, your questions show us that you are working on a suitable solution.\r\n\r\n> a. This approach uses the proposed type graph and provides a way to solve the challenges, but it seems a bit over-engineered and requires a lot of code to implement. Do you see this as a well-designed solution for the case?\r\n\r\nAAAAA\r\n\r\n> b. It is not entirely clear how the solution should produce code with statements (capable of printing to the console) without storing and thus moving (pulling up) the statements in the proposed type graph?\r\n\r\nAAAAAAAA\r\n\r\n> c. If we are only allowed to work with the information stored in the type graph, should we discard the ASG (reverse-engineered with JDT), and when we’re done with the M2M transformation of the type graph, build a new JDT model and use it to serialize the solution to the test? \r\n\r\nAAAAAAA"}}