Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001159Core InformActionspublic2013-12-18 19:242014-05-07 07:33
Reportersarracht 
Assigned Tograham 
PrioritynormalSeverityseriousReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSMac OS XOS Version10.9
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0001159: The syntax for writing rules with excepted actions is prone to misinterpretation by ni
DescriptionCopied from below:

Inform seems to interpret ``something other than'' as negating the condition on the verb and restricting all but the last action to specify no (grammatical) objects (though that still allows oddly reading rules where the last action uses a preposition). Or, in the case that the prepositions ``with'' or ``to'' are present after the action list (see WI 7.9), restricting all actions to give no objects. But this introduces an ambiguity: does the first rule in the attached source apply to actions with the box as their noun (per the special ``with''/``to'' syntax) or as their second noun (per the preposition for unlocking)? Inform chooses the latter (0000905). But it also expresses this preference, without backtracking (0000686), when any two-noun action is listed last, as in the second rule.

Perhaps it would be better for Inform not to allow any objects in the excluded action list, having WI 7.9 instead ask authors to use clearer ``when the noun is ...'' and ``when the second noun is ...'' conditions.
Minimal Source Text To Reproduce
Test Lab is a room.
Here is a box.

[WI 7.9 suggests that this rule would test the noun, not the second noun.]
Does the player mean doing something other than locking, or unlocking with a box:
	it is unlikely.

[This rule does not compile unless examining is listed last.]
Does the player mean doing something other than examining or locking to something:
	it is unlikely.
Additional InformationFor searchability, these rule preambles could also be written with ``except'':

Does the player mean doing something except locking, or unlocking with a box: ....
Does the player mean doing something except examining or locking to something: ....
TagsNo tags attached.
Effect(serious) Compiler rejects valid code
Attached Files

- Relationships
related to 0000784closedgraham "doing something other than Xing the Y" is handled wrong 

-  Notes
(0002191)
EmacsUser (manager)
2013-12-19 14:59

It's not clear to me that the reported problem is a bug so much as it is the limitation discussed in WI 7.8. But the first two cases are accepted, so clearly something fishy is going on. Let me dig further.
(0002197)
EmacsUser (manager)
2013-12-25 15:50
edited on: 2013-12-25 16:27

Okay, so this looks like a particularly unfortunate case of both 0000905 and 0000686. Inform seems to interpret ``something other than'' as negating the condition on the verb and restricting all but the last action to specify no (grammatical) objects (though that still allows oddly reading rules where the last action uses a preposition). Or, in the case that the prepositions ``with'' or ``to'' are present after the action list (see WI 7.9), restricting all actions to give no objects. But this introduces an ambiguity: Does

- - - -
Before doing something other than putting or unlocking with the box: ....
- - - -

apply to actions with the box as their noun (per the special ``with''/``to'' syntax) or as their second noun (per the preposition for unlocking)? Inform chooses the latter (0000905). But it also expresses this preference, without backtracking (0000686), when any two-noun action is listed last:

- - - -
Before doing something other than examining or locking to the box: ....
- - - -

fails to compile with ``to'' being rejected as a preposition for locking, whereas the ostensibly equivalent

- - - -
Before doing something other than locking or examining to the box: ....
- - - -

is admitted without complaint.

Perhaps it would be better for Inform not to allow any objects in the excluded action list, having WI 7.9 instead ask authors to use clearer ``when the noun is ...'' and ``when the second noun is ...'' conditions.

(0002198)
EmacsUser (manager)
2013-12-25 16:13

After further reading, I've edited the bug report to reflect the problems remaining after accounting for the limitation documented in WI 7.8. Let me know if you think I've cut out anything important—the original report is still in the history.
(0002549)
graham (administrator)
2014-03-10 15:35

I'm resolving this out because the fixes to 0000905 and 0000686 make Inform behave acceptably here, in my view, at least. The second rule in the test case compiles whichever order the actions are in, and both rules test the noun, not the second noun.

- Issue History
Date Modified Username Field Change
2013-12-18 19:24 sarracht New Issue
2013-12-19 14:59 EmacsUser Note Added: 0002191
2013-12-19 14:59 EmacsUser Category Rules and rulebooks => Actions
2013-12-25 15:50 EmacsUser Note Added: 0002197
2013-12-25 15:52 EmacsUser Relationship added child of 0000905
2013-12-25 15:52 EmacsUser Relationship added child of 0000686
2013-12-25 15:52 EmacsUser Relationship added related to 0000784
2013-12-25 16:13 EmacsUser Note Added: 0002198
2013-12-25 16:13 EmacsUser Status new => confirmed
2013-12-25 16:13 EmacsUser Summary "doing something other than" with multiple two-argument actions fails to compile in certain circumstances => The syntax for writing rules with excepted actions is prone to misinterpretation by ni
2013-12-25 16:13 EmacsUser Description Updated View Revisions
2013-12-25 16:13 EmacsUser Steps to Reproduce Updated View Revisions
2013-12-25 16:13 EmacsUser Additional Information Updated View Revisions
2013-12-25 16:27 EmacsUser Note Edited: 0002197 View Revisions
2014-01-26 08:54 graham Relationship deleted child of 0000905
2014-03-09 16:06 graham Relationship deleted child of 0000686
2014-03-10 15:35 graham Note Added: 0002549
2014-03-10 15:35 graham Status confirmed => resolved
2014-03-10 15:35 graham Resolution open => fixed
2014-03-10 15:35 graham Assigned To => graham
2014-05-07 07:32 jmcgrew Fixed in Version => 6L02
2014-05-07 07:33 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker