[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(FC-Devel) Run app run! (was: Reference app 0.0.0 try 2, UXF)



Hi all, hi Lindsay,

Lindsay wrote:
<snip>
> Ultimately there is no way you can get runnable code out of a set of
> UML diagrams (at least not without adding some "extra" conventions).

Ha! The first gain from prototyping as a way to get requirements.
We all do want runnable code I guess :-) 

Looking for an answer, a good convention, I stumbled on

http://www.rational.com/uml/resources/documentation/notation/notation8a.jtmpl#8.8?borschtid=86071099051975803527

and

http://www.softdocwiz.com/UML.htm#ActiveClass

I suggest taking the property "active" for that.
This property, denoted by thick lines around
the object, means that the object gets a thread of control.
In a single-threaded app like HelloWorld this would mean in C++ and 
in java that "main" just should give control to the active object.  
But with what message? 'go' seems just as good as 'run' or 'do'
or 'start' or ... the first message, or all messages that the object
can handle, each one for a separate thread. 
Let's for the moment say go().
 
Impact on reference app would be: 
HelloWorld object gets thick lines, meaning (and stating in the 
corresponding UxF) that is has the propery "active", making it an 
ActiveClass.
This would cause the Hello_world's "go" in the generated 
app to get control.  

This sounds Ok for model to code (m2c)
But what for the reverse case, c2m? 
Whatever is in main (java, C++) gets control.
Should we rename (or tag) it "go()" ? 
An alternative would be to intoduce a language dependent "main"
object.

I admit not feeling sure about this. All this is just improvisation, 
I would really appreciate some comments from the others.

> There is nothing in UMl that lets you represent actual code, so this is
> about as good as it is going to get.

So we will run into more of this.
The suggested modifications to the reference app
seem trivial here.
However: I think it is very important that we limit 
ourselves to as few own conventions as possible,
and that the ones we do have to invent are simple, 
and clear to everyone involved. So, for every
suggested own convention (including this one): 
please question it, discuss it, think about it, 
explain to yourself why it is really necessary, 
how did somebody else do it? 

If you don't understand then don't at first 
blame yourself; probably the explanation
lacks clarity. Please ask.

> > Lindsay, any idea when you have some publishable code?
> > I'm impressed, but you knew that allready :-)
 
> Well, I wrote this on Friday afternoon as a proof of concept so it is
> not in particularly great shape. I am about to restructure it and then
> I'll have something that people can look at it - in particular the
> current version simply reads in the Uxf and parses it and generates the
> C++ directly. I am going to rewrite it so that it builds more of an
> internal model of the system and then have hooks for generating
> different language representations. This week looks pretty busy so it
> may be next week before I have anything releasable.

This is only fair to the others :-)


Have fun,
				Danny