
========== Metarouting Environment (MRE) ======================

mre [-xml] [-mt | -dj | -bf] [-g inputFile | -term string | -i]
  --help  Display this list of options
  -i : enter interactive mode
  -term : input term
  -g : a file containing a labeled graph
  -mt : use matrix multiplication algorithm (default)
  -dj : use Dijstra's shortest path algorithm
  -bf : use Bellman-Ford shortest path algorithm
  -startNode : starting node which is used by some algorihms (default 0)
  -syntax : print information about term syntax
  -xml : print output in xml format
  -debug : [for development use only]
  -help  Display this list of options


Here is an example of using the interactive mode 

$ bin/mre -i

              ---- MetaRouting Environment (MRE) ----
                    University of Cambridge

    -----------------------  commands     ---------------------------
    ?                    --- print this list of commands/declarations 
    !q                   --- quit 
    !s                   --- show algebra syntax 
    !h                   --- show history 
    !w <file>            --- write history to <file>
    !r <file>            --- read commands from <file>
    % this is a comment  --- comment line (saved in history) 

    -----------------------  declarations ---------------------------
    <id> <- <algebra>               --- bind <id> to an <algebra> 
    <id1> : <id2> <- <term>         --- bind <id1> to a <term> in algebra <id2> 

mre> % let's define a semigroup
mre> s1 <- sProduct sNatMin sNatMax
Specification: sProduct (sNatMin) (sNatMax)
Carrier: (int * int)
------------ DecSetoid properties ------------
                    IsSignleton   FALSE : -
                    TwoElements   FALSE : -
                         Finite   FALSE : -
------------ Semigroup properties ------------
                    HasIdentity   FALSE : -
                 HasAnnihilator   FALSE : -
                    IsSelective   FALSE : (0, 0) , (1, 1)
                  IsCommutative   TRUE  : -
                   IsIdempotent   TRUE  : -
                         IsLeft   FALSE : (1, 0) , (0, 0)
                        IsRight   FALSE : (0, 0) , (1, 0)
                  LeftCondensed   FALSE : (1, 0) , (1, 0) , (0, 0)
                 RightCondensed   FALSE : (1, 0) , (1, 0) , (0, 0)
                LeftCancelative   FALSE : (1, 0) , (0, 0) , (0, 0)
               RightCancelative   FALSE : (1, 0) , (0, 0) , (0, 0)
                       AntiLeft   FALSE : (0, 0) , (0, 0)
                      AntiRight   FALSE : (0, 0) , (0, 0)
mre> % from this we will define an order 
mre> o1 <- pLeftNaturalOrder s1
Specification: pLeftNaturalOrder (sProduct (sNatMin) (sNatMax))
Carrier: (int * int)
------------ DecSetoid properties ------------
                    IsSignleton   FALSE : -
                    TwoElements   FALSE : -
                         Finite   FALSE : -
------------ Preorder properties -------------
                         HasTop   FALSE : -
                      HasBottom   FALSE : -
                          Total   FALSE : (0, 0) , (1, 1)
                        Antisym   TRUE  : -
mre> % and from this we define another semigroup 
mre> s2 <- sMinSetsUnion o1
Specification: sMinSetsUnion (pLeftNaturalOrder (sProduct (sNatMin) (sNatMax)))
Carrier: ((int * int)) list
------------ DecSetoid properties ------------
                    IsSignleton   FALSE : -
                    TwoElements   FALSE : -
                         Finite   FALSE : -
------------ Semigroup properties ------------
                    HasIdentity   TRUE  : []
                 HasAnnihilator   UNKNOWN 
                    IsSelective   FALSE : [(0, 0)] , [(1, 1)]
                  IsCommutative   TRUE  : -
                   IsIdempotent   TRUE  : -
                         IsLeft   FALSE : [] , [(0, 0)]
                        IsRight   FALSE : [(0, 0)] , []
                  LeftCondensed   FALSE : [] , [] , [(0, 0)]
                 RightCondensed   FALSE : [] , [] , [(0, 0)]
                LeftCancelative   FALSE : [(0, 0)] , [] , [(0, 0)]
               RightCancelative   FALSE : [(0, 0)] , [] , [(0, 0)]
                       AntiLeft   FALSE : [] , []
                      AntiRight   FALSE : [] , []
mre> !q

$ 