maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Patrick Browne <patrick.browne AT dit.ie>
- To: Francisco Durán <duran AT lcc.uma.es>
- Cc: "maude-help AT cs.uiuc.edu" <maude-help AT cs.uiuc.edu>
- Subject: Re: [Maude-help] MEL and reflection
- Date: Mon, 11 Apr 2011 10:09:11 +0100
- List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help>
- List-id: <maude-help.cs.uiuc.edu>
Francisco,
In OO languages, such as Java, the term reflection means that a program
can access information about objects (e.g. find its class at runtime). I
wish to know whether MEL can perform a similar task in Maude (i.e. find
the sort of a data item). Can MEL alone without explicit reference to
META-LEVEL provide this type of reflection?
My motivation is that I need to know precisely how this OO style
reflection is done in Maude.
Pat
On 10/04/2011 22:30, Francisco Durán wrote:
> Hi Pat,
>
> I'm not sure whether there is something more behind your question, I don't
> get that of "the kind and object level", but I would say that the answer is
> yes, almost everything in Maude is reflected, and can be used at Maude's
> metalevel.
>
> fmod FOO is
> sorts Foo Bar .
> subsort Bar < Foo .
> op f : Bool -> Foo .
> var B : Bool .
> cmb f(B) : Bar if B .
> endfm
>
> fmod BAR is inc FOO + META-LEVEL . endfm
>
> red metaReduce(upModule('FOO, false), upTerm(f(true))) .
>
> Francisco
This message has been scanned for content and viruses by the DIT Information
Services E-Mail Scanning Service, and is believed to be clean.
http://www.dit.ie
- [Maude-help] MEL and reflection, Patrick Browne, 04/10/2011
- Re: [Maude-help] MEL and reflection, Francisco Durán, 04/10/2011
- Re: [Maude-help] MEL and reflection, Patrick Browne, 04/11/2011
- Re: [Maude-help] MEL and reflection, Francisco Durán, 04/11/2011
- Re: [Maude-help] MEL and reflection, Michael Katelman, 04/11/2011
- Re: [Maude-help] MEL and reflection, Francisco Durán, 04/11/2011
- Re: [Maude-help] MEL and reflection, Patrick Browne, 04/11/2011
- Re: [Maude-help] MEL and reflection, Francisco Durán, 04/10/2011
Archive powered by MHonArc 2.6.16.