Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/aclai-lab/SoleModels.jl into…
Browse files Browse the repository at this point in the history
… dev
  • Loading branch information
giopaglia committed Oct 26, 2024
2 parents 20c2932 + ebf56b8 commit e148b87
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
12 changes: 7 additions & 5 deletions test/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ using Test

io = IOBuffer()

parse_other_kind_of_formula = SoleLogics.parseformula

p = SoleLogics.parseformula("p")
phi = SoleLogics.parseformula("p∧q∨r")
phi2 = SoleLogics.parsebaseformula("q∧s→r")
phi2 = parse_other_kind_of_formula("q∧s→r")

formula_p = SoleLogics.parsebaseformula("p")
formula_q = SoleLogics.parsebaseformula("q")
formula_r = SoleLogics.parsebaseformula("r")
formula_s = SoleLogics.parsebaseformula("s")
formula_p = parse_other_kind_of_formula("p")
formula_q = parse_other_kind_of_formula("q")
formula_r = parse_other_kind_of_formula("r")
formula_s = parse_other_kind_of_formula("s")

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Leaf models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
21 changes: 12 additions & 9 deletions test/misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ using SoleModels: listrules, displaymodel, submodels

io = IOBuffer()

# parse_other_kind_of_formula = SoleLogics.parsebaseformula
parse_other_kind_of_formula = SoleLogics.parseformula

################################### LeafModel #############################################
outcome_int = @test_nowarn ConstantModel(2)
outcome_float = @test_nowarn ConstantModel(1.5)
Expand Down Expand Up @@ -65,26 +68,26 @@ st_1 = @test_nowarn SyntaxTree(prop_1)
st_100 = @test_nowarn SyntaxTree(prop_100)

################################### Formulas ###############################################
p = @test_nowarn SoleLogics.parsebaseformula("p")
p = @test_nowarn parse_other_kind_of_formula("p")
p_tree = @test_nowarn SoleLogics.parseformula("p")

# phi = @test_nowarn SoleLogics.parsebaseformula("p∧q∨r")
# phi = @test_nowarn parse_other_kind_of_formula("p∧q∨r")
# phi_tree = @test_nowarn SoleLogics.parseformula("p∧q∨r")

# phi2 = @test_nowarn SoleLogics.parsebaseformula("q∧s→r")
# phi2 = @test_nowarn parse_other_kind_of_formula("q∧s→r")
# phi2_tree = @test_nowarn SoleLogics.parseformula("q∧s→r")


phi = @test_nowarn SoleLogics.parsebaseformula("p∧q∨r")
phi = @test_nowarn parse_other_kind_of_formula("p∧q∨r")
phi_tree = @test_nowarn SoleLogics.parseformula("p∧q∨r")

phi2 = @test_nowarn SoleLogics.parsebaseformula("q∧s→r")
phi2 = @test_nowarn parse_other_kind_of_formula("q∧s→r")
phi2_tree = @test_nowarn SoleLogics.parseformula("q∧s→r")

formula_p = @test_nowarn SoleLogics.parsebaseformula("p")
formula_q = @test_nowarn SoleLogics.parsebaseformula("q")
formula_r = @test_nowarn SoleLogics.parsebaseformula("r")
formula_s = @test_nowarn SoleLogics.parsebaseformula("s")
formula_p = @test_nowarn parse_other_kind_of_formula("p")
formula_q = @test_nowarn parse_other_kind_of_formula("q")
formula_r = @test_nowarn parse_other_kind_of_formula("r")
formula_s = @test_nowarn parse_other_kind_of_formula("s")

############################### SyntaxTree ######################################
st_not_r = @test_nowarn ¬st_r
Expand Down

0 comments on commit e148b87

Please sign in to comment.