From 92742ee5cf04dd70619277c20fbf9132802e5ddf Mon Sep 17 00:00:00 2001 From: Issa Hanou Date: Thu, 13 Feb 2025 14:18:22 +0100 Subject: [PATCH 1/2] remove use_uniformsolver parameter from GenericSolver --- src/solver/generic_solver/generic_solver.jl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/solver/generic_solver/generic_solver.jl b/src/solver/generic_solver/generic_solver.jl index baf2d9c..484302d 100644 --- a/src/solver/generic_solver/generic_solver.jl +++ b/src/solver/generic_solver/generic_solver.jl @@ -18,7 +18,6 @@ mutable struct GenericSolver <: Solver state::Union{SolverState, Nothing} schedule::PriorityQueue{AbstractLocalConstraint, Int} statistics::Union{SolverStatistics, Nothing} - use_uniformsolver::Bool fix_point_running::Bool max_size::Int max_depth::Int @@ -30,9 +29,9 @@ end Constructs a new solver, with an initial state using starting symbol `sym` """ -function GenericSolver(grammar::AbstractGrammar, sym::Symbol; with_statistics=false, use_uniformsolver=true, max_size = typemax(Int), max_depth = typemax(Int)) +function GenericSolver(grammar::AbstractGrammar, sym::Symbol; with_statistics=false, max_size = typemax(Int), max_depth = typemax(Int)) init_node = Hole(get_domain(grammar, sym)) - GenericSolver(grammar, init_node, with_statistics=with_statistics, use_uniformsolver=use_uniformsolver, max_size = max_size, max_depth = max_depth) + GenericSolver(grammar, init_node, with_statistics=with_statistics, max_size = max_size, max_depth = max_depth) end @@ -41,9 +40,9 @@ end Constructs a new solver, with an initial state of the provided [`AbstractRuleNode`](@ref). """ -function GenericSolver(grammar::AbstractGrammar, init_node::AbstractRuleNode; with_statistics=false, use_uniformsolver=true, max_size = typemax(Int), max_depth = typemax(Int)) +function GenericSolver(grammar::AbstractGrammar, init_node::AbstractRuleNode; with_statistics=false, max_size = typemax(Int), max_depth = typemax(Int)) stats = with_statistics ? SolverStatistics() : nothing - solver = GenericSolver(grammar, nothing, PriorityQueue{AbstractLocalConstraint, Int}(), stats, use_uniformsolver, false, max_size, max_depth) + solver = GenericSolver(grammar, nothing, PriorityQueue{AbstractLocalConstraint, Int}(), stats, false, max_size, max_depth) new_state!(solver, init_node) return solver end From 18a37bbae0f9d8610815af452e17fd4bc54a565c Mon Sep 17 00:00:00 2001 From: Issa Hanou Date: Thu, 20 Feb 2025 09:32:21 +0100 Subject: [PATCH 2/2] bump version to 0.3.0 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 6f47cd6..830af34 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "HerbConstraints" uuid = "1fa96474-3206-4513-b4fa-23913f296dfc" authors = ["Jaap de Jong "] -version = "0.2.5" +version = "0.3.0" [deps] DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"