Bias UI Documentation:

Debugging Options

The URL we give to users is http://www.csse.monash.edu.au/~nag/bias. This fires up Bias in a new window of its own, with no confusing "Back" buttons or URL text entry boxes.

For debugging, the "Back" button can be handy (although it should be used with caution - redisplaying a previous screen does not rewind the status of that session). Also, being able to enter the URL directly means you can feed parameters into the CGI program that aren't otherwise offered. The URL to start Bias in Netscape without disabling the "Back" button or the URL entry field use this URL to start Bias instead: http://www.csse.monash.edu.au/cgi-bin/cgiwrap/nag/bias/biasNj.pl.

CGI parameters can be appended to the URL using the notation URL?param1=value&param2=value etc. Some of the 'debug' menus listed at the bottom of the screen in Bias will feed these parameters in for you.

Here's what the actual parameters are. Note that unless otherwise specified, these should at least have the 'sid' parameter used with them.

Parameter

Example

Action

f=filename

.../bias/biasNj.pl? f=myfile.txt

View the English generated from the specified argument graph file.

Does not require 'sid' to be set, and can be easily used from the command line.

sid=number

.../bias/biasNj.pl? sid=217

This parameter specifies the current session ID number. It is always re-sent to the CGI for a particular session. Setting this parameter will let you "resume" an existing session, even from another computer. (The state information is all kept in files). Make sure if you do try this using multiple computers that only one version of the session is 'active'.

shownode=nodeName

../bias/biasNj.pl? shownode = GreMurBod

Show as many ways of saying this node as the program can think of. Note that some ways (eg. Relative probabilities) are not tried. Still, gives a good indication if a node's .nodeinfo entry has been entered correctly.

Does not require 'sid' to be set, and can be easily used from the command line.

dbg=prOut
dbg=noPrOut

.../bias/biasNj.pl? sid=217 & dbg=prOut

Switch on/off printing of extra debug information, especially output from calls to Nathalie's programs, during the remainder of the session.

init2

../bias/biasNj.pl? sid=217 & init2=1

Tells Bias to go straight into phase 2 of initialisation (loading the scenario etc)

dir=static Menu Name

../bias/biasNj.pl? sid=217 & dir = /Observations/Crime Scene/

Tells Bias which static menu to display. Static menus are arranged in a directory-like fashion.

eval=1

../bias/biasNj.pl? sid=217 & eval=1

Kick into evaluation mode

end=1

../bias/biasNj.pl? sid=217 & end=1

Tells Bias the 'Quit now' button was pressed

startnag=1

../bias/biasNj.pl?sid=217 & startnag=1

Tells Bias the user asked for an initial argument.

rebuttal=1

../bias/biasNj.pl? sid=217 & rebuttal=1

Tells Bias that the user has made a rebuttal (other parameters describe what the rebuttal was. It really is best to just use the menus for this one as hand debugging is quite tricky)

sel=1

.../bias/biasNj.pl? sid=217 & sel=1

Tells Bias that the user has selected which rebuttal path they intended from the list that Bias gives them

showag=1

../bias/biasNj.pl? sid=217 & showag=1

A convenient way to ask for the current AG file to be displayed at the end of the page. There's a button for this at the bottom of the screen.



Using the Command Line

Technically all of the parameters described above can be used from the command line. Some are easier to use than others. You can also cut-and-paste the parameter list from the URL of web page that's crashing to the parameter entry stuff in step 3 below (to repeat an operation on the command line).

The advantage to running Bias from the command line is that you can see details of segmentation faults and also anything sent to STDERR. It's sometimes useful for explaining mysterious crashes.

  1. Change to the directory ~nag/WWW/cgi-bin/bias

  2. Run ./biasNj.pl

  3. Enter any parameters you want (eg: f=testfile.txt). This does not include the URL or the question-mark character, but can include the & separator if you want more than one parameter.

  4. Press ^D to end parameter entry

The program will run, and display all its output (including STDERR) to the terminal. You can pipe its output through 'less' etc the same as for any other command line program.

Note that all output from this program is in un-interpreted HTML form, so it is human-readable but will be littered with html tags (in angle-brackets).

Some handy tags to know when reading HTML are:

Tag

Meaning

<p>

New Paragraph (like a blank line in LATEX)

<br>

Line break (like \\ in LATEX)

&lt;

Less-than (<) character

&gt;

Greater-than (>) character



Pretty much all other tags can be ignored.