[gme-users] Query regarding BON2 interpreter

damathai at vt.edu damathai at vt.edu
Tue Aug 8 15:36:41 CDT 2006


Hey Zoltan,

Thanks, that worked. I dint notice that the notice that the create methods were
static. :-)

Regards,
Deepak

Quoting Zoltan Molnar <zolmol at isis.vanderbilt.edu>:

> Sorry, I did not realize one more thing in your code. Please use
>
> BON::Connection conn;
> conn = BON::Connection::create(SM, s0, s1, string("Transition"));
>
> instead of
>
> > > BON::Connection conn;
> > > conn->create(SM, s0, s1, string("Transition"));
>
>
> (create methods are static, so they can be invoked in two ways, in the
> latter case althought it compiles, it works only if conn is already a
> non-null object)
>
>
> Br, Zoli
>
> > -----Original Message-----
> > From: gme-users-bounces at list.isis.vanderbilt.edu
> > [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf
> > Of damathai at vt.edu
> > Sent: Tuesday, August 08, 2006 10:54 AM
> > To: gme-users
> > Subject: RE: [gme-users] Query regarding BON2 interpreter
> >
> >
> > Hi Zoltan,
> >
> > Thanks for the prompt reply.
> >
> > I did try this. I traced the implementation hierarchy to see
> > if i could pass BON::Model in place of BON::Connection.
> >
> > This compiles fine, but gives me a run-time error, saying
> > "Debug Assertion Failed!"
> > File: c:\program files\gme\sdk\bon\util.h
> > Line: 520
> >
> > If I ignore this error, then it terminates on me saying:
> > Exception kind : Util Exception Exception message : Object is null
> >
> > So i did realise that it is not able to extract the objects
> > (srcEnd and dstEnd of the transition). And i conclude that
> > this was not the way to do it.
> >
> > So, do you know as to why i'm having this problem. I am using
> > GME Version 4.11.10 Could that be the problem?...Is this a
> > bug in the tool and has been fixed now?
> >
> > Let me know what you think about this.
> >
> > Thank you,
> >
> > Regards,
> > Deepak
> >
> >
> > Quoting Zoltan Molnar <zolmol at isis.vanderbilt.edu>:
> >
> > > Hi,
> > >
> > > You can just put s0 and s1 instead of srcEnd and dstEnd, because
> > > BON::Model inherits from BON::ConnectionEnd.
> > >
> > > BON::Connection conn;
> > > conn->create(SM, s0, s1, string("Transition"));
> > >
> > > Br, Zoli
> > >
> > >
> > > > -----Original Message-----
> > > > From: gme-users-bounces at list.isis.vanderbilt.edu
> > > > [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of
> > > > damathai at vt.edu
> > > > Sent: Monday, August 07, 2006 11:46 PM
> > > > To: gme-users
> > > > Subject: [gme-users] Query regarding BON2 interpreter
> > > >
> > > >
> > > > Hello there,
> > > >
> > > > My name is Deepak Mathaikutty and i'm a frequent user of GME. I
> > > > would like some help on a problem i'm facing.
> > > >
> > > > Here is my question:
> > > >
> > > > I'm constructing a finite state machine from my user
> > model created
> > > > using a metamodel i created in GME. The state machine
> > construction
> > > > is done through the BON2 interpreter.
> > > >
> > > > So i create states which is pretty straight forward :
> > > >
> > > > BON::Model s0;
> > > > s0->create(SM, string("State"));
> > > > s0->setName(string("STATE0"));
> > > >
> > > > BON::Model s1;
> > > > s1->create(SM, string("State"));
> > > > s1->setName(string("STATE1"));
> > > >
> > > > Assume SM to be the toplevel which acts as the parent for
> > the state
> > > > machine and State is a <<model>> entity in my metamodel.
> > > >
> > > > Now my question is I want to connect these states by creating a
> > > > transition, which is a <<model>> entity in my metamodel
> > > >
> > > > Which would something like this :
> > > >
> > > > BON::Connection conn;
> > > > conn->create(SM, srcEnd, dstEnd, string("Transition"));
> > > >
> > > > srcEnd and dstEnd are of type BON::ConnectionEnd.
> > > >
> > > > So how to initialize or get srcEnd to point to s0 and
> > dstEnd to s1?
> > > >
> > > > I can not find any appropriate APIs to do so.
> > > >
> > > > Let me know if i'm not doing it the right way.
> > > >
> > > > I will be grateful if someone can help me with this. Basically i
> > > > want to create a state machine through the interpreter, which
> > > > requires creating states (this is fine) and transitions,
> > which i'm
> > > > having problems with.
> > > >
> > > > Thank you,
> > > >
> > > > Regards,
> > > > Deepak
> > > > _______________________________________________
> > > > 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