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

Re: Blind software engineers, specifically UML

Daniel Dalton <d.dalton@iinet.net.au> writes:

> On Mon, Jul 15, 2013 at 11:09:25PM +0200, Pascal J. Bourguignon wrote:
>> UML CASE tools save UML models as XML files.  There's a standard DTD for
>> UML.  I guess that XML is as hard to read for you than for me, but you
>> can write a program to translate the model read from the XML files into
>> some readable form.  And vice versa.
> So basically extracting parts of the xml file to create a textual
> representation of the UML diagram?
>> The notion of diagram corresponds only to a subset of the model,
>> composed in a way to present it in an easily understandable chunk.
>> For example, here is a model and a few diagrams:
>> (defmodel "Windows and Views"
>>   (defclass window ()
>>     ((frame :accessor view-frame :type rectangle)
>>      (title :accessor window-title :type string)))
> I won't lie, I don't really have the knowledge to understand this just
> yet. So is this how you'd suggest conveying my thoughts in a textual
> way? Or is something like this possible to extract from the xml?

Well as a user of emacs, I assumed some knowledge of lisp and symbolic
expressions (sexps), but any textual form can do.

Lisp sexps are made of atoms or list of sexps.  List are written as
elements separated by space surrounded by parentheses.  Atoms are
anything that's not a list (symbols (identifiers), numbers, strings,
vectors, etc).

To give some meaning to a list, we often use a symbol in the first
position.  defmodel, defclass, defassociation, +, -, if, sin, cos, etc.
The meaning can be given by a formal definition in lisp, but can also be
in the mind of the writer and the reader.  "def" is a prefix often used
instead of "define-", so defclass is a short hand for define-class, and
its meaning of a list that starts with this symbol would be to define a
class.  The rest of the list would then be arguments needed to define a
class: its name, a list of its superclasses, a list of its attributes,

I'll repeat, the important part of this concept of symbolic expression
is that it's not limited to lisp forms.  You can use it to expression
any structured data, just like XML indeed.  But sexps are a little
simplier, since you there's less syntax, and you don't have to repeat
the tag at the closing parenthesis.  So they're much easier to read than

And since they're lisp data, they can easily be read by a lisp program
(with the read function), and then the lisp program can easily process
the lists of the sexp, to interpret and give them a meaning.  

But you could as well write a program that translates the XML model into
English prose describing the model, if you read it more easily than

    model: Windows and Views

    class window

       superclasses: none



                accessor:  window-frame
                type:      rectangle

                accessor:  window-title
                type:      string

etc.   I don't know if it's easier for you to read structured data
counting spaces or counting parentheses?

Also, have a look at: 

> Thanks for your comprehensive response. I'll certainly pass it on to my
> lecturer, because no doubt he'll understand it much better than I will. 

__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.  
You know you've been lisping too long when you see a recent picture of George 
Lucas and think "Wait, I thought John McCarthy was dead!" -- Dalek_Baldwin

To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@cs.vassar.edu" with a
subject of "unsubscribe" or "help".

If you have questions about this archive or had problems using it, please send mail to:

priestdo@cs.vassar.edu No Soliciting!

Emacspeak List Archive | 2010 | 2009 | 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog | Search the archive