maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Marc Boyer <Marc.Boyer AT onera.fr>
- To: Maude Help <maude-help AT cs.uiuc.edu>
- Subject: [Maude-help] Opposite sorting: a bug in the SORTABLE-LIST code ?
- Date: Fri, 19 Mar 2010 13:30:38 +0100
- List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help>
- List-id: <maude-help.cs.uiuc.edu>
Dear all,
I was tring to sort a list of Nat in reverse order, but I can't
make it works...
Here is a minimal example:
**** Defining a view were the order is the reverse of
view Nat> from STRICT-TOTAL-ORDER to NAT is
sort Elt to Nat .
op < to > .
endv
**** Testing
fmod REV-SORT-NAT is
protecting SORTABLE-LIST{Nat>} .
op l> : -> List{Nat>} .
eq l> = 1 3 .
endfm
red sort( l> ) .
*** The output is
result NeList{Nat>}: 1 3
But if I replace the view definition by
view Nat> from STRICT-TOTAL-ORDER to NAT is
sort Elt to Nat .
op X:Elt < Y:Elt to term ( X:Nat > Y:Nat ).
endv
Then, it works...
What's appening ?
Regards,
Marc Boyer
--
Marc Boyer, Ingenieur de recherche ONERA
Tel: (33) 5.62.25.26.36 DTIM
Fax: (33) 5.62.25.26.52 2, av Edouard Belin
http://www.onera.fr/staff/marc-boyer/ 31055 TOULOUSE Cedex 4
- [Maude-help] Opposite sorting: a bug in the SORTABLE-LIST code ?, Marc Boyer, 03/19/2010
- Re: [Maude-help] Opposite sorting: a bug in the SORTABLE-LIST code ?, Steven Eker, 03/22/2010
Archive powered by MHonArc 2.6.16.