maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Marko Schuetz-Schmuck <MarkoSchuetz AT web.de>
- To: maude-help AT lists.cs.illinois.edu
- Subject: [[maude-help] ] extending message "format"
- Date: Wed, 09 Jun 2021 11:24:27 -0400
- Authentication-results: ppops.net; spf=pass smtp.mailfrom=MarkoSchuetz AT web.de; dkim=pass header.d=web.de header.s=dbaedf251592
Dear All,
I'm still very new to Maude. I ran into something that has me
puzzled. Say I define the module TRADE-ORDER:
(omod TRADE-ORDER is
protecting STRING .
protecting NAT .
sorts Order Symbol CustomerId .
subsort Order < Msg .
subsorts String < Symbol CustomerId .
msg buy_of_for_ : Nat Symbol CustomerId -> Order .
msg sell_of_for_ : Nat Symbol CustomerId -> Order .
endom)
and based on that I want to define a LIMIT-ORDER which is just a
TRADE-ORDER with a limit (of course I didn't want to duplicate the parts
of the message that are already in TRADE-ORDER). So I tried the
following (which would have some drawbacks even if it would work,
e.g. multiple nested "at"s):
(omod LIMIT-ORDER is
protecting TRADE-ORDER .
sort Limit-Order .
subsort Limit-Order < Order .
msg _at_ : Order Float -> Limit-Order .
endom)
I was expecting to be able to write
(red in LIMIT-ORDER : buy 5 of "T" for "C" at 1.2 .)
but that results in "incorrect command". I have since changed this to
objects and classes, but the syntax is not as plain as it would be with
the above.
Best regards,
Marko
Attachment:
signature.asc
Description: PGP signature
- [[maude-help] ] extending message "format", Marko Schuetz-Schmuck, 06/09/2021
Archive powered by MHonArc 2.6.19.