[gme-users] Constraint definition errors

Zoltan Molnar zolmol at isis.vanderbilt.edu
Wed Feb 7 09:51:21 CST 2007


Excerpt from the "Metamodel composition with namespaces" readme doc:

"Defining constraints in a composed metamodel.

If namespaces are defined for the library and the hosting project then
the constraints in the hosting project need to be written in fully
qualified form. The constraints defined in the library may remain
untouched, using terms of the sub-paradigm, the Constraint Manager will
realize later that the types are defined there using short names, so it
will prefix them automatically. "


This means that in case you have composed your language (metamodel) from
other metamodel libraries and you defined namespaces for separating the
sub-languages then constraints newly defined in composite must be
written by using a namespace prefixed form: 

self.attachingConnections( MyNamespace::RootRiskAssociation)->size() >=
1

Zoli


> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu 
> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of aky
> Sent: Wednesday, February 07, 2007 7:37 AM
> To: gme-users
> Subject: Re: [gme-users] Constraint definition errors
> 
> 
> Hi Sumant,
> 
> Check your metamodel and see what the N:: namespace says. Clear the 
> namespaces for the main paradigm and library and reinterpret and the 
> constraints should go off.
> 
> Thanks,
> Akshay.
> 
> Sumant Tambe wrote:
> 
> > Hi Zoli,
> >
> >> What does the File/Display Constaints menuitem say about those 
> >> constraints? Are they loaded and turned on or they are disabled?
> >
> >
> > They seem to be disabled in the Constraint Browser. "Check" 
> button for
> > them is disabled.
> >
> >> Do those constraints use deprecated kindnames, which do not exist 
> >> anymore in the metamodel?
> >
> >
> > What are deprecated kindnames? It does not use elements that are
> > absent in the metamodel. For example following constraint shows 
> > definition error,
> >
> > self.attachingConnections(RootRiskAssociation)->size() >= 1
> >
> > Note that this same constraint does not give an error when it is
> > edited in "Equation" box.
> >
> > thanks,
> >
> > Sumant.
> >
> >>
> >> Zoli
> >>
> >>
> >>> -----Original Message-----
> >>> From: gme-users-bounces at list.isis.vanderbilt.edu
> >>> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of 
> >>> Sumant Tambe
> >>> Sent: Tuesday, February 06, 2007 12:58 PM
> >>> To: gme-users
> >>> Subject: [gme-users] Constraint definition errors
> >>>
> >>>
> >>> Hi folks,
> >>>
> >>> I am getting constraint definition errors to a bunch of 
> constraints
> >>> while importing a model from an xme. But while editing the same 
> >>> constraint in the Equation: box of a constraint, I don't get any 
> >>> error. In other words, MetaGME does not scream at the 
> constraint but 
> >>> while importing a model it does.
> >>>
> >>> This happens for the constraints that use
> >>> self.attachingConnections(*) or self.ConnectedFCOs(*). The 
> >>> constraint definition error says "Neither Type, Variable, 
> implicit 
> >>> attribute nor implicit Association (*) exists." Where in fact the 
> >>> association at the place of * does exist.
> >>>
> >>> These errors show up in CQML, which uses PICML as a 
> library and all
> >>> the types involved in the constraint are defined in CQML. 
> Is it an 
> >>> issue with namespaces?
> >>>
> >>> Please let me know if you have any clues.
> >>>
> >>> Thanks,
> >>>
> >>> Sumant.
> >>> _______________________________________________
> >>> gme-users mailing list
> >>> gme-users at list.isis.vanderbilt.edu
> >>> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> >>>
> >>
> >> _______________________________________________
> >> gme-users mailing list
> >> gme-users at list.isis.vanderbilt.edu
> >> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> >
> > _______________________________________________
> > gme-users mailing list
> > gme-users at list.isis.vanderbilt.edu
> > http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> 
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> 


More information about the gme-users mailing list