Expand description
Defines the core language of thought of the model and a simple virtual machine.
Structs§
- Context
- A struct which keeps track of the context leading up to some expression, e.g. its depth, what variables are accessible, and whether the context has a constant function.
- Execution
Config - A configuration struct to limit the time of execution of a given language expression
- ExprRef
- An index for a specific
Exprin aLanguageExpression - Lambda
Enumerator - An iterator that enumerates over all possible expressions of a given type.
- Lambda
Sampler - A struct which samples expressions from a distribution.
- Language
Expression - An expression pool with a defined root.
- Possible
Expressions - A struct which defines a HashMap of all types and expressions. The outer HashMap is for the return types of expressions and the inner HashMap is for their arguments. Then there is a vector of all possible lambda expressions with that output type and input arguments.
- Type
Agnostic Sampler - A re-usable sampler for sampling expressions of arbitrary types while caching frequent types
Enums§
- Actor
OrEvent - Whether something refers to an actor or event.
- BinOp
- All binary operations
- Conjoining
Error - An error which results from a failed application of
RootedLambdaPool::conjoin - Constant
- Any valid constant in the language.
- Expr
- The basic expression type of the language of thought. Note that it does not include free variables or any of the machinery of the lambda calculus which is handled elsewhere.
- Lambda
Parse Error - Error in parsing a lambda expression
- Language
Result - The result of running a
LanguageExpression, seeLanguageExpression::run. - Language
Result Type - The basic atomic types of the LOT. See
LanguageResult. - Language
Type Error - Possible errors that can be generated when running a
LanguageExpression - MonOp
- All unary operations
- Quantifier
- An enum which represents all possible quantifiers in the language.
- Variable
- The ID of a given variable bound by quantification
Functions§
- parse_
executable - A function which maps strings to language of thought expressions. Crucially, it automatically performs all lambda reductions.