Skip to content

Commit

Permalink
fix: uncomment tests now that Catlab v0.15.1 supports them again
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Jun 29, 2023
1 parent cbc2631 commit 0afbc1a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ AlgebraicPetriOrdinaryDiffEqExt = "OrdinaryDiffEq"

[compat]
Catalyst = "13"
Catlab = "0.15"
Catlab = "0.15.1"
GeneralizedGenerated = "0.3"
LabelledArrays = "1"
ModelingToolkit = "8"
Expand Down
31 changes: 15 additions & 16 deletions test/ModelComparison.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,21 @@ for pn in [models,
@test ob(s) == pn[2]
end

# TODO: Uncomment after Subobject logic support is fixed
# @test dom(hom(~foldl(∨, so) ∨ foldl(∨, so))) == pn[2]
# A,B = so
# @test implies(A, B) == ¬(A) ∨ B
# @test ¬(A ∧ B) == ¬(A) ∨ ¬(B)
# @test ¬(A ∧ B) != ¬(A) ∨ B
# # modus ponens holds only up to inclusion, not equality.
# @test length(compare(A ∧ implies(A,B), B)) > 0
# # this is an equivalent check because X ∧ B == X iff X ↪ B
# @test (A ∧ implies(A,B)) == B ∧ (A ∧ implies(A,B))
# @test length(compare(B ∧ implies(B,A), A)) > 0
# @test (B ∧ implies(B,A)) == A ∧ (B ∧ implies(B,A))
# @test ¬(A ∨ (¬B)) == ¬(A) ∧ ¬(¬(B))
# @test ¬(A ∨ (¬B)) == ¬(A) ∧ B
# @test A ∧ ¬(¬(A)) == ¬(¬(A))
# @test implies((A∧B), A) == A∨B
@test dom(hom(~foldl(, so) foldl(, so))) == pn[2]
A,B = so
@test implies(A, B) == ¬(A) B
@test ¬(A B) == ¬(A) ¬(B)
@test ¬(A B) != ¬(A) B
# modus ponens holds only up to inclusion, not equality.
@test length(compare(A implies(A,B), B)) > 0
# this is an equivalent check because X ∧ B == X iff X ↪ B
@test (A implies(A,B)) == B (A implies(A,B))
@test length(compare(B implies(B,A), A)) > 0
@test (B implies(B,A)) == A (B implies(B,A))
@test ¬(A (¬B)) == ¬(A) ¬(¬(B))
@test ¬(A (¬B)) == ¬(A) B
@test A ¬(¬(A)) == ¬(¬(A))
@test implies((AB), A) == AB
end

end

0 comments on commit 0afbc1a

Please sign in to comment.