Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002050Core InformRelationspublic2018-02-06 00:442018-02-06 00:44
Assigned To 
PrioritynormalSeveritymildReproducibilityhave not tried
Platformx86OSWindowsOS Version10
Product Version6M62 
Target VersionFixed in Version 
Summary0002050: You can compare descriptions for equality, but there is no correct way to do that.
DescriptionThe attached code prints false instead of true. However, there is no general way to get this comparison right, so it should probably be disallowed entirely (or alternatively, WI might grow a paragraph about "object identity vs. object equivalence" in the Advanced Phrases section).
Minimal Source Text To Reproduce
The Cave is a room.

Frobozz Magic Description Company Catalog relates one description of numbers to one number.

The verb to be available on page implies the Frobozz Magic Description Company Catalog relation.

To decide what description of Ks is cast (D - a description of values of kind K) to value:
	Decide on D;

When play begins:
	Now cast even numbers to value is available on page 2;
	Showme whether or not cast even numbers to value is available on page 2;
Additional InformationThe descriptions stored in this relation are otherwise fully functional, aside from not printing very usefully e.g. in RELATIONS output. This particular case could be solved by interning or constant folding the description literal, though I'm uncertain whether it's worth it in the general case.

It is not possible to get this comparison right because descriptions can be arbitrarily complicated. You could ask whether "numbers which are counterexamples to the Goldbach conjecture" is equal to an empty description, for example. This particular case could be solved by interning or constant-folding the literal, but that's not going to work in the general case.

Finally, you can still retrieve the contents of this relation by using the phrase "list of descriptions of numbers that relate to N by the Frobozz Magic Description Company Catalog relation", so disallowing this won't actually break anything.

Side note: Why is "cast [description] to value" not already in the standard rules, given how easy it is to write and how many things break without it?
TagsNo tags attached.
Effect(mild) Compiler accepts invalid code
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2018-02-06 00:44 NYKevin New Issue

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker