UNPKG

clvm_tools

Version:

Javascript implementation of clvm_tools

35 lines (34 loc) 2.04 kB
import { SExp } from "clvm"; import { TRunProgram } from "../stage_0"; export declare const QUOTE_ATOM: string; export declare const APPLY_ATOM: string; export declare const FIRST_ATOM: string; export declare const REST_ATOM: string; export declare const CONS_ATOM: string; export declare const RAISE_ATOM: string; export declare function non_nil(sexp: SExp): boolean | null; export declare function seems_constant(sexp: SExp): boolean; export declare function constant_optimizer(r: SExp, eval_f: TRunProgram): SExp; export declare function is_args_call(r: SExp): boolean; export declare const CONS_Q_A_OPTIMIZER_PATTERN: SExp; export declare function cons_q_a_optimizer(r: SExp, eval_f: TRunProgram): SExp; export declare const CONS_PATTERN: SExp; export declare function cons_f(args: SExp): SExp; export declare function cons_r(args: SExp): SExp; export declare function path_from_args(sexp: SExp, new_args: SExp): SExp; export declare function sub_args(sexp: SExp, new_args: SExp): SExp; export declare const VAR_CHANGE_OPTIMIZER_CONS_EVAL_PATTERN: SExp; export declare function var_change_optimizer_cons_eval(r: SExp, eval_f: TRunProgram): SExp; export declare function children_optimizer(r: SExp, eval_f: TRunProgram): SExp; export declare const CONS_OPTIMIZER_PATTERN_FIRST: SExp; export declare const CONS_OPTIMIZER_PATTERN_REST: SExp; export declare function cons_optimizer(r: SExp, eval_f: TRunProgram): SExp; export declare const FIRST_ATOM_PATTERN: SExp; export declare const REST_ATOM_PATTERN: SExp; export declare function path_optimizer(r: SExp, eval_f: TRunProgram): SExp; export declare const QUOTE_PATTERN_1: SExp; export declare function quote_null_optimizer(r: SExp, eval_f: TRunProgram): SExp; export declare const APPLY_NULL_PATTERN_1: SExp; export declare function apply_null_optimizer(r: SExp, eval_f: TRunProgram): SExp; export declare function optimize_sexp(r: SExp, eval_f: TRunProgram): SExp; export declare function make_do_opt(run_program: TRunProgram): (args: SExp) => import("clvm").Tuple<number, SExp>;