org.symcomp.wupsi
Class Wupsifer

java.lang.Object
  extended by org.symcomp.wupsi.Wupsifer
All Implemented Interfaces:
org.symcomp.notification.NotificationReceiver

public class Wupsifer
extends java.lang.Object
implements org.symcomp.notification.NotificationReceiver

is main loop class. It first evaluates the options, then registeres the handlers for the commands. Most state infos of the WUPSI are stored here and all console user interaction takes place here.


Method Summary
 org.symcomp.openmath.OpenMathBase compute(org.symcomp.scscp.SCSCPClient client, org.symcomp.openmath.OpenMathBase omb)
          does the actual computation
 void compute(org.symcomp.scscp.SCSCPClient client, java.lang.String in)
          meta-handler for computing
 boolean connect(java.lang.String url, java.lang.String name)
          connect
 void error(java.lang.String s)
           
 java.lang.String getActiveClient()
           
 org.symcomp.scscp.SCSCPClient getClient(java.lang.String name)
           
 java.util.Map<java.lang.String,org.symcomp.scscp.SCSCPClient> getClients()
           
 java.util.List<org.symcomp.openmath.OpenMathBase> getExamples()
           
 java.util.List<WupsiHandler> getHandlers()
           
 java.util.List<org.symcomp.openmath.OpenMathBase> getInputHistory()
           
static Wupsifer getInstance()
           
static Wupsifer getInstance(WupsiOptions options)
           
 java.util.Map<java.lang.String,org.symcomp.openmath.OpenMathBase> getLocals()
           
 java.lang.String getOutputFormat()
           
 java.util.List<org.symcomp.openmath.OpenMathBase> getOutputHistory()
           
 void info(java.lang.String s)
           
 void print(org.symcomp.openmath.OpenMathBase om)
           
 void print(java.lang.String s)
           
 void println(org.symcomp.openmath.OpenMathBase om)
           
 void println(java.lang.String s)
           
 void receiveNotification(org.symcomp.notification.Notification notification)
           
 org.symcomp.openmath.OpenMathBase replace(org.symcomp.openmath.OpenMathBase omb)
          replace all occurrencies of special variables in the OpenMath tree
 void run()
           
 java.lang.String serviceInfo(org.symcomp.scscp.SCSCPClient client)
          produces a nice info string
 void setActiveClient(java.lang.String activeClient)
           
 void setClients(java.util.Map<java.lang.String,org.symcomp.scscp.SCSCPClient> clients)
           
 void setExamples(java.util.List<org.symcomp.openmath.OpenMathBase> examples)
           
 void setInputHistory(java.util.List<org.symcomp.openmath.OpenMathBase> inputHistory)
           
 void setLocals(java.util.Map<java.lang.String,org.symcomp.openmath.OpenMathBase> locals)
           
 void setOutputFormat(java.lang.String outputFormat)
           
 void setOutputHistory(java.util.List<org.symcomp.openmath.OpenMathBase> outputHistory)
           
 void setPrompt(java.lang.String prompt)
           
 void systemCleanUp(org.symcomp.scscp.SCSCPClient client, boolean died)
           
 void systemDied(org.symcomp.scscp.SCSCPClient client)
           
 void systemDisconnect(org.symcomp.scscp.SCSCPClient client)
           
 void warning(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

run

public void run()
         throws java.io.IOException
Throws:
java.io.IOException

compute

public void compute(org.symcomp.scscp.SCSCPClient client,
                    java.lang.String in)
meta-handler for computing

Parameters:
client - the client on which to execute
in - the input string

compute

public org.symcomp.openmath.OpenMathBase compute(org.symcomp.scscp.SCSCPClient client,
                                                 org.symcomp.openmath.OpenMathBase omb)
does the actual computation

Parameters:
client -
omb -
Returns:

replace

public org.symcomp.openmath.OpenMathBase replace(org.symcomp.openmath.OpenMathBase omb)
replace all occurrencies of special variables in the OpenMath tree

Parameters:
omb - the OpenMath tree
Returns:
a replaced version

serviceInfo

public java.lang.String serviceInfo(org.symcomp.scscp.SCSCPClient client)
produces a nice info string

Parameters:
client - the client for which to get the infos
Returns:
the description

connect

public boolean connect(java.lang.String url,
                       java.lang.String name)
connect

Parameters:
url -
name -
Returns:
true of the connection could be established

print

public void print(org.symcomp.openmath.OpenMathBase om)

println

public void println(org.symcomp.openmath.OpenMathBase om)

println

public void println(java.lang.String s)

print

public void print(java.lang.String s)

info

public void info(java.lang.String s)

warning

public void warning(java.lang.String s)

error

public void error(java.lang.String s)

getClient

public org.symcomp.scscp.SCSCPClient getClient(java.lang.String name)

getClients

public java.util.Map<java.lang.String,org.symcomp.scscp.SCSCPClient> getClients()

setClients

public void setClients(java.util.Map<java.lang.String,org.symcomp.scscp.SCSCPClient> clients)

getActiveClient

public java.lang.String getActiveClient()

setActiveClient

public void setActiveClient(java.lang.String activeClient)

getOutputFormat

public java.lang.String getOutputFormat()

setOutputFormat

public void setOutputFormat(java.lang.String outputFormat)

getLocals

public java.util.Map<java.lang.String,org.symcomp.openmath.OpenMathBase> getLocals()

setLocals

public void setLocals(java.util.Map<java.lang.String,org.symcomp.openmath.OpenMathBase> locals)

getInputHistory

public java.util.List<org.symcomp.openmath.OpenMathBase> getInputHistory()

setInputHistory

public void setInputHistory(java.util.List<org.symcomp.openmath.OpenMathBase> inputHistory)

getOutputHistory

public java.util.List<org.symcomp.openmath.OpenMathBase> getOutputHistory()

setOutputHistory

public void setOutputHistory(java.util.List<org.symcomp.openmath.OpenMathBase> outputHistory)

getExamples

public java.util.List<org.symcomp.openmath.OpenMathBase> getExamples()

setExamples

public void setExamples(java.util.List<org.symcomp.openmath.OpenMathBase> examples)

setPrompt

public void setPrompt(java.lang.String prompt)

getInstance

public static Wupsifer getInstance()

getInstance

public static Wupsifer getInstance(WupsiOptions options)

getHandlers

public java.util.List<WupsiHandler> getHandlers()

systemDied

public void systemDied(org.symcomp.scscp.SCSCPClient client)

systemDisconnect

public void systemDisconnect(org.symcomp.scscp.SCSCPClient client)

systemCleanUp

public void systemCleanUp(org.symcomp.scscp.SCSCPClient client,
                          boolean died)

receiveNotification

public void receiveNotification(org.symcomp.notification.Notification notification)
Specified by:
receiveNotification in interface org.symcomp.notification.NotificationReceiver


Copyright © 2010. All Rights Reserved.