MCPcopy Create free account

hub / github.com/cucapra/lambdalab / functions

Functions88 in github.com/cucapra/lambdalab

↓ 24 callersFunctionpretty
(e: Expr, step : StepInfo | null)
lib/ast.ts:126
↓ 15 callersFunctionparse
(scanner : Scanner, strat : Strategy)
lib/parse.ts:400
↓ 12 callersMethodcopy
()
lib/ast.ts:18
↓ 9 callersMethoderror
* Create a ParseError with the given message that refers to the current * source position of the parser.
lib/parse.ts:94
↓ 9 callersMethodscan
* Match the regular expression at the current offset, return the match, and * advance the current position past the matched string. Or, if the regu
lib/parse.ts:69
↓ 9 callersFunctionskip_whitespace
* Scan over any amount of whitespace.
lib/parse.ts:102
↓ 7 callersFunctionalpha_equivalent
(ex1 : Expr, ex2: Expr)
lib/macro.ts:20
↓ 7 callersFunctionequiv_s
* Determines if two terms are macro-equivalent under Strategy s
lib/macro.ts:70
↓ 6 callersFunctionparse_expr
* Parse a sequence of terms separated by whitespace: in other words, * a nested hierarchy of applications.
lib/parse.ts:124
↓ 6 callersMethodset_string
(s : string)
lib/parse.ts:36
↓ 5 callersFunctionexecute
()
lambdalab.ts:392
↓ 4 callersFunctionclearError
* Remove the current error being displayed.
lambdalab.ts:299
↓ 4 callersFunctioninsertText
* Insert text into the DOM at the current selection caret.
lambdalab.ts:19
↓ 4 callersFunctionreplace_macros
* Replaces a term containing macros with an equivalent term without macros
lib/macro.ts:50
↓ 4 callersFunctionsubst
* Perform capture-avoiding substitution: e[v/x]. Returns the new expressions, as well as pointers to all * the substituted expressions
lib/reduce.ts:65
↓ 3 callersFunctionactiveInStep
* Determines if a given expression contains any subexpressions relevant to a step
lib/ast.ts:271
↓ 3 callersFunctionfind_value
(expr : Expr, reduce : (e: Expr) => [Expr | null, StepInfo | null])
lib/parse.ts:283
↓ 3 callersFunctionis_closed
(e : Expr)
lib/parse.ts:323
↓ 3 callersFunctionmakeGraph
(e : Expr, step : StepInfo | null, graphOut : HTMLElement)
lambdalab.ts:48
↓ 3 callersFunctionreduce_appl
(e: Expr)
lib/reduce.ts:227
↓ 3 callersFunctionsortMacros
* Sort the list of macros by dependency. Returns the sorted list
lambdalab.ts:456
↓ 2 callersFunctionappendResults
(res: ReadonlyArray<[string, Expr, StepInfo | null]>, resultList: HTMLElement)
lambdalab.ts:187
↓ 2 callersFunctioncompileMacro
(s : Scanner, macro_text : string, macro_name : string)
lib/parse.ts:327
↓ 2 callersFunctiongetStrategy
* Determine the currently selected evaluaiton strategy.
lambdalab.ts:369
↓ 2 callersFunctionmacroAdd
* Accept a new macro definition and incorporate it into the current macro * list.
lambdalab.ts:497
↓ 2 callersFunctionmacroText
* Get the current list of macros as a string.
lambdalab.ts:469
↓ 2 callersFunctionparse_macro_name
* Parse a macro name. Macro names are uppercase
lib/parse.ts:116
↓ 2 callersFunctionparse_var_name
* Parse a variable name. Variable names are lowercase
lib/parse.ts:109
↓ 2 callersFunctionposInText
* Given a list of text nodes and an offset into the concatenated text * they represent, return the text node where this offset lies and the * corres
lambdalab.ts:239
↓ 2 callersFunctionrenderASTs
(prev : Expr | null, stepInfo : StepInfo | null, cur : Expr)
lambdalab.ts:38
↓ 2 callersFunctionrun
(expr : Expr | null, timeout : number, reduce : (e: Expr) => [Expr | null, StepInfo | null])
lib/reduce.ts:288
↓ 2 callersFunctionshowError
* Display a parser error.
lambdalab.ts:259
↓ 2 callersFunctionshowResult
* Show the result, given as a string, of executing some code in the list * element provided. * * When interactive mode is off, this displays the re
lambdalab.ts:213
↓ 2 callersFunctionstrat_of_string
(s : string)
lib/reduce.ts:13
↓ 2 callersFunctionupdateLink
* Update the sharing link with the current code.
lambdalab.ts:306
↓ 2 callersFunctionupdateMacroList
* Update the list of defined macros to display all the macros in the scanner.
lambdalab.ts:480
↓ 1 callersFunctionadd_macro
(s: Scanner)
lib/parse.ts:373
↓ 1 callersFunctionalpha_equiv_in_context
(e1 : Expr, vars1 : string[], e2: Expr, vars2 : string[])
lib/macro.ts:21
↓ 1 callersFunctioncollectTree
(e : Expr, parent : number | null, self : number, target : number | null, vars : number[
lib/ast.ts:219
↓ 1 callersFunctioncolorize
(entry : HTMLLIElement, line : string)
lambdalab.ts:115
↓ 1 callersFunctionconvertToDot
(e : Expr, step : StepInfo | null)
lib/ast.ts:366
↓ 1 callersMethodcopyMacros
()
lib/parse.ts:55
↓ 1 callersFunctiondependsExpr
(e : Expr)
lib/macro.ts:195
↓ 1 callersFunctionexpand
* Expands a flattened AST
lib/ast.ts:299
↓ 1 callersFunctionflatten
* Flattens an Expr tree in place into a flattened tree by collapsing the parts * of the tree not relevant to the current step
lib/ast.ts:328
↓ 1 callersFunctionflattenToMatch
(source : Expr, target : Expr)
lib/ast.ts:202
↓ 1 callersFunctionfresh
* Create a version of the variable name x that is not * already present in the array.
lib/reduce.ts:53
↓ 1 callersFunctionfv
* Get the free variables in an expresison.
lib/reduce.ts:34
↓ 1 callersFunctiongetDependencies
(m1 : MacroDefinition, s : Scanner)
lib/macro.ts:194
↓ 1 callersFunctiongetLabel
* Produces the correct string label from a StepInfo object
lib/reduce.ts:277
↓ 1 callersFunctionguessesMatch
(e1 : Expr, e2 : Expr | null)
lib/ast.ts:190
↓ 1 callersFunctionhandleHash
* Load the current state from a URL hash, if it contains share link data. * * Return a flag indicating whether code was loaded from the state.
lambdalab.ts:321
↓ 1 callersFunctionhide
* Hide an HTML element from the page by setting "display: none" in its CSS.
lambdalab.ts:111
↓ 1 callersFunctionin_library
(e : Expr, sigma : MacroLibrary, s : Strategy, timeout : number)
lib/macro.ts:113
↓ 1 callersFunctioninit_macros
(s : Scanner)
lib/macro.ts:217
↓ 1 callersFunctioninteractiveResult
(res: ReadonlyArray<[string, Expr, StepInfo | null]>, s : Scanner, start : number,
lambdalab.ts:148
↓ 1 callersFunctionis_closed_in_context
(e : Expr, context : string[] )
lib/parse.ts:301
↓ 1 callersFunctionmacroSetUp
* Set up the macro event handlers. This is called when the DOM is first loaded.
lambdalab.ts:515
↓ 1 callersFunctionparse_abs
* Parse a lambda-abstraction.
lib/parse.ts:258
↓ 1 callersFunctionparse_dots
* Parse ellipses
lib/parse.ts:209
↓ 1 callersFunctionparse_macro
* Parse a macro occurrence.
lib/parse.ts:221
↓ 1 callersFunctionparse_term
* Parse a non-application expression: a variable or an abstraction, or a * parenthesized expression.
lib/parse.ts:154
↓ 1 callersFunctionparse_var
* Parse a variable occurrence.
lib/parse.ts:196
↓ 1 callersFunctionprogramSetUp
* Set up the program event handlers. This is called when the DOM is first * loaded. * * Return a function that runs the currently-entered program,
lambdalab.ts:386
↓ 1 callersMethodrecompileMacros
* Recompiles the macros in the scanner to reflect changes in dependencies * * @param sorted the sorted list of macros by dependency. This is ne
lib/parse.ts:48
↓ 1 callersFunctionresugar
(e : Expr, sigma : MacroLibrary, s : Strategy)
lib/macro.ts:166
↓ 1 callersFunctionrunCode
* Execute a lambda-calculus expression in a string. Return a new set of steps * to display or a parse error.
lambdalab.ts:70
↓ 1 callersFunctiontoggleVisibility
(el: HTMLElement)
lambdalab.ts:578
Methodconstructor
( public readonly name: string )
lib/ast.ts:12
Methodconstructor
( public e1: Expr, public e2: Expr )
lib/ast.ts:28
Methodconstructor
( public readonly vbl: string, public body: Expr )
lib/ast.ts:45
Methodconstructor
( public readonly name: string, public readonly body: Expr )
lib/ast.ts:62
Methodconstructor
(public readonly body : Expr )
lib/ast.ts:79
Methodconstructor
( public readonly beta: boolean, // whether the last step was a macro expansion (false) or a beta reductio
lib/ast.ts:102
Methodconstructor
(public name: string, public cbv_val : Expr | null, public cbn_val : Expr | null, public full_val : Ex
lib/macro.ts:11
Methodconstructor
(public msg: string, public pos: number)
lib/parse.ts:17
Methodconstructor
()
lib/parse.ts:29
Methodcopy
()
lib/ast.ts:35
Methodcopy
()
lib/ast.ts:52
Methodcopy
()
lib/ast.ts:69
Methodcopy
()
lib/ast.ts:84
Methodcopy
()
lib/ast.ts:114
Methoddone
* Check whether the entire string has been consumed.
lib/parse.ts:86
Functionequiv_a
* Determines if two terms are macro-equivalent under alpha-equivalence
lib/macro.ts:63
Functionis_value
* Check whether a lambda-term is a value. Only works for CBV/CBN and * does not account for macros.
lib/reduce.ts:27
Functionreduce_cbn
(e: Expr)
lib/reduce.ts:153
Functionreduce_cbv
(e: Expr)
lib/reduce.ts:110
Functionreduce_normal
(e: Expr)
lib/reduce.ts:181