maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Javi Espert <jespert AT dsic.upv.es>
- To: Matthew Rocklin <mrocklin AT cs.uchicago.edu>
- Cc: maude-help AT cs.uiuc.edu
- Subject: Re: [Maude-help] Wildcard symbol
- Date: Fri, 11 May 2012 18:01:25 +0200
- List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help>
- List-id: <maude-help.cs.uiuc.edu>
To my knowledge, yes, that is as far as you can go. But don't be so negative, it looks pretty good!
While using variables might seem tedious, notice that a wildcard symbol would only be useful when you have the same root symbol in both the left-hand side _expression_ and the right-hand side _expression_. Instead of providing syntactic sugar for that special case, the authors of Maude have opted for consistency.
Good luck with your project,
Javi Espert
2012/5/11 Matthew Rocklin <mrocklin AT cs.uchicago.edu>
Thanks for the response Javi!So I would need to do something like the following?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 situationsort 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 followingeq 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 Espert2012/5/11 Matthew Rocklin <mrocklin AT cs.uchicago.edu>
_______________________________________________I'm looking for a wildcard symbol.I.e. imagine I have an operation like thisop 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,--University of ChicagoComputer Science PhD Student
Maude-help mailing list
Maude-help AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/maude-help
--University of ChicagoComputer Science PhD Student
- [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.