Skip to Content.
Sympa Menu

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

maude-help AT lists.siebelschool.illinois.edu

Subject: Maude-help mailing list

List archive

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


Chronological Thread 
  • From: "Ziad H. Najem" <najem AT acm.kuniv.edu>
  • To: maude-help AT cs.uiuc.edu
  • Subject: [Maude-help] Why is (1 + 2 - 3) Ambiguous?
  • Date: Mon, 30 May 2011 18:24:53 +0300 (AST)
  • Importance: Normal
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help>
  • List-id: <maude-help.cs.uiuc.edu>


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
------






Archive powered by MHonArc 2.6.16.

Top of Page