[alicebot-archcomm] <set> tag, and clearing predicates
ccallen
alicebot-archcomm@list.alicebot.org
Mon, 9 Dec 2002 14:25:55 -0800
This is good, it makes senses. It would work and should be straight forward
to implement.
<condition name="some-predicate" exists="false">
As for clearing a variable from memory, clear makes me think of setting the
value to "" or 0, where drop or remove sound more like the variable is
actually removed from the collection or symbol table. Of course, I am
comming from a programmers point of view and thinking about the names of
functions on something like a binary tree, insert, set, remove, delete, etc.
Conan
----- Original Message -----
From: "Jonathan Roewen" <consulatewizard@yahoo.co.nz>
To: <alicebot-archcomm@list.alicebot.org>
Sent: Monday, December 09, 2002 12:12 PM
Subject: [alicebot-archcomm] <set> tag, and clearing predicates
> Hi,
>
> I think this has to be cleared up, as I see it used widely in AIML sets
for
> clearing values of predicates, which is wrong (I think).
>
> <set name="some-predicate"></set> does not clear a variable (not in
J-Alice
> anyways).
>
> I may be wrong, but doesn't XML define that any tag which has empty
content
> can be shortened to the self-closing variant. So, the above AIML can
become
> <set name="some-predicate"/>, which, as defined in the AIML spec, is the
> shortcut element for <set name="some-predicate"><star/></set>, which is
not
> what one wanted. Provided the category has no wildcards, the effect would
> indeed be achieved, as the stack is empty, producing the empty string.
> However, if there is at least one wildcard, it would no longer be doing
what
> was intended.
>
> I believe Kim's ProgramP has a <forget/> tag to achieve the effect of
> clearing all variables. However, I propose that the AIML spec introduces
one
> new tag to circumvent this problem, as clearing variables is a necessity
at
> times.
>
> I would like to see <clear name="some-predicate"/> be added, for clearing
> the variable from the bot's memory/knowledge.
>
> This could allow empty predicates to indeed be valid values, with a
cleared
> predicate being non-existing, however, this is a different issue and would
> require other changes if it were to be interpreted this way. For example,
> would require <condition name="some-predicate" exists="false"> to test for
a
> non-existing predicate.
>
> Jon =)
>
>
>
> _______________________________________________
> alicebot-archcomm mailing list
> alicebot-archcomm@list.alicebot.org
> http://list.alicebot.org/mailman/listinfo/alicebot-archcomm
>