csmic
Coded function factory.
This class generates new coded functions dynamically.
Creates a new ICodedFunction interface object that implements the dynamic method described.
Name of the function.
Number of expected arguments.
The method body.
An ICodedFunction interface object.
A coded implementation of the absolute value function.
Expects 1 argument.
The name of the function.
Executes a code block.
The arguments used in the code block.
The absolute value of the argument.
A coded implementation of the exponential function based on the constant e.
Expects 1 argument.
The name of the function.
Executes a code block.
The arguments used in the code block.
The constant e raised to the power of the argument.
A coded implementation of the log function.
Expects 2 arguments.
The name of the function.
Executes a code block.
The arguments used in the code block.
The log of the first argument to the base of the second argument.
A coded implementation of a precision function.
Expects 2 arguments.
The name of the function.
Executes a code block.
The arguments used in the code block.
The first argument to the precision of the argument.
A coded implementation of the squre root function.
Expects 1 argument.
The name of the function.
Executes a code block.
The arguments used in the code block.
The square root of the argument.
A coded implementation of the cosine function.
Expects 1 argument.
The name of the function.
Executes a code block.
The arguments used in the code block.
The cosine of the argument.
A coded implementation of a rounded function.
Expects 1 argument.
The name of the function.
Executes a code block.
The arguments used in the code block.
The rounded argument.
A coded implementation of the sine function.
Expects 1 argument.
The name of the function.
Executes a code block.
The arguments used in the code block.
The sine of the argument.
A coded implementation of the tangent function.
Expects 1 argument.
The name of the function.
Executes a code block.
The arguments used in the code block.
The tangent of the argument.
Computable class.
The expression to be built.
The interpreter to act as a base.
The add symbol.
The substract symbol.
The divide symbol.
The multiply symbol.
The modifier symbol.
The power symbol.
Gets the expression.
The expression.
Creates a Computable instance.
The expression.
The interpreter.
Resolves the computable as an input interpreter having calculated the input.
The computable as an input interpreter.
Resolve the computer to a type .
Generic type parameter.
The selector function.
.
Form the operation given the operation constant and an argument.
The operation constant.
The argument.
A string with the given operation appended.
Form the function with the current expression as the first argument, followed by .
The name of the function.
The arguments.
.
Adds addend.
The decimal to add.
A computable class after the addition.
Subtracts the subtrahend.
The subtrahend.
A computable class after the subtraction.
Multiplies the multiplicand.
The multiplicand.
A computable class after the mulitplication.
Divides the divisor.
The divisor.
A computable class after the divison.
Mods using a given divisor.
The divisor.
A computable class after the mod.
Raises to power of the given integer value.
The power.
A computable class after the power operation.
Applies the function with the current expression as the first argument, followed by .
The name of the function.
The arguments.
A computable class after the function is applied.
Executes a command for all items in a collection.
Generic type parameter.
The items of type .
The action belonging to type .
.
CS-MIC extension methods.
A string extension method that interprets as input the string that calls it.
The input to act on.
The output from the interpretation of the string.
A string extension method that executes as macro operation.
The script to act on.
The final output of the script.
A string extension method that interprets as input the string that calls it.
The collection to act on.
The output from the interpretation of the string.
A string extension method that interprets as input the string that calls it.
The collection to act on.
The action.
The output from the interpretation of the string.
Enumerates input in this collection, returning a selection on the interpreter.
Generic type parameter.
The collection to act on.
The selection.
An enumerator that allows foreach to be used to process interpret< t> in this
collection.
A string extension method that executes as macro operation.
The collection to act on.
The final output of the script.
Enumerates input in parallel in this collection.
The collection to act on.
An enumerator that allows foreach to be used to process interpret in parallel in this
collection.
Enumerates input in parallel this collection, returning a selection on the interpreter.
Generic type parameter.
The collection to act on.
The selection.
An enumerator that allows foreach to be used to process interpret in parallel< t> in
this collection.
A string extension method that interprets as input the strings that calls it in parallel.
The collection to act on.
The output from the interpretation of the string.
A generically coded implementation of the ICodedFunction interface.
Number of expected arguments.
Name of the function.
The method body.
Constructor.
Name of the function.
Number of expected arguments.
The method body.
Gets the number of expected arguments.
The total number of expected arguments.
Gets the name of the function.
The name of the function.
Executes a code block that computes the value of the function.
A variable-length parameters list containing arguments.
The decimal value computed by the function.
Implements a function that is coded in the .Net environment.
This interface is required to implement a method or function
that can be used by the CS-MIC inputInterpreter. It is worth noting that the
function's name will be the text that is used in the inputInterpreter as the
executable text.
Gets the number of expected arguments.
Gets the name of the function.
The input inputInterpreter will use this function name as
executable text, expecting an opening and closing parenthesis following
it.
Executes a code block that computes the value of the function.
An array of arguments passed to the function.
The decimal value computed by the function.
Any code block is valid. Error handling must be done by the
developer, as the inputInterpreter cannot determine if there is an error.
This example shows how to implement the sine function through the interface's
Execute() function.
public decimal Execute(params decimal[] args)
{
//Set up an output variable.
decimal output = 0;
//Check to see if the number or arguments recieved
//is equal to the number of arguments expected.
if (args.Length == this.NumExpectedArguments)
{
//Grab the argument and set a local variable for clarity.
decimal input = args[0];
//Set the output as a sine of the input.
output = (decimal)Math.Sin((double)input);
}
//Return the output. The function will return the sine if the arguments
//matched what was expected, and will return 0 otherwise. Returning 0 on
//errors is the standard in CS-MIC.
return output;
}
An interpreter object that reads user input and evaluates the code.
The interpreter does not support exceptions by design. Instead, invalid
calculations, parameters, etc. will result in a result of zero.
InputInterpreter interpreter = new InputInterpreter();
interpreter.Interpret("1/0"); // The result will be 0, not an exception.
The output generated.
The variables assigned.
The time for execution.
The verbose message of the calculation.
The list of coded functions that can be executed.
The list of user defined functions that can be executed.
The private calculated value.
Creates a new InputInterpreter.
Creates a new InputInterpreter from an original.
The orginal input interpreter to copy.
Gets the message that represents the InputInterpreters output.
Gets the verbose message that is generated with a calculation.
Gets the value of the output as a decimal.
Gets the value of the output cast as an int.
Gets the value of the output cast as a float.
Gets the value of the output cast as a double.
Gets the value (cast as a long) converted to its binary equivalent.
Gets the execution time of the last calculation.
Gets or sets a list of coded functions that the interpreter supports.
Gets or sets a list of user generated interpreted functions that the interpreter supports.
The interpreted functions.
Gets the variables.
The variables.
Interprets and executes given input.
The input to interpret and execute.
Computes an expression and returns the result as a decimal.
The expression to be calculated.
The value that was computed.
Assigns a decimal value to a variable.
The name of the variable.
The value of the variable.
True if the variable was set, false otherwise.
Assigns a decimal value to a variable.
The name of the variable.
The expression of the variable.
True if the variable was set, false otherwise.
Assigns a decimal value to a variable.
The name of the variable.
The values of the variable.
True if the variable was set, false otherwise.
Executes a function stored in the interpreter.
The name of the function to execute.
The arguments to pass to the function.
The value computed from the function execution.
Loads the default coded functions supported by the interpreter.
Produces output given a single object.
The object representing the output.
Produces output given an object and a message.
The object representing the output.
The message to be displayed with the output.
Interpret an input asynchronously.
The input to interpret and execute.
The callback.
Interpret asynchronous threading work.
The input to interpret and execute.
Interpret asynchronous delegate.
The input.
.
Converts this object to a computable.
This object as a Computable.
Treats the current object as a computable and performs an action in that context.
The action to execute as a computable object.
This object as a Computable, after the given action.
Represents a user defined function that can be executed by the interpreter.
The name of the function.
The number of expected arguments.
The set of instructions to be passed to the internal inputInterpreter.
A set of arguments used in computation of the function.
The internal macro builder used for computation.
The internal input inputInterpreter that macro builder will use for computation.
Creates a new interpreted function.
The name of the fuction.
The node to be used in computation.
A set of argument names to be used in computation.
Gets the name of the function.
Gets the number of expected arguments for the function.
Computes the value of the function.
The arguments used for computation.
The decimal value computed by the function.
Because a function's internal pattern may be different, we must manually check to see if the function
names are the same.
The object to test.
True if the functions are the same.
Serves as a hash function for a particular type.
A hash code for the current .
Represents an argument made in an interpreted function.
The name of the argument.
The value of the argument.
Creates a new interpreted function argument.
Creates a new interpreted function argument.
The name of the argument in the interpreted function.
The value of the argument to use in the interpreted function.
Gets or sets the name of the argument.
Gets or sets the value of the argument.
A builder object that executes macro scripts.
The input inputInterpreter.
The script to run as a macro.
The output as a list of strings.
The time for execution.
The root macro operation.
Creates a new builder object that executes a given macro script.
A list of strings representing the macro.
The InputInterpreter to be used.
Creates a new builder object that executes a given macro script.
A list of strings representing the macro.
The InputInterpreter to be used.
Gets a list of strings representing the output.
Gets the execution time of the last script computation.
Gets the decimal value last computed by the macrobuilder.
Runs this macro.
Executes the asynchronous operation.
The input.
The callback.
Executes the asynchronous threading work operation.
The input.
.
Macro asynchronous delegate.
The input.
.
Represents the operation types supported by a scripted macro.
Represents a conditional block.
Represents a conditional else block.
Represents a complete conditional block.
A while block.
A for block.
A function declaration.
An echo statement.
A say statement.
A display statement.
A statement to execute.
A string to display.
An unknown or malformed block.
An operation object that executes a specified action.
The type of operation represented by the operation.
The collection of children nodes that belong to the operation.
A list of the necesary input to execute the operation.
Creates a new macro operation node.
The type of operation the node represents.
Gets or sets the children nodes of the operation.
Gets or sets the input for the operation.
Gets or sets the operation type for this operation.
Represents the data types supported in a variable.
Decimal
Equation
Array
Unknown
No type associated
An object that contains information about a variable.
The type of variable.
The value of the variable.
Creates an empty variable.
Gets or sets an object representing the variable's value.
Gets or sets the type of the variable.