Logo Search packages:      
Sourcecode: mathpiper version File versions  Download package

org::mathpiper::lisp::userfunctions::SingleArityBranchingUserFunction Class Reference

Inheritance diagram for org::mathpiper::lisp::userfunctions::SingleArityBranchingUserFunction:

List of all members.

Detailed Description

A function (usually mathematical) which is defined by one or more rules. This is the basic class which implements functions. Evaluation is done by consulting a set of rewritng rules. The body of the car rule that matches is evaluated and its result is returned as the function's result.

Definition at line 35 of file SingleArityBranchingUserFunction.java.

Public Member Functions

ConsPointer argList ()
int arity ()
void declarePattern (int aPrecedence, ConsPointer aPredicate, ConsPointer aBody) throws Exception
void declareRule (int aPrecedence, ConsPointer aBody) throws Exception
void declareRule (int aPrecedence, ConsPointer aPredicate, ConsPointer aBody) throws Exception
void evaluate (Environment aEnvironment, ConsPointer aResult, ConsPointer aArgumentsPointer) throws Exception
boolean fenced ()
Iterator getParameters ()
Iterator getRules ()
void holdArgument (String aVariable)
boolean isArity (int aArity)
void showStack (Environment aEnvironment, MathPiperOutputStream aOutput)
 SingleArityBranchingUserFunction (ConsPointer aParameters, String functionName) throws Exception
UserStackInformation stackInformation ()
void unFence ()

Static Public Member Functions

static boolean isTraced ()
static boolean isTraceFunction (String functionName)
static void setTraceExceptFunctionList (List traceExceptFunctionList)
static void setTraceFunctionList (List traceFunctionList)
static void showExpression (StringBuffer outString, Environment aEnvironment, ConsPointer aExpression) throws Exception
static void traceOff ()
static void traceOn ()
static void traceShowArg (Environment aEnvironment, ConsPointer aParam, ConsPointer aValue) throws Exception
static void traceShowEnter (Environment aEnvironment, ConsPointer aExpression, String extraInfo) throws Exception
static void traceShowExpression (Environment aEnvironment, ConsPointer aExpression) throws Exception
static void traceShowLeave (Environment aEnvironment, ConsPointer aResult, ConsPointer aExpression, String extraInfo, String localVariables) throws Exception
static void traceShowRule (Environment aEnvironment, ConsPointer aExpression, String ruleDump) throws Exception

Static Public Attributes

static boolean DEBUG = false
static boolean iTraced = false
static boolean TRACE_TO_STANDARD_OUT = false
static boolean VERBOSE_DEBUG = false

Protected Member Functions

ConsPointer[] evaluateArguments (Environment aEnvironment, ConsPointer aArgumentsPointer) throws Exception

Protected Attributes

String functionName
String functionType = "**** user rulebase"
List< BranchiBranchRules = new ArrayList()
 List of rules, sorted on precedence.
List< FunctionParameteriParameters = new ArrayList()
 List of arguments, with corresponding iHold property.

Package Functions

void insertRule (int aPrecedence, Branch newRule)

Package Attributes

UserStackInformation iBasicInfo = new UserStackInformation()
boolean iFenced = true
ConsPointer iParameterList = new ConsPointer()
 List of arguments.
boolean showFlag = false

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index