Skip to content

Commit

Permalink
a bit of cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
sebdumancic committed Mar 25, 2022
1 parent 1486a6f commit 490646c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,11 @@ function resolve(goals::Vector{<:Term}, clauses::ClauseTable{T}; options...) wh
search = get(options, :search, :bfs)::Symbol
vcount = get(options, :vcount, Ref(UInt(0)))::Ref{UInt}
# Construct top level goal and put it on the queue
#queue = MutableLinkedList{GoalTree}()
queue = MutableLinkedList{GoalTree}()
push!(queue, GoalTree(Const(false), nothing, Vector{Term}(goals), 1, env, Subst()))
#queue = Vector{GoalTree}([GoalTree(Const(false), nothing, Vector{Term}(goals), 1, env, Subst())])
subst = Subst[]
# Iterate across queue of goals
while length(queue) > 0
#goal = (search == :dfs) ? pop!(queue) : popfirst!(queue)
goal = popfirst!(queue)
@debug string("Goal: ", Clause(goal.term, goal.children), " ",
"Env: ", goal.env)
Expand Down Expand Up @@ -373,7 +370,6 @@ function resolve(goals::Vector{<:Term}, clauses::ClauseTable{T}; options...) wh
parent.env = compose!(parent.env, vmap)
# Advance parent to next subgoal and put it back on the queue
parent.active += 1
#push!(queue, parent)
(search==:dfs) ? pushfirst!(queue, parent) : push!(queue, parent)
continue
end
Expand Down

0 comments on commit 490646c

Please sign in to comment.