![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: Code beautifiers for Rhapsody? Topic Summary: Created On: 15-Jun-2006 16:39 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I'm looking into integrating a code beautifier into Rhapsody to clean up its rather ugly generated code (specifically for C++, though C and/or Java support would be nice too). Has anyone been successful with this? If so, with what package?
So far, all the ones I've looked at are either not powerful enough to make a real difference, or mess with Rhapsody's magic comments. Thanks, Aaron Sher, Vanteon Corporation |
|
![]() |
|
![]() |
|
What specific beautifiers have you looked at ?
Maybe the outcoming "rulebased" C++ Codegen will help you. This should allow you to generate C++ code following your rules ;-) best regards, Bernhard. |
|
![]() |
|
![]() |
|
Yes, I imagine that the new rules-based codegen will help, but I'm trying to solve a short-term problem. I've got a solution based on GC (that I've posted over in the Value Added Utilities forum) that at least does no harm, and that improves the code somewhat, but it's not really what I'd like.
I'm currently playing with the codegen properties that let you insert comments; hopefully that plus the GC script will get me something acceptable. |
|
![]() |
|
![]() |
|
Hi Aaron
Although I really think you should not care about the generated code since it is infact no longer source code but object code (When was the last time you formatted your .obj files that the C compiler produced???) I think you should look at "indent" which is a very old program that beefs up source code in C but I think in te meantime it can do C++ too. greetings Walter |
|
![]() |
|
![]() |
|
I understand, and I would agree, except that my company does contract software (and hardware) development for clients. Unless they're willing to purchase a Rhapsody license, all I can deliver to them is the source code. They may want to make changes to the application, and they're going to have to understand the source in order to do it. Now, the fact that the source uses the OXF libraries, and that we're not allowed to distribute source for those libraries, is already a major problem in that case, but that's a separate question. :-)
I did look briefly at indent, and as I recall it doesn't do a lot more than its name suggests. That much is easy, any beautifier can do that. What I'd really like is something that can understand the C++ syntax, and make syntax-dependent changes using a rules-based language. All the (free) beautifiers I've looked at so far use a flag-based approach, where you just say "perform operations 1, 3, and 5, but not 2 and 4"; this limits you to the modifications that have been explicitly coded in by the tool writer, and it has some combinatorial problems (e.g. operations 2 and 5 together cause mismatched braces). |
|
![]() |
|
![]() |
|
Just a comment on the upcoming "rule-based" C++ code generator:
The view here is that while we applaud that this feature will be introduced, it is difficult to justify the additional cost (not just for the administrator who would update the "rules", but also for users of the modified generator) when the desired changes to the code generator are very minor (e.g. movement of braces, tab-indentation). Another consideration is that whenever generated code is modified, this will have an effect on round-tripping. |
|
![]() |
Telelogic Rhapsody
» Rhapsody Category » Rhapsody
»
Code beautifiers for Rhapsody?
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.