the user mo deling shell system bgp-ms

31

Upload: others

Post on 16-Oct-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The User Mo deling Shell System BGP-MS

The User Modeling Shell System BGP-MSA Manual of System EssentialsJ�org-Cyril H�ohle and Wolfgang PohlThe BGP-MS Project�Department of Mathematics and Computer ScienceUniversity of Essen, Germanyc/o GMD (German Natl. Res. Ctr. for Information Technology), FIT.MMKemail: [email protected] Introduction 22 Installation 33 Using BGP-MS 74 Environments 135 De�ning Partition Hierarchies 156 Stereotype Facilities of BGP-MS 167 BGDL { tell and ask language of BGP-MS 188 Dialog Act Types and Dialog Acts 219 Interviewing the User 2410Source Information 2711Run-time Use of BGP-MS 2812Messages 29�The BGP-MS project is supported by the German Society for the Advancement of Scienti�c Research(Grant number Ko 1044/4) and has been supported by the University of Konstanz (1/1992-8/1995; Grantnumber AFF 17/92). Currently, it is also supported by GMD FIT.

Page 2: The User Mo deling Shell System BGP-MS

1 IntroductionBGP-MS is a user modeling shell system that can assist interactive software systems inadapting to their current users by taking the users' presumed knowledge, beliefs, and goalsinto account. It o�ers applications several methods for communicating observations con-cerning the user to BGP-MS, and for obtaining information on currently held assumptionsabout the user from BGP-MS. It provides a choice of two integrated formalisms for rep-resenting beliefs and goals, and includes several types of inferences for drawing additionalassumptions based on observed user actions and stereotypical knowledge about pre-de�neduser subgroups.This paper describes how BGP-MS is installed, gives an example of how to use BGP-MS,and documents all the features of BGP-MS that are needed for working with the system.It does not contain descriptions of the graphical developer interfaces coming with BGP-MS(however, these interfaces are described in separate document, that is also publicly availableand should be contained in the BGP-MS release). Nor does it explain the facilities allowinginter-process communication with BGP-MS from Lisp, Prolog, or C applications, which arethe recommended mechanisms to have BGP-MS running concurrently to your application.If you are interested in detailed information or help on these topics, we will be happy togive support.

2

Page 3: The User Mo deling Shell System BGP-MS

2 Installation2.1 Set-up and StartThis section gives a detailed description of how BGP-MS is installed, set up, and started.Requirements for BGP-MSBGP-MS runs on SUN workstations with SunOS 4.1.x or Solaris 2.x. We recommend aminimum memory of 32 MB for running an application together with BGP-MS.BGP-MS requires CMU Common Lisp (CMUCL) 17f. In the last release, CMUCL wasintegrated into BGP-MS, which is no longer the case. If you do not have CMUCL 17f onyour machine yet, download the necessary archives for SunOS (17f-sun4c 411.tar.gz and17f-extra-sun4c 411.tar.gz) or Solaris 2 (17f-sun4c 53.tar.gz, 17f-extra-sun4c 53.tar.gz)from one of the CMUCL archive sites (e.g., ftp://lisp-rt1.slisp.cs.cmu.edu/ orftp://rs104.hrz.th-darmstadt.de/pub/programming/languages/lisp/cmu-lisp, ) and installthem according to the respective instructions.Downloading BGP-MSBGP-MS is distributed via anonymous FTP from ftp.gmd.de (129.26.8.84) in the directory/GMD/bgp-ms/. In /GMD/bgp-ms/, there are one compressed tar �le, bgp-ms-22.tar.gz, severaldocumentation �les in Postscript (they are also in the archive) and this README.Download the tar �le (in binary mode) into a newly created directory of your �lesystem.The expanded archive will use about 20 MB of disk space. In the following sections, wewill refer to this directory as your BGP-MS directory.BGP-MS, CMU Common Lisp, and GINABGP-MS is written in CMU Common Lisp (CMUCL) and uses GINA (a system for buildinggraphical interfaces in Lisp) for its graphical developer interfaces and its interview visual-ization component. It is necessary to install CMUCL version 17f to get BGP-MS running.For several reasons, we do not provide big, integrated BGP-MS/CMUCL executables (so-called \cores") any more. First, cores are huge, and di�erent cores are needed for SunOS4 and Solaris 2. In addition, without cores, you will be able to run di�erent con�gurationsof BGP-MS with one installation. However, since loading BGP-MS is much faster with acore, you will be able to cast any con�guration into a core.In the following, it is assumed that you have CMUCL 17f installed. In this case, there is alib/ subdirectory in your main CMUCL directory, which we will refer to as your CMUCLlibrary directory.BGP-MS contains those parts of GINA that are necessary for its purposes.3

Page 4: The User Mo deling Shell System BGP-MS

The BGP-MS ArchiveNow, let us assume that you have successfully downloaded bgp-ms-22.tar.gz to your BGP-MS directory, uncompressed and untarred it (e.g., by the command gzcat bgp-ms-22.tar.gz| tar xvf -). The result are the following items:- README is this �le. - bgp-ms is a shell script that provides the preferrable way of get-ting BGP-MS started. - start-bgp-ms.lisp is an init �le for BGP-MS, which you canadapt to your needs. - dump-bgp-ms.lisp is an alternative init �le for generating cores.- doc is a directory that contains documentation for BGP-MS. There are a preprint ofthe journal article from \User Modeling and User-Adapted Interaction" by Kobsa and Pohl(kp-wisreport.ps.gz), a small paper on the reduced version BGP-MS-jr. (bgp-ms-jr.ps.gz),a manual for the main system (bgp-ms-doc.ps.gz), and a description of the developer GUIs(bgp-ms-guis.ps.gz). In addition, you will �nd the �les printer-example.lisp, iv-printer-ex.lisp,and comm-example.lisp that contain examples of how to work with BGP-MS. - clm-2.3 andgina-2.3 - Several other directories containing all BGP-MS sources and binaries.Adapting BGP-MS to your local siteThe central thing to do is to make some adaptations in the bgp-ms shell script. There aretwo things to do:1. Change the setting of the CMUCLLIB environment variable to your CMUCL library direc-tory (see above). 2. Change the setting of the BGPMSHOME environment variable to your newBGP-MS directory. Example: /home/user1/bgp-ms (no slash at the end!).In addition, you can change start-bgp-ms.lisp to suit your needs. Mainly, you might wishto change the form(configure-bgp-ms :junior nil :developer t :visualize t)which determines your BGP-MS con�guration. If unchanged, full BGP-MS including de-veloper GUIs and interview visualization will be loaded. Moreover, the call to init-bgp-mscan be adapted. See the \Installation" section of the manual for more details.Running BGP-MSPut the bgp-ms shell script to a place where your shell will �nd it (according to yourstandard program path { maybe updating the command table with something like \rehash"is necessary), and then type bgp-ms to the shell prompt. This will start CMUCL and loadBGP-MS which may take some time if developer GUIs are used. If you generate your owncore, startup will be much faster.When Lisp is up, it prompts for input with * . In order to get access to BGP-MS, youmust switch to the BGP-MS program package with(in-package "BGP-MS-PROGRAMMER")Finally, just to protect CMUCL novices from despair: Lisp is terminated by (ext:quit) orbetter (b-p:exit-bgp-ms) once BGP-MS is loaded.4

Page 5: The User Mo deling Shell System BGP-MS

2.2 Con�gurationBGP-MS can be started up in several con�gurations. This is determined by the call toconfigure-bgp-ms in the �le start-bgp-ms.lisp (see above). This con�guration tool worksas follows:con�gure-bgp-ms functionSyntax: (con�gure-bgp-ms [:junior junior- ag] [:developer dev-gui- ag] [:visualize iv-vis- ag])Description: con�gure-bgp-ms loads a con�guration of BGP-MS according to the para-meter settings.Parameters:junior- ag may be T or NIL. If T, BGP-MS-jr. will be loaded (only terminologicalrepresentation within partitions, plus negation partitions; cf. [Pohl and H�ohle,1995]). The default is NIL.dev-gui- ag may be T or NIL. If T, the developer GUIs are loaded. The default is T.iv-vis- ag may be T or NIL. If T, BGP-MS is enabled to perform and visualize de�neduser interviews (see Section 9). The default is T.Return: irrelevantAfter loading a con�guration, BGP-MS must be properly initialized. For this purpose, thefollowing Lisp function is called in start-bgp-ms.lisp, which can also be used to reset thesystem.init-bgp-ms functionSyntax: (init-bgp-ms [:bgp-ms-data-path data-path] [:bgp-ms-port bgp-ms-port])Description: init-bgp-ms resets all dynamic information, i.e. user model structure andcontents as well as the communication state to the initial state of BGP-MS.Parameters:data-path sets the global variable *bgp-ms-data-path*, if provided. See the descrip-tion of this variable below for more details. The default is "bgp-ms:Data/", whichrefers to the Data/ subdirectory of your BGP-MS directory.bgp-ms-port sets the global variable *bgp-ms-port*, if provided. See the descriptionof this variable below for more details. The default is "BGP-MS".Return: irrelevantThere are some possibilities in BGP-MS to create �les that are private to your applicationand not system-internal. BGP-MS expects that all these �les reside in one directory:*bgp-ms-data-path* variable5

Page 6: The User Mo deling Shell System BGP-MS

Description: *bgp-ms-data-path* is supposed to refer to a directory of your �le system.BGP-MS will look in this directory for all �les that have been created by the developer,e.g. saved environments (see Section 4) or dialog act type libraries (see Section 8).The value of this variable must be a pathname string, terminated by a slash (/). Theinitial value for this variable is "bgp-ms:Data/", which refers to the Data/ subdirectoryof your BGP-MS directory.Remark: The suggested way of setting this variable is via init-bgp-ms.*bgp-ms-port* variableDescription: The value of *bgp-ms-port* must be a character string. It is used as namefor the KN-IPCMS communication port that BGP-MS sets up for communicatingwith applications. The initial value is "BGP-MS".Remark: The suggested way of setting this variable is via init-bgp-ms.2.3 Generating CoresBGP-MS start-up is quite slow, particularly if the developer GUIs or the interview visual-ization is involved. This section describes how to achieve faster start-up times by castingyour BGP-MS con�guration into a core. Generating a core mainly consists of three steps:1. In the �le dump-bgp-ms.lisp, you can adapt the call to configure-bgp-ms (see above).Make sure that the value of junior- ag is the same as in start-bgp-ms.lisp.2. In the same �le, you can set the name of the core in the call to dump-bgp-ms-core.The default is "library:bgp-ms.core"; leave the library: pre�x and the .core su�xintact. If the default is used, further calls of the bgp-ms shell script will automaticallyload this core.3. Run the shell command bgp-ms -load your-bgp-ms-path/dump-bgp-ms. This com-mand will generate a core, save it in your CMUCL library directory and exit.You can now load BGP-MS with your core by bgp-ms -core library:your-core.core. Be-ware that the configure-bgp-ms settings in start-bgp-ms.lisp �nally determine what isloaded. If they are extending the ones that you had in dump-bgp-ms.lisp for generating thiscore, the missing parts are loaded and added onto the core. The exception is the junior- ag of configure-bgp-ms; if its setting in start-bgp-ms.lisp deviates from the setting indump-bgp-ms.lisp, an error is signalled.6

Page 7: The User Mo deling Shell System BGP-MS

3 Using BGP-MSThis section tries to present all important features of BGP-MS using parts of a singleexample of working with the system. The reader shall get an impression of how to useBGP-MS properly, and may later use this section as a quick reference in contrast to themore detailed documentation given in the subsequent sections. The complete exampleis contained in the �le printer-example.lisp in the doc/ subdirectory of your BGP-MSdirectory. It contains only Lisp forms, which you may want to go through step by stepto get acknowledged to the possibilities of BGP-MS. The example presupposes a correctinstallation and initialization of BGP-MS as described in Section 2. Remember to useinit-bgp-ms.A variant of the above example, which uses the interview features of BGP-MS, is containedin iv-printer-ex.lisp in the doc/ directory. There you will also �nd hints on how torun a small interactive application that show the BGP-MS features in a more vivid way.The source code of this GINA application can be found in text-editor.lisp in the doc/directory. Another variant can be found in comm-example.lisp; it shows how an applicationcan use BGP-MS via inter-process communication.Developing a User Modeling ComponentAs a developer, you normally use BGP-MS from Lisp. A lot of your work is done by typingcommands to the Lisp interpreter, but for some important steps you can take advantage ofgraphical user interfaces. In the following examples an asterisk with a following space (* )is the Lisp prompt.Installing an environmentIn a �rst step, an environment is installed. This is a software object providing a frame forall activities in BGP-MS. It is suggested that you de�ne a Lisp variable that can be boundto the new environment.* (defvar *printer-env*)*PRINTER-ENV** (setq *printer-env* (make-environment :name 'printer-env))#<environment PRINTER-ENV>An environment must be initialized. Afterwards, make it your current working environmentusing switch-to-environment:* (init-environment *printer-env*)NIL* (switch-to-environment *printer-env*)T* 7

Page 8: The User Mo deling Shell System BGP-MS

De�ning a partition hierarchyOne of the most important steps of developing a user modeling component is the de�nitionof a partition hierarchy. This task can be performed with the help of a graphical interface,the partition editor1, which is started via* (start-grapher)Alternatively, BGP-MS also provides a Lisp function for de�ning partition hierarchies. Thefollowing calls de�ne parts of the example hierarchy presented in [Kobsa and Pohl, 1995].* (define-bgp-ms-partition 'SBMB)#<partition SBMB>* (define-bgp-ms-partition 'SB :supers '(SBMB))#<partition SB>* (define-bgp-ms-partition 'SBMBUB :supers '(SBMB))#<partition SBMBUB>* (define-bgp-ms-partition 'SBUB :supers '(SBMBUB))#<partition SBUB>Leaf partitions in a hierarchy are called views. They inherit the contents of all (indirect)superpartitions.Filling partitions with knowledgeNew assumptions about beliefs and goals of the user are normally entered at run time usingthe bgp-ms-tell message (see Section 12). For use from Lisp at development time there isa corresponding function that can be employed in order to enter system domain knowledgeinto partition SB (the name standing for \the System Believes") or �ll stereotype partitionswith stereotypical knowledge (see next subsection). Like the message, the bgp-ms-tellfunction accepts a new assumption in form of a standard BGDL (Belief and Goal DescriptionLanguage, see Section 7) expression as parameter. A BGDL expression speci�es a sequenceof modalities addressing a partition of the current hierarchy and a logical expression thatshall become a new partition entry. Some examples, addressing the SB partition, are (don'tbe concerned about the NIL result, this is alright):* (bgp-ms-tell '(B S (:concept printer)))NIL* (bgp-ms-tell '(B S (all pr (-> (laser_printer pr) (printer pr)))))1The partition editor is the central developer GUI of BGP-MS. It o�ers access to other interfaces forentering terminological knowledge into partitions, de�ning stereotype activation and retraction conditions,and composing user interviews. See the document \The Graphic Interfaces to BGP-MS { Basic Usage" forfurther information 8

Page 9: The User Mo deling Shell System BGP-MS

NIL* (bgp-ms-tell '(B S (all doc (all p (-> (and (ascii_document doc)(ps_printer p))(not (printable_on doc p)))))))NILUsing stereotypesStereotypes are models of subgroups of the expected user population. In BGP-MS, stereo-types correspond to stereotype partitions, which can be de�ned via the partition editor orusing a call to the function define-bgp-ms-partition with the :stereotype parameter setto T. Names of stereotype partitions are a concatenation of an arbitrary stereotype nameand the BGP-MS modality B for \Believes". An example, de�ning a stereotype partitionfor the beliefs of novices concerning computer networks, is:* (define-bgp-ms-partition 'NETWORK_NOVICEB :stereotype t)#<partition NETWORK_NOVICEB>In order to build a stereotypical model, the stereotype partition must be �lled with contents.This is done via the standard bgp-ms-tell mechanism. Examples:* (bgp-ms-tell '(B NETWORK_NOVICE (:concept office_printer)))NIL* (bgp-ms-tell '(B NETWORK_NOVICE (all x (-> (word_processor x)(local_application x)))))NIL* (bgp-ms-tell'(B NETWORK_NOVICE (all doc (<-> (document doc)(exists pr (and (printer pr)(printable_on doc pr)))))))NILActivation and retraction of stereotypes happen at run-time and are controlled by activationand retraction conditions. They must be explicitly de�ned for each stereotype. BGP-MScontains a special graphical interface that supports this task. It can be invoked from thepartition editor. Again, also a Lisp function can be used. An example of de�ning a verysimple retraction condition for the NETWORK NOVICEB stereotype partition (the stereotypeshall never be retracted) is:(set-stereotype-trigger 'NETWORK_NOVICEB :retraction-rule '(never))The frequency of evaluating these conditions is controlled by the the value of the variable*stereocheck-interval*. In our example, the maximal frequency is obtained by(setq *stereocheck-interval* 1) 9

Page 10: The User Mo deling Shell System BGP-MS

De�ning heuristics for user model acquisitionFor this purpose, the dialog act type mechanism can be used. Dialog act types are simplerules that de�ne, how an observed user action can be transformed into user model entriesin form of BGDL expressions. The tool for de�ning such rules is the define-d-act Lispmacro. An example of its use is:(define-d-act PRINT-COMMAND (file):presuppositions ((B S (B M (sent_for_printing file)))(B S (B M (W U (printed file))))))BGP-MS supports the use of dialog act type libraries, i.e. �les containing a number of(define-d-act ...) forms. There are two types of libraries: system libraries, which comewith BGP-MS, and developer libraries, which can be created by the developer of a usermodeling component. Developer libraries have to be situated in the directory that is spec-i�ed by the value of the *bgp-ms-data-path* variable (cf. Section 2). Their �lename musthave the extension .dat. For the purposes of our example, imagine that we have createda developer library containing just the single dialog act type de�nition from above in �leprinter.dat. Then this library can be loaded with(load-dat-lib 'printer :developer T)De�ning rules for view-connecting inferencesA standard BGDL expression corresponds to an entry into one ore more views, namelyall leaf partitions of the hierarchy that are descendants of the partition being addressedby the expression. Based on these entries, inferences are performed only within views. InBGP-MS, you can additionally enter expressions that relate several views with one another.In case of implications, inferences connecting several views are enabled. View-connectingexpressions can be entered using bgp-ms-tell and an extended BGDL syntax. Example:(bgp-ms-tell'(all doc (all p (-> (B S (B M (W U (printed_on doc p))))(B S (B M (B U (printable_on doc p))))))))In addition to such formulas that relate speci�c entries, also general relationships betweenviews can be de�ned in form of formula schemes. Scheme variables have the form (:varsymbol). An example that establishes the modal axiom(BSBMWU � ^BSBU (�! ))! BSBMWU in the current environment, is:(bgp-ms-tell'(-> (and (B S (B M (W U (:var phi))))(B S (B U (-> (:var phi) (:var psi)))))(B S (B M (W U (:var psi)))))) 10

Page 11: The User Mo deling Shell System BGP-MS

Using persistent environmentsAll data that are necessary for a user modeling component are speci�ed within an envi-ronment, using the mechanisms described above. Environments can be made persistent, sothat any state of a user modeling component, particularly a state that should be restored asinitial state of the user modeling component before running an application, may be saved.In our example, we could use(save-environment *printer-env* "printer-example")Environments are saved in �les that are located in the directory speci�ed by the value ofthe Lisp variable *bgp-ms-data-path* (cf. Section 2). So, if *bgp-ms-data-path* points toa directory "/home/user/data/", the �le "/home/user/data/printer-example.env" will becreated.Persistent environments can be reloaded. This is especially useful at the beginning ofapplication run time. Then, instead of a call to make-environment,(load-environment "printer-example")can be used to set up an environment, which already contains all the user modeling datathat have been de�ned at development time.Running an Application with BGP-MSStarting BGP-MS for run time useThere is nothing very special about starting BGP-MS for run-time use. The following sub-sections expect that BGP-MS has been loaded, that all environment-independent initializa-tions have been redone, and that the current environment contains all the data de�ned atdevelopment time. So, if you make no break after the foregoing steps, you need do nothingbut* (set-run-time-use T)which causes BGP-MS to behave slightly di�erent than at development time: Stereotypeactivation and retraction is performed, where the value of *stereocheck-interval* is con-sidered, and only standard BGDL expressions are accepted by bgp-ms-tell.If (inter-process) messages are to be employed for communication between the applica-tion and BGP-MS, the application must load or integrate the inter-process communicationtool KN-IPCMS that is provided with BGP-MS. In the �le comm-example.lisp in the doc/directory, the employment of KN-IPCMS within a Lisp application is demonstrated.The following parts describe a scenario where a PROLOG application that uses BGP-MS is simulated in a PROLOG shell. This simulation makes use of a PROLOG librarythat provides all the functionality used for communicating with a BGP-MS user modelingcomponent. Similar libraries have been set up for CMU Common Lisp and ANSI C. Theselibraries can be obtained on demand from the BGP-MS project. Note that in the example�les Lisp is used instead of PROLOG. 11

Page 12: The User Mo deling Shell System BGP-MS

Communicating assumed beliefs and goals to BGP-MSThe bgp-ms-tellmechanism is used as before, only in form of a message, not a function call.The PROLOG communication library contains a send-bgp-ms/2 predicate, the argumentsof which are a string consisting of a BGP-MS message and a variable that is supposed toreceive the return value of the message. An example is?- send-bgp-ms("(bgp-ms-tell (B S (B M (ascii_document userdoc))))",Answer).Querying the user modelAlso bgp-ms-ask can be used in form of a message, for example:?- send-bgp-ms("(bgp-ms-ask :id 11(B S (B U (all doc (-> (printed doc)(printed_on doc lw_plus))))))",Answer).In contrast to the function, the message may have an identi�er (a number or a symbol)which must be speci�ed by the developer with :id id after the message name. Moreover,you can ask about the so-called source information (see Section 10), using an additionalmessage parameter:?- send-bgp-ms("(bgp-ms-ask (B S (B M (W U (printed userdoc)))):return (:source :origin))",Answer).A \normal" bgp-ms-ask query only causes view-internal inferences. If you want to takeadvantage of view-connecting inferences, you have to specify this in the ask message:?- send-bgp-ms("(bgp-ms-ask (B S (B M (W U (printed_on userdoc lw_plus)))):vue T)",Answer).Reporting user actionsThe dialog act types de�ned in the current environment come into action when a d-actmessage is sent to BGP-MS. For example,?- send-bgp-ms("(d-act PRINT-COMMAND (userdoc))",Answer).causes BGP-MS to make the same entries as induced by(bgp-ms-tell '(B S (B M (send_for_printing userdoc))))(bgp-ms-tell '(B S (B M (W U (printed userdoc)))))according to the presuppositions de�ned by the print-command dialog act type.12

Page 13: The User Mo deling Shell System BGP-MS

4 EnvironmentsEnvironments are software objects that serve as a frame for most BGP-MS activities. I.e.,almost everything is relative to the current environment: partition hierarchies, dialog actlibraries, stereotype information. Some exceptions are the *bgp-ms-data-path* and the*bgp-ms-port* variables. Their values remain unchanged when the current environmentchanges. In its initial state, an environment contains no user-de�ned data. This sectiondescribes the functions for handling environments.make-environment functionSyntax: (make-environment :name environment-name)Description: make-environment creates a new environment with name environment-name.Parameters: environment-name must be a Lisp symbol.Return: the new environment object. It may be useful to bind a variable to this object forlater use.Example: (make-environment :name 'printer-env)init-environment functionSyntax: (init-environment environment)Description: init-environment initializes the given environment. It is obligatory to callinit-environment on any environment immediately after it has been created by make-environment. In other situations, the e�ects of init-environment are unde�ned.Parameters: environment is an environment objectReturn: NILswitch-to-environment functionSyntax: (switch-to-environment environment)Description: switch-to-environment makes the speci�ed environment current, therebysaving all environment-related data of the old and restoring all environment-relateddata of the new current environment.Parameters: environment may be an environment object or an environment name (symbol)Return: Tremove-environment functionSyntax: (remove-environment environment)Description: remove-environment deletes the speci�ed environment.Parameters: environment may be an environment object or an environment name (symbol)13

Page 14: The User Mo deling Shell System BGP-MS

Return: irrelevantsave-environment functionSyntax: (save-environment environment �lename)Description: save-environment saves environment-related data persistently in the �lefilename.env in the directory speci�ed by *bgp-ms-data-path*.Parameters:environment must be an environment object (use the *curcon* variable)�lename must be a string specifying a simple �lenameReturn: the pathname of the environment �leload-environment functionSyntax: (load-environment �lename)Description: load-environment creates an environment from the environment �le �le-name.env in the directory speci�ed by *bgp-ms-data-path*. The corresponding orig-inal environment must be removed before.Parameters: �lename must be a string specifying a simple �lenameReturn: the new environment object

14

Page 15: The User Mo deling Shell System BGP-MS

5 De�ning Partition HierarchiesThe de�nition of a partition hierarchy should be the �rst step in developing a user modelingcomponent with BGP-MS after an environment has been set up. This task is supportedby both a graphical interface and a Lisp function. Here, we only describe the functionalinterface. Examples of its use have been given in Section 3.de�ne-bgp-ms-partition functionSyntax: (de�ne-bgp-ms-partition name [:subs subs] [:supers supers] [:stereotype stereo- ag])Description: de�ne-bgp-ms-partition de�nes a partition with the given name in thecurrent environment, along with its super- and subpartition relationships. If thestereotpye- ag is set, the partition will be a stereotype partitionParameters:name is a symbol. Arbitrary symbols can be used, but some are more appropriatethan others. See below for an explanation.subs is a list of partition names and speci�es the subpartitions of the new partition.supers is a list of partition names and speci�es the superpartitions of the new parti-tion.stereo- ag may be T or NIL. If T, the new partition will be a stereotype partition. Ifnot speci�ed, this parameter defaults to NILReturn: The new partition object. Normally, you won't use this object further on.Partition names correlate to the BGP-MS language for the description of assumptions aboutthe user, standard BGDL (see Section 7). The syntax of this language allows a sequenceof modalities to precede a logical expression. Example: (B S (B U p)), where the modalitysequence (B S (B U ... )) stands for \the system believes that the user believes", andp is the (simple) expression. B is called a modality, and S and U are called agents. Themodality part of astandard BGDL expression is mapped to a partition name by switchingmodalities and agents. For example, (B S (B U ...)) is mapped to SBUB. Normally, allBGDL expressions must have the form (B S ...). While these expressions refer to non-stereotype partitions, expressions with only one modality B may have an arbitrary agentsymbol in order to refer to stereotype partitions: (B stereotype-name p)Consequently, useful partition names that can be addressed by BGDL expressions eitherhave the form SBf<modality><agent>g* for normal partitions or <stereotype-name>Bfor stereotype partitions (stereotype contents are restricted to beliefs). Allowed modalitiesare B and W (for \wants"), allowed agents are S, U, and M (for \mutually"). The currentversion of BGP-MS does not prohibit the use of partition names that do not obey theserestrictions, but they are not supported. Also, BGP-MS does not check if the speci�edsub- and superpartition relationships lead to a hierarchy that is sensible with respect to thesemantics of partition names. 15

Page 16: The User Mo deling Shell System BGP-MS

6 Stereotype Facilities of BGP-MSBGP-MS supports modeling of stereotypical assumptions about assumed subclasses of theuser population. Usually, the resulting models are brie y called stereotypes. The basicbuilding block of a BGP-MS stereotype is a stereotype partition. Such a partition is �lledwith knowledge elements forming the set of stereotypical assumptions. In run time mode,BGP-MS will automatically activate and retract stereotypes (i.e. assign and deassign theuser to a user class) based on an evaluation of the activation and retraction conditions ofthe stereotype partitions. Consequently, modeling stereotypes in BGP-MS mainly consistsof the following tasks:� De�nition of a stereotype partition (see Section 5)� Entering the stereotypical assumptions using bgp-ms-tell (see Sections 7 and 12)� De�nition of activation and retraction conditions.The �rst two items are described in other sections. The rest of this section deals withactivation and retraction conditions. Basically, these are logical combinations of arbitrarylisp code that returns boolean values (T or NIL) with special predicates that are pre-de�ned in BGP-MS and evaluate the contents of the current user model. These predicatesare called condition schemes, and the application developer can appropriately instantiatethem to de�ne the activation and retraction conditions of the stereotypes in his applicationdomain.The set of pre-de�ned schemes is as follows:� IFKNOWN list: is satis�ed if all knowledge items contained in list are known to theuser (i.e., are all contained in view SBUB).� IFUNKNOWN list: is satis�ed if the knowledge items contained in list are all unknownto the user.� IFKNOWN% n: is satis�ed if n percent of the contents of the stereotype are knownto the user.� IFKNOWN%OF n list: is satis�ed if n percent of the knowledge items contained inlist are known to the user.� IFUNKNOWN% n: is satis�ed if n percent of the contents of the stereotype areunknown to the user.� IFUNKNOWN%OF n list: is satis�ed if n percent of the knowledge items containedin list are unknown to the user.� ALWAYS: is always satis�ed.� NEVER: is never satis�ed.In these de�nitions, n is always an integer with 1 � n � 100, and list is always a list oflogical expressions p obeying the syntax for < p > given in section 7. For any expression p,a (bgp-ms-ask '(B S (B U p))) must be possible.16

Page 17: The User Mo deling Shell System BGP-MS

Instantiated schemes can be logically combined by the connectives AND, OR, and NOT,and also with any LISP code that returns a Boolean value, particularly any legal call tobgp-ms-ask. An example that shows a combination of all possibilities is:(or (bgp-ms-ask '(B S (network-novice *current-user*)))(IFUNKNOWN '((:concept LAN) (:concept ethernet)(:concept file-server))))These conditions can easily be composed and declared as activation or retraction conditionsin the graphical editor STED (STereotype EDitor). This document describes a functionalinterface that can be used for the same purpose.set-stereotype-trigger functionSyntax: (set-stereotype-trigger stereotype-partition condition-type condition)Description: set-stereotype-trigger de�nes a new condition of condition-type (activationor retraction) for the given stereotype partition.Parameters:stereotype-partition is the name of a stereotype partition.condition-type is either :activation-rule or :retraction-rule.condition is an activation or retraction condition as described above.Return: A list describing the stereotype-related properties of the stereotype partition:stereotype ag, activation condition and retraction condition (if already de�ned).An example of the use of set-stereotype-trigger is:* (set-stereotype-trigger 'NETWORK_NOVICEB :retraction-rule '(never))((:STEREOTYPE T)(:ACTIVATION-RULE(OR (BGP-MS-ASK '(B S (NETWORK_NOVICE CURRENT_USER)))(IFUNKNOWN'((:CONCEPT LAN) (:CONCEPT ETHERNET) (:CONCEPT FILE_SERVER)))))(:RETRACTION-RULE (NEVER)))If and only if BGP-MS is in run time mode, the activation conditions of inactive stereotypesand the retraction conditions of active stereotypes are regularly evaluated. If the activationcondition of a stereotype is satis�ed, the SBUB partition is connected to the stereotypepartition (in the example: NETWORK NOVICEB) and automatically inherits its contents.If a retraction condition is satis�ed, such a link is removed.Since the conditions refer to the contents of partition SBUB, the evaluation always happensafter another n entries into SBUB have been made (if you want stereotype evaluation to beperformed, it is obligatory to have an SBUB partition). The evaluation interval n can bein uenced by the developer by setting the variable*stereocheck-interval* variableDescription: *stereocheck-interval* has as value an integer, which determines the stereo-type evaluation interval. The initial value of this variable is 4. The value is local toan environment and will be permanently stored with load-environment.17

Page 18: The User Mo deling Shell System BGP-MS

7 BGDL { tell and ask language of BGP-MSBGP-MS provides a uniform means of formulating new user model entries or queries tothe user model. The language BGDL (Belief and Goal Description Language) allows fullpredicate logic expressions, embedded within modalities. BGDL expressions are related tothe internal representation mechanisms, i.e. partitions, SB-ONE, and �rst order calculus.A standard BGDL expression has the form Mp, where M is a sequence of modalitiesreferring to a partition and p is a logical expression referring to a representation elementwithin a partition. Standard BGDL is used to formulate both user model entry expressionsas needed by the input message bgp-ms-tell and other input facilities and query expressionsfor the query message bgp-ms-ask.Extended BGDL expressions can be used to describe inference rules or relationships beyondpartitions. They are applicable only at development time. At run-time as well as in queriesto BGP-MS, the use of BGDL is restricted to standard BGDL.The syntax of standard BGDL is as follows (Note: The terms in italics may be replacedby symbols. Only alphanumerical characters and (underscore) are allowed in symbols ofBGDL, unless explicitly stated otherwise.):<s-bgdl> ::= (B S <bel/goal>) j (B stereotype p)<bel/goal> ::= p j (<modality> <agent> <bel/goal>) j(NOT (<modality> <agent> <bel/goal>))<modality> ::= B j W<agent> ::= S j U j MThe syntax for logical expressions p is a Lisp-like bracket notation of FOPC:< p > ::= (predicate <term>* )j (not < p > )j (and < p > < p > )j (or < p > < p > )j (-> < p > < p > )j (<-> < p > < p > )j (all <var> + < p > )j (exists <var> + < p > )j < p0 >< p0 >::= (:concept symbol)j (:data arbitrary-entry)Examples:(B S (:concept apple_lw))(B S (all pr (-> (apple_lw pr) (laser_printer pr))))(B S (B M (apple_lw lw_plus)))(B NETWORK_NOVICE(all doc (all p (-> (and (printed doc) (office_printer p))(printed_on doc p)))))18

Page 19: The User Mo deling Shell System BGP-MS

There are two kinds of special expressions < p0 >: The (:concept symbol) expression isan abbreviation of (all x (-> (symbol x) (thing x))) and refers to an SB-ONE concept.The :data construct allows to enter and query arbitrary, application-speci�c entries liketext strings etc.Extended BGDL for non-schematic relations is de�ned as follows:<e-bgdl> ::= <s-bgdl>j (not <e-bgdl> )j (and <e-bgdl> <e-bgdl> )j (or <e-bgdl> <e-bgdl> )j (-> <e-bgdl> <e-bgdl> )j (<-> <e-bgdl> <e-bgdl> )j (all <var>+ <e-bgdl> )j (exists <var>+ <e-bgdl> )Example:(all doc (all p (-> (B S (B M (W U (printed_on doc p))))(B S (B M (B U (printable_on doc p)))))))If schematic relations shall be de�ned, the de�nition of < p > in standard BGDL must bechanged to< p > ::= <scheme-var>j (not < p > )j (and < p > < p >)j (or < p > < p > )j (-> < p > < p > )j (<-> < p > < p > )<scheme-var> ::= (:var symbol )Example:(-> (and (B S (B M (W U (:var phi)))) (B S (B U (-> (:var phi) (:var psi)))))(B S (B M (W U (:var psi)))))BGDL expressions can be used in several places, but the main usage is for inputs andqueries to BGP-MS. Inputs and queries can be communicated to BGP-MS via messages,which are described in Section 12. However, there are also corresponding functions thatcan be employed from within Lisp at development time.bgp-ms-tell functionSyntax: (bgp-ms-tell bgdl-expression [:source source-symbol])Description: bgp-ms-tell makes an entry into the user model. The bgdl-expression isanalyzed; depending on the result, a new entry is made into one or more views, or anew view-connecting expression is introduced.19

Page 20: The User Mo deling Shell System BGP-MS

Parameters:bgdl-expression must be an expression obeying the syntax of extended BGDL.source-symbol must be one of the source symbols as described in Section 10. Thedefault is :developer.Return: no relevant return-valuebgp-ms-ask functionSyntax: (bgp-ms-ask bgdl-expression [:return ret-list] [:vue vue- ag])Description: bgp-ms-ask queries the user model, if the bgdl-expression currently is a validassumption.Parameters:bgdl-expression must be an expression obeying the syntax of standard BGDL.ret-list is a list containing a set of source information keywords (see Section 10).BGP-MS will return source information according to the keywords, as far as itis available for the given expression.vue- ag determines if view-connecting inferences are used for answering the query.This is only done, when :vue T is speci�ed.Return: T (or another non-NIL value) or source information according to the :return pa-rameter, if bgdl-expression currently is a valid assumption; else NIL.

20

Page 21: The User Mo deling Shell System BGP-MS

8 Dialog Act Types and Dialog ActsDialog act types (DATs) can be employed to de�ne heuristic rules for the acquisition ofassumptions about the user from user actions. They describe how a user action that wasreported along with its parameters to BGP-MS shall be transformed into user model entries.This transformation may be restricted by preconditions, i.e., the entries will only be madeprovided that a set of given expressions are valid user model entries. User actions that areinstances of a DAT are called dialog acts. (For detailed information about dialog acts, see[Pohl et al., 1995]).Dialog act types can be de�ned as follows:de�ne-d-act MacroSyntax: (de�ne-d-act name parameter-list :presuppositions presupposition-list[:variables variable-list] [:preconditions precondition-list] )Description: de�ne-d-act de�nes a dialog act type with presuppositions and preconditions.Parameters:name is the name of the new DAT and must be a symbol.parameter-list is a list of formal parameters of the DAT.variable-list must list the symbols that occur in the presuppositions as variables be-hind a quanti�er, who is supposed to bind free variables in dialog act parameters.presupposition-list is a list of BGDL expressions that may contain the symbols of theparameter-list in place of predicate logical expressions.precondition-list is a list of BGDL expressions that may contain the symbols of theparameter-list in place of predicate logical expressions.Return: the name of the dialog act type.The standard BGP-MS procedure of de�ning a set of dialog act types and make themaccessible to the application system is to put the de�nitions into a �le and use it as a dialogact type library. Then it can be stated which libraries shall be loaded into an environment.Only the list of libraries can be saved persistently with an environment. In general, it isnot safe to de�ne DATs outside a library; such DATs may be lost.Several pre-de�ned DAT libraries containing DAT de�nitions for, e.g., adaptive hypertextapplications, come with BGP-MS. Developer-de�ned DAT libraries are supposed to belocated in the *bgp-ms-data-path* directory and have names of the form library-name.dat.BGP-MS provides the following functions to deal with DAT libraries at development time:load-dat-lib functionSyntax: (load-dat-lib lib-name [:developer developer- ag] [:env environment])Description: load-dat-lib makes all DAT de�nitions of the library lib-name accessible inthe speci�ed environment. The place where BGP-MS tries to �nd the library �ledepends on the developer- ag.Parameters: 21

Page 22: The User Mo deling Shell System BGP-MS

lib-name may be a symbol or a string.developer- ag may be T or NIL (the default). If T, BGP-MS will try to load *bgp-ms-data-path*/lib-name.dat, in case of NIL it looks for lib-name.dat among thepre-de�ned DAT libraries.environment speci�es the environment into which the library shall be loaded. If notspeci�ed, the current environment is taken as default.Return: T if the library is found. Else, an error is signaled.remove-dat-lib functionSyntax: (remove-dat-lib lib-name [:developer developer- ag] [:env environment])Description: remove-dat-lib removes the library lib-name from the list of DAT librariesof the given environment and deletes the contained DATs from the list of accessibleDATs in the environment.Parameters:lib-name must be a stringdeveloper- ag may be T or NIL (the default), depending on lib-name being a devel-oper library or not.environment speci�es the environment the library shall be removed from. If notspeci�ed, the current environment is taken as default.Return: Tupdate-d-act-typesSyntax: (update-d-act-types [:env environment])Description: update-d-act-types reloads all libraries of the given environment. This isuseful if any of the libraries have been changed.Parameters:environment speci�es the environment to be updated. If not speci�ed, the currentenvironment is taken as default.Return: TAt application run time, dialog acts can be reported by the application to BGP-MS. This isdone using the d-act message described in Section 12. At development time, the followingcorresponding Lisp function can be employed to achieve the same results:d-act functionSyntax: (d-act DAT-name parameter-list [variable-list])Description: d-act instantiates the presuppositions and the preconditions of the speci�edDAT with the predicate logical expressions from the parameter list. The instantiatedpresuppositions will be entered into the user model, if the instantiated preconditionsare valid user model entries. 22

Page 23: The User Mo deling Shell System BGP-MS

Parameters:DAT-name is the name of a DAT accessible in the current environment.parameter-list is a list of predicate logical expressions in BGDL notation. Of course,the binding of the formal parameters of the DAT de�nition to the expressions inparameter-list is order-dependent.variable-list must contain all symbols that are free variables in the expressions con-tained in parameter-list. Also the correspondance of this list to the variable listin the DAT de�nition is order-dependent.Return: T

23

Page 24: The User Mo deling Shell System BGP-MS

9 Interviewing the UserInterviews can be an important source of information about the user. BGP-MS supportsthe modular composition of user interviews. During run time, interviews can be performedin any situation. According to the speci�cation of an initiated interview, BGP-MS controlsthe interviewing process by determining the questions that must be asked, draws inferencesabout the user based on his answers, and enters these assumptions into the user model.The application must start an interview, ask BGP-MS about the next set of questions thatshould be posed to the user, receive the user's answers and inform BGP-MS about them.In addition to the interview control component, BGP-MS o�ers an interview execution (orvisualization) component, which relieves the application from most of the above-mentionedtasks. When this component is utilized, the application just has to start the interview.9.1 Composing an InterviewAn interview consists of question blocks, each of which can consist of one or more questions.The questions of a question block are presented to the user all at once, and the user's answersare sent back to BGP-MS. The user may choose to skip individual questions, questionblocks, or even the whole interview. In the following, the means for setting up the di�erentinterview units and composing complete user interviews will be described.Interview QuestionsThe basic element of an interview is an interview question. The de�nition of a questionincludes its name, the question text, the question type, and the conclusions part. Forspecifying an interview question, use the following macro:de�ne-interview-question macroSyntax: (de�ne-interview-question:name name :text text :type type :conclusions conclusions)Description: de�ne-interview-question speci�es a new interview question.Parameters:name is the name of the interview questiontext is the question text. It must be speci�ed in double quotes.type speci�es the possible answers and indicates how the question should be visual-ized. See below for a detailed syntax speci�cation of this parameter.conlusions speci�es the inferences that BGP-MS should draw from the user's answer.See below for a detailed syntax speci�cation of this parameter.Return: irrelevantThe following type speci�cations are possible:24

Page 25: The User Mo deling Shell System BGP-MS

� ( :select-one j :select-multiple ( <answer-string>+ ) )One (:select-one) or more (:select-multiple) of the answer-strings can be selectedby the user.� ( :integer-value ((:min N1) (:max N2) (:value-type string)) )The answer is an integer value between N1 and N2. The value-type (e.g., "US$") isused in the visualization. N1, N2 and the value-type must be set into double quotes.� ( :string-value [(( :multiple-line T j NIL ))])The answer is arbitrary text. The ag :multiple-line speci�es, if the visualizationshould o�er a multi-line or a single-line text �eld. The default is NIL (single-line).� ( :select-continuous ((:lower-label label1) (:upper-label label1)(:lower-value N1) (:upper-value N2) (:default-value N3)) )N1, N2, and N3 must be integer values, given as strings; the labels must be strings.The user can choose a real ( oating-point) value between N1 and N2. The visualiza-tion will label the lower and upper end of the range with label1 and label2, resp. Italso uses N3 as an initial value for the selection mechanism (e.g., a slider).Have a look at the following example:(define-interview-question:name network-experience:text "How often do you use networked computers?":type (:select-one ("daily" "once per week" "rarely" "never")):conclusions(((member answer '("rarely" "never"))(B S (network-novice *current-user*)))((equal answer "daily")(B S (network-experienced *current-user*)))))This example also shows what conclusions should look like:( f(<Lisp-expression> <s-bgdl>)g* )For the syntax of <s-bgdl>, see Section 7. In the Lisp expression, you can use the symbolanswer to refer to the user's answer. Since string comparisons are used quite often, theCommon Lisp function member is locally rede�ned to work with strings. The Lisp expressionis evaluated; if it returns a non-nil value, the BGDL expression will be communicated toBGP-MS.Question BlocksBasically, question blocks are lists of questions. Their speci�cation is quite simple.de�ne-interview-question-block macroSyntax: (de�ne-interview-question-block:name name :question-name-list question-name-list)Description: de�ne-interview-question-block speci�es a new interview question block.25

Page 26: The User Mo deling Shell System BGP-MS

Parameters:name is the name of the question block.question-name-list is a list of question names: ( <question-name>+ )Return: irrelevantThe question order as speci�ed in question-name-list must be obeyed by the visualization.InterviewsBasically, interviews are lists of question blocks.de�ne-interview macroSyntax: (de�ne-interview:name name :question-block-name-list question-block-name-list)Description: de�ne-interview speci�es a new interview.Parameters:name is the name of the interview.question-block-name-list is a list of question block names: ( <question-block-name>+ )Return: irrelevantThe question block order as speci�ed in question-block-name-list must be obeyed by thevisualization.9.2 Starting an InterviewInterviews are invoked via a message to BGP-MS.start-interview messageSyntax: (start-interview interview-name)Description: start-interview is the means for starting an interview.Parameters:interview-name is the name of a speci�ed interview.Return: depends on who does the visualization. If BGP-MS visualizes the interview, it willsend both an immediate reply and a message of the form (interview-end interview-name) when the interview is �nished. See comm-example.lisp for an example of howthis can be handled.For use of BGP-MS within one Lisp process, a corresponding function exists. As e�ect ofa start-interview message, a next-question-block message is sent to the visualization. Thecommunication between BGP-MS and the visualization (perhaps the application itself) isnot further explained here. We recommend that you let BGP-MS do the visualization.26

Page 27: The User Mo deling Shell System BGP-MS

10 Source InformationEntries into the current user model may have di�erent sources: they can be observed by theapplication or can be inferred by either the interview component, the dialogue act analysiscomponent, stereotype activation, or inferences performed within the user model. For eachentry, BGP-MS stores its "source" in form of a source symbol. In addition, BGP-MShas several other types of information associated to user model entries that depend on itssource: a status information (inferred vs observed), the reliability of the information, etc.An application can make use of the bgp-ms-ask message to retrieve such information fromBGP-MS.As a user model entry may be based on more than one source (e.g., it may have beenobserved by the application and additionally inferred by internal inferences), there mayalso be multiple values attached to one information slot.Source information is assigned to new entries into the user model. The following sourcesymbols exist and are de�ned to be attached to a user model entry under the followingcircumstances::application The entry has been made as result of an incoming bgp-ms-tell message.:developer The entry is a result of an application of the bgp-ms-tell function at develop-ment time.:interview The entry has been made as a result of evaluating the conclusion parts ofinterview question de�nitions.:KN-DACT The entry is a result of dialogue act analysis performed because of an incom-ing d-act message.:KN-STEREO The entry is inside a stereotype partition.:KN-PART The entry has been found to be deducible from the current user model byforward inferences or by backward inferences performed because of a bgp-ms-askmes-sage.Currently, BGP-MS associates three information slots (:origin, :assumption-type, and :re-liability) with each source-symbol. The following table shows the values of these slotsdepending on the di�erent source symbols.source symbol :origin :assumption-type :reliability:application :observed :primary :high:developer :pre-de�ned :primary :high:KN-DACT :inferred :primary :middle:interview :inferred :primary :high:KN-STEREO :stereotype :primary :high:KN-PART :inferred :secondary :middle27

Page 28: The User Mo deling Shell System BGP-MS

11 Run-time Use of BGP-MSThere are two main modes of working with BGP-MS: First, developing a user modelingcomponent of an application (development mode), and second, running this applicationtogether with the user modeling component (run time mode). BGP-MS behaves di�erentlyin these modes. The di�erences are the following:� In bgp-ms-tell messages, only standard BGDL expressions are allowed in run timemode.� Stereotype evaluation is performed in run time mode only.Concerning the last item, there is a prerequisite for switching to run time mode, namely thatfor all stereotype partitions both activation and retraction conditions have been explicitlyde�ned.The working mode of BGP-MS is determined by the current environment, i.e. if environ-ments are switched, also the working mode can change. If an environment is created, it willinitially be manipulated in development mode. When an environment is saved, its currentworking mode is stored along with the other environment data; it will be restored when theenvironment is loaded up again. Within an environment, BGP-MS does not automaticallyswitch between the two modes. In order to switch to run time mode (and back again), youcan use the following function:set-run-time-use functionSyntax: (set-run-time-use run-time- ag)Description: set-run-time-use can be used to switch from development mode to run timemode or vice versa. An error is signaled, if run time mode is the desired mode withthe prerequisites for run time mode not being satis�ed.Parameters:run-time- ag must be T or NIL. If T, BGP-MS will be in run time mode afterwards.If NIL, BGP-MS will be in development mode.Return: T, if the mode has been switched, NIL if not.28

Page 29: The User Mo deling Shell System BGP-MS

12 MessagesThis section describes the available message types that an application can make use offor communicating with BGP-MS. Conceptually, some of the messages to BGP-MS do notentail explicit reply messages going from BGP-MS back to the application. However, in thecurrent implementation, the result of every message evaluation is immediately sent backto the application in a message string. Thus, the application will get noti�ed if an erroroccurs in BGP-MS. The example �le comm-example.lisp in the doc/ directory demonstrateshow to deal with this kind of message handling. In the description of the messages below,an \irrelevant" return value means that BGP-MS does not reply with an explicit answermessage, but only with a simple return value.bgp-ms-tell messageSyntax: (bgp-ms-tell expression)Description: bgp-ms-tell is the means for entering new assumptions about the user intothe current user model.Parameters:expression must be a (extended) BGDL expression.Return: irrelevantbgp-ms-ask messageSyntax: (bgp-ms-ask [:id id] expression [:return return-key-list] [:vue vue- ag])Description: bgp-ms-ask is the means for queries to the current user model. Currently,only synchronous queries are possible.Parameters:expression must be a (standard) BGDL expression.id is a message identi�er (number or symbol).return-key-list is a list containing a set of source information keywords (see Sec-tion 10). BGP-MS will return source information according to the keywords,as far as it is available for the given expression.vue- ag determines if view-connecting inferences are used for answering the query.This is only done, when :vue T is speci�ed.Return: BGP-MS will send an answer message of the form(bgp-ms-answer [:id id ] :answer answer [:return return-list ] ).The answer is yes, if expression currently is a valid assumption, else it is no. idand return-list correspond to the message identi�er and the return-key-list of thecorresponding bgp-ms-ask message, if provided.d-act messageSyntax: (d-act dialog-act-type parameter-list)29

Page 30: The User Mo deling Shell System BGP-MS

Description: d-act is used to report the occurrence of a dialog act. It causes entries into theuser model according to the presuppositions given in the de�nition of dialog-act-type,which are instantiated by the values from parameter list.Parameters:dialog-act-type must be the name of a dialog act type de�ned in one of the librariesthat are loaded in the current environment.parameter-list is a list of FOPC expressions in BGDL syntax. Of course, the numberof parameters in parameter-list must match the number of formal parameters inthe de�nition of dialog-act-type.Return: irrelevantstart-interview messageSyntax: (start-interview interview-name)Description: start-interview is the means for starting an interview.Parameters:interview-name is the name of a speci�ed interview.Return: depends on who does the visualization. If BGP-MS visualizes the interview,it will send both an immediate reply and a message of the form (interview-endinterview-name) when the interview is �nished. See comm-example.lisp for an exam-ple of how this can be handled.bgp-ms-call messageSyntax: (bgp-ms-call Lisp-expression)Description: bgp-ms-call can be used to send arbitrary Lisp function calls to BGP-MS.Any function available in BGP-MS (and Lisp) can be invoked, and, more generally,arbitrary Lisp forms can be evaluated. Consequently, this message may also be usedat development time in order to set up a user modeling component from other en-vironments than Lisp, provided that the communication system has been initializedappropriately.Parameters:Lisp-expression must be a legal argument to the Lisp interpretation function eval.Return: according to the called functionbgp-ms-version messageSyntax: (bgp-ms-version )Description: bgp-ms-version returns BGP-MS version information.Parameters: noneReturn: BGP-MS version information 30

Page 31: The User Mo deling Shell System BGP-MS

AcknowledgementsBGP-MS is implemented in CMU Common Lisp, a free Common Lisp implementation fromthe Carnegie Mellon University, School of Computer Science. It also makes use of GINA,a construction kit for graphical user interfaces from the German National Research Centerfor Information Technology (GMD), and the theorem prover OTTER 3.0.3, from ArgonneNational Laboratory, Mathematics and Computer Science Division.References[Kobsa and Pohl, 1995] A. Kobsa and W. Pohl. The User Modeling Shell System BGP-MS.User Modeling and User-Adapted Interaction, 4(2):59{106, 1995.[Pohl and H�ohle, 1995] W. Pohl and J. H�ohle. BGP-MS-jr. { a PC port of BGP-MS and itsapplications. In U. Malinowski, editor, ABIS 95 { Adaptivit�at und Benutzermodellierungin interaktiven Systemen, October 1995.[Pohl et al., 1995] W. Pohl, A. Kobsa, and O. Kutter. User Model Acquisition Heuris-tics Based on Dialogue Acts. In International Workshop on the Design of CooperativeSystems, pages 471{486, Antibes-Juan-les-Pins, France, 1995.

31