[alicebot-archcomm] Predefine predicates/properties
Ernest Lergon
alicebot-archcomm@list.alicebot.org
Sat, 26 Jul 2003 19:22:09 +0200
Proposal:
The AIML interpreter must raise a fatal error at load-time, if a
predicate/property is not predefined.
The content of the attribute 'name' is case-sensitive.
E.g.:
To access a property like
<bot name="name"/>
it must be predefined in the startup-files as
<property name="name" value="Alice"/>
To access a predicate like
<get name="likes"/>
<set name="likes">Lizards</set>
it must be predefined in the startup-files as
<predicate name="likes" default="nothing" set-return="value"/>
where the attributes 'default' and 'set-return' are optional.
Many bugs come from variables, which where never defined or written w/o
respect to case, thus being undefined.
Have a look at the pattern "BOT PROPERTIES" in aiml/alice/B.aiml, where
many of the properties listed are never mentioned in startup.xml. BTW:
properties like 'memory', 'spt' (Server Provcessing Time),
'hourlyqueries' or 'totalclients' are dynamic and can't be predefined -
but this is another story...
So to avoid endless searching through tons of categories it might be
better to use a strict pre-defining.
As you might have noticed this implies, that the AIML specs should
define a standard <startup> format ;-)
Ernest
--
ProgramV - Alice on Perl - available at
http://www.virtualitas.net/perl/aiml/
VIRTUALITAS - Manufacturer of fine OOPPS - since 1996
*********************************************************************
* VIRTUALITAS Inc. * http://www.virtualitas.net *
* Ernest Lergon * mailto:Ernest@virtualitas.net *
*********************************************************************
PGP-Fingerprint 6E6F DC17 A886 342D D63F 7880 12F5 6BA9
PGP-Key http://www.virtualitas.net/Ernest_Lergon.asc
---------------------------------------------------------------------
SPAM ALERT http://www.virtualitas.net/spam.html
---------------------------------------------------------------------