@AnssiR66, while working on lib_classes.i I realized that there might be some CHECKs missing for NOT natural and natural light sources.
Currently, only the verbs turn_on, turn_off and switch carry out CHECKs to ensure that they can be used only with NOT natural light sources.
I'm going ahead and applying the fixes mentioned above, because I'm convinced that this is how it should be; but I'd like to have your confirmation that this is OK.
The current documentation (§12.5. LIGHTSOURCE), is a bit obscure on the topic:
LIGHTSOURCE is natural or NOT natural (a natural LIGHTSOURCE is for example a match or a torch). It can be turned on and off, lighted and extinguished (= put out) if it is not broken. A natural LIGHTSOURCE cannot be turned on or off, it can only be lighted and extinguished (= put out). When examined, a LIGHTSOURCE is by default supplied with a description of whether it is providing light or not.
It doesn't mention explicitly which verbs are allowed on artificial light sources (only for natural ones).
I believe that this how they should work (the * indicates current lacks of CHECKs):
type
turn ON/OFF
light
extinguish
natural
NO
YES
YES
artificial
YES
YES
NO *
Some practical examples:
Natural light sources: a candle, a campfire. They can be lighted and extinguished/put out, but not switched/turned on/off.
Artificial light sources: a flashlight, a table lamp, a light bulb. They can be switched/turned on/off, and even lighted, but not extinguished/put out.
Right now, you can 'extinguish' and 'put off' a flashlight, or other artificial (electrical) light sources, which doesn't seem linguistically correct.
Fix the current lack of CHECKs for which verbs can be used with natural and artificial light source:
extinguish
: addCHECK THIS IS natural
.tests/integrity/lightsources.alan
tests/integrity/lightsources_verbs-natural-vs-artificial.a3log
@AnssiR66, while working on
lib_classes.i
I realized that there might be some CHECKs missing forNOT natural
andnatural
light sources.Currently, only the verbs
turn_on
,turn_off
andswitch
carry out CHECKs to ensure that they can be used only withNOT natural
light sources.I'm going ahead and applying the fixes mentioned above, because I'm convinced that this is how it should be; but I'd like to have your confirmation that this is OK.
The current documentation (§12.5. LIGHTSOURCE), is a bit obscure on the topic:
It doesn't mention explicitly which verbs are allowed on artificial light sources (only for natural ones).
I believe that this how they should work (the
*
indicates current lacks of CHECKs):Some practical examples:
Natural light sources: a candle, a campfire. They can be lighted and extinguished/put out, but not switched/turned on/off.
Artificial light sources: a flashlight, a table lamp, a light bulb. They can be switched/turned on/off, and even lighted, but not extinguished/put out.
Right now, you can 'extinguish' and 'put off' a flashlight, or other artificial (electrical) light sources, which doesn't seem linguistically correct.