Unipen Interpreter

    Introduction

    The Unipen interpreter is a Java package written by Isabelle Guyon.
    The main routine is part of the class Interpreter. It calls a Lexical Analyzer, which verifies that Unipen instructions follow the syntax of the Unipen format, and an Evaluator, which evaluates the instructions by calling associated methods.
    Methods are wrapped into classes derived from the abstract class Method. The actual routine which gets called is called eval().
    We currently provide a subset of methods to analyze benchmark results. Some of these methods call utilities of the package statistics.

    Installation instructions

    Quick start

    java com.clopinet.unipen.interpreter.Interpreter -h java com.clopinet.unipen.interpreter.Interpreter -e 3
    Note that some methods are not implemented yet. By default, keywords are mapped to the DEBUG method which just prints out the arguments. java com.clopinet.unipen.interpreter.Interpreter
    Since a Unipen instruction ends with the start of a new instruction, when you enter an instruction at the prompt, it will not be executed until you enter the next one. Alternatively, type a simple dot and newline. This will flush your instruction and send it to the interpreter. To exit, type .EXIT <newline> . <newline>. java com.clopinet.unipen.interpreter.Interpreter -f mytask.res
    The included file mytask.rec is also executed. The truth values are automatically read from mytask.seg. A result table suitable to be read by statistical packages is output in mytask.tab.

    Note

    Many methods are not implemented yet. Do not expect the interpreter to behave reasonably outside the simple scoring of result files.

    Interpreter overview

    The Interpreter class of the package com.clopinet.unipen.interpreter contains the main routine that calls the Unipen interpreter.
    An interpreter consists of a lexical analyzer, which checks that an instruction follows the format syntax, and an evaluator, which evaluates the instruction by calling the associated method.

    For more information, look at the package documentation of Interpreter.

    Path

    If you want to change the place of the various files without typing lengthy path on the command line, you can modify com.clopinet.unipen.interpreter.Path. Note that Path variables are used by the methods INCLUDE, START_SET and END_SET of the package com.clopinet.unipen.methods. These classes need to be recompiled when the Path variables are changed.

    Adding a new method

    To add a method associated to a Unipen keyword .MY_KEYWORD, it suffices to add a class com.clopinet.unipen.methods.MY_KEYWORD, derived from the class com.clopinet.unipen.methods.Method. The actual routine which gets called has name eval(). Its argument is a vector which contains the arguments of the instruction.

    Sometimes, it is useful to be able to switch methods for a given keyword depending on the task at hand. For that purpose, we provide method aliases. For instance, to associate com.clopinet.unipen.methods.METHOD_A to .MY_KEYWORD, add this line to the unipen.alias file:

    MY_KEYWORD METHOD_A

    Using the statistics package

    The purpose of the current module is to be able to provide an on-line service to the participants. Their result files will be screened for format errors. Diagnostics and percent success will be sent back. We can create some synergy by posting the top best scores on any given task.

    Only basic descriptive statistics are currently implemented. These include:

    No use is made of the values provided in .REC_SCORES and .REC_TIME to compute these descriptive statistics, but ALL the results get formatted in a table that is printed out for further analysis. Note that the segments in this table are out of order.

    Some basic checks of potential errors or fraud are made: