Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000331Core InformPropertiespublic2010-10-14 23:322010-10-28 00:31
ReporterRon Newcomb 
Assigned Tograham 
PrioritynormalSeveritymildReproducibilityalways
StatusclosedResolutionfixed 
PlatformPPCOSMac OS XOS Version10.4
Product Version6E72 
Target VersionFixed in Version6F95 
Summary0000331: The ``provides property'' predicates is always false when applied to values within a quantifier
DescriptionIn the following code, I assert that each Thing has a Color (called tint), and, each Color has a Thing (called the simile). But the condition "provides the property" isn't working the same for each of them:

When asking "if thing provides the property tint", it's always true, and the message is printed, as it should be.

When asking "if color provides the property simile", it's false?! But,
when asking "if red provides the property simile", it's true and prints.

OK, so, I understand that when the property is filled in for only some instances (red, but not green), asking whether or not the whole kind (color) has the property is questionable. However, I didn't fill in the property for all instances of Thing (the tree), but when asking if its kind (Thing) has the property, it always says yes -- I don't need to specify "if the fire truck provides the property tint".

I guess the bug I'm trying to report is that KOVs and Objects work differently in the phrase "provides the property" in the case of only some of those instantiations' properties being filled in. I was expecting "color provides the property simile" to be true.

Minimal Source Text To Reproduce
"asdf"

Spot is a room.

Color is a kind of value. Some colors are red, green, and blue. 

A fire truck and a tree are things.

A thing has a color called the tint.
A color has a thing called the simile.

The tint of the fire truck is red. 
The simile of red is a fire truck.

When play begins:
	if thing provides the property tint, say "Usual color for apples, fire trucks, and hydrants: they 
are usually [tint of fire truck]."; 
	if color provides the property simile, say "Usual simile for red:  'He was as red as a [simile 
of red]!'";
	
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
(0000696)
EmacsUser (manager)
2010-10-15 11:05

Note that ``if color provides the property simile'' is not a statement about the kind at all---it's read as ``if a color provides the property simile,'' so it refers to instances of the kind. Thus, this also fails:

- - - -
There is a room.
Leaf is a thing.

Color is a kind of value. Some colors are red, green, and blue.
A color has a thing called the simile. The simile of green is the leaf.

When play begins, if no color provides the property simile, say "Test fails."
- - - -
(0000697)
jmcgrew (administrator)
2010-10-15 11:43

The condition is evaluated at compile time when used with a specific value:

<code>
      ! [3: if red provides the property simile , say ~Red has it.~]
       if (((true))) { say__p=1;ParaContent(); print (PrintText) SC_14; new_line; .L_Say3; .L_SayX3; }
</code>

But when used with the kind name (referring to "any color"), it's evaluated at runtime by this routine:

<code>
! True or false?
! [ Exists x : color(x) & provides(x, 'the property simile') ]
! in ' '
[ Prop_1 x x_ix ;
    for (x=1: x<=3: x++){
        if ((WhetherProvides(x, false, p14_simile))){
            rtrue;
        }
    }
    rfalse;
];
</code>

... which fails because WhetherProvides only works on objects, not values.
(0000701)
graham (administrator)
2010-10-16 18:16

Fixed. (An obscure problem in type-checking.) It's actually an awful piece of source text, though, as the actual meaning of

if thing provides the property tint

is to search through all things to see if any of them provides this property (it behaves as if we had typed "if a thing provides the property tint"); so, for instance, it would fail if there were no things in the world.

- Issue History
Date Modified Username Field Change
2010-10-14 23:32 Ron Newcomb New Issue
2010-10-15 11:05 EmacsUser Note Added: 0000696
2010-10-15 11:05 EmacsUser Status new => confirmed
2010-10-15 11:05 EmacsUser Category Kinds and type checking => Properties
2010-10-15 11:05 EmacsUser Summary "if <KOV> provides the property..." not working as it does for Objects => The ``provides property'' predicates is always false when applied to values within a quantifier
2010-10-15 11:43 jmcgrew Note Added: 0000697
2010-10-16 18:16 graham Note Added: 0000701
2010-10-16 18:16 graham Status confirmed => resolved
2010-10-16 18:16 graham Resolution open => fixed
2010-10-16 18:16 graham Assigned To => graham
2010-10-25 21:14 jmcgrew Fixed in Version => 6F95
2010-10-28 00:31 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker