Substrate.FSharp Module


This module defines the following types:

FSharp Type

A substrate the wraps a mapping from function names to (curried) F# functions. This substrate is not intended to be used directly. The purpose of this substrate is to serve as a basis for the implementation of specialized substrates via initialization of an instance of an FSharpSubstrate with a concrete mapping from function names to corresponding F# implementations. Example for usage: Substrate.Crypto

Methods

Modifiers Return type Method name Method parameters Description
static FunctionTerm createFunction string, Type, FunctionTerm list
static FunctionTerm var string
static FunctionTerm con a
static IVar toVar FunctionTerm
static Object toConstElem FunctionTerm

 

Function Type

A function application AST element

Implemented Interfaces

  • IEquatable<Function>
  • IStructuralEquatable

Methods

Modifiers Return type Method name Method parameters Description
int GetHashCode IEqualityComparer
int GetHashCode
bool Equals Object, IEqualityComparer
bool Equals Function
bool Equals Object

Properties

Return type Property name Description
string Name
Type ReturnType
FunctionTerm list Args

 

FunctionTerm Type

A type to keep AST elements of the F# Substrate

Implemented Interfaces

  • IEquatable<FunctionTerm>
  • IStructuralEquatable
  • ITerm

Methods

Modifiers Return type Method name Method parameters Description
static FunctionTerm NewConst Constant
static FunctionTerm NewVar IVar
static FunctionTerm NewFunction Function
int GetHashCode IEqualityComparer
int GetHashCode
bool Equals Object, IEqualityComparer
ITerm Apply ISubstitution
ITerm Normalize
a option UnifyFrom a, ITerm
bool Equals FunctionTerm
bool Equals Object

Properties

Return type Property name Description
int Tag
bool IsConst
bool IsVar
bool IsFunction
IType Type
IVar list Vars
bool isGround
bool isGroundOrVar

 

Function Type

Base type: FunctionTerm
Function application AST element for the F# Substrate (uses Function type)

Implemented Interfaces

  • IEquatable<FunctionTerm>
  • IStructuralEquatable
  • ITerm

Properties

Return type Property name Description
Function Item

 

Var Type

Base type: FunctionTerm
Variable AST element for the F# Substrate

Implemented Interfaces

  • IEquatable<FunctionTerm>
  • IStructuralEquatable
  • ITerm

Properties

Return type Property name Description
IVar Item

 

Const Type

Base type: FunctionTerm
Constant AST element for the F# Substrate

Implemented Interfaces

  • IEquatable<FunctionTerm>
  • IStructuralEquatable
  • ITerm

Properties

Return type Property name Description
Constant Item

 

FunctionQueryTerm Type

The Result is either a ground term, a constant or a variable. When solving the term the values of Body and Result are unified.

Implemented Interfaces

  • ITerm
  • ISubstrateQueryTerm
  • ISubstrateTerm

Methods

Modifiers Return type Method name Method parameters Description
ITerm Apply ISubstitution
ITerm Normalize
a option UnifyFrom a, ITerm
bool Equals Object
int GetHashCode

Properties

Return type Property name Description
FunctionTerm Body
FunctionTerm Result
string Namespace
IType Type
IVar list Vars

 

FSharpSubstrate Type

FSharpSubstrate that takes FunctionQueryTerms and solves them by means of applying the functions to their arguments

Implemented Interfaces

  • ISubstrate

Methods

Modifiers Return type Method name Method parameters Description
FunctionTerm createFunctionTerm string, FunctionTerm list
FunctionQueryTerm createQueryTerm FunctionTerm, FunctionTerm
unit Add string, a
ISubstitution seq Solve ISubstrateQueryTerm seq, ISubstitution seq

 

Automatically generated on 6/10/2011 2:28:40 PM
 

Last edited Jun 10, 2011 at 9:37 PM by gdecaso, version 3

Comments

No comments yet.