thaw-grammar
Version:
Implementations of the grammars of several programming languages, including LISP, Scheme, Prolog, and the Lambda Calculus.
23 lines • 1.39 kB
TypeScript
import { IImmutableSet } from 'thaw-common-utilities.ts';
import { ILCBetaReductionOptions, ILCExpression, ILCLambdaExpression, ILCSubstitution, ILCUnifiable } from './interfaces/expression';
import { LCValueBase } from './value-base';
import { LCVariable } from './variable';
export declare class LCLambdaExpression extends LCValueBase implements ILCLambdaExpression {
readonly arg: LCVariable;
readonly body: ILCExpression;
constructor(arg: LCVariable, body: ILCExpression);
toString(): string;
containsVariableNamed(name: string): boolean;
containsBoundVariableNamed(name: string): boolean;
containsUnboundVariableNamed(name: string, boundVariableNames: IImmutableSet<string>): boolean;
renameBoundVariable(newName: string, oldName: string): ILCExpression;
substituteForUnboundVariable(name: string, value: ILCExpression): ILCExpression;
isBetaReducible(): boolean;
betaReduce(options?: ILCBetaReductionOptions): ILCExpression;
deltaReduce(): ILCExpression;
etaReduce(): ILCExpression;
getSetOfAllVariableNames(): IImmutableSet<string>;
applySubstitution(substitution: ILCSubstitution): ILCExpression;
unify(other: ILCUnifiable, variablesInOriginalExpr1Param?: IImmutableSet<string>, variablesInOriginalExpr2Param?: IImmutableSet<string>): ILCSubstitution | undefined;
}
//# sourceMappingURL=lambda-expression.d.ts.map