Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: Code beautifiers for Rhapsody?
Topic Summary:
Created On: 15-Jun-2006 16:39
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 15-Jun-2006 16:39
User is offline View Users Profile Print this message


Aaron Sher

Posts: 5
Joined: 14-Apr-2006

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
Report this to a Moderator Report this to a Moderator
 21-Jun-2006 12:03
User is offline View Users Profile Print this message


Bernhard Merkle

Posts: 18
Joined: 2-Jun-2005

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.
Report this to a Moderator Report this to a Moderator
 21-Jun-2006 13:29
User is offline View Users Profile Print this message


Aaron Sher

Posts: 5
Joined: 14-Apr-2006

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.
Report this to a Moderator Report this to a Moderator
 24-Jun-2006 09:33
User is offline View Users Profile Print this message


Walter van der Heiden

Posts: 3
Joined: 15-Apr-2005

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
Report this to a Moderator Report this to a Moderator
 24-Jun-2006 13:00
User is offline View Users Profile Print this message


Aaron Sher

Posts: 5
Joined: 14-Apr-2006

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).
Report this to a Moderator Report this to a Moderator
 26-Jun-2006 09:02
User is offline View Users Profile Print this message


Default User

Posts: 4
Joined: 4-May-2005

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.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 0 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.