maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Petr Vrchlavsky <vrchlavsky.petr AT gmail.com>
- To: maude-help AT cs.uiuc.edu
- Subject: [Maude-help] list of objects in object moduls
- Date: Mon, 26 Nov 2012 21:13:57 +0100
- List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help/>
- List-id: <maude-help.cs.uiuc.edu>
Hi,
I am new to the Maude and I come across a problem. I am trying to model ORM system with some data evolution features. I choose to use object-orientet maude.
I cannot find out how to model list of objects in an example below there is a car which should have a collection of wheels. I would like to model this by a list of wheels, something like an array list in Java.
Can you pleas give me an example how to model a list of wheels inside CAR modul? Thanx.
(omod WHEEL is
pr QID .
subsort Qid < Oid .
sort WheelSize .
ops small big : -> WheelSize [ctor] .
class Wheel | type : WheelSize .
sort Decoration .
ops nice bad : -> Decoration [ctor] .
class DecoratedWheel | decoration : Decoration .
subclass DecoratedWheel < Wheel .
endom)
(omod CAR is
pr WHEEL .
pr QID .
subsort Qid < Oid .
subsort WheelSize < Msg .
class Car | wheel : Oid .
msg getWheel : Oid -> Msg .
vars M N : Oid .
var W : Wheel .
var D : Decoration .
var S : WheelSize .
var W : Wheel .
var WS : WheelSize .
var D : Decoration .
rl [getWheel] : getWheel(M) < M : Car | wheel : N > < N : Wheel | > => < N : Wheel | > .
msg getWheelSize : Oid -> WheelSize .
rl [getWheelSize] : getWheelSize(M) < M : Wheel | type : WS > => WS .
endom
- [Maude-help] list of objects in object moduls, Petr Vrchlavsky, 11/26/2012
- Re: [Maude-help] list of objects in object moduls, Francisco Durán, 11/26/2012
Archive powered by MHonArc 2.6.16.