[alicebot-archcomm] Predefine predicates/properties

Jonathan Roewen alicebot-archcomm@list.alicebot.org
Sun, 27 Jul 2003 22:44:29 +1200


> 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.

I don't see this as a mandatory requirement. At most, this should be a
feature, nothing more. For AIML sets that do much more than basic chatting,
this is more of a burden. It's like the variable declaration rules of C,
where you must declare everything before you use it. Ie, can't declare a
variable in a for loop statement, whereas in C++ you can declare a variable
anywhere you want, and not even initialise it if you don't want to.

Predefining values for predicates should be a matter of personal
style/preference. Your references to AIML sets referring to predicates that
aren't initialised is the AIML writer's fault .. and if it was of a high
concern, would've been rectified by the use of condition.

One of the more elegant alternatives which is employed in J-Alice (idea
originating from Jon Baer's TinyAlice) is using the get tag's content as the
default when the value retrieved is the empty string.

IE:  <get name="name">user</get> would produce "user" iff the predicate
results in "" (empty string), otherwise it would be the value of the
predicate (eg "bob").

Jon