maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Steven Eker <eker AT csl.sri.com>
- To: maude-help AT cs.uiuc.edu
- Subject: Re: [Maude-help] Wildcard symbol
- Date: Fri, 11 May 2012 10:59:18 -0700
- List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help>
- List-id: <maude-help.cs.uiuc.edu>
The only way to improve on that is to structure your data - i.e.
rather than have a flat 13-ary symbol, push some of the arguments
into subterms, then you need fewer variables for the parts that
don't change. Steven On 5/11/12 8:45 AM, Matthew Rocklin wrote: Thanks for the response Javi!
var n : Nat .
var s : String .
var f : Float .
eq F("a",
n, s, f) = F("A", n, s, f) .
My operations (like F) are relatively involved so doing this sort of thing is undesirable. Here is an example operation so you understand my situation sort Array .
op GEMM : Char Char
Nat Nat Nat Float Array Nat Array Nat Float Array Nat
->
Array .
an equation of the form listed above looks like the following
eq GEMM("N", c, n, m,
o, alpha, transpose(A), p, B, q, beta, C, r)
= GEMM("Y", c, n, m,
o, alpha, A , p, B, q, beta, C, r) .
I think the extra variables obfuscate the meaning of this equation. Any other ideas or is this the best I can do? On Fri, May 11, 2012 at 10:30 AM, Javi
Espert <jespert AT dsic.upv.es>
wrote:
Hi, There is no such a thing as a wildcard symbol in Maude.
However, you can accomplish the same goal by placing fresh
variables wherever you would write a wildcard. A variable is
fresh if it doesn't appear anywhere else in the _expression_.
Best regards,
Javi Espert
2012/5/11 Matthew Rocklin <mrocklin AT cs.uchicago.edu>
I'm looking for a wildcard symbol.
I.e. imagine I have an operation like this
op F : Char Nat String Float -> Bool .
And I want a rule that says, if the first char
is an 'a', make it an "A". I want to write this
rule like this:
eq F("a", _, _, _) = F("A", _, _, _) .
Is there a clean way to do this in Maude?
Best,
--
Matthew Rocklin
University of Chicago
Computer Science PhD Student
Maude-help mailing list Maude-help AT cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/maude-help Matthew Rocklin
University of Chicago
Computer Science PhD Student
_______________________________________________ Maude-help mailing list Maude-help AT cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/maude-help |
- [Maude-help] Wildcard symbol, Matthew Rocklin, 05/11/2012
- Re: [Maude-help] Wildcard symbol, Javi Espert, 05/11/2012
- Re: [Maude-help] Wildcard symbol, Matthew Rocklin, 05/11/2012
- Re: [Maude-help] Wildcard symbol, Javi Espert, 05/11/2012
- Re: [Maude-help] Wildcard symbol, Steven Eker, 05/11/2012
- Re: [Maude-help] Wildcard symbol, Matthew Rocklin, 05/11/2012
- Re: [Maude-help] Wildcard symbol, Javi Espert, 05/11/2012
Archive powered by MHonArc 2.6.16.