F
igure 1: Architecture of the smart script system.
4 SMART SCRIPT SYSTEM
As shown in Figure 1, the smart script system
consists of the Execution Engine which controls the
automatic execution of scripts, the Sensor which
receives diverse event and status information from
environments, the Effector which is responsible for
the execution of individual basic tasks or actions, the
Script Editor which allows users to edit or modify
scripts, and the Script Manager which allows users
to monitor and control the execution of scripts in
real time. The Sensor detects a variety of events that
may occur in smartphone environments, including
text-message arrival, phone ringing, WiFi detection
and schedule notification, and works to update an
internal World Model of the Execution Engine based
on new facts associated with those events.
The Execution Engine responsible for the
execution of scripts has internal components with
different roles, such as World Model, Plan Library,
Interpreter, and Intention Structure. The World
Model manifests the current status of the system in
which scripts are being executed, by saving and
updating the environmental status or user-entered
data detected by the sensor or data on the results of
each basic task/action executed. In the Plan Library,
user-defined scripts are stored in an execution
waiting status, and whenever necessary, it stores
scripts in a database or brings up the stored scripts
from the database. The Interpreter, based on the
facts of the World Model, checks whether the
preconditions of individual event-driven scripts in
the Plan Library are satisfied or whether each goal-
driven script is matched with a user-supplied task
goal and plays the role of choosing a script to be
executed next. The Intention Structure, with the
script chosen by the Interpreter, performs script-
intended tasks by executing in sequence the basic
tasks/actions described in the body of the script. The
Execution Engine has been designed as an Android
service so that it can start the quick execution of
scripts whenever the script-associated events occur.
While the Execution Engine executes the logical
decision-making process of the smart script system,
the Effector executes each of basic tasks/actions
actually as requested by the Execution Engine with
existing s/w tools such as web browsers, calendars
and email programs or its own programs
implemented with Android API
Figure 2: Screenshot of the script manager.
The Script Manager provides the main user interface
of the smart script system. Users can execute one of
the command-driven scripts through the script
manager, suspend running scripts, or
activate/inactivate event-driven scripts. In this way
they can control the scripts in real time. In addition,
with the help of the Script Editor, they can create
copy, modify or delete scripts. Taking into account
the limited size of smart phones' screen and
keyboard, the Script Editor has been programmed to
minimize users' keyboard entries by applying
graphic icons and menu selections to most editing
procedures. Figure 2 shows the screenshot of the
Script Manager.
5 APPLICATION
In order to examine the performance and usefulness
of the smart script system developed in this work,
Smart Reservation has been created based on this
system. Smart Reservation is an application which
finds a nearby restaurant and makes reservations for
smart phone users in semi-autonomous way. Smart
Reservation can get the user's location information
from GPS to search for nearby restaurants and have
SIMULTECH 2011 - 1st International Conference on Simulation and Modeling Methodologies, Technologies and
Applications
234