Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000514Core InformRules and rulebookspublic2011-01-19 20:002014-05-07 07:35
ReporterRon Newcomb 
Assigned Tograham 
PrioritynormalSeverityseriousReproducibilityalways
StatusclosedResolutionfixed 
PlatformPPCOSMac OS XOS Version10.4
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000514: A pair of "<rule> is listed before/after <rule> in <rulebook>" consistently fails.
DescriptionUsing two "is listed before" assertions (or, two "is listed after") will always fail in one ordering, and always work in another ordering.

Compile the below source text and check the Rules Index to see the ordering of rules isn't 1,2,3,Final. But if the pair of "listed before" assertions swap places in the source, they do work.

Same issue for the (commented out) "listed after". They fail in the below ordering, but swapping them and they'll work.
Minimal Source Text To Reproduce
Our failing action is a number that varies. 
To decide if our planning actor cannot try (N - number): no.


Enacting [for someone] something is an activity on people.  

For enacting when our failing action is less than one (this is the 1st  rule): do nothing instead.

For enacting for someone off-stage (this is the 2nd rule): do nothing instead.

For enacting when our planning actor cannot try our failing action (this is the 3rd rule): do nothing 
instead.

Last for enacting for someone (called our enactor) (this is the Final rule):do nothing.


The 1st rule is listed before the 2nd rule in the for enacting rulebook.
The 2nd rule is listed before the 3rd rule in the for enacting rulebook.


[The 3rd rule is listed after the 2nd rule in the for enacting rulebook.
The 2nd rule is listed after the 1st rule in the for enacting rulebook.]


There is room.
Additional Information
enacting ... activity
 b f a
for someone off-stage 2nd rule name unlist
for when our planning actor cannot try our failing action 3rd rule name unlist
for when our failing action is less than one 1st rule name unlist
for someone (called our enactor) Final rule name unlist
default outcome is success
      NB: the 2nd rule is listed before the 3rd rule in the for enacting rulebook
      NB: the 1st rule is listed before the 2nd rule in the for enacting rulebook
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
(0001471)
mattweiner (reporter)
2011-12-01 14:20

More in this forum thread:
http://www.intfiction.org/forum/viewtopic.php?f=7&t=3824&p=27328 [^]

The ordering process seems very opaque; as far as I can tell the compiler is *not* going through each declaration and, as it encounters it, placing it in the appropriate half of the rulebook according to its specificity ordering. Which is what should happen according to section 18.4 of the documentation.
(0002285)
graham (administrator)
2014-01-12 14:48

This is correct behaviour. Without the "listed before" sentences, we get the order 1, 3, 2, Final, because the rulebook is sorted by specificity, and 2 is less specific than 1 or 3. When the "listed before" sentences are done, first 1 is placed before 2, giving 3, 1, 2, Final; then 2 is listed before 3, giving 2, 3, 1, Final. Listed before sentences are read and acted on in sequence.

- Issue History
Date Modified Username Field Change
2011-01-19 20:00 Ron Newcomb New Issue
2011-01-20 02:39 jmcgrew Status new => acknowledged
2011-01-21 09:47 EmacsUser Status acknowledged => confirmed
2011-12-01 14:20 mattweiner Note Added: 0001471
2014-01-12 14:48 graham Note Added: 0002285
2014-01-12 14:48 graham Status confirmed => resolved
2014-01-12 14:48 graham Resolution open => fixed
2014-01-12 14:48 graham Assigned To => graham
2014-05-07 07:34 jmcgrew Fixed in Version => 6L02
2014-05-07 07:35 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker