increpare / PuzzleScript

Open Source HTML5 Puzzle Game Engine
MIT License
905 stars 160 forks source link

properties bug(?) no flow flow_up on rhs allowed #1017

Closed increpare closed 4 months ago

increpare commented 4 months ago

v. complex example, needs to be simplified https://www.puzzlescript.net/editor.html?hack=43cebc58529f81ed86279ca7b3117820

david-pfx commented 4 months ago

Needs more info.

increpare commented 4 months ago

here's a simpler example:

a_or_b = a or b

[ c ] -> [ a no a_or_b ]
[ d ] -> [ no a_or_b b ]

what's the problem? somewhat unclear semantics - it's somewhat paradoxical-seeming typing "no a_or_b a" on the right-hand side of a rule. on the other hand, the only sensible way to interpret it is "remove the property, and add the non-property"

simplifying it further, even this is allowed:

[ c ] -> [ a no a ]

this is a catastrophically simplified variant of the first instruction, that could trigger a warning (the way that it does if it's on the left-hand side

[ a no a ] -> [  ]

).

But, I think this is fine overall. It's something of a spooky corner of rule-semantics, with some degenerate forms, but it seems that it always has either one meaningful interpretation, or else is nonsense.