As for precedence values, Maude assigns default gathering patterns to all those operators for which the user does not specify this information as part of the operator declaration. The default gathering patterns are also entirely similar to those used by OBJ3 [44]. The rules for the assignment of the default gathering patterns are:
&, regardless
of the user specification.
&. In
other words, if an underbar appears between tokens different from the underbar,
then its corresponding argument will have this default gathering pattern. For
example, the default gathering pattern for the operator if_then_else_fi
is (& & &), the default gathering pattern for the operator
[_and then_]
is (& &), and the default gathering pattern for the operator (_)
is (&).
E. Thus, e.g., the
default gathering pattern for the operator not_ is (E), the
default gathering pattern for the operator _?_:_ is (E & E), the
default gathering pattern for the operator _+_ is (E E), and the
default gathering pattern for the operator __ is (E E).
Those binary operators which start with an underscore, end with an underscore, and have a precedence greater than 0 are handled as special cases:
op _+_ : Nat Nat -> Nat [assoc] . op _*_ : Nat Nat -> Nat [assoc] . op __ : NatList NatList -> NatList [assoc] .
Assuming Int < IntList, then the operators
op _<:_ : Int IntList -> IntList . op _:>_ : IntList Int -> IntList .
have, by default, gathering patterns (e E) and (E e),
respectively. According to the general rule, since their argument bars are the
leftmost and the rightmost tokens, the gathering pattern should be (E E)
for both of them. However, both operators fall into the second special case,
since they are binary operators which start and end with underscores, have a
precedence greater than 0 (by default 41), and are not declared associative.
Given the subsort relation, the operator _<:_ may right-associate, but
not left-associate, that is, 1 <: 2 <: 3 should be parsed as
1 <: (2 <: 3),
but (1 <: 2) <: 3 should not be a valid parse. Therefore, _<:_
gets default gathering pattern (e E). And similarly for _:>_,
although in this case it can left-associate, and therefore it gets default
gathering pattern (E e).