diff --git a/README.md b/README.md index 9038d7eb..5fb7dbd2 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ julia> using Graphs # Instantiate a Kripke frame with 5 worlds and 5 edges julia> worlds = SoleLogics.World.(1:5) -julia> edges = Edge.([ (1, 2), (1, 3), (2, 4), (3, 4), (3, 5)]) +julia> edges = Edge.([(1,2), (1,3), (2,4), (3,4), (3,5)]) julia> fr = SoleLogics.ExplicitCrispUniModalFrame(worlds, Graphs.SimpleDiGraph(edges)) SoleLogics.ExplicitCrispUniModalFrame{SoleLogics.World{Int64}, SimpleDiGraph{Int64}} with diff --git a/pluto-demo.jl b/pluto-demo.jl index 1db83b2f..c9b01b23 100644 --- a/pluto-demo.jl +++ b/pluto-demo.jl @@ -27,7 +27,7 @@ begin using Graphs worlds = SoleLogics.World.(1:5) - edges = Edge.([ (1, 2), (1, 3), (2, 4), (3, 4), (3, 5)]) + edges = Edge.([(1,2), (1,3), (2,4), (3,4), (3,5)]) fr = SoleLogics.ExplicitCrispUniModalFrame(worlds, Graphs.SimpleDiGraph(edges)) end diff --git a/src/core.jl b/src/core.jl index 25ed1774..68c0fee5 100644 --- a/src/core.jl +++ b/src/core.jl @@ -26,7 +26,7 @@ │ ├── BoxRelationalConnective (e.g., [G]) │ └── ... └── ... -¬ \ + Also: const Operator = Union{Connective,Truth} const SyntaxToken = Union{Connective,SyntaxLeaf} @@ -864,7 +864,8 @@ function syntaxstring( return tokstr elseif arity(tok) == 2 && !function_notation # Infix notation for binary operators - "$(_binary_infix_syntaxstring(tok, children(φ)[1])) "* + + "$(_binary_infix_syntaxstring(tok, children(φ)[1])) " * "$tokstr $(_binary_infix_syntaxstring(tok, children(φ)[2]))" else # Infix notation with arity != 2, or function notation diff --git a/src/docstrings.jl b/src/docstrings.jl index e2829d93..19fd6f78 100644 --- a/src/docstrings.jl +++ b/src/docstrings.jl @@ -51,7 +51,7 @@ See also [`parseformula`](@ref), In the case of a syntax tree, `syntaxstring` is a recursive function that calls itself on the syntax children of each node. For a correct functioning, the `syntaxstring` -must be defined (including `kwargs...`) for every newly defined +must be defined (including the `kwargs...` part!) for every newly defined `SyntaxToken` (e.g., `SyntaxLeaf`s, that is, `Atom`s and `Truth` values, and `Operator`s), in a way that it produces a *unique* string representation, since `Base.hash` and `Base.isequal`, at least for diff --git a/src/modal-logic.jl b/src/modal-logic.jl index f2da3e94..f8ad7712 100644 --- a/src/modal-logic.jl +++ b/src/modal-logic.jl @@ -572,7 +572,7 @@ julia> fmodal = randformula(Random.MersenneTwister(14), 3, [p,q], SoleLogics.BAS # Nodes are called worlds, and the edges are relations between worlds. julia> worlds = SoleLogics.World.(1:5) # 5 worlds are created, numerated from 1 to 5 -julia> edges = Edge.([ (1, 2), (1, 3), (2, 4), (3, 4), (3, 5)]) +julia> edges = Edge.([(1,2), (1,3), (2,4), (3,4), (3,5)]) julia> kframe = SoleLogics.ExplicitCrispUniModalFrame(worlds, Graphs.SimpleDiGraph(edges))