maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Francisco Duran <duran AT lcc.uma.es>
- To: Alanna Zito <zito AT cs.queensu.ca>
- Cc: maude-help AT peepal.cs.uiuc.edu
- Subject: Re: [Maude-help] Problem defining operations with objects in fullMaude
- Date: Wed, 31 May 2006 11:26:58 +0200
- List-archive: <http://maude.cs.uiuc.edu/pipermail/maude-help>
- List-id: Maude help list <maude-help.maude.cs.uiuc.edu>
Alanna,
Try adding the declaration
op matches : Object Object -> Bool .
Regards,
Paco Durán
Alanna Zito escribió:
I am trying to define some operations that take two objects and return true if the objects match or are equal (based on certain criteria). I have been able to define similar operations and equations that take sorts, but when I try to do something equivalent with classes, I get a parse error when I try to load the module - I can't figure out if it's just a syntax error that I'm missing, or if I'm trying to do something illegal. Here is a simple example of what I am trying to do (where two Properties "match" if they have the same value for the attribute "lower"):
(omod TEST is
protecting BOOL .
protecting NAT .
class Property | lower : Nat .
op matches : Property Property -> Bool .
vars P1, P2 : Oid .
var L : Nat .
eq matches ( < P1 : Property | lower : L > , < P2 : Property | lower : L > ) = true .
eq matches ( X:Property , Y:Property ) = false [owise] .
endom)
This gives the error
Warning: Parse error in (matches(< <---*HERE*
Error: no parse for eq matches(< P1 : Property | lower : L >,< P2 : Property |
lower : L >) ~ true
Does anyone know what I'm doing wrong, or if there's a better way to do this?
Thank you,
Alanna
_______________________________________________
Maude-help mailing list
Maude-help AT maude.cs.uiuc.edu
http://maude.cs.uiuc.edu/cgi-bin/mailman/listinfo/maude-help
- [Maude-help] Problem defining operations with objects in full Maude, Alanna Zito, 05/30/2006
- Re: [Maude-help] Problem defining operations with objects in fullMaude, Francisco Duran, 05/31/2006
Archive powered by MHonArc 2.6.16.