Skip to Content.
Sympa Menu

maude-help - Re: [Maude-help] Why is (1 + 2 - 3) Ambiguous?

maude-help AT lists.siebelschool.illinois.edu

Subject: Maude-help mailing list

List archive

Re: [Maude-help] Why is (1 + 2 - 3) Ambiguous?


Chronological Thread 
  • From: Chucky Ellison <celliso2 AT illinois.edu>
  • To: najem AT acm.kuniv.edu
  • Cc: maude-help AT cs.uiuc.edu
  • Subject: Re: [Maude-help] Why is (1 + 2 - 3) Ambiguous?
  • Date: Mon, 30 May 2011 10:40:28 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help>
  • List-id: <maude-help.cs.uiuc.edu>

Worse yet, 1 - 2 + 3 actually fails to parse.  It isn't even considered ambiguous.

Maude> rew 1 - 2 + 3 .
Warning: <standard input>, line 3: didn't expect token +:
1 - 2 + <---*HERE*
Warning: <standard input>, line 3: no parse for term.

-Chucky

On Mon, May 30, 2011 at 10:24 AM, Ziad H. Najem <najem AT acm.kuniv.edu> wrote:

Core Maude 2.6 reports the _expression_ (1+2-3) is ambiguous (as shown below)

Shouldn't the gather rules (associativity) resolve the ambiguity?

 - Ziad


-------
Maude> red in INT : 1 + 2 - 3 .
Warning: <standard input>, line 2: ambiguous term, two parses are:
1 + (2 - 3)
-versus-
(1 + 2) - 3

Arbitrarily taking the first as correct.
reduce in INT : 1 + (2 - 3) .
rewrites: 2 in 0ms cpu (0ms real) (~ rewrites/second)
result Zero: 0
------


_______________________________________________
Maude-help mailing list
Maude-help AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/maude-help




Archive powered by MHonArc 2.6.16.

Top of Page