Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
GiggleLiu committed Jul 9, 2024
1 parent 4741421 commit 230f5f4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 34 deletions.
Empty file removed src/Core.jl
Empty file.
1 change: 0 additions & 1 deletion src/ProblemReductions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export target_problem, AbstractProblem, AbstractReductionResult, reduceto, extra
export spinglass_circuit
export findbest, BruteForce

include("Core.jl")
include("truth_table.jl")
include("topology.jl")
include("bitvector.jl")
Expand Down
27 changes: 27 additions & 0 deletions test/models/Circuit.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
using ProblemReductions, Test
using ProblemReductions: BooleanExpr, booleans, is_literal, is_cnf, is_dnf

@testset "clauses" begin
a, b, c, d, e = booleans(5)
@test a isa BooleanExpr
@test a.head == :var
@test a.var == Symbol(1)
nota = ¬a
@test is_literal(a)
@test is_literal(¬a)
@test nota isa BooleanExpr
@test nota.head == :¬
@test nota.args[1] == a

clause = ((¬a, b), (c, ¬e))
@test is_cnf(clause)
clause = ((a, b), (c, ¬e))
@test is_dnf(clause)
end

@testset "hash, eval" begin
a, b, c, d, e = booleans(5)
expr = (a b) (c ¬e)
d = Dict(a=>true, b=>true, c=>true, e=>false)
@test ProblemReductions.evaluate(a, d) == true
@test d[a] == true
@test ProblemReductions.evaluate(expr, d) == true
end
@testset "circuit expr" begin
ex = quote
c = x y
Expand Down
4 changes: 0 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ end
include("rules/rules.jl")
end

@testset "sat" begin
include("sat.jl")
end

@testset "topology" begin
include("topology.jl")
end
Expand Down
29 changes: 0 additions & 29 deletions test/sat.jl

This file was deleted.

0 comments on commit 230f5f4

Please sign in to comment.