[gme-users] Pattern processor in GME 4.2.3

Anantha Narayanan Ananth at isis.vanderbilt.edu
Thu Feb 26 15:39:25 CST 2004


Hi,
 I could not open nettest.mga, please send an exported xml of the model.

 I tried something with my own test model, these are some observations I
could make:

1. The <fieldspec> attribute in the EVAL_FORALL must specify what kind
of objects you are looking for. I believe that it must contain the kind
name, such as "Router" or "Host", rather than "Model" or "Atom".
Rewriting the pattern file with the correct names might give you the
desired output.

2. When I tried my model with the same pattern file, the first <$Name>
resulted in the name of the top level model being printed (though it was
contained in a folder above, the folder name was not printed). This
means that the same model will be the context of a top level EVAL_FORALL
statement. When constructing the EVAL_FORALL, you must keep the context
in mind. (I am not really sure why it didn't select the root folder or a
top level folder.)

My model contained a folder called "NewPrivateConnections", containing a
model called "NewNetDiagram", which in turn contained a "Router". The
router contained two "Port"s. (A simple trash model based on the
paradigm). The context being "NewNetDiagram", I can use EVAL_FORALL to
navigate to models and atoms under this level.
For instance, $!EVAL_FORALL("R:Router", "<$Name>") will result in the
name of the router printed as: <Router>. However,
$!EVAL_FORALL("R:PrivateConnections","<$Name>") will not result in any
output, since "PrivateConnections" folders cannot be contained within
"NetDiagram" models.

Also, I am currently working on a new pattern processor that should be
more powerful and easy to use than the one available now. Unfortunately,
it is not integrated with GME. It is based on UDM, but can be used with
GME models through a command line tool. There is no documentation on it
right now. If you are interested, please mail to me at
ananth at isis.vanderbilt.edu and I can send you the executable and
instructions on how to use it.

Hope this helps,
Ananth

-----Original Message-----
From: Thompson, Robert C [mailto:robert.c.thompson3 at boeing.com] 
Sent: Thursday, February 26, 2004 11:29 AM
To: gme-users
Subject: [gme-users] Pattern processor in GME 4.2.3


Hi,

I'm trying to run the Pattern Processor using GME 4.2.3.  I'm still
trying to figure out how it works so I could be completely off, but it
seems like it isn't working.  

I've attached the metamodel "networking", which was imported from the
networking.xme which came with the tutorial as described in Lesson 6.  I
used it to create a model "nettest" which has a few routers and things.
Then I used "dump.pat" which is in the tutorial section 7.2.3.  When I
ran the interpreter I had my "NewNetDiagram" selected in the browser and
also the "NewNetDiagram" model window open (showing the model's
contents).  Then I did File->Run Interpreter->Pattern Processor.  This
created the file "NewNetDiagram.xml" which doesn't contain what I
expected.  It just outputs the XML header and the name of the diagram,
but there are no contents, and it in fact doesn't ever close the <$Name>
tag with the </$Name> at the end, making me think it aborted processing
partway through (?)

Here are my questions:

a) Am I running the Pattern Processor right?
b) If so, is the output I got what I should have gotten? 
c) If so, I'm really confused:  I thought that it would be giving me
content based on the contents of the model as dictated by the
EVAL_FORALLs in "dump.pat".  Am I misunderstanding EVAL_FORALL?

d) Or is the Processor broken?

I appreciate any help that can be provided.  Please accept my apologies
if this has already been asked/resolved.  I couldn't find anything
related in the bugzilla or the mail archives...

Thanks
-ace

Ace Thompson
The Boeing Company 
5000 E McDowell Road MC M531-C240
Mesa, Arizona 85215-9797  USA
(480) 891-2284




 <<NewNetDiagram.xml>>  <<dump.pat>>  <<networking.mga>>
<<nettest.mga>> 


More information about the gme-users mailing list