[Uml-devel] codegenerators

Brian Thomas thomas at mail630.gsfc.nasa.gov
Mon Apr 21 09:17:04 UTC 2003


On Sunday 20 April 2003 11:13 pm, Pascal wrote:
> That is where we diverge: I was not talking round-tripping at all, just
> use Umbrello upstream, and not let it trash all the edits I have done in
> my code once generated. Luis has proposed something with diff3, which I
> think is the solution to this problem. This gives limited usability, but
> I think this is quite easy to implement, and is much more useful that
> the current code generation we have. Currently, once you have generated
> the code, and used it (meaning probably adapted it somehow), there is no
> way to go change something in Umbrello and have it be reflected in the
> code without doing this by hand, or letting umbrello stamp on your
> hand-edited parts. And that may prevent people from using it...

	Umn, perhaps I dont understand round-tripping, but I thought what
	you just mentioned IS roundtripping, e.g. make a edit in the code and 
	then the UML diagram updates and vice-versa. Can you describe
	the "limited usability" of diff3 so I understand it better and how it 
	diverges from round-tripping? Do you mean just to not let Umbrello
	blow away your edits in the code? I think there are still problems here.. 
	for example you may ADD a method that doesnt exist in the UML. 
	Later on, you decide to add the method (operation) to the UML class. 
	What should Umbrello do then? and that is assuming that it recognizes
	that both the method you edited and the operation are the same thing.
	The code to do that is pretty similar to what is needed for full round-
	tripping. Right now I dont see how you can go "halfway" with this sort 
	of thing and do a decent job.

	I also want to reinforce that I DONT want round-tripping right away. I 
	just would be happy to be able to better control the action of the code
	generation from the UML tool with perhaps some ability to "preview" 
	the code that would be generated.

	BTW, I've been wanting to work on the code, but alot of instability has
	appeared over the last few weeks and Im waiting for the hacking on the
	diagrams to die down and stabilize before I start.


>
> I think too that round-tripping is a hard problem, but the source of
> this is that the code analysis part has to deal with getting from
> low-level information (the source) to higher-level features. A state
> diagram or sequence diagram can be tricky to figure out automatically...

	No question! I certainly dont claim to know how to do that myself so	
	I couldnt begin to code a program to do that. IMO the sequence/state
	diagrams are of little use for code generation in their current form.
	There just isnt enough information specified in them so that they 
	can be successfully integrated in with class/object diagrams. I 
	think the UML designers will have to do a much better job on these 
	types of diagrams before code generation using them can be a reality
	(and that may take many years from now to be a reality). In fact the
	weakness in many of the UML diagrams leads me to believe that
	the software community will eventually scrap UML in favor of something
	else, or UML will morph tremendously in the next few years.

			-b.t.

> --Pascal

--

Live fast, die young, and leave a flat patch of fur on the highway!
		-- The Squirrels' Motto (The "Hell's Angels of Nature")





More information about the umbrello-devel mailing list