Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000473Core InformPhrases and functional programmingpublic2010-12-18 17:472014-05-07 07:35
ReporterEmacsUser 
Assigned Tograham 
PrioritynormalSeverityseriousReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSMac OS XOS Version10.6
Product Version6F95 
Target VersionFixed in Version6L02 
Summary0000473: To decide whether phrases are mistyped
DescriptionThis already turned up in 0000452:0000880. The phrase ``ruling on Pluto's status'' in the attached source is given a void return type when invoked by name, so ni wrongly rejects the when-play-begins rule with

- - - -
Problem. You wrote 'present ruling on Pluto's status' , but 'ruling on Pluto's status' has the wrong kind of value: a phrase nothing -> nothing rather than a phrase nothing -> truth state.
I was trying to match this phrase:

present (ruling on pluto's status - phrase nothing -> truth state)
This was what I found out:

ruling on Pluto's status = a phrase nothing -> nothing
- - - -

The alternative

- - - -
To decide what truth state is Pluto is a planet...
- - - -

is illegal I7:

- - - -
Problem. You wrote 'To decide what truth state is Pluto is a planet (this is ruling on Pluto's status)' : but phrases are not allowed to decide a truth state, and should be defined with the form 'To decide if ...' rather than 'To decide what truth state is ...'.
 See the manual: 11.5 > Conditions and questions
- - - -
Minimal Source Text To Reproduce
There is a room.
To decide whether Pluto is a planet (this is ruling on Pluto's status):
	decide no.
To present (decider - a phrase nothing -> truth state):
	showme the decider.
When play begins:
	present ruling on Pluto's status.
TagsNo tags attached.
Effect(serious) Compiler rejects valid code
Attached Files

- Relationships
has duplicate 0000946closed Type of predicate phrases is very strange 

-  Notes
(0000910)
EmacsUser (manager)
2010-12-19 15:27

Corrected typo in minimal source.
(0001456)
EmacsUser (manager)
2011-11-11 14:08
edited on: 2012-07-21 04:39

Actually, as things currently stand, the type could also be argued as phrase nothing -> condition.

(0001939)
mattweiner (reporter)
2012-12-13 05:20

A case where I actually wanted to apply this, and a workaround:

http://www.intfiction.org/forum/viewtopic.php?f=7&t=6622&p=46405&sid=4c438f8e289e25a3bccd46d1bea31491 [^]
(0001940)
mattweiner (reporter)
2012-12-13 05:22

Note also that the Standard Rules does contain one of the apparently illegal "to decide what truth state" phrases:

To decide what truth state is whether or not (C - condition)
(documented at ph_whether):
(- ({C}) -).

If one includes a "to decide what truth state..." phrase in one's own code, then both that phrase and the phrase from the Standard Rules will throw a compiler error.
(0002290)
graham (administrator)
2014-01-14 12:14

I think the most appropriate thing is for the kind here to be "phrase nothing -> truth state", and I've made this change for the next build.

- Issue History
Date Modified Username Field Change
2010-12-18 17:47 EmacsUser New Issue
2010-12-18 18:37 jmcgrew Status new => confirmed
2010-12-19 15:27 EmacsUser Note Added: 0000910
2010-12-19 15:27 EmacsUser Steps to Reproduce Updated View Revisions
2011-09-16 09:32 EmacsUser Relationship added related to 0000750
2011-09-16 09:32 EmacsUser Relationship deleted related to 0000750
2011-11-11 14:08 EmacsUser Note Added: 0001456
2011-11-11 14:09 EmacsUser Note Edited: 0001456 View Revisions
2012-07-21 04:39 EmacsUser Note Edited: 0001456 View Revisions
2012-07-21 04:39 EmacsUser Relationship added has duplicate 0000946
2012-12-13 05:20 mattweiner Note Added: 0001939
2012-12-13 05:22 mattweiner Note Added: 0001940
2014-01-14 12:14 graham Note Added: 0002290
2014-01-14 12:14 graham Status confirmed => resolved
2014-01-14 12:14 graham Resolution open => fixed
2014-01-14 12:14 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