Dynamic discovery of structure?

8 messages Options
Embed this post
Permalink
Jimmy Johnson

Dynamic discovery of structure?

Reply Threaded More More options
Print post
Permalink
Is there a way to determine *all* the types to which an object conforms?

Or to determine which object types conform to a particular object?

Is there a way to determine an object's *class* hierarchy?

If so, is there a way to determine from which class an object's field originated and from which class the last redefinition came?

Colin LeMahieu

Re: Dynamic discovery of structure?

Reply Threaded More More options
Print post
Permalink
Sounds like you're looking for the Class and Feature tools.  View -> Tools
-> Class, View -> Tools -> Features.  With these you can find derived types,
ancestor types, descendant versions, ancestor versions, calees, callers,
assigners, etc.

On Tue, Sep 1, 2009 at 2:20 PM, boxer41a <[hidden email]> wrote:

>
>
> Is there a way to determine *all* the types to which an object conforms?
>
> Or to determine which object types conform to a particular object?
>
> Is there a way to determine an object's *class* hierarchy?
>
> If so, is there a way to determine from which class an object's field
> originated and from which class the last redefinition came?
>
>  
>


[Non-text portions of this message have been removed]

Jimmy Johnson

Re: Dynamic discovery of structure?

Reply Threaded More More options
Print post
Permalink
Sorry, I was not clear.  What I want to do is discover the *class* structure from which a running system was created.

I'm sure the runtime must keep a table somewhere of all the dynamic and static types for the current system.  Can I explore that and discover the class structure, for example?



--- In [hidden email], Colin LeMahieu <clemahieu@...> wrote:

>
> Sounds like you're looking for the Class and Feature tools.  View -> Tools
> -> Class, View -> Tools -> Features.  With these you can find derived types,
> ancestor types, descendant versions, ancestor versions, calees, callers,
> assigners, etc.
>
> On Tue, Sep 1, 2009 at 2:20 PM, boxer41a <boxer41a@...> wrote:
>
> >
> >
> > Is there a way to determine *all* the types to which an object conforms?
> >
> > Or to determine which object types conform to a particular object?
> >
> > Is there a way to determine an object's *class* hierarchy?
> >
> > If so, is there a way to determine from which class an object's field
> > originated and from which class the last redefinition came?
> >
> >  
> >
>
>
> [Non-text portions of this message have been removed]
>


Daniel Furrer

Re: Re: Dynamic discovery of structure?

Reply Threaded More More options
Print post
Permalink
You can access some runtime information using the classes INTERNAL and TYPE
(and ANY.generating_type).
I don't think you can do what you're looking for though.

Daniel

On Tue, Sep 1, 2009 at 9:34 PM, boxer41a <[hidden email]> wrote:

>
>
> Sorry, I was not clear. What I want to do is discover the *class* structure
> from which a running system was created.
>
> I'm sure the runtime must keep a table somewhere of all the dynamic and
> static types for the current system. Can I explore that and discover the
> class structure, for example?
>
>
> --- In [hidden email] <eiffel_software%40yahoogroups.com>,
> Colin LeMahieu <clemahieu@...> wrote:
> >
> > Sounds like you're looking for the Class and Feature tools. View -> Tools
> > -> Class, View -> Tools -> Features. With these you can find derived
> types,
> > ancestor types, descendant versions, ancestor versions, calees, callers,
> > assigners, etc.
> >
> > On Tue, Sep 1, 2009 at 2:20 PM, boxer41a <boxer41a@...> wrote:
> >
> > >
> > >
> > > Is there a way to determine *all* the types to which an object
> conforms?
> > >
> > > Or to determine which object types conform to a particular object?
> > >
> > > Is there a way to determine an object's *class* hierarchy?
> > >
> > > If so, is there a way to determine from which class an object's field
> > > originated and from which class the last redefinition came?
> > >
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>  
>


[Non-text portions of this message have been removed]

Jimmy Johnson

Re: Dynamic discovery of structure?

Reply Threaded More More options
Print post
Permalink
Manu,

I am trying to get a list of all the dynamic types in a system.  To do so I inherited from INTERNAL and assigned `internal_dynamic_type_string_table' to a local after creating a composite object.  However, the table seems to be empty.  ??

jjj



--- In [hidden email], Daniel Furrer <daniel.furrer@...> wrote:

>
> You can access some runtime information using the classes INTERNAL and TYPE
> (and ANY.generating_type).
> I don't think you can do what you're looking for though.
>
> Daniel
>
> On Tue, Sep 1, 2009 at 9:34 PM, boxer41a <boxer41a@...> wrote:
>
> >
> >
> > Sorry, I was not clear. What I want to do is discover the *class* structure
> > from which a running system was created.
> >
> > I'm sure the runtime must keep a table somewhere of all the dynamic and
> > static types for the current system. Can I explore that and discover the
> > class structure, for example?
> >
> >
> > --- In [hidden email] <eiffel_software%40yahoogroups.com>,
> > Colin LeMahieu <clemahieu@> wrote:
> > >
> > > Sounds like you're looking for the Class and Feature tools. View -> Tools
> > > -> Class, View -> Tools -> Features. With these you can find derived
> > types,
> > > ancestor types, descendant versions, ancestor versions, calees, callers,
> > > assigners, etc.
> > >
> > > On Tue, Sep 1, 2009 at 2:20 PM, boxer41a <boxer41a@> wrote:
> > >
> > > >
> > > >
> > > > Is there a way to determine *all* the types to which an object
> > conforms?
> > > >
> > > > Or to determine which object types conform to a particular object?
> > > >
> > > > Is there a way to determine an object's *class* hierarchy?
> > > >
> > > > If so, is there a way to determine from which class an object's field
> > > > originated and from which class the last redefinition came?
> > > >
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >  
> >
>
>
> [Non-text portions of this message have been removed]
>


Emmanuel Stapf

RE: Re: Dynamic discovery of structure?

Reply Threaded More More options
Print post
Permalink
> I am trying to get a list of all the dynamic types in a system.  To do so
> I inherited from INTERNAL and assigned
> `internal_dynamic_type_string_table' to a local after creating a
> composite object.  However, the table seems to be empty.  ??

That's expected. The table is used to speed up the process of querying the
corresponding dynamic type from a textual representation. It is not meant to be
filled at startup time. You can use `type_name_of_type' given a runtime computed
dynamic type (e.g. from querying the dynamic type of an object, or the one you get
from a textual representation) to get a type description.

Regards,
Manu

------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------  
Jimmy Johnson

Re: Dynamic discovery of structure?

Reply Threaded More More options
Print post
Permalink
Okay, thanks.  So is there a way to discover all the [dynamic] types that a system "knows" about without actually having hold of an object or a string representation of a type?

jjj

--- In [hidden email], "Emmanuel Stapf [ES]" <manus@...> wrote:

>
> > I am trying to get a list of all the dynamic types in a system.  To do so
> > I inherited from INTERNAL and assigned
> > `internal_dynamic_type_string_table' to a local after creating a
> > composite object.  However, the table seems to be empty.  ??
>
> That's expected. The table is used to speed up the process of querying the
> corresponding dynamic type from a textual representation. It is not meant to be
> filled at startup time. You can use `type_name_of_type' given a runtime computed
> dynamic type (e.g. from querying the dynamic type of an object, or the one you get
> from a textual representation) to get a type description.
>
> Regards,
> Manu
>


Jimmy Johnson

Re: Dynamic discovery of structure?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Emmanuel Stapf
Is there a way to force the table to become filled with *all* types known to the system?




--- In [hidden email], "Emmanuel Stapf [ES]" <manus@...> wrote:

>
> > I am trying to get a list of all the dynamic types in a system.  To do so
> > I inherited from INTERNAL and assigned
> > `internal_dynamic_type_string_table' to a local after creating a
> > composite object.  However, the table seems to be empty.  ??
>
> That's expected. The table is used to speed up the process of querying the
> corresponding dynamic type from a textual representation. It is not meant to be
> filled at startup time. You can use `type_name_of_type' given a runtime computed
> dynamic type (e.g. from querying the dynamic type of an object, or the one you get
> from a textual representation) to get a type description.
>
> Regards,
> Manu
>