|
|
Re: Use intermediate models [message #468688 is a reply to message #468677] |
Sun, 03 August 2008 12:59 |
Eclipse User |
|
|
|
Originally posted by: jose.chillan_eclipse.polytechnique.org
Hi,
I think for my part that the pivot model is key for an efficient and
flexible resolution of the conversion.
Although I think the actual implementation is great and provide very good
value, I think I need this pivot model that is not the Java AST, neither
the
C# AST, but rather something out of the languages : a description of the
business and algorithms implemented.
I my view, the Java and C# source code are just "projections" of
this "knowledge" in different languages, and this allow to implement
several
other projections in the future when needed.
As an exemple, a toString() method in Java has to be renamed "ToString()"
in
C#. But I would represent it as a "method that gives a string
representation
of the object" for which we have additional attribute that are the Java
name (toString) and C# name (ToString), and that could be enriched with
information
upon needs.
In addition, I want to be able to recognize code patterns in the code
differents than those necessary to the refactoring in order to apply other
types of transformations in the code for a special purpose conversion,
directly
on the "pivot AST".
One way to achieve this without too much work would be to enrich the Java
code
during the transformation with special comments generated after each phase
that would represent the "pivot AST" serialization. This would allow the
actual refactoring process as comments are kept during most refactor
operations and thus, at any point of the process,it would be possible to
add
custom transformation in addition.
Last, the final source code generation would be performed on the pivot AST
basis.
Jose
|
|
|
|
|
Re: Use intermediate models [message #565093 is a reply to message #468677] |
Sun, 03 August 2008 12:59 |
Eclipse User |
|
|
|
Originally posted by: jose.chillan_eclipse.polytechnique.org
Hi,
I think for my part that the pivot model is key for an efficient and
flexible resolution of the conversion.
Although I think the actual implementation is great and provide very good
value, I think I need this pivot model that is not the Java AST, neither
the
C# AST, but rather something out of the languages : a description of the
business and algorithms implemented.
I my view, the Java and C# source code are just "projections" of
this "knowledge" in different languages, and this allow to implement
several
other projections in the future when needed.
As an exemple, a toString() method in Java has to be renamed "ToString()"
in
C#. But I would represent it as a "method that gives a string
representation
of the object" for which we have additional attribute that are the Java
name (toString) and C# name (ToString), and that could be enriched with
information
upon needs.
In addition, I want to be able to recognize code patterns in the code
differents than those necessary to the refactoring in order to apply other
types of transformations in the code for a special purpose conversion,
directly
on the "pivot AST".
One way to achieve this without too much work would be to enrich the Java
code
during the transformation with special comments generated after each phase
that would represent the "pivot AST" serialization. This would allow the
actual refactoring process as comments are kept during most refactor
operations and thus, at any point of the process,it would be possible to
add
custom transformation in addition.
Last, the final source code generation would be performed on the pivot AST
basis.
Jose
|
|
|
|
Powered by
FUDForum. Page generated in 0.04176 seconds