[alicebot-developer] Implementing the <system> tag

Helio Perroni Filho alicebot-developer@list.alicebot.org
Mon, 21 Mar 2005 12:43:57 -0300 (ART)


According to the AIML standard, the <system> tag
"instructs the AIML interpreter to pass its content
(with any appropriate preprocessing, as noted above)
to the system command interpreter of the local machine
on which the AIML interpreter is running". I know
that, by "system command interpreter", the author
meant the underlying SO command interpreter, such as
Windows's cmd or Linux's Bash. But how much must a
complying AIML parser stick to that interpretation?

One of my concerns for ChatterBean (the AIML parser
formerly known as ProgramJ) is platform-independency;
I wouldn't like my AIML files to be dependant on what
command interpreter the underlying SO uses. So I
embedded a BeanShell (http://www.beanshell.org/)
interpreter into ChatterBean, and coded my AIML parser
so the contents of the <system> tag will be passed to
it.

The BeanShell provides all the expected commands, such
as dir, cd, rm, etc, and you can run external programs
(even non-Java) through it. Other than its syntax,
which deviates a little from what is normally found on
comand-line consoles, it doesn't differ much from the
usual shell interpreter. All things considered, I
think this is a really nice solution, but is it
standard-compliant? Or am I demanded to pass the
contents of the <system> tag to the SO's /standard/
command interpreter?

-- 
Ja mata ne.
Helio Perroni Filho



	
	
		
Yahoo! Mail - Com 250MB de espaço. Abra sua conta! http://mail.yahoo.com.br/