Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000957Core InformUnderstandingpublic2012-07-28 21:372014-05-07 07:34
Reporterotistdog 
Assigned Tograham 
PrioritynormalSeverityseriousReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSWindowsOS Version7
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000957: Too many activities / stack overflow for understand rule.
DescriptionI wanted to figure out a way to emulate the use of possessives as seen in documentation 4.15, only I wanted this to apply to things not part of a person. The trick for "your" as seen in documentation 16.17 seemed close, so I was trying to adapt it to use any person's name followed by an apostrophe and an "s".

(Minimal source updated to reflect Zarf's comment)
Minimal Source Text To Reproduce
"Help Board Project" by Otis

Place is a room.
Here is a rock.
A person called Bob is in Place.
Understand "[person] s" as a thing when the item described is not a person.
Understand "[person] s" as the rock.
Understand "[Bob] s" as the rock.
Test me with "x bob s".
Additional InformationThe specific error message was:

------------------------------------

P12 - Too many activities at once

Most problems are detected when Inform translates the source text, but this is one of the exceptions, a "run-time problem" which emerges only during play.

There is no limit to the number of activities in a work - in most works there are around two dozen built-in activities and perhaps one or two others - but only 25 can be simultaneously going on. In practice this is a generous limit and the most likely cause of breaking it is circularity mistake - where an activity is directly or indirectly duplicating itself.

------------------------------------

The game window terminates with:

"*** Run-time problem P12: Too many activities are going on at once.

Fatal Error: Stack overflow"
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
(0001730)
zarf (developer)
2012-07-31 12:19

You are legitimately creating an infinite loop here -- the error message is correct. Your Understand rule attempts to understand a given input as an person in the process of trying to understand the input as an object. But people are themselves objects. This goes on forever.

Even if you were able to bypass the recursion, your technique will not work, because "[person]'s" is two tokens and can't match the single input word "Bob's".
(0001732)
zarf (developer)
2012-07-31 12:34

I tried a few variations: (Note that I added a rock to the game, and also removed the apostrophe to make it clear that these rules try to match two input words, not one.)

Understand "[person] s" as a thing when the item described is not a person.
Understand "[person] s" as the rock.
Understand "[Bob] s" as the rock.

All of these generate infinite recursions. Arguably an Understand line this tightly contrained should be legal -- maybe not all of these, but at least the last one? Contrast the following, which *does* work as expected:

Color is a kind of value. The colors are red and green and blue.
Understand "[color] s" as the rock.
(0002301)
graham (administrator)
2014-01-17 16:24

I was distinctly nervous of altering anything fundamental in the I6-level parser, but that's really what Zarf calls for here, and I can't think of any reason why the change should cause trouble. Previously, a token like "[Bob]" would parse objects and then reject those which are not Bob; now, it only parses those which are Bob, i.e., it only parses Bob. Thus the noun filter is applied before parsing, not after. This makes all of Zarf's cases work.

- Issue History
Date Modified Username Field Change
2012-07-28 21:37 otistdog New Issue
2012-07-31 12:19 zarf Note Added: 0001730
2012-07-31 12:34 zarf Note Added: 0001732
2012-08-01 18:19 EmacsUser Status new => confirmed
2012-08-01 18:19 EmacsUser Description Updated View Revisions
2012-08-01 18:19 EmacsUser Steps to Reproduce Updated View Revisions
2012-08-01 18:19 EmacsUser Additional Information Updated View Revisions
2014-01-17 16:24 graham Note Added: 0002301
2014-01-17 16:24 graham Status confirmed => resolved
2014-01-17 16:24 graham Resolution open => fixed
2014-01-17 16:24 graham Assigned To => graham
2014-05-07 07:34 jmcgrew Fixed in Version => 6L02
2014-05-07 07:34 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker