(Last modified Tue Jan 22 22:41 2008)

home

allen examples

These examples provide a start for new users of allen; it's always easier to work from an example.  The examples range from the intriguing to the very simple.  This web page was generated using allen

User input is in color

Table of contents

Which build of allen.jar
An example of using allen
An example of using allen -subclass
The -help option
Help while allen is running
The -subclass -help option



Which build of allen

[top]
java -jar allen.jar -build
allen 2006Jan26 Thu 23:48:05 UT

An example of using allen

[top]
java -jar allen.jar -echo 
Reading from standard input (-help or ? for help):
(p).(m)
(p).(m) = (p)
(pmoDF).(seSdf)
(pmoFD).(seSdf) = (pmoFDseSdfO)
!(p)
!(p) = (P)
~(p)
~(p) = (moFDseSdfOMP)
(pm)+(mo)
(pm)+(mo) = (pmo)
(pm)^(mo)
(pm)^(mo) = (m)
~()
~() = (pmoFDseSdfOMP)
(pmo)<(moFD)
(pmo)<(moFD) = false
(pmo).(p)=(p).(pmo)
(pmo).(p)=(p).(pmo) = true

An example of using allenSubclass

[top]
java -cp allen.jar allen.subclass.Command -echo 
Reading from standard input (-help or ? for help):
(pmo)(moD)(oDF)(DFs)(Fse)
-close=.
  Adding (pmo).(moD) = (pmoFD)
  Adding (FDs).(FDs) = (pmoFDs)
  Adding (Fse).(Fse) = (pmoFse)
-print
(pmoFDs)
(pmoFD)
(pmoFse)
(pmo)
(moD)
(oFD)
(FDs)
(Fse)
-closed=.
Closed under '.' composition.
-closed=!
Not closed under '!' converse:
  !(pmoFDs) = (SdfOMP)
-tractable=H
Not a subclass of the H subalgebra.
 (FDs) not in H:  Intersects with (sd) and with (FD) but does not contain (o)
 (Fse) not in H:  Intersects with (sd) and with (FD) but does not contain (o)

The -help option

[top]
% java -jar allen.jar -helpallen -- do operations with Allen's interval algebra relations.
allen [options] [file ...]
Input is taken from the standard input or named files and scanned for
relations to evaluate.

Command line options:
 -help     Show this help.
 -subclass The 'Allen subclass' command;  allen -subclass -help for help.
             May only appear as the first option on the command line.
 -build    Show the build identifier.
 -chars    List the 13 basic relations and their characters,
             and the 5 operations and their characters.
 -chars=s  Use s, which must be a string of 13 characters,
             as the symbols for the basic relations pmoFDseSdfOMP,
             followed optionally by the 5 operations !.~^+ ,
             followed optionally by the 5 comparators =><#? ;
             or (s=Allen) use Allen's symbols;
             or (s=kjj) use Krokhin, Jeavons, and Jonsson's symbols;
             or (s=ScenarioML) use the ScenarioML symbols (default).
 -syntax   Give help on the input syntax (same as from input line "?").
 -echo     Input is echoed.  -echo=help for more specific choices.
 -quiet    Only the results (and errors) are displayed;  no echoing.

An input line consisting of ? results in a display of the input syntax.
Input lines beginning with # are echoed as comments.
Input lines beginning with - are interpreted as command-line options.
Each other line contains either an Allen relation, an expression
evaluating to a relation, or a comparison between two expressions.
Allen relations are expressed by listing the characters for the basic
relations they contain, in parentheses.  -chars lists the characters.
The complement of a relation is indicated by a ~ before it.
The converse of a relation is indicated by a ! before it.
Composition of two relations is indicated by a dot . between them.
Intersection is ^, union is +.
Comparison of two expressions for equality is indicated by =.
Comparison of two expressions for strength is indicated by > or <
with the sign pointing to the equal-or-weaker (superset) relation.
Whitespace is ignored except inside a literal relation.
Compound relations are displayed with basic relation characters sorted.

Example input line:
(pm).~(oFDSe)

Help while allen is running

[top]
% java -jar allen.jar -echoReading from standard input (-help or ? for help):
?
# <inputLine>  ::= # <comment>
#               |  ?               # show this help
#               |  -<option>       # -help or any other command line option
#               |  <expression>
#               |  <comparison>
# <expression> ::= <relation>
#               |  ( <expression> )
#               |  ~ <expression>            # complement
#               |  <expression> . <relation> # composition
#               |  ! <expression>            # converse
#               |  <expression> ^ <relation> # intersection
#               |  <expression> + <relation> # union
# <relation>   ::= ( [pmoFDseSdfOMP]* )
# <comparison> ::= <expression> = <expression>
#               |  <expression> > <expression>
#               |  <expression> < <expression>
#               |  <expression> # <expression>
#               |  <expression> ? <expression>
#
-help
allen -- do operations with Allen's interval algebra relations.
allen [options] [file ...]
Input is taken from the standard input or named files and scanned for
relations to evaluate.

Command line options:
 -help     Show this help.
 -subclass The 'Allen subclass' command;  allen -subclass -help for help.
             May only appear as the first option on the command line.
 -build    Show the build identifier.
 -chars    List the 13 basic relations and their characters,
             and the 5 operations and their characters.
 -chars=s  Use s, which must be a string of 13 characters,
             as the symbols for the basic relations pmoFDseSdfOMP,
             followed optionally by the 5 operations !.~^+ ,
             followed optionally by the 5 comparators =><#? ;
             or (s=Allen) use Allen's symbols;
             or (s=kjj) use Krokhin, Jeavons, and Jonsson's symbols;
             or (s=ScenarioML) use the ScenarioML symbols (default).
 -syntax   Give help on the input syntax (same as from input line "?").
 -echo     Input is echoed.  -echo=help for more specific choices.
 -quiet    Only the results (and errors) are displayed;  no echoing.

An input line consisting of ? results in a display of the input syntax.
Input lines beginning with # are echoed as comments.
Input lines beginning with - are interpreted as command-line options.
Each other line contains either an Allen relation, an expression
evaluating to a relation, or a comparison between two expressions.
Allen relations are expressed by listing the characters for the basic
relations they contain, in parentheses.  -chars lists the characters.
The complement of a relation is indicated by a ~ before it.
The converse of a relation is indicated by a ! before it.
Composition of two relations is indicated by a dot . between them.
Intersection is ^, union is +.
Comparison of two expressions for equality is indicated by =.
Comparison of two expressions for strength is indicated by > or <
with the sign pointing to the equal-or-weaker (superset) relation.
Whitespace is ignored except inside a literal relation.
Compound relations are displayed with basic relation characters sorted.

Example input line:
(pm).~(oFDSe)
-chars
pmoFDseSdfOMP~.!^+><=#?
  p precedes
  m meets
  o overlaps
  F finished-by
  D contains
  s starts
  e equals
  S started-by
  d during
  f finishes
  O overlapped-by
  M met-by
  P preceded-by
 '~' complement
 '.' composition
 '!' converse
 '^' intersection
 '+' union
 '>' stronger
 '<' weaker
 '=' equals
 '#' incomparable
 '?' categorize

The -subclass -help option

[top]
java -cp allen.jar allen.subclass.Command -help
allenSubclass -- do operations on sets of Allen's interval algebra relations.
allenSubclass [argument ...]
Inputs are file names, -- which represents standard input, and -all.
The set of relations is then operated on as specified by command-line arguments.
Inputs are read and operators are applied in the order in which they are listed.
If the last argument is not "-print", the result set is printed by default.

Command line options:
 -help     Show this help.
 -build    Show the build identifier.
 -subalgebras  List the eighteen maximal tractable subalgebras and their
             membership criteria.
 -syntax   Give help on the input syntax (same as from input line "?").
 -echo     Input is echoed.
 -quiet    Input is not echoed;  only the results (and errors) are displayed.

Command-line operators on the current set of relations:
 file      Add the relations in the named file to the current set.
 --        Add the relations read from the standard input to the current set.
 -all      As if a file containing all 8192 Allen relations were named where
             this option appears.
 -chars    List the 13 basic relations and their characters,
             and the 5 operations and their characters.
 -chars=s  Use s, which must be a string of 13 characters, as
             the symbols for the basic relations pmoFDseSdfOMP,
             or 18 with additionally the characters for the operations !.~^+ ;
             or (s=Allen) use Allen's symbols;
             or (s=kjj) use Krokhin, Jeavons, and Jonsson's symbols;
             or (s=ScenarioML) use the ScenarioML symbols (default).
 -clear    Clear all relations from the current set.
 -close=[!.~^+]+
           Close the relations under the listed operations.
 -closed=[!.~^+]+
           Check whether the relations are closed under each listed operation,
             and give a counterexample for each if not.
             If none are named, !.^+ are checked.
 -filter=[A1,A2,A3,A4,Ae,B1,B2,B3,B4,EStar,Ed,Eo,Ep,H,SStar,Sd,So,Sp]
           Remove any relations that are not in the named subalgebra.
 -tractable=[A1,A2,A3,A4,Ae,B1,B2,B3,B4,EStar,Ed,Eo,Ep,H,SStar,Sd,So,Sp]*
           Check whether the relations are all members of the named
             subalgebras.  If none are named, all are checked.
             List relations that are not in each checked subalgebra.
 -print    Display the relations, in standard form and sequence.
Made with jEdit Valid CSS! Valid HTML 4.01! UC Irvine © 2005-2006 Thomas A. Alspaugh
Assistant Professor, Informatics Dept.
School of Information and Computer Sciences