[great-users] (very high) Complexity of pattern matching

Aditya Agrawal aagrawa at us.ibm.com
Fri Oct 8 14:20:48 CDT 2004


If the rule is only creating the object and setting some associations 
there is no reason why it should take so long. We should spend some time 
with the example on a profiles to see where the bottleneck is.

Thanks,
Adi

-----------------------------------
Aditya Agrawal
Researcher
IBM T. J. Watson
mailto:aagrawa at us.ibm.com
+1 (914) 784-6068 (TL 863)


great-users-bounces at list.isis.vanderbilt.edu wrote on 10/08/2004 11:44:11 
AM:

> Adi,
> That rule is not trying to find anything. There are three bound 
> objects coming in, and the rule is creating the Integer object along
> with the two associations. The screenshot perhaps did not reveal the
> color distinction clearly.
> 
> Sandeep
> 
> --
> Sandeep Neema
> Research Scientist,
> Institute of Software Integrated Systems, Vanderbilt University
> Phone: 615-343-9996
> Email: sandeep.k.neema at vanderbilt.edu
> -----Original Message-----
> From: great-users-bounces at list.isis.vanderbilt.edu [mailto:great-
> users-bounces at list.isis.vanderbilt.edu] On Behalf Of Aditya Agrawal
> Sent: Friday, October 08, 2004 9:58 AM
> To: great-users
> Subject: RE: [great-users] (very high) Complexity of pattern matching
> 
> 
> Feng, the pattern matcher in GRE. Does it search for composition 
> associations before association class associations? 
> 
> If not I would suggest Sandeep to find the child object integer in 
> one rule and that in a subsequent rule find the associations. 
> 
> Thanks, 
> Adi 
> 
> -----------------------------------
> Aditya Agrawal
> Researcher
> IBM T. J. Watson
> mailto:aagrawa at us.ibm.com
> +1 (914) 784-6068 (TL 863)
> 

> 
> "Feng Shi" <fengshi at isis.vanderbilt.edu> 
> Sent by: great-users-bounces at list.isis.vanderbilt.edu 
> 10/08/2004 10:50 AM 
> 
> Please respond to
> "A list for GReAT users to share bugs, fixes and ideas"
> 
> To
> 
> "great-users" <great-users at list.isis.vanderbilt.edu> 
> 
> cc
> 
> 
> 
> Subject
> 
> RE: [great-users] (very high) Complexity of pattern matching
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> The pattern match algorithm in GRE is exponential. For ~1200 input 
> packets, it could take a quite number of time even for a simple 
> rule. I suggest you removing the two associations from the rule, 
> like following: 
> [image removed] 
> 
> and use Guard to determine whether the Integer object is the real 
> one. The guard code should look like: 
> 
> If both mr end and mc end have cardinality 0..1 
> return (Integer.mr() == SpeciesP && Integer.mc() == Itentifier); 
> Or the cardinality is 0..* 
>             set<SpeciesP> mrs = Integer.mr(); 
>             set<Identifies> mcs = Integer.mc(); 
>             return (mrs.find(SpeciesP)!=mrs.end() && mcs.
> find(Identifier)!=mcs.end()); 
> 
> Hope this helps, 
> 
> Thanks, 
> Feng 
> -----Original Message-----
> From: great-users-bounces at list.isis.vanderbilt.edu [mailto:great-
> users-bounces at list.isis.vanderbilt.edu] On Behalf Of Sandeep Neema
> Sent: Friday, October 08, 2004 9:34 AM
> To: great-users
> Subject: [great-users] (very high) Complexity of pattern matching 
> 
> Here is a simple rule: 
> 
> [image removed] 
> 
> I have a (relatively) large number of packets going into this rule 
> ~1200. However, the matching in this rule is not much. All the 
> objects are bound, a new object, some associations, and a trivial 
> amount of code in an attribute map. The execution of this rule takes
> ~375 seconds on a 3 GHz P4/HT. Can’t blame it on the XML backend 
> because I am running the transformation in memory (Configuration 
> attribute “Run Transform in Memory” is set to True). This numbers 
> are from GRE. I don’t have the exact time for the Code-Generated 
> version but that is crunching for a long time (on the same time-
> scale) as well. Any thoughts? 
> 
> If anybody cares to profile, I can make the transformation and input
> data set available – 
> 
> Cheers, 
> Sandeep 
> 
> -- 
> Sandeep Neema 
> Research Scientist, 
> Institute of Software Integrated Systems, Vanderbilt University 
> Phone: 615-343-9996 
> Email: sandeep.k.neema at vanderbilt.edu 
> -----Original Message-----
> From: great-users-bounces at list.isis.vanderbilt.edu [mailto:great-
> users-bounces at list.isis.vanderbilt.edu] On Behalf Of Feng Shi
> Sent: Friday, October 08, 2004 9:03 AM
> To: great-users
> Subject: RE: [great-users] Creating new classes in the Crosslinks folder 

> 
> Matt, 
> 
> The composition relationship between two classes of two different 
> meta is illegal. You can do in the following way: 
> 
> In your CrossLink UML diagram, create a new class Root as the 
> container of class ExceptionRegistryEntry, and then set the 
> association between Exception and ExceptionRegistryEntry. It should 
> be dealt with as same as other metas, say that you need to initiate 
> the datanetwork of this crosslink meta in the configuration model. 
> Our great-dev team are now working on automatic initiation of such 
> temporary datanetwork with the attribute “temporary” as true value, 
> and it will work in the next release. 
> 
> [image removed] 
> 
> Please let us know any further question. 
> 
> Thanks, 
> Feng 
> 
> -----Original Message-----
> From: great-users-bounces at list.isis.vanderbilt.edu [mailto:great-
> users-bounces at list.isis.vanderbilt.edu] On Behalf Of Matthew J. Emerson
> Sent: Thursday, October 07, 2004 6:06 PM
> To: great-users
> Subject: [great-users] Creating new classes in the Crosslinks folder 
> 
> I need to declare some special “bookkeeping” classes which are not a
> part of either my source metamodel or my destination metamodel to 
> cludge some information around between rules.  So, what is the trick
> to doing this?  I tried to simply define the new class in the 
> Crosslinks folder of my transformation and relate to one of the 
> existing classes in my source metamodel through containment, but 
> this results in a Master General Exception.  Just so you understand 
> what I’m trying to do, here are some pictures: 
> 
> Here’s what I’m putting in the Crosslinks folder. 
> ExceptionRegistryEntry is my cludge class. 
> 
> [image removed] 
> 
> Here’s how I’m trying to use it in my transformation: 
> 
> [image removed] 
> 
> Later on, I want to get out some information I stuck in value using 
> an AttributeMapping.   Any ideas about what I’m missing or doing wrong?
> _______________________________________________
> great-users mailing list
> great-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
> _______________________________________________
> great-users mailing list
> great-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/great-users/attachments/20041008/d7078f9a/attachment.htm


More information about the great-users mailing list