-
Notifications
You must be signed in to change notification settings - Fork 161
Open
Labels
Description
kast.md
defines #Top
as
syntax {Sort} Sort ::= "#Top" [klabel(#Top), symbol, group(mlUnary)] |
and #True
as
| "#True" [klabel(#Top), symbol, group(mlUnary), unparseAvoid] |
(Similarly for #Bottom
and #False
.)
Both productions have the same klabel
and are symbol
-s. However, according to the K User Manual,
The symbol provided must be unique to this definition. This is enforced by K.
In this case, it is not enforced. As a consequence, there are productions in compiled.json
that have the same klabel
(field, not the attribute), which makes processing productions more difficult.
Possible fixes:
- [If this is a bug] Add the missing check for
symbol
uniqueness. Drop#True
and#False
as they do not seem to be indispensable. - [If this is a feature] Adjust the documentation. Add a new kompiler pass that eliminates the duplicate production from
compiled.json
.