thaw-grammar
Version:
Implementations of the grammars of several programming languages, including LISP, Scheme, Prolog, and the Lambda Calculus.
22 lines • 1.35 kB
TypeScript
import { IImmutableSet } from 'thaw-common-utilities.ts';
import { ILCBetaReductionOptions, ILCExpression, ISubstitution, IUnifiable } from './interfaces/expression';
export declare abstract class LCValueBase implements ILCExpression {
readonly typename: string;
constructor(typename: string);
abstract toString(): string;
equals(obj: unknown): boolean;
applySubstitution(substitution: ISubstitution<ILCExpression>): ILCExpression;
abstract unify(other: IUnifiable<ILCExpression>, variablesInOriginalExpr1Param?: IImmutableSet<string>, variablesInOriginalExpr2Param?: IImmutableSet<string>): ISubstitution<ILCExpression> | undefined;
containsVariableNamed(name: string): boolean;
containsBoundVariableNamed(name: string): boolean;
containsUnboundVariableNamed(name: string, boundVariableNames: IImmutableSet<string>): boolean;
substituteForUnboundVariable(name: string, value: ILCExpression): ILCExpression;
getSetOfAllVariableNames(): IImmutableSet<string>;
renameBoundVariable(newName: string, oldName: string): ILCExpression;
isBetaReducible(): boolean;
betaReduce(options?: ILCBetaReductionOptions): ILCExpression;
deltaReduce(): ILCExpression;
etaReduce(): ILCExpression;
isIsomorphicTo(other: IUnifiable<ILCExpression>): boolean;
}
//# sourceMappingURL=value-base.d.ts.map