HerbGrammar.jl Documentation
HerbGrammar.ContextSensitiveGrammar
— TypeContextSensitiveGrammar <: AbstractGrammar
Represents a context-sensitive grammar. Extends AbstractGrammar
with constraints.
Consists of:
rules::Vector{Any}
: A list of RHS of rules (subexpressions).types::Vector{Symbol}
: A list of LHS of rules (types, all symbols).isterminal::BitVector
: A bitvector where biti
represents whether rulei
is terminal.iseval::BitVector
: A bitvector where biti
represents whether rule i is an eval rule.bytype::Dict{Symbol,Vector{Int}}
: A dictionary that maps a type to all rules of said type.domains::Dict{Symbol, BitVector}
: A dictionary that maps a type to a domain bitvector. The domain bitvector has biti
set to true iff thei
th rule is of this type.childtypes::Vector{Vector{Symbol}}
: A list of types of the children for each rule. If a rule is terminal, the corresponding list is empty.bychildtypes::Vector{BitVector}
: A bitvector of rules that share the same childtypes for each rulelog_probabilities::Union{Vector{Real}, Nothing}
: A list of probabilities for each rule. If the grammar is non-probabilistic, the list can benothing
.constraints::Vector{AbstractConstraint}
: A list of constraints that programs in this grammar have to abide.
Use the @csgrammar
macro to create a ContextSensitiveGrammar
object. Use the @pcsgrammar
macro to create a ContextSensitiveGrammar
object with probabilities.
HerbGrammar.NodeLoc
— TypeNodeLoc A helper struct that points to a node in the tree via its parent such that the child can be easily swapped out. If i is 0 the node pointed to is the root node and parent is the node itself.
HerbGrammar.SymbolTable
— TypeSymbolTable
Type alias for a Dict
that maps terminal symbols in the AbstractGrammar
to their Julia interpretation.
HerbGrammar.@cfgrammar
— Macro@cfgrammar
This macro is deprecated and will be removed in future versions. Use @csgrammar
instead.
HerbGrammar.@csgrammar
— Macro@csgrammar
A macro for defining a ContextSensitiveGrammar
. AbstractConstraints can be added afterwards using the addconstraint!
function.
Example usage:
grammar = @csgrammar begin
R = x
R = 1 | 2
R = R + R
end
Syntax:
- Literals: Symbols that are already defined in Julia are considered literals, such as
1
,2
, orπ
. For example:R = 1
. - Variables: A variable is a symbol that is not a nonterminal symbol and not already defined in Julia. For example:
R = x
. - Functions: Functions and infix operators that are defined in Julia or the
Main
module can be used with the default evaluator. For example:R = R + R
,R = f(a, b)
. - Combinations: Multiple rules can be defined on a single line in the grammar definition using the
|
symbol. For example:R = 1 | 2 | 3
. - Iterators: Another way to define multiple rules is by providing a Julia iterator after a
|
symbol. For example:R = |(1:9)
.
Related:
@pcsgrammar
uses a similar syntax to create probabilisticContextSensitiveGrammar
s.
HerbGrammar.@pcsgrammar
— Macro@pcsgrammar
A macro for defining a probabilistic ContextSensitiveGrammar
.
Example usage:
grammar = @pcsgrammar begin
0.5 : R = x
0.3 : R = 1 | 2
0.2 : R = R + R
end
Syntax:
The syntax of rules is identical to the syntax used by @csgrammar
:
- Literals: Symbols that are already defined in Julia are considered literals, such as
1
,2
, orπ
. For example:R = 1
. - Variables: A variable is a symbol that is not a nonterminal symbol and not already defined in Julia. For example:
R = x
. - Functions: Functions and infix operators that are defined in Julia or the
Main
module can be used with the default evaluator. For example:R = R + R
,R = f(a, b)
. - Combinations: Multiple rules can be defined on a single line in the grammar definition using the
|
symbol. For example:R = 1 | 2 | 3
. - Iterators: Another way to define multiple rules is by providing a Julia iterator after a
|
symbol. For example:R = |(1:9)
.
Every rule is also prefixed with a probability. Rules and probabilities are separated using the :
symbol. If multiple rules are defined on a single line, the probability is equally divided between the rules. The sum of probabilities for all rules of a certain non-terminal symbol should be equal to 1. The probabilities are automatically scaled if this isn't the case.
Related:
@csgrammar
uses a similar syntax to create non-probabilisticContextSensitiveGrammar
s.
Base.get
— Methodget(root::AbstractRuleNode, loc::NodeLoc) Obtain the node pointed to by loc.
Base.insert!
— Methodinsert!(loc::NodeLoc, rulenode::RuleNode) Replaces the subtree pointed to by loc with the given rulenode.
HerbGrammar.add_rule!
— Methodadd_rule(grammar, tree)
Extends a given grammar with an AbstractRuleNode
. The type of the rule is inferred from the root-type.
Arguments
grammar::AbstractGrammar
: the grammar to extendtree::RuleNode
: the Herb tree
HerbGrammar.add_rule!
— Methodadd_rule!(g::AbstractGrammar, e::Expr)
Adds a rule to the grammar.
Usage:
add_rule!(grammar, :("Real = Real + Real"))
The syntax is identical to the syntax of @csgrammar
and @cfgrammar
, but only single rules are supported.
Calls to this function are ignored if a rule is already in the grammar.
HerbGrammar.add_rule!
— Methodadd_rule!(g::AbstractGrammar, p::Real, e::Expr)
Adds a probabilistic derivation rule.
HerbGrammar.addconstraint!
— Methodaddconstraint!(grammar::ContextSensitiveGrammar, c::AbstractConstraint)
Adds a AbstractConstraint
to a ContextSensitiveGrammar
.
HerbGrammar.child_types
— Methodchild_types(grammar::AbstractGrammar, rule_index::Int)
Returns the types of the children (nonterminals) of the production rule at rule_index
.
HerbGrammar.child_types
— Methodchild_types(grammar::AbstractGrammar, node::RuleNode)
Returns the list of child types (nonterminal symbols) in the production rule used by node
.
HerbGrammar.cleanup_removed_rules!
— Methodcleanup_removed_rules!(g::AbstractGrammar)
Removes any placeholders for previously deleted rules. This means that indices get shifted.
When indices are shifted, this grammar can no longer be used to interpret AbstractRuleNode
trees created before the call to this function. These trees become meaningless.
HerbGrammar.clearconstraints!
— MethodClear all constraints from the grammar
HerbGrammar.containedin
— Methodcontainedin(vec1::Vector, vec2::Vector)
Checks if elements of vec1
are contained in vec2
in the same order (possibly with elements in between)
HerbGrammar.contains_returntype
— Functioncontains_returntype(node::RuleNode, grammar::AbstractGrammar, sym::Symbol, maxdepth::Int=typemax(Int))
Returns true if the tree rooted at node
contains at least one node at depth less than maxdepth
with the given return type or nonterminal symbol.
HerbGrammar.expr2csgrammar
— Methodexpr2csgrammar(ex::Expr)::ContextSensitiveGrammar
A function for converting an Expr
to a ContextSensitiveGrammar
. If the expression is hardcoded, you should use the @csgrammar
macro. Only expressions in the correct format (see @csgrammar
) can be converted.
Example usage:
grammar = expr2csgrammar(
begin
R = x
R = 1 | 2
R = R + R
end
)
HerbGrammar.expr2pcsgrammar
— Methodexpr2pcsgrammar(ex::Expr)::ContextSensitiveGrammar
Function for converting an Expr
to a ContextSensitiveGrammar
with probabilities. If the expression is hardcoded, you should use the @pcsgrammar
macro. Only expressions in the correct format (see @pcsgrammar
) can be converted.
Example usage:
grammar = expr2pcsgrammar(
begin
0.5 : R = x
0.3 : R = 1 | 2
0.2 : R = R + R
end
)
HerbGrammar.expr2rulenode
— Methodexpr2rulenode(expr::Expr, grammar::AbstractGrammar, startSymbol::Symbol)
Converts an expression into a AbstractRuleNode
corresponding to the rule definitions in the grammar.
HerbGrammar.expr2rulenode
— Methodexpr2rulenode(expr::Expr, grammar::AbstractGrammar)
Converts an expression into a AbstractRuleNode
corresponding to the rule definitions in the grammar.
HerbGrammar.expr2rulenode
— Methodexpr2rulenode(expr::Symbol, grammar::AbstractGrammar, startSymbol::Symbol)
Converts an expression into a AbstractRuleNode
corresponding to the rule definitions in the grammar.
HerbGrammar.expr2rulenode
— Methodexpr2rulenode(expr::Symbol, grammar::AbstractGrammar)
Converts an expression into a AbstractRuleNode
corresponding to the rule definitions in the grammar.
HerbGrammar.get_childtypes
— Methodget_childtypes(rule::Any, types::AbstractVector{Symbol})
Returns the child types/nonterminals of a production rule.
HerbGrammar.get_domain
— Methodget_domain(g::AbstractGrammar, type::Symbol)::BitVector
Returns the domain for the hole of a certain type as a BitVector
of the same length as the number of rules in the grammar. Bit i
is set to true
iff rule i
is of type type
.
Since this function can be intensively used when exploring a program space defined by a grammar, the outcomes of this function are precomputed and stored in the domains
field in a AbstractGrammar
.
HerbGrammar.get_domain
— Methodget_domain(g::AbstractGrammar, rules::Vector{Int})::BitVector
Takes a domain rules
defined as a vector of ints and converts it to a domain defined as a BitVector
.
HerbGrammar.get_rulesequence
— Methodget_rulesequence(node::RuleNode, path::Vector{Int})
Extract the derivation sequence from a path (sequence of child indices) and an AbstractRuleNode
. If the path is deeper than the deepest node, it returns what it has.
HerbGrammar.grammar2symboltable
— Functiongrammar2symboltable(grammar::AbstractGrammar, mod::Module=Main)
Returns a SymbolTable
populated with a mapping from symbols in the AbstractGrammar
to symbols in module mod
or Main
, if defined.
HerbGrammar.init_probabilities!
— Methodinit_probabilities!(grammar::AbstractGrammar)
If the grammar is not probabilistic yet, initializes the grammar with uniform probabilities per type. If the grammar is already probabilistic, no changed are made.
HerbGrammar.iscomplete
— Methodiscomplete(grammar::AbstractGrammar, node::RuleNode)
Returns true if the expression represented by the RuleNode
is a complete expression, meaning that it is fully defined and doesn't have any Hole
s.
HerbGrammar.iseval
— Methodiseval(grammar::AbstractGrammar, index::Int)::Bool
Returns true if the production rule at rule_index contains the special _() eval function.
evaluate immediately functionality is not yet supported by most of Herb.jl
HerbGrammar.iseval
— Methodiseval(grammar::AbstractGrammar)::Bool
Returns true if any production rules in grammar contain the special _() eval function.
evaluate immediately functionality is not yet supported by most of Herb.jl
HerbGrammar.iseval
— Methodiseval(rule)
Returns true if the rule is the special evaluate immediately function, i.e., _()
evaluate immediately functionality is not yet supported by most of Herb.jl
HerbGrammar.isprobabilistic
— Methodisprobabilistic(grammar::AbstractGrammar)::Bool
Function returns whether a AbstractGrammar
is probabilistic.
HerbGrammar.isterminal
— Methodisterminal(grammar::AbstractGrammar, node::AbstractRuleNode)::Bool
Returns true if the production rule used by node
is terminal, i.e., does not contain any nonterminal symbols.
HerbGrammar.isterminal
— Methodisterminal(grammar::AbstractGrammar, rule_index::Int)::Bool
Returns true if the production rule at rule_index
is terminal, i.e., does not contain any nonterminal symbols.
HerbGrammar.isterminal
— Methodisterminal(rule::Any, types::AbstractVector{Symbol})
Returns true if the rule is terminal, i.e., it does not contain any of the types in the provided vector. For example, :(x) is terminal, and :(1+1) is terminal, but :(Real + Real) is typically not.
HerbGrammar.isvariable
— Methodisvariable(grammar::AbstractGrammar, ind::Int, mod::Module)::Bool
Return true if the rule with index ind
represents a variable.
Taking into account the symbols defined in the given module(s).
HerbGrammar.isvariable
— Methodisvariable(grammar::AbstractGrammar, ind::Int)::Bool
Return true if the rule with index ind
represents a variable.
HerbGrammar.isvariable
— Methodisvariable(grammar::AbstractGrammar, node::RuleNode, mod::Module)::Bool
Return true if the rule used by node
represents a variable.
Taking into account the symbols defined in the given module(s).
HerbGrammar.isvariable
— Methodisvariable(grammar::AbstractGrammar, node::RuleNode)::Bool
Return true if the rule used by node
represents a variable in a program (essentially, an input to the program)
HerbGrammar.log_probability
— Methodlog_probability(grammar::AbstractGrammar, index::Int)::Real
Returns the log probability for the rule at index
in the grammar.
If the grammar is not probabilistic, a warning is displayed, and a uniform probability is assumed.
HerbGrammar.max_arity
— Methodmax_arity(grammar::AbstractGrammar)::Int
Returns the maximum arity (number of children) over all production rules in the AbstractGrammar
.
HerbGrammar.max_rulenode_log_probability
— Methodmax_rulenode_log_probability(rulenode::AbstractRuleNode, grammar::AbstractGrammar)
Calculates the highest possible probability within an AbstractRuleNode
. That is, for each node and its domain, get the highest probability and multiply it with the probabilities of its children, if present. As we operate with log probabilities, we sum the logarithms.
HerbGrammar.merge_grammars!
— Methodmerge_grammars!(merge_to::AbstractGrammar, merge_from::AbstractGrammar)
Adds all rules and constraints from merge_from
to merge_to
.
HerbGrammar.mindepth
— Methodmindepth(grammar::AbstractGrammar, typ::Symbol, dmap::AbstractVector{Int})
Returns the minimum depth achievable for a given nonterminal symbol. The minimum depth is the depth of the lowest tree that can be made using typ
as a start symbol. dmap
can be obtained from mindepth_map
.
HerbGrammar.mindepth_map
— Methodmindepth_map(grammar::AbstractGrammar)
Returns the minimum depth achievable for each production rule in the AbstractGrammar
. In other words, this function finds the depths of the lowest trees that can be made using each of the available production rules as a root.
HerbGrammar.nchildren
— Methodnchildren(grammar::AbstractGrammar, rule_index::Int)::Int
Returns the number of children (nonterminals) of the production rule at rule_index
.
HerbGrammar.nchildren
— Methodnchildren(grammar::AbstractGrammar, node::RuleNode)::Int
Returns the number of children in the production rule used by node
.
HerbGrammar.nonterminals
— Methodnonterminals(grammar::AbstractGrammar)::Vector{Symbol}
Returns a list of the nonterminals or types in the AbstractGrammar
.
HerbGrammar.normalize!
— Functionnormalize!(grammar::ContextSensitiveGrammar, type::Union{Symbol, Nothing}=nothing)
A function for normalizing the probabilities of a probabilistic ContextSensitiveGrammar
. If the optional type
argument is provided, only the rules of that type are normalized. If the grammar is not probabilistic, i.e. grammar.log_probabilities==nothing
, a uniform distribution is initialized.
HerbGrammar.parse_probabilistic_rule
— Methodparse_probabilistic_rule(e::Expr)
Parses a single (potentially shorthand) derivation rule of a probabilistic ContextSensitiveGrammar
. Returns nothing
if the rule is not probabilistic, otherwise a Tuple
of its type and a Vector
of probability-rule pairs it expands into.
HerbGrammar.probability
— Methodprobability(grammar::AbstractGrammar, index::Int)::Real
Return the probability for a rule in the grammar. Use log_probability
whenever possible.
If the grammar is not probabilistic, a warning is displayed, and a uniform probability is assumed.
HerbGrammar.read_csg
— Functionread_csg(grammarpath::AbstractString, constraintspath::OptionalPath=nothing)::ContextSensitiveGrammar
Reads a ContextSensitiveGrammar
from the files at grammarpath
and constraintspath
.
Only open trusted grammars. Parts of the grammar can be passed to Julia's eval
function.
HerbGrammar.read_pcsg
— Functionread_pcsg(grammarpath::AbstractString, constraintspath::OptionalPath=nothing)::ContextSensitiveGrammar
Reads a probabilistic ContextSensitiveGrammar
from the files at grammarpath
and constraintspath
.
Only open trusted grammars. Parts of the grammar can be passed to Julia's eval
function.
HerbGrammar.remove_rule!
— Methodremove_rule!(g::AbstractGrammar, idx::Int)
Removes the rule corresponding to idx
from the grammar. In order to avoid shifting indices, the rule is replaced with nothing
, and all other data structures are updated accordingly.
HerbGrammar.return_type
— Methodreturn_type(grammar::AbstractGrammar, rule_index::Int)::Symbol
Returns the type of the production rule at rule_index
.
HerbGrammar.return_type
— Methodreturn_type(grammar::AbstractGrammar, node::RuleNode)
Gives the return type or nonterminal symbol in the production rule used by node
.
HerbGrammar.return_type
— Methodreturn_type(grammar::AbstractGrammar, hole::UniformHole)
Gives the return type or nonterminal symbol in the production rule used by hole
.
HerbGrammar.root_node_loc
— Methodrootnodeloc(root::RuleNode) Returns a NodeLoc pointing to the root node.
HerbGrammar.rulenode2expr
— Methodrulenode2expr(rulenode::AbstractRuleNode, grammar::AbstractGrammar)
Converts an AbstractRuleNode
into a Julia expression corresponding to the rule definitions in the grammar. The returned expression can be evaluated with Julia semantics using eval()
.
HerbGrammar.rulenode_log_probability
— Methodrulenode_log_probability(node::RuleNode, grammar::AbstractGrammar)
Calculates the log probability associated with a rulenode in a probabilistic grammar.
HerbGrammar.rulesonleft
— Methodrulesonleft(node::RuleNode, path::Vector{Int})::Set{Int}
Finds all rules that are used in the left subtree defined by the path.
HerbGrammar.store_csg
— Functionstore_csg(g::ContextSensitiveGrammar, grammarpath::AbstractString, constraintspath::OptionalPath=nothing)
Writes a ContextSensitiveGrammar
to the files at grammarpath
and constraintspath
. The grammarpath
file will contain a ContextSensitiveGrammar
definition, and the constraintspath
file will contain the AbstractConstraint
s of the ContextSensitiveGrammar
.
HerbGrammar.subsequenceof
— Methodsubsequenceof(vec1::Vector{Int}, vec2::Vector{Int})
Checks if vec1
is a subsequence of vec2
.
HerbGrammar.swap_node
— Methodswap_node(expr::AbstractRuleNode, new_expr::AbstractRuleNode, path::Vector{Int})
Replace a node in expr
, specified by path
, with new_expr
. Path is a sequence of child indices, starting from the root node.
HerbGrammar.swap_node
— Methodswap_node(expr::RuleNode, node::RuleNode, child_index::Int, new_expr::RuleNode)
Replace child i
of a node, a part of larger expr
, with new_expr
.
Index
HerbConstraints.AbstractGrammarConstraint
HerbConstraints.AbstractLocalConstraint
HerbConstraints.AbstractStateManager
HerbConstraints.Contains
HerbConstraints.ContainsSubtree
HerbConstraints.DomainRuleNode
HerbConstraints.Forbidden
HerbConstraints.ForbiddenSequence
HerbConstraints.GenericSolver
HerbConstraints.GenericSolver
HerbConstraints.GenericSolver
HerbConstraints.LessThanOrEqualHardFail
HerbConstraints.LessThanOrEqualResult
HerbConstraints.LessThanOrEqualSoftFail
HerbConstraints.LessThanOrEqualSuccess
HerbConstraints.LessThanOrEqualSuccessEquality
HerbConstraints.LessThanOrEqualSuccessLessThan
HerbConstraints.LessThanOrEqualSuccessWithHoles
HerbConstraints.LocalContains
HerbConstraints.LocalContainsSubtree
HerbConstraints.LocalContainsSubtree
HerbConstraints.LocalForbidden
HerbConstraints.LocalForbiddenSequence
HerbConstraints.LocalOrdered
HerbConstraints.LocalUnique
HerbConstraints.MakeEqualHardFail
HerbConstraints.MakeEqualResult
HerbConstraints.MakeEqualSoftFail
HerbConstraints.MakeEqualSuccess
HerbConstraints.Ordered
HerbConstraints.PatternMatchHardFail
HerbConstraints.PatternMatchResult
HerbConstraints.PatternMatchSoftFail
HerbConstraints.PatternMatchSuccess
HerbConstraints.PatternMatchSuccessWhenHoleAssignedTo
HerbConstraints.Solver
HerbConstraints.SolverState
HerbConstraints.SolverStatistics
HerbConstraints.StateHole
HerbConstraints.StateHole
HerbConstraints.StateHole
HerbConstraints.StateInt
HerbConstraints.StateIntBackup
HerbConstraints.StateManager
HerbConstraints.StateSparseSet
HerbConstraints.StateSparseSet
HerbConstraints.StateStack
HerbConstraints.StateStack
HerbConstraints.StateStack
HerbConstraints.UniformSolver
HerbConstraints.UniformSolver
HerbConstraints.Unique
HerbConstraints.VarNode
HerbCore.AbstractConstraint
HerbCore.AbstractGrammar
HerbCore.AbstractHole
HerbCore.AbstractRuleNode
HerbCore.AbstractUniformHole
HerbCore.Hole
HerbCore.HoleReference
HerbCore.RuleNode
HerbCore.RuleNode
HerbCore.RuleNode
HerbCore.UniformHole
HerbGrammar.ContextSensitiveGrammar
HerbGrammar.NodeLoc
HerbGrammar.SymbolTable
HerbSearch.AbstractBFSIterator
HerbSearch.AbstractDFSIterator
HerbSearch.AbstractMHSearchIterator
HerbSearch.AbstractSASearchIterator
HerbSearch.AbstractVLSNSearchIterator
HerbSearch.BFSIterator
HerbSearch.DFSIterator
HerbSearch.ExpandFailureReason
HerbSearch.GeneticSearchIterator
HerbSearch.MHSearchIterator
HerbSearch.MLFSIterator
HerbSearch.ProgramIterator
HerbSearch.RandomIterator
HerbSearch.SASearchIterator
HerbSearch.StochasticSearchIterator
HerbSearch.SynthResult
HerbSearch.TopDownIterator
HerbSearch.UniformIterator
HerbSearch.UniformIterator
HerbSearch.VLSNSearchIterator
HerbSpecification.AbstractDependentTypeSpecification
HerbSpecification.AgdaSpecification
HerbSpecification.IOExample
HerbSpecification.MetricProblem
HerbSpecification.Problem
HerbSpecification.SMTSpecification
HerbSpecification.Trace
Base.collect
Base.collect
Base.findall
Base.findfirst
Base.findlast
Base.get
Base.getindex
Base.getindex
Base.in
Base.in
Base.insert!
Base.isless
Base.iterate
Base.iterate
Base.iterate
Base.iterate
Base.iterate
Base.length
Base.length
Base.length
Base.length
Base.push!
Base.rand
Base.rand
Base.rand
Base.show
Base.size
Base.size
Base.sum
HerbConstraints._contains
HerbConstraints._count_occurrences
HerbConstraints._count_occurrences
HerbConstraints._count_occurrences!
HerbConstraints._exchange_positions!
HerbConstraints._update_bounds_val_removed!
HerbConstraints._update_max_val_removed!
HerbConstraints._update_min_val_removed!
HerbConstraints.annotation2constraint
HerbConstraints.are_disjoint
HerbConstraints.are_disjoint
HerbConstraints.backup!
HerbConstraints.check_tree
HerbConstraints.check_tree
HerbConstraints.check_tree
HerbConstraints.check_tree
HerbConstraints.check_tree
HerbConstraints.check_tree
HerbConstraints.contains_varnode
HerbConstraints.deactivate!
HerbConstraints.deactivate!
HerbConstraints.decrement!
HerbConstraints.fix_point!
HerbConstraints.freeze_state
HerbConstraints.get_grammar
HerbConstraints.get_grammar
HerbConstraints.get_hole_at_location
HerbConstraints.get_hole_at_location
HerbConstraints.get_intersection
HerbConstraints.get_max_depth
HerbConstraints.get_max_size
HerbConstraints.get_nodes
HerbConstraints.get_nodes_on_path
HerbConstraints.get_priority
HerbConstraints.get_starting_symbol
HerbConstraints.get_state
HerbConstraints.get_tree
HerbConstraints.get_tree
HerbConstraints.get_tree_size
HerbConstraints.get_value
HerbConstraints.increment!
HerbConstraints.is_subdomain
HerbConstraints.is_subdomain
HerbConstraints.isfeasible
HerbConstraints.isfeasible
HerbConstraints.load_state!
HerbConstraints.make_equal!
HerbConstraints.make_less_than_or_equal!
HerbConstraints.make_less_than_or_equal!
HerbConstraints.make_less_than_or_equal!
HerbConstraints.new_state!
HerbConstraints.notify_new_node
HerbConstraints.notify_new_nodes
HerbConstraints.notify_new_nodes
HerbConstraints.notify_tree_manipulation
HerbConstraints.notify_tree_manipulation
HerbConstraints.partition
HerbConstraints.pattern_match
HerbConstraints.pattern_match
HerbConstraints.pattern_match
HerbConstraints.pattern_match
HerbConstraints.pattern_match
HerbConstraints.pattern_match
HerbConstraints.post!
HerbConstraints.post!
HerbConstraints.propagate!
HerbConstraints.propagate!
HerbConstraints.propagate!
HerbConstraints.propagate!
HerbConstraints.propagate!
HerbConstraints.propagate!
HerbConstraints.propagate!
HerbConstraints.remove!
HerbConstraints.remove!
HerbConstraints.remove!
HerbConstraints.remove!
HerbConstraints.remove!
HerbConstraints.remove_above!
HerbConstraints.remove_above!
HerbConstraints.remove_above!
HerbConstraints.remove_all_but!
HerbConstraints.remove_all_but!
HerbConstraints.remove_all_but!
HerbConstraints.remove_all_but!
HerbConstraints.remove_below!
HerbConstraints.remove_below!
HerbConstraints.remove_below!
HerbConstraints.remove_node!
HerbConstraints.restore!
HerbConstraints.restore!
HerbConstraints.restore!
HerbConstraints.save_state!
HerbConstraints.save_state!
HerbConstraints.save_state!
HerbConstraints.schedule!
HerbConstraints.set_infeasible!
HerbConstraints.set_infeasible!
HerbConstraints.set_value!
HerbConstraints.shouldschedule
HerbConstraints.shouldschedule
HerbConstraints.simplify_hole!
HerbConstraints.substitute!
HerbCore.contains_hole
HerbCore.contains_hole
HerbCore.contains_index
HerbCore.contains_nonuniform_hole
HerbCore.depth
HerbCore.get_children
HerbCore.get_node_at_location
HerbCore.get_node_at_location
HerbCore.get_node_at_location
HerbCore.get_node_at_location
HerbCore.get_path
HerbCore.get_path
HerbCore.get_path
HerbCore.get_rule
HerbCore.get_rule
HerbCore.get_rulesequence
HerbCore.hasdynamicvalue
HerbCore.have_same_shape
HerbCore.isfilled
HerbCore.isfilled
HerbCore.isuniform
HerbCore.node_depth
HerbCore.number_of_holes
HerbCore.rulesoftype
HerbCore.rulesoftype
HerbCore.rulesonleft
HerbCore.swap_node
HerbCore.swap_node
HerbGrammar.add_rule!
HerbGrammar.add_rule!
HerbGrammar.add_rule!
HerbGrammar.addconstraint!
HerbGrammar.child_types
HerbGrammar.child_types
HerbGrammar.cleanup_removed_rules!
HerbGrammar.clearconstraints!
HerbGrammar.containedin
HerbGrammar.contains_returntype
HerbGrammar.expr2csgrammar
HerbGrammar.expr2pcsgrammar
HerbGrammar.expr2rulenode
HerbGrammar.expr2rulenode
HerbGrammar.expr2rulenode
HerbGrammar.expr2rulenode
HerbGrammar.get_childtypes
HerbGrammar.get_domain
HerbGrammar.get_domain
HerbGrammar.get_rulesequence
HerbGrammar.grammar2symboltable
HerbGrammar.init_probabilities!
HerbGrammar.iscomplete
HerbGrammar.iseval
HerbGrammar.iseval
HerbGrammar.iseval
HerbGrammar.isprobabilistic
HerbGrammar.isterminal
HerbGrammar.isterminal
HerbGrammar.isterminal
HerbGrammar.isvariable
HerbGrammar.isvariable
HerbGrammar.isvariable
HerbGrammar.isvariable
HerbGrammar.log_probability
HerbGrammar.max_arity
HerbGrammar.max_rulenode_log_probability
HerbGrammar.merge_grammars!
HerbGrammar.mindepth
HerbGrammar.mindepth_map
HerbGrammar.nchildren
HerbGrammar.nchildren
HerbGrammar.nonterminals
HerbGrammar.normalize!
HerbGrammar.parse_probabilistic_rule
HerbGrammar.probability
HerbGrammar.read_csg
HerbGrammar.read_pcsg
HerbGrammar.remove_rule!
HerbGrammar.return_type
HerbGrammar.return_type
HerbGrammar.return_type
HerbGrammar.root_node_loc
HerbGrammar.rulenode2expr
HerbGrammar.rulenode_log_probability
HerbGrammar.rulesonleft
HerbGrammar.store_csg
HerbGrammar.subsequenceof
HerbGrammar.swap_node
HerbGrammar.swap_node
HerbInterpret.evaluate_program
HerbInterpret.execute_on_input
HerbInterpret.execute_on_input
HerbInterpret.execute_on_input
HerbInterpret.execute_on_input
HerbInterpret.interpret
HerbInterpret.test_all_examples
HerbInterpret.test_examples
HerbSearch._calculate_cost
HerbSearch._find_next_complete_tree
HerbSearch.accept
HerbSearch.best_accept
HerbSearch.calculate_cost
HerbSearch.const_temperature
HerbSearch.constructNeighbourhood
HerbSearch.constructNeighbourhoodRuleSubset
HerbSearch.cross_over
HerbSearch.crossover_swap_children_1
HerbSearch.crossover_swap_children_2
HerbSearch.decreasing_temperature
HerbSearch.default_fitness
HerbSearch.derivation_heuristic
HerbSearch.derivation_heuristic
HerbSearch.derivation_heuristic
HerbSearch.enumerate_neighbours_propose
HerbSearch.evaluate
HerbSearch.extract_name_from_argument
HerbSearch.fitness
HerbSearch.generate_branches
HerbSearch.get_best_program
HerbSearch.heuristic_leftmost
HerbSearch.heuristic_random
HerbSearch.heuristic_rightmost
HerbSearch.heuristic_smallest_domain
HerbSearch.hole_heuristic
HerbSearch.is_field_decl
HerbSearch.is_kwdef
HerbSearch.mean_squared_error
HerbSearch.misclassification
HerbSearch.mutate!
HerbSearch.mutate_random!
HerbSearch.neighbourhood
HerbSearch.next_solution!
HerbSearch.priority_function
HerbSearch.priority_function
HerbSearch.priority_function
HerbSearch.priority_function
HerbSearch.probabilistic_accept
HerbSearch.probabilistic_accept_with_temperature
HerbSearch.probabilistic_accept_with_temperature_fraction
HerbSearch.processkwarg!
HerbSearch.propose
HerbSearch.random_fill_propose
HerbSearch.select_chromosome
HerbSearch.select_fitness_proportional_parents
HerbSearch.select_parents
HerbSearch.set_stateholes!
HerbSearch.synth
HerbSearch.temperature
HerbSearch.validate_iterator
StatsBase.sample
StatsBase.sample
StatsBase.sample
StatsBase.sample
HerbConstraints.@csgrammar_annotated
HerbCore.@rulenode
HerbGrammar.@cfgrammar
HerbGrammar.@csgrammar
HerbGrammar.@pcsgrammar
HerbSearch.@programiterator