HerbGrammar.jl Documentation
HerbGrammar.ContextSensitiveGrammar — TypeContextSensitiveGrammar <: AbstractGrammarRepresents 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 bitirepresents whether ruleiis terminal.iseval::BitVector: A bitvector where bitirepresents 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 bitiset to true iff theith 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 — TypeSymbolTableType alias for a Dict that maps terminal symbols in the AbstractGrammar to their Julia interpretation.
HerbGrammar.@cfgrammar — Macro@cfgrammarThis macro is deprecated and will be removed in future versions. Use @csgrammar instead.
HerbGrammar.@csgrammar — Macro@csgrammarA 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
endSyntax:
- 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
Mainmodule 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:
@pcsgrammaruses a similar syntax to create probabilisticContextSensitiveGrammars.
HerbGrammar.@pcsgrammar — Macro@pcsgrammarA 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
endSyntax:
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
Mainmodule 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:
@csgrammaruses a similar syntax to create non-probabilisticContextSensitiveGrammars.
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 and updates grammar constraints as required.
Usage:
add_rule!(grammar, :("Real = Real + Real"))The syntax is identical to the syntax of @csgrammar and @cfgrammar, but only single rules are supported.
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)::ContextSensitiveGrammarA 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)::ContextSensitiveGrammarFunction 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)::BitVectorReturns 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})::BitVectorTakes 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 Holes.
HerbGrammar.iseval — Methodiseval(grammar::AbstractGrammar, index::Int)::BoolReturns true if the production rule at rule_index contains the special _() eval function.
HerbGrammar.iseval — Methodiseval(grammar::AbstractGrammar)::BoolReturns true if any production rules in grammar contain the special _() eval function.
HerbGrammar.iseval — Methodiseval(rule)Returns true if the rule is the special evaluate immediately function, i.e., _()
HerbGrammar.isprobabilistic — Methodisprobabilistic(grammar::AbstractGrammar)::BoolFunction returns whether a AbstractGrammar is probabilistic.
HerbGrammar.isterminal — Methodisterminal(grammar::AbstractGrammar, node::AbstractRuleNode)::BoolReturns 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)::BoolReturns 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)::BoolReturn 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)::BoolReturn true if the rule with index ind represents a variable.
HerbGrammar.isvariable — Methodisvariable(grammar::AbstractGrammar, node::RuleNode, mod::Module)::BoolReturn 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)::BoolReturn 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)::RealReturns the log probability for the rule at index in the grammar.
HerbGrammar.max_arity — Methodmax_arity(grammar::AbstractGrammar)::IntReturns 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. Duplicate rules are ignored.
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)::IntReturns the number of children (nonterminals) of the production rule at rule_index.
HerbGrammar.nchildren — Methodnchildren(grammar::AbstractGrammar, node::RuleNode)::IntReturns 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)::RealReturn the probability for a rule in the grammar. Use log_probability whenever possible.
HerbGrammar.read_csg — Functionread_csg(grammarpath::AbstractString, constraintspath::OptionalPath=nothing)::ContextSensitiveGrammarReads a ContextSensitiveGrammar from the files at grammarpath and constraintspath.
HerbGrammar.read_pcsg — Functionread_pcsg(grammarpath::AbstractString, constraintspath::OptionalPath=nothing)::ContextSensitiveGrammarReads a probabilistic ContextSensitiveGrammar from the files at grammarpath and constraintspath.
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)::SymbolReturns 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 AbstractConstraints 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.AbstractGrammarConstraintHerbConstraints.AbstractLocalConstraintHerbConstraints.AbstractStateManagerHerbConstraints.ContainsHerbConstraints.ContainsSubtreeHerbConstraints.DomainRuleNodeHerbConstraints.ForbiddenHerbConstraints.ForbiddenSequenceHerbConstraints.GenericSolverHerbConstraints.GenericSolverHerbConstraints.GenericSolverHerbConstraints.LessThanOrEqualHardFailHerbConstraints.LessThanOrEqualResultHerbConstraints.LessThanOrEqualSoftFailHerbConstraints.LessThanOrEqualSuccessHerbConstraints.LessThanOrEqualSuccessEqualityHerbConstraints.LessThanOrEqualSuccessLessThanHerbConstraints.LessThanOrEqualSuccessWithHolesHerbConstraints.LocalContainsHerbConstraints.LocalContainsSubtreeHerbConstraints.LocalContainsSubtreeHerbConstraints.LocalForbiddenHerbConstraints.LocalForbiddenSequenceHerbConstraints.LocalOrderedHerbConstraints.LocalUniqueHerbConstraints.MakeEqualHardFailHerbConstraints.MakeEqualResultHerbConstraints.MakeEqualSoftFailHerbConstraints.MakeEqualSuccessHerbConstraints.OrderedHerbConstraints.PatternMatchHardFailHerbConstraints.PatternMatchResultHerbConstraints.PatternMatchSoftFailHerbConstraints.PatternMatchSuccessHerbConstraints.PatternMatchSuccessWhenHoleAssignedToHerbConstraints.SolverHerbConstraints.SolverStateHerbConstraints.StateHoleHerbConstraints.StateHoleHerbConstraints.StateHoleHerbConstraints.StateIntHerbConstraints.StateIntBackupHerbConstraints.StateManagerHerbConstraints.StateSparseSetHerbConstraints.StateSparseSetHerbConstraints.StateStackHerbConstraints.StateStackHerbConstraints.StateStackHerbConstraints.UniformSolverHerbConstraints.UniformSolverHerbConstraints.UniqueHerbConstraints.VarNodeHerbCore.AbstractConstraintHerbCore.AbstractGrammarHerbCore.AbstractHoleHerbCore.AbstractRuleNodeHerbCore.AbstractUniformHoleHerbCore.HoleHerbCore.HoleReferenceHerbCore.RuleNodeHerbCore.RuleNodeHerbCore.RuleNodeHerbCore.UniformHoleHerbGrammar.ContextSensitiveGrammarHerbGrammar.NodeLocHerbGrammar.SymbolTableHerbSearch.AbstractBFSIteratorHerbSearch.AbstractDFSIteratorHerbSearch.AbstractMHSearchIteratorHerbSearch.AbstractSASearchIteratorHerbSearch.AbstractVLSNSearchIteratorHerbSearch.BFSIteratorHerbSearch.DFSIteratorHerbSearch.ExpandFailureReasonHerbSearch.GeneticSearchIteratorHerbSearch.MHSearchIteratorHerbSearch.MLFSIteratorHerbSearch.ProgramIteratorHerbSearch.RandomIteratorHerbSearch.SASearchIteratorHerbSearch.StochasticSearchIteratorHerbSearch.SynthResultHerbSearch.TopDownIteratorHerbSearch.UniformIteratorHerbSearch.UniformIteratorHerbSearch.VLSNSearchIteratorHerbSpecification.AbstractDependentTypeSpecificationHerbSpecification.AgdaSpecificationHerbSpecification.IOExampleHerbSpecification.MetricProblemHerbSpecification.ProblemHerbSpecification.SMTSpecificationHerbSpecification.TraceBase.collectBase.collectBase.findallBase.findfirstBase.findlastBase.getBase.getindexBase.getindexBase.inBase.inBase.insert!Base.islessBase.iterateBase.iterateBase.iterateBase.iterateBase.iterateBase.lengthBase.lengthBase.lengthBase.lengthBase.push!Base.randBase.randBase.randBase.showBase.sizeBase.sizeBase.sumHerbConstraints._containsHerbConstraints._count_occurrencesHerbConstraints._count_occurrencesHerbConstraints._count_occurrences!HerbConstraints._exchange_positions!HerbConstraints._update_bounds_val_removed!HerbConstraints._update_max_val_removed!HerbConstraints._update_min_val_removed!HerbConstraints.annotation2constraintHerbConstraints.are_disjointHerbConstraints.are_disjointHerbConstraints.backup!HerbConstraints.check_treeHerbConstraints.check_treeHerbConstraints.check_treeHerbConstraints.check_treeHerbConstraints.check_treeHerbConstraints.check_treeHerbConstraints.contains_varnodeHerbConstraints.deactivate!HerbConstraints.deactivate!HerbConstraints.decrement!HerbConstraints.fix_point!HerbConstraints.freeze_stateHerbConstraints.get_grammarHerbConstraints.get_grammarHerbConstraints.get_hole_at_locationHerbConstraints.get_hole_at_locationHerbConstraints.get_intersectionHerbConstraints.get_max_depthHerbConstraints.get_max_sizeHerbConstraints.get_nodesHerbConstraints.get_nodes_on_pathHerbConstraints.get_priorityHerbConstraints.get_starting_symbolHerbConstraints.get_stateHerbConstraints.get_treeHerbConstraints.get_treeHerbConstraints.get_tree_sizeHerbConstraints.get_valueHerbConstraints.increment!HerbConstraints.is_subdomainHerbConstraints.is_subdomainHerbConstraints.isfeasibleHerbConstraints.isfeasibleHerbConstraints.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_nodeHerbConstraints.notify_new_nodesHerbConstraints.notify_new_nodesHerbConstraints.notify_tree_manipulationHerbConstraints.notify_tree_manipulationHerbConstraints.partitionHerbConstraints.pattern_matchHerbConstraints.pattern_matchHerbConstraints.pattern_matchHerbConstraints.pattern_matchHerbConstraints.pattern_matchHerbConstraints.pattern_matchHerbConstraints.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_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.shouldscheduleHerbConstraints.shouldscheduleHerbConstraints.simplify_hole!HerbConstraints.substitute!HerbCore.contains_holeHerbCore.contains_holeHerbCore.contains_indexHerbCore.contains_nonuniform_holeHerbCore.depthHerbCore.get_childrenHerbCore.get_node_at_locationHerbCore.get_node_at_locationHerbCore.get_node_at_locationHerbCore.get_node_at_locationHerbCore.get_pathHerbCore.get_pathHerbCore.get_pathHerbCore.get_ruleHerbCore.get_ruleHerbCore.get_rulesequenceHerbCore.hasdynamicvalueHerbCore.have_same_shapeHerbCore.is_domain_validHerbCore.isfilledHerbCore.isfilledHerbCore.issameHerbCore.isuniformHerbCore.node_depthHerbCore.number_of_holesHerbCore.rulesoftypeHerbCore.rulesoftypeHerbCore.rulesonleftHerbCore.swap_nodeHerbCore.swap_nodeHerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbCore.update_rule_indices!HerbGrammar.add_rule!HerbGrammar.add_rule!HerbGrammar.add_rule!HerbGrammar.addconstraint!HerbGrammar.child_typesHerbGrammar.child_typesHerbGrammar.cleanup_removed_rules!HerbGrammar.clearconstraints!HerbGrammar.containedinHerbGrammar.contains_returntypeHerbGrammar.expr2csgrammarHerbGrammar.expr2pcsgrammarHerbGrammar.expr2rulenodeHerbGrammar.expr2rulenodeHerbGrammar.expr2rulenodeHerbGrammar.expr2rulenodeHerbGrammar.get_childtypesHerbGrammar.get_domainHerbGrammar.get_domainHerbGrammar.get_rulesequenceHerbGrammar.grammar2symboltableHerbGrammar.init_probabilities!HerbGrammar.iscompleteHerbGrammar.isevalHerbGrammar.isevalHerbGrammar.isevalHerbGrammar.isprobabilisticHerbGrammar.isterminalHerbGrammar.isterminalHerbGrammar.isterminalHerbGrammar.isvariableHerbGrammar.isvariableHerbGrammar.isvariableHerbGrammar.isvariableHerbGrammar.log_probabilityHerbGrammar.max_arityHerbGrammar.max_rulenode_log_probabilityHerbGrammar.merge_grammars!HerbGrammar.mindepthHerbGrammar.mindepth_mapHerbGrammar.nchildrenHerbGrammar.nchildrenHerbGrammar.nonterminalsHerbGrammar.normalize!HerbGrammar.parse_probabilistic_ruleHerbGrammar.probabilityHerbGrammar.read_csgHerbGrammar.read_pcsgHerbGrammar.remove_rule!HerbGrammar.return_typeHerbGrammar.return_typeHerbGrammar.return_typeHerbGrammar.root_node_locHerbGrammar.rulenode2exprHerbGrammar.rulenode_log_probabilityHerbGrammar.rulesonleftHerbGrammar.store_csgHerbGrammar.subsequenceofHerbGrammar.swap_nodeHerbGrammar.swap_nodeHerbInterpret.evaluate_programHerbInterpret.execute_on_inputHerbInterpret.execute_on_inputHerbInterpret.execute_on_inputHerbInterpret.execute_on_inputHerbInterpret.interpretHerbSearch._calculate_costHerbSearch._find_next_complete_treeHerbSearch.acceptHerbSearch.best_acceptHerbSearch.calculate_costHerbSearch.const_temperatureHerbSearch.constructNeighbourhoodHerbSearch.constructNeighbourhoodRuleSubsetHerbSearch.cross_overHerbSearch.crossover_swap_children_1HerbSearch.crossover_swap_children_2HerbSearch.decreasing_temperatureHerbSearch.default_fitnessHerbSearch.derivation_heuristicHerbSearch.derivation_heuristicHerbSearch.derivation_heuristicHerbSearch.enumerate_neighbours_proposeHerbSearch.evaluateHerbSearch.extract_name_from_argumentHerbSearch.fitnessHerbSearch.generate_branchesHerbSearch.get_best_programHerbSearch.heuristic_leftmostHerbSearch.heuristic_randomHerbSearch.heuristic_rightmostHerbSearch.heuristic_smallest_domainHerbSearch.hole_heuristicHerbSearch.is_field_declHerbSearch.is_kwdefHerbSearch.mean_squared_errorHerbSearch.misclassificationHerbSearch.mutate!HerbSearch.mutate_random!HerbSearch.neighbourhoodHerbSearch.next_solution!HerbSearch.priority_functionHerbSearch.priority_functionHerbSearch.priority_functionHerbSearch.priority_functionHerbSearch.probabilistic_acceptHerbSearch.probabilistic_accept_with_temperatureHerbSearch.probabilistic_accept_with_temperature_fractionHerbSearch.processkwarg!HerbSearch.proposeHerbSearch.random_fill_proposeHerbSearch.select_chromosomeHerbSearch.select_fitness_proportional_parentsHerbSearch.select_parentsHerbSearch.set_stateholes!HerbSearch.synthHerbSearch.temperatureHerbSearch.validate_iteratorStatsBase.sampleStatsBase.sampleStatsBase.sampleStatsBase.sampleHerbConstraints.@csgrammar_annotatedHerbCore.@rulenodeHerbGrammar.@cfgrammarHerbGrammar.@csgrammarHerbGrammar.@pcsgrammarHerbSearch.@programiterator