Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
giopaglia committed Mar 15, 2024
2 parents 49c748b + 25b4b7d commit 8a2364f
Show file tree
Hide file tree
Showing 37 changed files with 3,055 additions and 471 deletions.
1 change: 1 addition & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
style = "sciml"
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
freebsd_instance:
image_family: freebsd-13-2
image_family: freebsd-14-0
task:
name: FreeBSD
artifacts_cache:
Expand Down
7 changes: 4 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SoleLogics"
uuid = "b002da8f-3cb3-4d91-bbe3-2953433912b5"
authors = ["Mauro MILELLA", "Giovanni PAGLIARINI", "Alberto PAPARELLA", "Eduard I. STAN"]
version = "0.7.1"
version = "0.8.0"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand All @@ -23,10 +23,10 @@ ThreadSafeDicts = "4239201d-c60e-5e0a-9702-85d713665ba7"
AbstractTrees = "0.4"
DataStructures = "0.18"
Dictionaries = "0.3"
FunctionWrappers = "1"
Graphs = "1.8"
IterTools = "1"
Lazy = "0.15"
FunctionWrappers = "1"
PrettyTables = "2.2"
Random = "1"
Reexport = "1"
Expand All @@ -38,9 +38,10 @@ julia = "1"

[extras]
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "Markdown", "InteractiveUtils", "PlutoUI"]
test = ["Test", "Markdown", "InteractiveUtils", "PlutoUI", "BenchmarkTools"]
86 changes: 54 additions & 32 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9"
version = "0.0.1"

[[deps.AbstractTrees]]
git-tree-sha1 = "faa260e4cb5aba097a73fab382dd4b5819d8ec8c"
git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177"
uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
version = "0.4.4"
version = "0.4.5"

[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
Expand Down Expand Up @@ -54,11 +54,17 @@ git-tree-sha1 = "c0216e792f518b39b22212127d4a84dc31e4e386"
uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
version = "1.3.5"

[[deps.CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
git-tree-sha1 = "59939d8a997469ee05c4b4944560a820f9ba0d73"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.7.4"

[[deps.Compat]]
deps = ["TOML", "UUIDs"]
git-tree-sha1 = "75bd5b6fc5089df449b5d35fa501c846c9b6549b"
git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "4.12.0"
version = "4.14.0"
weakdeps = ["Dates", "LinearAlgebra"]

[deps.Compat.extensions]
Expand All @@ -81,9 +87,9 @@ version = "1.16.0"

[[deps.DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "ac67408d9ddf207de5cfa9a97e114352430f01ed"
git-tree-sha1 = "0f4b5d62a88d8f59003e43c25a8a90de9eb76317"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.18.16"
version = "0.18.18"

[[deps.DataValueInterfaces]]
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
Expand Down Expand Up @@ -111,10 +117,10 @@ uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.9.3"

[[deps.Documenter]]
deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "Test", "Unicode"]
git-tree-sha1 = "2613dbec8f4748273bbe30ba71fd5cb369966bac"
deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"]
git-tree-sha1 = "4a40af50e8b24333b9ec6892546d9ca5724228eb"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "1.2.1"
version = "1.3.0"

[[deps.Downloads]]
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
Expand Down Expand Up @@ -146,21 +152,26 @@ version = "1.9.3"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[deps.FunctionWrappers]]
git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e"
uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e"
version = "1.1.3"

[[deps.Future]]
deps = ["Random"]
uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"

[[deps.Git]]
deps = ["Git_jll"]
git-tree-sha1 = "51764e6c2e84c37055e846c516e9015b4a291c7d"
git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e"
uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
version = "1.3.0"
version = "1.3.1"

[[deps.Git_jll]]
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"]
git-tree-sha1 = "b30c473c97fcc1e1e44fab8f3e88fd1b89c9e9d1"
git-tree-sha1 = "12945451c5d0e2d0dca0724c3a8d6448b46bbdf9"
uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb"
version = "2.43.0+0"
version = "2.44.0+1"

[[deps.Graphs]]
deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"]
Expand Down Expand Up @@ -217,9 +228,9 @@ version = "0.21.4"

[[deps.JuliaInterpreter]]
deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"]
git-tree-sha1 = "04663b9e1eb0d0eabf76a6d0752e0dac83d53b36"
git-tree-sha1 = "7b762d81887160169ddfc93a47e5fd7a6a3e78ef"
uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a"
version = "0.9.28"
version = "0.9.29"

[[deps.LaTeXStrings]]
git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec"
Expand Down Expand Up @@ -271,9 +282,9 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[deps.LogExpFunctions]]
deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"]
git-tree-sha1 = "7d6dd4e9212aebaeed356de34ccf262a3cd415aa"
git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37"
uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
version = "0.3.26"
version = "0.3.27"

[deps.LogExpFunctions.extensions]
LogExpFunctionsChainRulesCoreExt = "ChainRulesCore"
Expand All @@ -290,9 +301,9 @@ uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[deps.LoweredCodeUtils]]
deps = ["JuliaInterpreter"]
git-tree-sha1 = "20ce1091ba18bcdae71ad9b71ee2367796ba6c48"
git-tree-sha1 = "31e27f0b0bf0df3e3e951bfcc43fe8c730a219f6"
uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b"
version = "2.4.4"
version = "2.4.5"

[[deps.MacroTools]]
deps = ["Markdown", "Random"]
Expand Down Expand Up @@ -372,9 +383,9 @@ version = "1.2.0"

[[deps.Preferences]]
deps = ["TOML"]
git-tree-sha1 = "00805cd429dcb4870060ff49ef443486c262e38e"
git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.4.1"
version = "1.4.3"

[[deps.PrettyTables]]
deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"]
Expand Down Expand Up @@ -413,9 +424,9 @@ version = "1.3.0"

[[deps.Revise]]
deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "Requires", "UUIDs", "Unicode"]
git-tree-sha1 = "3fe4e5b9cdbb9bbc851c57b149e516acc07f8f72"
git-tree-sha1 = "12aa2d7593df490c407a3bbd8b86b8b515017f3e"
uuid = "295af30f-e4ad-537b-8983-00126c2a3abe"
version = "3.5.13"
version = "3.5.14"

[[deps.SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
Expand All @@ -439,15 +450,17 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[deps.SoleBase]]
deps = ["CategoricalArrays", "FillArrays", "IterTools", "Logging", "Random", "StatsBase"]
git-tree-sha1 = "1acbf3c233d2d494a8fd03dcb1fff5621bc5074f"
git-tree-sha1 = "878891f576af95083687f1039f33beb40d990fcf"
uuid = "4475fa32-7023-44a0-aa70-4813b230e492"
version = "0.12.0"
version = "0.12.1"

[[deps.SoleLogics]]
deps = ["AbstractTrees", "DataStructures", "Dictionaries", "Graphs", "IterTools", "Lazy", "PrettyTables", "Random", "Reexport", "Revise", "SoleBase", "StatsBase", "ThreadSafeDicts"]
git-tree-sha1 = "0ae255c1f522be5f8ee54e2714d036b13f57d983"
deps = ["AbstractTrees", "DataStructures", "Dictionaries", "FunctionWrappers", "Graphs", "IterTools", "Lazy", "PrettyTables", "Random", "Reexport", "Revise", "SoleBase", "StatsBase", "ThreadSafeDicts"]
git-tree-sha1 = "d1397a39e65fea01379e74a8ec99393395122ebe"
repo-rev = "many-valued-logics"
repo-url = ".."
uuid = "b002da8f-3cb3-4d91-bbe3-2953433912b5"
version = "0.7.0"
version = "0.7.1"

[[deps.SortingAlgorithms]]
deps = ["DataStructures"]
Expand All @@ -461,9 +474,9 @@ uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[deps.StaticArrays]]
deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"]
git-tree-sha1 = "7b0e9c14c624e435076d19aea1e5cbdec2b9ca37"
git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "1.9.2"
version = "1.9.3"

[deps.StaticArrays.extensions]
StaticArraysChainRulesCoreExt = "ChainRulesCore"
Expand Down Expand Up @@ -533,9 +546,18 @@ deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[deps.ThreadSafeDicts]]
git-tree-sha1 = "53948619aafc920ab39e89942d1b6dfb2ae36532"
git-tree-sha1 = "300b753c0a786ea43fdafc26a4e50b87fb58cd50"
uuid = "4239201d-c60e-5e0a-9702-85d713665ba7"
version = "0.1.4"
version = "0.1.6"

[[deps.TranscodingStreams]]
git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.10.4"
weakdeps = ["Random", "Test"]

[deps.TranscodingStreams.extensions]
TestExt = ["Test", "Random"]

[[deps.UUIDs]]
deps = ["Random", "SHA"]
Expand Down
7 changes: 4 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using SoleLogics
using SoleLogics.ManyValuedLogics
using Documenter

DocMeta.setdocmeta!(SoleLogics, :DocTestSetup, :(using SoleLogics); recursive = true)

makedocs(;
modules = [SoleLogics],
authors = "Mauro Milella, Giovanni Pagliarini, Eduard I. Stan",
modules = [SoleLogics, SoleLogics.ManyValuedLogics],
authors = "Mauro Milella, Giovanni Pagliarini, Alberto Paparella, Eduard I. Stan",
repo=Documenter.Remotes.GitHub("aclai-lab", "SoleLogics.jl"),
sitename = "SoleLogics.jl",
format = Documenter.HTML(;
Expand All @@ -19,7 +20,7 @@ makedocs(;
"Getting started" => "getting-started.md",
"Introduction to Logics and Propositional Logic" => "base-logic.md",
"Modal Logic" => "modal-logic.md",
"Fuzzy" => "fuzzy.md",
"Many-valued logics" => "many-valued-logics.md",
"More on Formulas" => "more-on-formulas.md",
"Hands On" => "hands-on.md"
],
Expand Down
76 changes: 76 additions & 0 deletions docs/src/many-valued-logics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
```@meta
CurrentModule = SoleLogics.ManyValuedLogics
```

```@contents
Pages = ["many-valued-logics.md"]
```

# [Introduction](@id many-valued-logics-introduction)
SoleLogics also provides tools to work with [many-valued logics](https://en.wikipedia.org/wiki/Many-valued_logic) (e.g., fuzzy logics), that is, logics with more truth values other than the classical Boolean ones `` and ``. With many-valued logics, the truth values are elements of a bounded lattice, providing a partial order between them, which encodes a *truer than* relation.

Most of the tools for dealing with these logics can be accessed by importing the ManyValuedLogics submodule:
```julia
using SoleLogics.ManyValuedLogics
```

# [Operation](@id many-valued-logics-operation)
```@docs
Operation
BinaryOperation
```

# [Axiom](@id many-valued-logics-axiom)
```@docs
Axiom
checkaxiom
```

## [Common axioms](@id many-valued-logics-common-axioms)
```@docs
Commutativity
Associativity
AbsorptionLaw
LeftIdentity
RightIdentity
IdentityElement
RightResidual
LeftResidual
ResiduationProperty
Implication1
Implication2
Implication3
DistributiveLaw
```

# [Finite algebra](@id many-valued-logics-finite-algebra)
```@docs
FiniteAlgebra
```

## [Monoid](@id many-valued-logics-monoid)
```@docs
Monoid
CommutativeMonoid
```

## [Finite lattice](@id many-valued-logics-finite-lattice)
```@docs
FiniteLattice
FiniteBoundedLattice
FiniteResiduatedLattice
```

## [Finite algebra varieties](@id many-valued-logics-finite-algebra-varieties)
```@docs
FiniteFLewAlgebra
FiniteHeytingAlgebra
```

# [Order utilities](@id many-valued-logics-order-utilities)
```@docs
precedeq
precedes
succeedeq
succeedes
```
File renamed without changes.
19 changes: 11 additions & 8 deletions src/SoleLogics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,21 @@ export AbstractWorlds, Worlds

export Interval, Interval2D, OneWorld


export AbstractRelation

export GlobalRel, IdentityRel
export globalrel, identityrel


include("modal-logic.jl")

############################################################################################

include("many-valued-logics/ManyValuedLogics.jl")

############################################################################################

export LeftmostLinearForm, LeftmostConjunctiveForm, LeftmostDisjunctiveForm, Literal

export subformulas, normalize
Expand All @@ -105,14 +116,6 @@ include("syntax-utils.jl")

############################################################################################

export HeytingTruth, HeytingAlgebra
export precedes, succeedes, precedeq, succeedeq # TODO move above.
export @heytingtruths, @heytingalgebra

include("fuzzy.jl")

############################################################################################

include("interpretation-sets.jl")

############################################################################################
Expand Down
Loading

0 comments on commit 8a2364f

Please sign in to comment.