Skip to Content.
Sympa Menu

maude-help - [Maude-help] getting attribute's value problem

maude-help AT lists.cs.illinois.edu

Subject: Maude-help mailing list

List archive

[Maude-help] getting attribute's value problem


Chronological Thread 
  • From: Petr Vrchlavsky <vrchlavsky.petr AT gmail.com>
  • To: maude-help AT cs.uiuc.edu
  • Subject: [Maude-help] getting attribute's value problem
  • Date: Wed, 16 Jan 2013 01:13:09 +0100
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help/>
  • List-id: <maude-help.cs.uiuc.edu>

Hello, can you please give me an advice or better an example on how to retrieve an attribute from an object? Is it even possible? My issue is that I would like to compere given data with a given object's attribute. Let say that I have a modu like this one below:

(omod CAR is

   pr STRING .
   pr NAT .

   class Car | name : String, maxspeed : Nat .

endom)

My goal is to have an operation similar to the one below:

   op getName : Car -> String .

which would give me the value of the name attribute of the Car class. Is there any way how to recieve that information from a class/object? It doesnt need to be an operation, it can be an msg or anything that give me the capabilities to compare an attribute value against a given value.

Thank you for any response
Peter V.



Archive powered by MHonArc 2.6.16.

Top of Page