Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

I7: Discrepancy between documentation and behaviour concerning present perfect

1 view
Skip to first unread message

constantl...@gmail.com

unread,
Mar 7, 2007, 8:23:32 AM3/7/07
to
I compiled the following code:

<code>
Home is a room. A box is here. It is an openable closed container.

After opening the box when the box has been open, say "The box has
been open."
</code>

This produced the following transcript:

Welcome
An Interactive Fiction
Release 1 / Serial number 070307 / Inform 7 build 4K41 (I6/v6.31 lib
6/11N) SD

Home
You can see a box (closed) here.

>open box
The box has been open.

[...]

However, the documentation states that:

<quote>
if X has been Y ...
is true if it has ever been the case that "X is Y" at the start of any
turn (or any action).
</quote>

Either my temporal logic is flawed or this is a bug. ;-) Any ideas?

mikegentry

unread,
Mar 7, 2007, 10:57:38 AM3/7/07
to
On Mar 7, 8:23 am, constantlyvaria...@gmail.com wrote:
> I compiled the following code:
> Either my temporal logic is flawed or this is a bug. ;-) Any ideas?

The code is doing what it's supposed to. By the time the after-rule
gets around to checking the "has been open" status of the box, the
open action is already complete, and the box has, indeed, been open.
(Not since the beginning of the turn, but since the last action.) In
other words, the reasoning went like this:

1) Check opening the box -- all systems go.
2) Carry out opening the box -- the box is now open.
3) Now, has the box been open? Yes, it has been ever since step 2.

If you want to check specifically to see if the box was open *at the
beginning of the turn on
which you opened it*, you need to use the past tense. E.g.,

<code>
Home is a room. A box is here. It is an openable closed container.

After opening the box when the box was open, say "The box was open."
</code>

The after rule will not fire, because at the beginning of the turn on
which you opened it, the box was closed. (In fact, I don't think it
can ever fire, because you can't open an already open box by the
standard rules.)

rca...@home.com

unread,
Mar 7, 2007, 12:20:26 PM3/7/07
to
> After opening the box when the box has been open, say "The box has
> been open."

I think you may want something like:

After opening the box more than one time, say "The box has been open."

Refer to section "7.17. Actions on consecutive turns" of the
documentation.

(However, this may be problematic for other reasons. It probably
won't handle failed attempts to open the box (if it's locked, for
example) very well, and instructing NPCs to open the box may also
break it. So just manually setting up a flag like HasEverBeenOpened
is probably the safest, if least concise, way to proceed.)


Cheers,
Roger

JDC

unread,
Mar 7, 2007, 5:38:32 PM3/7/07
to
On Mar 7, 8:23 am, constantlyvaria...@gmail.com wrote:

I think you want the past perfect here, i.e.:

After opening the box when the box had been open, say "You open the
box again."

-JDC

0 new messages