JMP: Java Implementation of MP


What is the Multi Protocol?

The Multi Protocol (MP) is designed for exploring issues in integrating symbolic, numeric, graphics, document processing, and other software tools for scientific computation within different computing paradigms (e.g., point to point, distributed, parallel, software bus).

All data is transmitted in the form of linearized annotated syntax trees. Interior nodes of a syntax tree are operators, while leaves are non-operator basic types or an operator with no children. Each node of the tree is sent individually in a node packet. Each node of the tree (node packet) may have 0 or more annotations attached to it. Annotations are transmitted individually as annotation packets and immediately follow the node to which they are attached.

To support this experimentation, MP was implemented in a layered fashion and is independent of the transport mechanism used to transmit the data. Device interfaces are available for files, TCP sockets, and PVM.

JMP: Object-Oriented Implementation of MP in Java

JMP is the MP Java Library. The implementation is based on MP 1.2 specification and JMP is developed under JDK1.2.2.

Besides 26 core classes in JMP, there are sample testing classes in the EDU.kent.iamc.mp package which follows the name convention of TryFunctionName, such as TrySum.java and TrySin.java. Command java EDU.kent.iamc.mp.TrySin could invoke the packaged TrySin class and an MP encoded message would be generated in the file c:/JMP/sin.mp (the mp subdirectory should exist before running the test classes). JMPUsage.pdf is a JMP usage guide and the user could use it as a guide to get familiar with JMP.

  1. To Download JMP:
  2. JMP is distributed free under the GNU GENERAL PUBLIC LICENSE. Shift-click on one of these links to download JMP:

    For Windows: JMP.zip

    For UNIX: JMP_Unix.tar.gz

  3. To install JMP under Windows system:
  4. First, unzip the JMP.zip file to a selected directory c:\JMP (or the user could choose a preferred one) using Winzip and the JMP package files will be put to EDU\kent\iamc\mp subdirectory. If you select the c:\JMP as the unzip root directory, the JMP classes will be install into c:\JMP\EDU\kent\iamc\mp directory while some document files are installed in the JMP directory.

    Next, you should set the classpath properly. JMP require the root path of the installation in the CLASSPATH environment. For example, if you unzip the JMP.zip to C:\JMP then the CLASSPATH should be like: ".;c:\JMP;path3..." where the "." stands for the current directory. There are several ways to set the CLASSPATH environment. The following is only one way of setting:

    C:> set CLASSPATH=.;c:\JMP

    Each path ends with a filename or directory depending on what you are setting the class path to. Multiple entries should be separated by semi-colons.

    If the CLASSPATH variable is set at system startup, the place to look for it depends on your operating system:

    • Under Windows 98/95: Examine autoexec.bat for the set command.
    • Under Windows NT: Start the Control Panel, select System, click the Environment tab and, in the User Variables section, examine the CLASSPATH variable.

     

  5. To install JMP under Unix system:
  6. First, select the install root directory (such as c:/JMP directory) and unzip the JMP_Unix.tar.gz file using gunzip, and then use command: tar -xvf JMP_Unix.tar to install the JMP to EDU/kent/iamc/mp subdirectory.

    Next, you should set the classpath properly. JMP require the root path of the installation in the CLASSPATH environment. For example, if you C:/JMP is the root for EDU/kent/iamc/mp, then the CLASSPATH should be like ".:c:/JMP:path3..." where the "." stands for the current directory. There are several ways to set the CLASSPATH environment:

    • In csh, the CLASSPATH environment variable is modified with the setenv command. The format is: setenv CLASSPATH path1:path2:...
    • In sh, the CLASSPATH environment variable can be modified with these commands: CLASSPATH = path1:path2:... and export CLASSPATH

    Each path ends with a filename or directory depending on what you are setting the class path to. Multiple entries are separated by colons.

    If the CLASSPATH variable is set at system startup, the place to look for it depends on the shell you are running:

    • Under csh, tcsh: Examine your .cshrc file for the setenv command..
    • Under sh, ksh: Examine your .profile file for the export command..

  7. JMP Usage ABC:
  8. Following are some commands of using JMP to Encode or Decode MP messages (detail usage should be guided by JMPUsage.pdf).

    1. java EDU.kent.iamc.mp.Encoder "(foo x y z)" c:\JMP\foo.mp

    -- expression foo(x,y,z) will be MP encoded into c:\JMP\foo.mp file

    2. java EDU.kent.iamc.mp.Decoder c:\JMP\foo.mp

    -- MP message in c:\JMP\foo.mp file will be decoded

    3. java EDU.kent.iamc.mp.Encode

    -- the input and output formats are illustrated in JMPUsage.pdf

    4. java EDU.kent.iamc.mp.Decode

    -- the input and output formats are illustrated in JMPUsage.pdf

    Encode.class and Decode.class in JMP are dual-purpose Java classes. They could be run under JVM as well as in browsers (Netscape/Internet Explorer) and appletviewer:

    • java java.MP.Encode is the command to run Encode as JVM interpreted class, and the command "c:\JMP> appletviewer JMPEncoder" will run Encode as an applet.
    • java java.MP.Decode is the command to run Decode as JVM interpreted class, and the command "c:\JMP> appletviewer JMPDecoder" will run Decode as an applet.

Authors

Linlin Tong, Simon Gray, Norbert kajler, Paul Wang

Institute for Compuotational Mathematics
Kent State University
Kent OH USA 44242-0001
http://icm.mcs.kent.edu

Latest JMP version at: http://icm.mcs.kent.edu/research/jmp/

The JMP effort has been supported in part by the National Science Foundation under Grant CCR-9721343 and the Ohio Board of Regents Computer Science Enhancement Funds.

| IAMC Homepage |