From 8ecb03db9ff622ca523a206bf717d77c5f88dfa6 Mon Sep 17 00:00:00 2001 From: Issa Hanou Date: Thu, 14 Nov 2024 15:35:18 +0100 Subject: [PATCH 1/4] get rid of all the 'index' links on the home of the docs --- docs/make.jl | 1 + docs/src/index.md | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 183c060..a59530c 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -15,6 +15,7 @@ tutorials_dir = joinpath(dirname(@__DIR__), "docs", "src", "tutorials") Pkg.activate(@__DIR__) build(tutorials_dir) +# NOTE: tutorials should be added manually on the homepage (src/index.md) makedocs( modules=[HerbConstraints, HerbSearch, HerbGrammar, HerbSpecification, HerbInterpret, HerbCore], authors="PONYs", diff --git a/docs/src/index.md b/docs/src/index.md index abc456e..3875331 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -7,9 +7,9 @@ CurrentModule=Herb ## Why Herb.jl? -When writing research software we almost always investigate highly specific properties or algorithms of our domain, leading to us building the tools from scratch over and over again. The very same holds for the field of program synthesis: Tools are hard to run, benchmarks are hard to get and prepare, and its hard to adapt our existing code to a novel idea. +When writing research software we almost always investigate highly specific properties or algorithms of our domain, leading to us building the tools from scratch over and over again. The very same holds for the field of program synthesis: Tools are hard to run, benchmarks are hard to get and prepare, and it is hard to adapt our existing code to a novel idea. -Herb.jl will take care of this for you and helps you defining, solving and extending your program synthesis problems. +Herb.jl will take care of this for you and helps you in defining, solving and extending your program synthesis problems. Herb.jl provides... - a unified and universal framework for program synthesis @@ -46,6 +46,17 @@ Pages = ["install.md", "get_started.md", "concepts.md"] ``` ## Advanced content - ```@contents +Pages = [p * "/index.md" for p in readdir(joinpath(dirname(@__FILE__), "..", "src")) if occursin("Herb", p)] +Depth = 1 ``` + +## Tutorials +To familiarize yourself with Herb, we have created several tutorials: +- [A more verbose getting started with Herb.jl](tutorials/getting_started_with_herb.md) +- [Defining Grammars in Herb.jl](tutorials/defining_grammars.md) +- [Advanced Search Procedures](tutorials/advanced_search.md) +- [Top Down Iterator](tutorials/TopDown.md) +- [Getting started with Constraints](tutorials/getting_started_with_constraints.md) +- [Working with custom interpreters](tutorials/working_with_interpreters.md) +- [Abstract Syntax Trees](tutorials/abstract_syntax_trees.md) From f7d41eb4f4b038ff26dbcad1a3638f89ee5cf407 Mon Sep 17 00:00:00 2001 From: Issa Hanou Date: Thu, 14 Nov 2024 15:45:26 +0100 Subject: [PATCH 2/4] hide cells with 'use PlutoAI', no more print statement cells andfixed typos --- docs/src/get_started.md | 4 +- docs/src/install.md | 2 +- docs/src/tutorials/TopDown.md | 26 +- docs/src/tutorials/abstract_syntax_trees.jl | 215 ++++++++------- docs/src/tutorials/advanced_search.jl | 248 ++++++++++-------- docs/src/tutorials/defining_grammars.jl | 174 ++++++------ .../getting_started_with_constraints.jl | 190 ++++++++------ .../tutorials/getting_started_with_herb.jl | 184 +++++++------ .../tutorials/working_with_interpreters.jl | 204 +++++++------- 9 files changed, 668 insertions(+), 579 deletions(-) diff --git a/docs/src/get_started.md b/docs/src/get_started.md index de9e03c..f8d15ff 100644 --- a/docs/src/get_started.md +++ b/docs/src/get_started.md @@ -1,6 +1,6 @@ # Getting Started -You can either paste this code into the Julia REPL or into a seperate file, e.g. `get_started.jl`. If using a separate file you can execute using `julia get_started.jl` or `julia --project=. get_started.jl` depending on whether you installed Herb.jl globally or in a project. +You can either paste this code into the Julia REPL or into a separate file, e.g. `get_started.jl`. If using a separate file you can execute using `julia get_started.jl` or `julia --project=. get_started.jl` depending on whether you installed Herb.jl globally or in a project. To begin, we need to import all needed packages using @@ -30,7 +30,7 @@ Second, the problem specification can be provided using e.g. input/output exampl problem = Problem([IOExample(Dict(:x => x), 2x+1) for x ∈ 1:5]) ``` -The problem is given now, let us search for a solution with `HerbSearch`. For now we will just use the default parameters searching for a satisfying program over the grammar, given the problem and a starting symbol using +The problem is given now, let us search for a solution with `HerbSearch`. For now, we will just use the default parameters searching for a satisfying program over the grammar, given the problem and a starting symbol using ```julia iterator = BFSIterator(g, :Number, max_depth=5) diff --git a/docs/src/install.md b/docs/src/install.md index 6953624..5736db9 100644 --- a/docs/src/install.md +++ b/docs/src/install.md @@ -2,7 +2,7 @@ Before installing Herb.jl, ensure that you have a running Julia distribution installed (Julia version 1.7 and above were tested). -Thanks to Julia's package management, installing Herb.jl is very straighforward. +Thanks to Julia's package management, installing Herb.jl is very straightforward. Activate the default Julia REPL using ```shell diff --git a/docs/src/tutorials/TopDown.md b/docs/src/tutorials/TopDown.md index 629b24f..51a3470 100644 --- a/docs/src/tutorials/TopDown.md +++ b/docs/src/tutorials/TopDown.md @@ -2,8 +2,18 @@ The core building block in Herb is a program iterator. A program iterator represents a walk through the program space; different iterators provide different ways of iterating through program space. -From the program synthesis point of view, program iterators actaully represent program spaces. - +From the program synthesis point of view, program iterators actually represent program spaces. + +```mermaid + flowchart TD + id1((13)) --- + id2((6)) + id1 --- id3((12)) + id4((11)) + id5((4)) + id3 --- id4 + id3 --- id5 +``` ### Iterator hierarchy @@ -20,7 +30,7 @@ Stochastic search further provides specific iterators: - `VLNSearchIterator` for traversals with Very Large Neighbourhood Search - `SASearchIterator` for Simulated Annealing - We provide generic and customiseable implementations of each of these iterators, so that users can easily tweak them by through multiple dispatch. Keep reading! + We provide generic and customisable implementations of each of these iterators, so that users can easily tweak them by through multiple dispatch. Keep reading! ### Iterator design @@ -28,7 +38,7 @@ Stochastic search further provides specific iterators: Program iterators follow the standard Julia `Iterator` interface. That is, every iterator should implement two functions: - `iterate(<:ProgramIterator)::(RuleNode,Any)` to get the first program. The function takes a program iterator as an input, returning the first program and a state (which can be anything) - - `iterate(<:ProgramIterator,Any)::(RuleNode,Any)` to get the consequtive programs. The function takes the progrma iterator and the state from the previous iteration, and return the next program and the next state. + - `iterate(<:ProgramIterator,Any)::(RuleNode,Any)` to get the consecutive programs. The function takes the program iterator and the state from the previous iteration, and return the next program and the next state. @@ -38,9 +48,9 @@ That is, every iterator should implement two functions: ## Top Down iterator -We illustarate how to build iterators with a Top Down iterator. +We illustrate how to build iterators with a Top Down iterator. The top Down iterator is build as a best-first iterator: it maintains a priority queue of programs and always pops the first element of the queue. -The iterator is customiseable through the following functions: +The iterator is customisable through the following functions: - priority_function: dictating the order of programs in the priority queue - derivation_heuristic: dictating in which order to explore the derivations rules within a single hole - hole_heuristic: dictating which hole to expand next @@ -110,7 +120,7 @@ The `SolverState` and `UniformIterator` are specialised data structure to improv Herb uses a data structure of `UniformTrees` to represent all programs with an AST of the same shape, where each node has the same type. the `UniformIterator` is an iterator efficiently iterating over that structure. -The `SolverState` represents non-uniform trees -- ASTs whose shape we haven't compeltely determined yet. `SolverState` is used as an intermediate representation betfore we reach `UniformTree`s on which partial constraint propagation is done. +The `SolverState` represents non-uniform trees -- ASTs whose shape we haven't completely determined yet. `SolverState` is used as an intermediate representation before we reach `UniformTree`s on which partial constraint propagation is done. In principle, you should never construct ASTs yourself directly; you should leave that to the constraint solver. @@ -131,7 +141,7 @@ function _find_next_complete_tree( ``` -If it is a Uniform Iterator, that is an interator where all the holes have the same shape, then it iterates over the solutions. +If it is a Uniform Iterator, that is an iterator where all the holes have the same shape, then it iterates over the solutions. ``` julia diff --git a/docs/src/tutorials/abstract_syntax_trees.jl b/docs/src/tutorials/abstract_syntax_trees.jl index 07f8c7b..897373f 100644 --- a/docs/src/tutorials/abstract_syntax_trees.jl +++ b/docs/src/tutorials/abstract_syntax_trees.jl @@ -1,5 +1,5 @@ ### A Pluto.jl notebook ### -# v0.19.43 +# v0.20.3 using Markdown using InteractiveUtils @@ -45,6 +45,9 @@ We first consider the simple program 5*(x+3). We will define a grammar that is s md""" ### Define the grammar""" +# ╔═╡ 4ab41dab-63f0-4ee0-b30d-532513406a0f + + # ╔═╡ 9f54f013-e8b9-4e0d-8bac-9867f5d1a393 grammar = @csgrammar begin Number = |(0:9) @@ -64,7 +67,7 @@ The AST of this program is shown in the diagram below. The number in each node r # ╔═╡ 64c2a6ce-5e3b-413b-bcb7-84936137439f md""" ```mermaid - flowchart + flowchart TD id1((13)) --- id2((6)) id1 --- id3((12)) @@ -75,19 +78,6 @@ md""" ``` """ -# ╔═╡ 64f6f1e3-5cbc-4e37-a806-d4fd45c20855 -md""" -```mermaid - flowchart - id1((13)) --- - id2((6)) - id1 --- id3((12)) - id4((11)) - id5((4)) - id3 --- id4 - id3 --- id5 -```""" - # ╔═╡ 29b37a82-d022-453e-bf65-672aa94e4c87 md""" In `Herb.jl`, the `HerbCore.RuleNode` is used to represent both an individual node, but also entire ASTs or sub-trees. This is achieved by nesting instances of `RuleNode`. A `RuleNode` can be instantiated by providing the index of the grammar rule that the node represents and a vector of child nodes. """ @@ -111,7 +101,7 @@ md""" ## Another example: FizzBuzz Let's look at a more interesting example. -The program `fizbuzz()` is based on the popular _FizzBuzz_ problem. Given an integer number, the program simply returns a `String` of that number, but replace numbers divisible by 3 with `\"Fizz\"`, numbers divisible by 5 with `\"Buzz\"`, and number divisible by both 3 and 5 with `\"FizzBuzz\"`.""" +The program `fizzbuzz()` is based on the popular _FizzBuzz_ problem. Given an integer number, the program simply returns a `String` of that number, but replace numbers divisible by 3 with `\"Fizz\"`, numbers divisible by 5 with `\"Buzz\"`, and number divisible by both 3 and 5 with `\"FizzBuzz\"`.""" # ╔═╡ 3fd0895e-7f1f-4ecd-855f-95c69a466dde function fizzbuzz(x) @@ -160,7 +150,7 @@ Given the grammar, the AST of `fizzbuzz()` looks like this:""" # ╔═╡ 6a663bce-155b-4c0d-94ec-7dc5fbba348a md""" ```mermaid -flowchart +flowchart TD id1((12)) --- id21((13)) id1--- id22((9)) id1--- id23((12)) @@ -205,10 +195,8 @@ flowchart id36 --- id410((9)) id410 --- id510((8)) id510 --- id63((1)) - - - -```""" +``` +""" # ╔═╡ d9272c48-a7da-4ca0-af15-98c0fe4a3f24 md""" @@ -356,9 +344,9 @@ PlutoUI = "~0.7.59" PLUTO_MANIFEST_TOML_CONTENTS = """ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.4" +julia_version = "1.11.1" manifest_format = "2.0" -project_hash = "0ce6f08e629fb0ab6945e23b691d12a7e72d4c7a" +project_hash = "d7f8bf7232fa30ef1b0ebfa845c2ec09e025cc88" [[deps.AbstractPlutoDingetjes]] deps = ["Pkg"] @@ -373,7 +361,7 @@ version = "0.4.5" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" +version = "1.1.2" [[deps.ArnoldiMethod]] deps = ["LinearAlgebra", "Random", "StaticArrays"] @@ -383,21 +371,23 @@ version = "0.4.0" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd" +git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.8+1" +version = "1.0.8+2" [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "a2f1c8c668c8e3cb4cca4e57a8efdb09067bb3fd" +git-tree-sha1 = "009060c9a6168704143100f36ab08f06c2af4642" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.0+2" +version = "1.18.2+1" [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] @@ -406,16 +396,16 @@ uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" version = "0.11.5" [[deps.CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" +version = "0.3.1" [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.15.0" +version = "4.16.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -435,10 +425,12 @@ version = "0.18.20" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] @@ -453,6 +445,7 @@ version = "2.6.2+0" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" +version = "1.11.0" [[deps.FixedPointNumbers]] deps = ["Statistics"] @@ -480,9 +473,9 @@ version = "0.21.0+0" [[deps.Glib_jll]] deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "7c82e6a6cd34e9d935e9aa4051b66c6ff3af59ba" +git-tree-sha1 = "674ff0db93fffcd11a3573986e550d66cd4fd71f" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.80.2+0" +version = "2.80.5+0" [[deps.Graphite2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -492,9 +485,9 @@ version = "1.3.14+0" [[deps.Graphs]] deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "4f2b57488ac7ee16124396de4f2bbdd51b2602ad" +git-tree-sha1 = "1dc470db8b1131cfc7fb4c115de89fe391b9e780" uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.11.0" +version = "1.12.0" [[deps.HarfBuzz_ICU_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "HarfBuzz_jll", "ICU_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] @@ -515,9 +508,9 @@ version = "0.2.0" [[deps.HerbGrammar]] deps = ["AbstractTrees", "DataStructures", "HerbCore", "Serialization", "TreeView"] -git-tree-sha1 = "aa70e06c5cec398294cc65c16e18f2ebdc3a7348" +git-tree-sha1 = "c5c7fd92a7502459db394115a10669f10643a440" uuid = "4ef9e186-2fe5-4b24-8de7-9f7291f24af7" -version = "0.2.1" +version = "0.2.2" [[deps.HerbInterpret]] deps = ["HerbCore", "HerbGrammar", "HerbSpecification"] @@ -526,9 +519,9 @@ uuid = "5bbddadd-02c5-4713-84b8-97364418cca7" version = "0.1.2" [[deps.HerbSpecification]] -git-tree-sha1 = "5385b81e40c3cd62aeea591319896148036863c9" +git-tree-sha1 = "ce13a9a2b7970686ef4befc2e79c2e6f1a2c4dc6" uuid = "6d54aada-062f-46d8-85cf-a1ceaf058a06" -version = "0.1.0" +version = "0.1.1" [[deps.Hyperscript]] deps = ["Test"] @@ -550,24 +543,25 @@ version = "69.1.0+0" [[deps.IOCapture]] deps = ["Logging", "Random"] -git-tree-sha1 = "8b72179abc660bfab5e28472e019392b97d0985c" +git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.4" +version = "0.2.5" [[deps.Inflate]] -git-tree-sha1 = "ea8031dea4aff6bd41f1df8f2fdfb25b33626381" +git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" -version = "0.1.4" +version = "0.1.5" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" +version = "1.6.1" [[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] @@ -577,9 +571,9 @@ version = "0.21.4" [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c84a835e1a09b289ffcd2271bf2a337bbdda6637" +git-tree-sha1 = "25ee0be4d43d0269027024d75a24c24d6c6e590c" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.0.3+0" +version = "3.0.4+0" [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -589,20 +583,20 @@ version = "3.0.0+1" [[deps.LLVMOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "d986ce2d884d49126836ea94ed5bfb0f12679713" +git-tree-sha1 = "78211fb6cbc872f77cad3fc0b6cf647d923f4929" uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "15.0.7+0" +version = "18.1.7+0" [[deps.LZO_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "70c5da094887fd2cae843b8db33920bac4b6f07d" +git-tree-sha1 = "854a9c268c43b77b0a27f22d7fab8d33cdb3a731" uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.2+0" +version = "2.10.2+1" [[deps.LaTeXStrings]] -git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.3.1" +version = "1.4.0" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] @@ -612,16 +606,17 @@ version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.4.0+0" +version = "8.6.0+0" [[deps.LibGit2]] deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +version = "1.11.0" [[deps.LibGit2_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" +version = "1.7.2+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] @@ -630,6 +625,7 @@ version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" [[deps.Libffi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -639,21 +635,21 @@ version = "3.2.2+1" [[deps.Libgcrypt_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll"] -git-tree-sha1 = "9fd170c4bbfd8b935fdc5f8b7aa33532c991a673" +git-tree-sha1 = "8be878062e0ffa2c3f67bb58a595375eda5de80b" uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" -version = "1.8.11+0" +version = "1.11.0+0" [[deps.Libgpg_error_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fbb1f2bef882392312feb1ede3615ddc1e9b99ed" +git-tree-sha1 = "c6ce1e19f3aec9b59186bdf06cdf3c4fc5f5f3e6" uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" -version = "1.49.0+0" +version = "1.50.0+0" [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" +git-tree-sha1 = "61dfdba58e585066d8bce214c5a51eaa0539f269" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.17.0+0" +version = "1.17.0+1" [[deps.Libmount_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -676,6 +672,7 @@ version = "2.40.1+0" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" [[deps.LittleCMS_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pkg"] @@ -685,6 +682,7 @@ version = "2.12.0+0" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" [[deps.MIMEs]] git-tree-sha1 = "65f28ad4b594aebe22157d6fac869786a255b7eb" @@ -700,18 +698,20 @@ version = "0.5.13" [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" +version = "2.28.6+0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" +version = "1.11.0" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" +version = "2023.12.12" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -720,7 +720,7 @@ version = "1.2.0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+4" +version = "0.3.27+1" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -730,9 +730,9 @@ version = "2.4.0+0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a12e56c72edee3ce6b96667745e6cbbe5498f200" +git-tree-sha1 = "ad31332567b189f508a3ea8957a2640b1147ab00" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "1.1.23+0" +version = "1.1.23+1" [[deps.OrderedCollections]] git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" @@ -757,15 +757,21 @@ uuid = "30392449-352a-5448-841d-b1acce4e97dc" version = "0.43.4+0" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" +version = "1.11.0" + + [deps.Pkg.extensions] + REPLExt = "REPL" + + [deps.Pkg.weakdeps] + REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.PlutoUI]] deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] -git-tree-sha1 = "ab55ee1510ad2af0ff674dbcced5e94921f867a9" +git-tree-sha1 = "eba4810d5e6a01f612b948c9fa94f905b49087b0" uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" -version = "0.7.59" +version = "0.7.60" [[deps.Poppler_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "OpenJpeg_jll", "Pkg", "libpng_jll"] @@ -788,14 +794,12 @@ version = "1.4.3" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +version = "1.11.0" [[deps.Random]] deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" [[deps.Reexport]] git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" @@ -814,10 +818,12 @@ version = "0.7.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" [[deps.SharedArrays]] deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" +version = "1.11.0" [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] @@ -827,17 +833,18 @@ version = "0.9.4" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" +version = "1.11.0" [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "9ae599cd7529cfce7fea36cf00a62cfc56f0f37c" +git-tree-sha1 = "777657803913ffc7e8cc20f0fd04b634f871af8f" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.4" +version = "1.9.8" [deps.StaticArrays.extensions] StaticArraysChainRulesCoreExt = "ChainRulesCore" @@ -848,19 +855,24 @@ version = "1.9.4" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [[deps.StaticArraysCore]] -git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.2" +version = "1.4.3" [[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.1+1" +version = "7.7.0+0" [[deps.TOML]] deps = ["Dates"] @@ -875,6 +887,7 @@ version = "1.10.0" [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +version = "1.11.0" [[deps.TikzGraphs]] deps = ["Graphs", "LaTeXStrings", "TikzPictures"] @@ -895,9 +908,9 @@ uuid = "39424ebd-4cf3-5550-a685-96706a953f40" version = "0.5.1" [[deps.Tricks]] -git-tree-sha1 = "eae1bb484cd63b36999ee58be2de6c178105112f" +git-tree-sha1 = "7822b97e99a1672bfb1b49b668a6d46d58d8cbcb" uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.8" +version = "0.1.9" [[deps.URIs]] git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" @@ -907,21 +920,23 @@ version = "1.5.1" [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" [[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] -git-tree-sha1 = "52ff2af32e591541550bd753c0da8b9bc92bb9d9" +git-tree-sha1 = "6a451c6f33a176150f315726eba8b92fbfdb9ae7" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.12.7+0" +version = "2.13.4+0" [[deps.XSLT_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] -git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "a54ee957f4c86b526460a720dbc882fa5edcbefc" uuid = "aed1982a-8fda-507f-9586-7b0439959a61" -version = "1.1.34+0" +version = "1.1.41+0" [[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] @@ -961,9 +976,9 @@ version = "0.1.1+0" [[deps.Xorg_libxcb_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] -git-tree-sha1 = "b4bfde5d5b652e22b9c790ad00af08b6d042b97d" +git-tree-sha1 = "bcd466676fef0878338c61e655629fa7bbc69d8e" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.15.0+0" +version = "1.17.0+0" [[deps.Xorg_xtrans_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -978,25 +993,25 @@ version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e678132f07ddb5bfa46857f0d7620fb9be675d3b" +git-tree-sha1 = "555d1076590a6cc2fdee2ef1469451f872d8b41b" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.6+0" +version = "1.5.6+1" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" +version = "5.11.0+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "d7015d2e18a5fd9a4f47de711837e980519781a4" +git-tree-sha1 = "b70c870239dc3d7bc094eb2d6be9b73d27bef280" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.43+1" +version = "1.6.44+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" +version = "1.59.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] @@ -1017,11 +1032,11 @@ version = "0.13.1+0" # ╟─bff155ab-ff0e-452b-a8f5-fe744e41a30f # ╟─caa3446e-c5df-4dac-905a-20515f681074 # ╠═c784cbc3-19fc-45c9-b344-db10cf7a81fa +# ╠═4ab41dab-63f0-4ee0-b30d-532513406a0f # ╠═9f54f013-e8b9-4e0d-8bac-9867f5d1a393 # ╟─46fbbe87-ee6e-4874-9708-20a42347ff18 # ╟─5dc6be9c-e4d9-4fdb-90bf-f4c59bb66a70 # ╠═64c2a6ce-5e3b-413b-bcb7-84936137439f -# ╟─64f6f1e3-5cbc-4e37-a806-d4fd45c20855 # ╟─29b37a82-d022-453e-bf65-672aa94e4c87 # ╠═822d9601-284d-4d30-9551-605684f83d90 # ╟─351210d1-20b6-4695-b9fe-f1136d4447d5 diff --git a/docs/src/tutorials/advanced_search.jl b/docs/src/tutorials/advanced_search.jl index 0f829f6..ec0ac9c 100644 --- a/docs/src/tutorials/advanced_search.jl +++ b/docs/src/tutorials/advanced_search.jl @@ -1,10 +1,11 @@ ### A Pluto.jl notebook ### -# v0.19.43 +# v0.20.3 using Markdown using InteractiveUtils # ╔═╡ a93d954d-0f09-4b6d-a3a5-62bfe39681e2 +# hide using PlutoUI # ╔═╡ c4441fa4-09ec-4b81-9681-b13b93a9c9c0 @@ -29,6 +30,7 @@ More specifically, you will learn about """ # ╔═╡ 6ab37bbc-73e2-4d9a-a8b2-e715a0b61c8f +# hide TableOfContents() # ╔═╡ 61cee94c-2481-4268-823b-ca596592b63c @@ -81,16 +83,21 @@ md""" To see the effect `max_depth` has on the number of memory allocations made during the program synthesis process, we use the `@time` macro. """ +# ╔═╡ 7e251a07-0041-4dc2-ac09-94fb01075c03 +md""" +Solution for max_depth = 3: +""" + # ╔═╡ a6fb2e91-b73a-4032-930f-d884abd539e2 -begin - println("Solution for max_depth = 3:") - solution_1 = @time synth(problem_1, iterator_1) - println(solution_1) - println("----------------------") - println("Solution for max_depth = 6:") - solution_2 = @time synth(problem_1, iterator_2) - println(solution_2) -end +solution_1 = @time synth(problem_1, iterator_1) + +# ╔═╡ d1b02aac-f93d-4643-98da-62eb74933e5b +md""" +Solution for max_depth = 6: +""" + +# ╔═╡ e1d2cb58-5409-4eed-8ce1-9636e5ee2d1e +solution_2 = @time synth(problem_1, iterator_2) # ╔═╡ 58c1a904-4d87-43f7-bcc3-884a8663c1da md""" @@ -106,11 +113,14 @@ Let's explore how many enumerations are necessary to solve our simple problem. """ # ╔═╡ 3954dd49-07a2-4ec2-91b4-9c9596d5c264 -for i in range(1, 50) - println(i, " enumerations") +result = begin + arr = [] + for i in range(1, 50) iterator = BFSIterator(g_1, :Number, max_depth=i) - solution = @time synth(problem_1, iterator) - println(solution) + solution = @time synth(problem_1, iterator) + push!(arr, solution) + end + arr end # ╔═╡ 9892e91b-9115-4520-9637-f8d7c8905825 @@ -152,9 +162,6 @@ As expected, an exception occurs during the synthesis process. Now we try the sa # ╔═╡ 606070e1-83a7-4cca-a716-4fa459f78772 solution_4 = synth(problem_2, iterator_3, allow_evaluation_errors=true) -# ╔═╡ 52332fa2-7ea7-4226-9460-e0bbc905c619 -println("solution: ", solution_4) - # ╔═╡ c262116e-138e-4133-a032-d2f50bfbf5bd md""""This time we find a solution, although a suboptimal one.""" @@ -203,9 +210,6 @@ To see all possible solution programs the iterator explores, we use `collect`. I # ╔═╡ 6aec7358-225a-4764-9a36-da86234b6cf8 programs_bfs = collect(iterator_bfs) -# ╔═╡ 54ecf6b9-3341-49e0-92e9-71190e06d61b -println(programs_bfs) - # ╔═╡ d3ff497e-d2c2-4df6-8e4c-cdca70fd0677 md""" Let's verify that the iterator returns the programs we expect (keep in mind we use a leftmost-first heuristic). @@ -222,7 +226,7 @@ answer_programs = [ ] # ╔═╡ 9efb01cf-b190-4e3e-aa19-11499ba46489 -println(all(p ∈ programs_bfs for p ∈ answer_programs)) +all(p ∈ programs_bfs for p ∈ answer_programs) # ╔═╡ 0020b79a-6352-4e2d-93f6-2a1d7b03ae2c md""" @@ -239,9 +243,6 @@ iterator_dfs = DFSIterator(g_3, :Real, max_depth=2, max_size=typemax(Int)) # ╔═╡ 4048ff37-e7d1-44ee-bfa3-aa058b6f53b6 programs_dfs = collect(iterator_dfs) -# ╔═╡ 658c55ac-88c8-4657-a8eb-c9c9b91d0ded -println(programs_dfs) - # ╔═╡ 243165be-a9d2-484d-8046-811a2b0ba139 md""" `DFSIterator` also uses by default a **leftmost-first** heuristic. If we want to use a **rightmost-first** heuristic instead, we can create our own iterator `DFSIteratorRightmost` as a sub-type of `TopDownIterator`, using the `@programiterator` macro. Then we implement the functions `priority_function` and `hole_heuristic`. Also see the tutorial [Top Down Iterator](https://herb-ai.github.io/Herb.jl/dev/tutorials/TopDown/) for how to build iterators is Herb.jl. @@ -285,9 +286,6 @@ iteratordfs_rightmost = DFSIteratorRightmost(g_3, :Real, max_depth=2, max_size=t # ╔═╡ e0e8042d-ae41-4046-ab4f-5954a0d1cfb7 programs_dfs_rightmost = collect(iteratordfs_rightmost) -# ╔═╡ c70eb1a1-7d6b-413f-bd85-77e1b8c30b94 -println(programs_dfs_rightmost) - # ╔═╡ 02010940-df9f-4847-b0be-0bc9c6bb2ad4 md""" We observe that the order of programs has changed. We can also test if both DFS iterators return the same programs: @@ -362,9 +360,12 @@ Run the following code block to define the iterator and perform the program synt begin iterator_mh = MHSearchIterator(g_4, :X, examples_mh, cost_function, max_depth=3) program_mh = synth(problem_mh, iterator_mh) - println("Sollution using MH: ", program_mh) + println("Solution using MH: ", program_mh) end +# ╔═╡ 3d29e321-e82e-4bf8-8be3-781ab5f561a2 + + # ╔═╡ 700270ea-90bd-474b-91d9-0e5ed329776a md""" ### Very Large Scale Neighbourhood Search @@ -388,9 +389,6 @@ iterator_vlsn1 = VLSNSearchIterator(g_4, :X, examples_vlsn1, cost_function, max_ # ╔═╡ 33af905e-e8ca-425d-9805-eb02bec7c26b program_vlsn1 = synth(problem_vlsn1, iterator_vlsn1) -# ╔═╡ 7cbaa721-2bab-4a27-8c18-83f3f81bb336 -println("Solution: ", program_vlsn1) - # ╔═╡ bea28b36-6613-4895-98f9-27dfd9e57b09 e_vlsn2 = x -> x @@ -403,9 +401,6 @@ iterator_vlsn2 = VLSNSearchIterator(g_4, :X, examples_vlsn2, cost_function, max_ # ╔═╡ 36f0e0cf-c871-42c9-956e-054767cbf693 program_vlsn2 = synth(problem_vlsn2, iterator_vlsn2) -# ╔═╡ bff8026e-49ee-4200-ae86-7687767389a5 -println("Solution: ", program_vlsn2) - # ╔═╡ 599194a8-3f47-4917-9143-a5fe0d43029f md""" ### Simulated Annealing @@ -489,9 +484,9 @@ PlutoUI = "~0.7.59" PLUTO_MANIFEST_TOML_CONTENTS = """ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.4" +julia_version = "1.11.1" manifest_format = "2.0" -project_hash = "0ffb99b60bda019fda3cc31f30ebdb78c9cca62d" +project_hash = "73f8122c6ae5b467aa0add1406bff57483e6e09d" [[deps.AbstractPlutoDingetjes]] deps = ["Pkg"] @@ -506,7 +501,7 @@ version = "0.4.5" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" +version = "1.1.2" [[deps.ArnoldiMethod]] deps = ["LinearAlgebra", "Random", "StaticArrays"] @@ -516,21 +511,23 @@ version = "0.4.0" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd" +git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.8+1" +version = "1.0.8+2" [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "a2f1c8c668c8e3cb4cca4e57a8efdb09067bb3fd" +git-tree-sha1 = "009060c9a6168704143100f36ab08f06c2af4642" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.0+2" +version = "1.18.2+1" [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] @@ -539,16 +536,16 @@ uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" version = "0.11.5" [[deps.CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" +version = "0.3.1" [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.15.0" +version = "4.16.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -573,10 +570,12 @@ version = "0.18.20" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" [[deps.DocStringExtensions]] deps = ["LibGit2"] @@ -597,6 +596,7 @@ version = "2.6.2+0" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" +version = "1.11.0" [[deps.FixedPointNumbers]] deps = ["Statistics"] @@ -624,9 +624,9 @@ version = "0.21.0+0" [[deps.Glib_jll]] deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "7c82e6a6cd34e9d935e9aa4051b66c6ff3af59ba" +git-tree-sha1 = "674ff0db93fffcd11a3573986e550d66cd4fd71f" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.80.2+0" +version = "2.80.5+0" [[deps.Graphite2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -636,9 +636,9 @@ version = "1.3.14+0" [[deps.Graphs]] deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "ebd18c326fa6cee1efb7da9a3b45cf69da2ed4d9" +git-tree-sha1 = "1dc470db8b1131cfc7fb4c115de89fe391b9e780" uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.11.2" +version = "1.12.0" [[deps.HarfBuzz_ICU_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "HarfBuzz_jll", "ICU_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] @@ -659,9 +659,9 @@ uuid = "1fa96474-3206-4513-b4fa-23913f296dfc" version = "0.2.2" [[deps.HerbCore]] -git-tree-sha1 = "923877c2715b8166d7ba9f9be2136d70eed87725" +git-tree-sha1 = "98a4c7b30a8a752bb33bddc2475f6554602b588b" uuid = "2b23ba43-8213-43cb-b5ea-38c12b45bd45" -version = "0.3.0" +version = "0.3.1" [[deps.HerbGrammar]] deps = ["AbstractTrees", "DataStructures", "HerbCore", "Serialization", "TreeView"] @@ -682,9 +682,9 @@ uuid = "3008d8e8-f9aa-438a-92ed-26e9c7b4829f" version = "0.3.0" [[deps.HerbSpecification]] -git-tree-sha1 = "5385b81e40c3cd62aeea591319896148036863c9" +git-tree-sha1 = "ce13a9a2b7970686ef4befc2e79c2e6f1a2c4dc6" uuid = "6d54aada-062f-46d8-85cf-a1ceaf058a06" -version = "0.1.0" +version = "0.1.1" [[deps.Hyperscript]] deps = ["Test"] @@ -706,9 +706,9 @@ version = "69.1.0+0" [[deps.IOCapture]] deps = ["Logging", "Random"] -git-tree-sha1 = "8b72179abc660bfab5e28472e019392b97d0985c" +git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.4" +version = "0.2.5" [[deps.Inflate]] git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" @@ -718,6 +718,7 @@ version = "0.1.5" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" [[deps.IrrationalConstants]] git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" @@ -726,9 +727,9 @@ version = "0.2.2" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" +version = "1.6.1" [[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] @@ -738,9 +739,9 @@ version = "0.21.4" [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c84a835e1a09b289ffcd2271bf2a337bbdda6637" +git-tree-sha1 = "25ee0be4d43d0269027024d75a24c24d6c6e590c" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.0.3+0" +version = "3.0.4+0" [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -750,20 +751,20 @@ version = "3.0.0+1" [[deps.LLVMOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "d986ce2d884d49126836ea94ed5bfb0f12679713" +git-tree-sha1 = "78211fb6cbc872f77cad3fc0b6cf647d923f4929" uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "15.0.7+0" +version = "18.1.7+0" [[deps.LZO_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "70c5da094887fd2cae843b8db33920bac4b6f07d" +git-tree-sha1 = "854a9c268c43b77b0a27f22d7fab8d33cdb3a731" uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.2+0" +version = "2.10.2+1" [[deps.LaTeXStrings]] -git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.3.1" +version = "1.4.0" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] @@ -773,16 +774,17 @@ version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.4.0+0" +version = "8.6.0+0" [[deps.LibGit2]] deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +version = "1.11.0" [[deps.LibGit2_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" +version = "1.7.2+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] @@ -791,6 +793,7 @@ version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" [[deps.Libffi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -800,21 +803,21 @@ version = "3.2.2+1" [[deps.Libgcrypt_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll"] -git-tree-sha1 = "9fd170c4bbfd8b935fdc5f8b7aa33532c991a673" +git-tree-sha1 = "8be878062e0ffa2c3f67bb58a595375eda5de80b" uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" -version = "1.8.11+0" +version = "1.11.0+0" [[deps.Libgpg_error_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fbb1f2bef882392312feb1ede3615ddc1e9b99ed" +git-tree-sha1 = "c6ce1e19f3aec9b59186bdf06cdf3c4fc5f5f3e6" uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" -version = "1.49.0+0" +version = "1.50.0+0" [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" +git-tree-sha1 = "61dfdba58e585066d8bce214c5a51eaa0539f269" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.17.0+0" +version = "1.17.0+1" [[deps.Libmount_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -837,6 +840,7 @@ version = "2.40.1+0" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" [[deps.LittleCMS_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pkg"] @@ -846,9 +850,9 @@ version = "2.12.0+0" [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" +git-tree-sha1 = "a2d09619db4e765091ee5c6ffe8872849de0feea" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.27" +version = "0.3.28" [deps.LogExpFunctions.extensions] LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" @@ -862,6 +866,7 @@ version = "0.3.27" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" [[deps.MIMEs]] git-tree-sha1 = "65f28ad4b594aebe22157d6fac869786a255b7eb" @@ -882,11 +887,12 @@ version = "0.5.13" [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" +version = "2.28.6+0" [[deps.Missings]] deps = ["DataAPI"] @@ -896,10 +902,11 @@ version = "1.2.0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" +version = "1.11.0" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" +version = "2023.12.12" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -908,7 +915,7 @@ version = "1.2.0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+4" +version = "0.3.27+1" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -918,9 +925,9 @@ version = "2.4.0+0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a12e56c72edee3ce6b96667745e6cbbe5498f200" +git-tree-sha1 = "ad31332567b189f508a3ea8957a2640b1147ab00" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "1.1.23+0" +version = "1.1.23+1" [[deps.OrderedCollections]] git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" @@ -945,15 +952,21 @@ uuid = "30392449-352a-5448-841d-b1acce4e97dc" version = "0.43.4+0" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" +version = "1.11.0" + + [deps.Pkg.extensions] + REPLExt = "REPL" + + [deps.Pkg.weakdeps] + REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.PlutoUI]] deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] -git-tree-sha1 = "ab55ee1510ad2af0ff674dbcced5e94921f867a9" +git-tree-sha1 = "eba4810d5e6a01f612b948c9fa94f905b49087b0" uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" -version = "0.7.59" +version = "0.7.60" [[deps.Poppler_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "OpenJpeg_jll", "Pkg", "libpng_jll"] @@ -976,14 +989,12 @@ version = "1.4.3" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +version = "1.11.0" [[deps.Random]] deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" [[deps.Reexport]] git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" @@ -1002,10 +1013,12 @@ version = "0.7.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" [[deps.SharedArrays]] deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" +version = "1.11.0" [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] @@ -1015,6 +1028,7 @@ version = "0.9.4" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" [[deps.SortingAlgorithms]] deps = ["DataStructures"] @@ -1025,13 +1039,13 @@ version = "1.2.1" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" +version = "1.11.0" [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "eeafab08ae20c62c44c8399ccb9354a04b80db50" +git-tree-sha1 = "777657803913ffc7e8cc20f0fd04b634f871af8f" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.7" +version = "1.9.8" [deps.StaticArrays.extensions] StaticArraysChainRulesCoreExt = "ChainRulesCore" @@ -1047,9 +1061,14 @@ uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" version = "1.4.3" [[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] [[deps.StatsAPI]] deps = ["LinearAlgebra"] @@ -1066,7 +1085,7 @@ version = "0.34.3" [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.1+1" +version = "7.7.0+0" [[deps.TOML]] deps = ["Dates"] @@ -1081,6 +1100,7 @@ version = "1.10.0" [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +version = "1.11.0" [[deps.TikzGraphs]] deps = ["Graphs", "LaTeXStrings", "TikzPictures"] @@ -1101,9 +1121,9 @@ uuid = "39424ebd-4cf3-5550-a685-96706a953f40" version = "0.5.1" [[deps.Tricks]] -git-tree-sha1 = "eae1bb484cd63b36999ee58be2de6c178105112f" +git-tree-sha1 = "7822b97e99a1672bfb1b49b668a6d46d58d8cbcb" uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.8" +version = "0.1.9" [[deps.URIs]] git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" @@ -1113,15 +1133,17 @@ version = "1.5.1" [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" [[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] -git-tree-sha1 = "d9717ce3518dc68a99e6b96300813760d887a01d" +git-tree-sha1 = "6a451c6f33a176150f315726eba8b92fbfdb9ae7" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.13.1+0" +version = "2.13.4+0" [[deps.XSLT_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "XML2_jll", "Zlib_jll"] @@ -1184,25 +1206,25 @@ version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e678132f07ddb5bfa46857f0d7620fb9be675d3b" +git-tree-sha1 = "555d1076590a6cc2fdee2ef1469451f872d8b41b" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.6+0" +version = "1.5.6+1" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" +version = "5.11.0+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "d7015d2e18a5fd9a4f47de711837e980519781a4" +git-tree-sha1 = "b70c870239dc3d7bc094eb2d6be9b73d27bef280" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.43+1" +version = "1.6.44+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" +version = "1.59.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] @@ -1218,8 +1240,8 @@ version = "0.13.1+0" # ╔═╡ Cell order: # ╟─dddca175-3d88-45ce-90da-575c0ba38175 -# ╠═a93d954d-0f09-4b6d-a3a5-62bfe39681e2 -# ╠═6ab37bbc-73e2-4d9a-a8b2-e715a0b61c8f +# ╟─a93d954d-0f09-4b6d-a3a5-62bfe39681e2 +# ╟─6ab37bbc-73e2-4d9a-a8b2-e715a0b61c8f # ╟─61cee94c-2481-4268-823b-ca596592b63c # ╠═c4441fa4-09ec-4b81-9681-b13b93a9c9c0 # ╟─67931820-0f43-41e1-898e-5b5bd55e30d1 @@ -1230,7 +1252,10 @@ version = "0.13.1+0" # ╠═338f19f1-3a62-4462-b8dc-24424d7644f2 # ╠═542cd47e-74cd-4b6f-acc9-bf524222e583 # ╟─63e97576-1c34-464d-a106-d59d5fb1ee38 +# ╠═7e251a07-0041-4dc2-ac09-94fb01075c03 # ╠═a6fb2e91-b73a-4032-930f-d884abd539e2 +# ╠═d1b02aac-f93d-4643-98da-62eb74933e5b +# ╠═e1d2cb58-5409-4eed-8ce1-9636e5ee2d1e # ╟─58c1a904-4d87-43f7-bcc3-884a8663c1da # ╟─35405357-179b-4e77-9bdc-edf5a550b36d # ╠═3954dd49-07a2-4ec2-91b4-9c9596d5c264 @@ -1243,7 +1268,6 @@ version = "0.13.1+0" # ╠═4821fd3a-ff2d-4991-99ad-76608d11b1da # ╟─b2eb08d7-3e53-46c5-84b1-e1fa0e07e291 # ╠═606070e1-83a7-4cca-a716-4fa459f78772 -# ╠═52332fa2-7ea7-4226-9460-e0bbc905c619 # ╟─c262116e-138e-4133-a032-d2f50bfbf5bd # ╟─9b4b21e0-dc6a-43ae-a511-79988ee99001 # ╟─115c02c9-ae0c-4623-a61d-831fc6ad55a2 @@ -1252,14 +1276,12 @@ version = "0.13.1+0" # ╠═f2521a57-267e-4b49-9179-4e9c2e6bdec7 # ╟─bf038215-1ecf-4e1c-a9be-e133e4497293 # ╠═6aec7358-225a-4764-9a36-da86234b6cf8 -# ╠═54ecf6b9-3341-49e0-92e9-71190e06d61b # ╟─d3ff497e-d2c2-4df6-8e4c-cdca70fd0677 # ╠═07b54acf-0c0d-40ac-ae18-fb26094b4aca # ╠═9efb01cf-b190-4e3e-aa19-11499ba46489 # ╟─0020b79a-6352-4e2d-93f6-2a1d7b03ae2c # ╠═db5be2c3-0b36-40b4-bf14-20e2c7063ad7 # ╠═4048ff37-e7d1-44ee-bfa3-aa058b6f53b6 -# ╠═658c55ac-88c8-4657-a8eb-c9c9b91d0ded # ╟─243165be-a9d2-484d-8046-811a2b0ba139 # ╠═4b97602a-5226-429f-86ea-8ecac3c807fa # ╟─ed198b79-1b95-4531-b148-c1037cfdacf4 @@ -1268,7 +1290,6 @@ version = "0.13.1+0" # ╠═7e2af72d-b71c-4234-9bca-cb9a90732a91 # ╠═00d05a7e-ca79-4d6b-828d-b24ef1cb80a2 # ╠═e0e8042d-ae41-4046-ab4f-5954a0d1cfb7 -# ╠═c70eb1a1-7d6b-413f-bd85-77e1b8c30b94 # ╟─02010940-df9f-4847-b0be-0bc9c6bb2ad4 # ╠═f5edcb4d-da72-4eeb-b55e-0ace1697133a # ╟─168c71bf-ce5b-4ab3-b29a-5996981c42a5 @@ -1281,17 +1302,16 @@ version = "0.13.1+0" # ╠═afe1872c-6641-4fa0-a53e-50c6b4a712ee # ╟─69e91ae9-8475-47dd-826e-8c229faa11e8 # ╠═0a30fb40-cd45-4661-a501-ae8e45f1e07e -# ╟─700270ea-90bd-474b-91d9-0e5ed329776a +# ╠═3d29e321-e82e-4bf8-8be3-781ab5f561a2 +# ╠═700270ea-90bd-474b-91d9-0e5ed329776a # ╠═e6e5c63b-34e8-40d6-bc12-bd31f40b4b16 # ╠═2397f65f-e6b4-4f11-bf66-83440c58b688 # ╠═7c738d7b-bf05-40c7-b3b7-1512fbae7299 # ╠═33af905e-e8ca-425d-9805-eb02bec7c26b -# ╠═7cbaa721-2bab-4a27-8c18-83f3f81bb336 # ╠═bea28b36-6613-4895-98f9-27dfd9e57b09 # ╠═aa95cb5e-926d-4119-8d08-353f37a59039 # ╠═285043ef-c295-400f-91c5-f3c6c69ac2bf # ╠═36f0e0cf-c871-42c9-956e-054767cbf693 -# ╠═bff8026e-49ee-4200-ae86-7687767389a5 # ╟─599194a8-3f47-4917-9143-a5fe0d43029f # ╟─dd6aee87-cd96-4be1-b8fb-03fffee5ea43 # ╠═e25d115f-7549-4606-b96c-9ef700810f7b diff --git a/docs/src/tutorials/defining_grammars.jl b/docs/src/tutorials/defining_grammars.jl index 08bb920..241e620 100644 --- a/docs/src/tutorials/defining_grammars.jl +++ b/docs/src/tutorials/defining_grammars.jl @@ -1,5 +1,5 @@ ### A Pluto.jl notebook ### -# v0.19.43 +# v0.20.3 using Markdown using InteractiveUtils @@ -196,7 +196,7 @@ HerbGrammar.nonterminals(g₇) md""" ### Adding rules -It is also possible to add rules to a grammar during execution. This can be done using the `add_rule!` function. The exclamatin mark is a Julia convention and is appended to name if a function modifies its arguments (in our example the grammar). +It is also possible to add rules to a grammar during execution. This can be done using the `add_rule!` function. The exclamation mark is a Julia convention and is appended to name if a function modifies its arguments (in our example the grammar). A rule can be provided in the same syntax as is used in the grammar definition. The rule should be of the `Expr` type, which is a built-in type for representing expressions. @@ -347,9 +347,9 @@ HerbGrammar = "~0.3.0" PLUTO_MANIFEST_TOML_CONTENTS = """ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.4" +julia_version = "1.11.1" manifest_format = "2.0" -project_hash = "7e68dadf6c36ec756dee195b1ce6f2abc419c446" +project_hash = "940e4d43fa303c6cd39be535f576fbe0e88bfd9f" [[deps.AbstractTrees]] git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" @@ -358,7 +358,7 @@ version = "0.4.5" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" +version = "1.1.2" [[deps.ArnoldiMethod]] deps = ["LinearAlgebra", "Random", "StaticArrays"] @@ -368,33 +368,35 @@ version = "0.4.0" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd" +git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.8+1" +version = "1.0.8+2" [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "a2f1c8c668c8e3cb4cca4e57a8efdb09067bb3fd" +git-tree-sha1 = "009060c9a6168704143100f36ab08f06c2af4642" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.0+2" +version = "1.18.2+1" [[deps.CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" +version = "0.3.1" [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.15.0" +version = "4.16.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -414,10 +416,12 @@ version = "0.18.20" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] @@ -432,6 +436,7 @@ version = "2.6.2+0" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" +version = "1.11.0" [[deps.Fontconfig_jll]] deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] @@ -453,9 +458,9 @@ version = "0.21.0+0" [[deps.Glib_jll]] deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "7c82e6a6cd34e9d935e9aa4051b66c6ff3af59ba" +git-tree-sha1 = "674ff0db93fffcd11a3573986e550d66cd4fd71f" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.80.2+0" +version = "2.80.5+0" [[deps.Graphite2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -465,9 +470,9 @@ version = "1.3.14+0" [[deps.Graphs]] deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "4f2b57488ac7ee16124396de4f2bbdd51b2602ad" +git-tree-sha1 = "1dc470db8b1131cfc7fb4c115de89fe391b9e780" uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.11.0" +version = "1.12.0" [[deps.HarfBuzz_ICU_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "HarfBuzz_jll", "ICU_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] @@ -488,9 +493,9 @@ uuid = "1fa96474-3206-4513-b4fa-23913f296dfc" version = "0.2.2" [[deps.HerbCore]] -git-tree-sha1 = "923877c2715b8166d7ba9f9be2136d70eed87725" +git-tree-sha1 = "98a4c7b30a8a752bb33bddc2475f6554602b588b" uuid = "2b23ba43-8213-43cb-b5ea-38c12b45bd45" -version = "0.3.0" +version = "0.3.1" [[deps.HerbGrammar]] deps = ["AbstractTrees", "DataStructures", "HerbCore", "Serialization", "TreeView"] @@ -505,25 +510,26 @@ uuid = "a51ab1cf-af8e-5615-a023-bc2c838bba6b" version = "69.1.0+0" [[deps.Inflate]] -git-tree-sha1 = "ea8031dea4aff6bd41f1df8f2fdfb25b33626381" +git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" -version = "0.1.4" +version = "0.1.5" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" +version = "1.6.1" [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c84a835e1a09b289ffcd2271bf2a337bbdda6637" +git-tree-sha1 = "25ee0be4d43d0269027024d75a24c24d6c6e590c" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.0.3+0" +version = "3.0.4+0" [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -533,20 +539,20 @@ version = "3.0.0+1" [[deps.LLVMOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "d986ce2d884d49126836ea94ed5bfb0f12679713" +git-tree-sha1 = "78211fb6cbc872f77cad3fc0b6cf647d923f4929" uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "15.0.7+0" +version = "18.1.7+0" [[deps.LZO_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "70c5da094887fd2cae843b8db33920bac4b6f07d" +git-tree-sha1 = "854a9c268c43b77b0a27f22d7fab8d33cdb3a731" uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.2+0" +version = "2.10.2+1" [[deps.LaTeXStrings]] -git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.3.1" +version = "1.4.0" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] @@ -556,16 +562,17 @@ version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.4.0+0" +version = "8.6.0+0" [[deps.LibGit2]] deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +version = "1.11.0" [[deps.LibGit2_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" +version = "1.7.2+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] @@ -574,6 +581,7 @@ version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" [[deps.Libffi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -583,21 +591,21 @@ version = "3.2.2+1" [[deps.Libgcrypt_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll"] -git-tree-sha1 = "9fd170c4bbfd8b935fdc5f8b7aa33532c991a673" +git-tree-sha1 = "8be878062e0ffa2c3f67bb58a595375eda5de80b" uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" -version = "1.8.11+0" +version = "1.11.0+0" [[deps.Libgpg_error_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fbb1f2bef882392312feb1ede3615ddc1e9b99ed" +git-tree-sha1 = "c6ce1e19f3aec9b59186bdf06cdf3c4fc5f5f3e6" uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" -version = "1.49.0+0" +version = "1.50.0+0" [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" +git-tree-sha1 = "61dfdba58e585066d8bce214c5a51eaa0539f269" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.17.0+0" +version = "1.17.0+1" [[deps.Libmount_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -620,6 +628,7 @@ version = "2.40.1+0" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" [[deps.LittleCMS_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pkg"] @@ -629,6 +638,7 @@ version = "2.12.0+0" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" [[deps.MLStyle]] git-tree-sha1 = "bc38dff0548128765760c79eb7388a4b37fae2c8" @@ -644,18 +654,20 @@ version = "0.5.13" [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" +version = "2.28.6+0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" +version = "1.11.0" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" +version = "2023.12.12" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -664,7 +676,7 @@ version = "1.2.0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+4" +version = "0.3.27+1" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -674,9 +686,9 @@ version = "2.4.0+0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a12e56c72edee3ce6b96667745e6cbbe5498f200" +git-tree-sha1 = "ad31332567b189f508a3ea8957a2640b1147ab00" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "1.1.23+0" +version = "1.1.23+1" [[deps.OrderedCollections]] git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" @@ -695,9 +707,15 @@ uuid = "30392449-352a-5448-841d-b1acce4e97dc" version = "0.43.4+0" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" +version = "1.11.0" + + [deps.Pkg.extensions] + REPLExt = "REPL" + + [deps.Pkg.weakdeps] + REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Poppler_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "OpenJpeg_jll", "Pkg", "libpng_jll"] @@ -720,14 +738,12 @@ version = "1.4.3" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +version = "1.11.0" [[deps.Random]] deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" [[deps.Requires]] deps = ["UUIDs"] @@ -741,10 +757,12 @@ version = "0.7.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" [[deps.SharedArrays]] deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" +version = "1.11.0" [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] @@ -754,17 +772,18 @@ version = "0.9.4" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" +version = "1.11.0" [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "9ae599cd7529cfce7fea36cf00a62cfc56f0f37c" +git-tree-sha1 = "777657803913ffc7e8cc20f0fd04b634f871af8f" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.4" +version = "1.9.8" [deps.StaticArrays.extensions] StaticArraysChainRulesCoreExt = "ChainRulesCore" @@ -775,19 +794,24 @@ version = "1.9.4" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [[deps.StaticArraysCore]] -git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.2" +version = "1.4.3" [[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.1+1" +version = "7.7.0+0" [[deps.TOML]] deps = ["Dates"] @@ -799,10 +823,6 @@ deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" version = "1.10.0" -[[deps.Test]] -deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - [[deps.TikzGraphs]] deps = ["Graphs", "LaTeXStrings", "TikzPictures"] git-tree-sha1 = "e8f41ed9a2cabf6699d9906c195bab1f773d4ca7" @@ -824,21 +844,23 @@ version = "0.5.1" [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" [[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] -git-tree-sha1 = "52ff2af32e591541550bd753c0da8b9bc92bb9d9" +git-tree-sha1 = "6a451c6f33a176150f315726eba8b92fbfdb9ae7" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.12.7+0" +version = "2.13.4+0" [[deps.XSLT_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] -git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "a54ee957f4c86b526460a720dbc882fa5edcbefc" uuid = "aed1982a-8fda-507f-9586-7b0439959a61" -version = "1.1.34+0" +version = "1.1.41+0" [[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] @@ -878,9 +900,9 @@ version = "0.1.1+0" [[deps.Xorg_libxcb_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] -git-tree-sha1 = "b4bfde5d5b652e22b9c790ad00af08b6d042b97d" +git-tree-sha1 = "bcd466676fef0878338c61e655629fa7bbc69d8e" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.15.0+0" +version = "1.17.0+0" [[deps.Xorg_xtrans_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -895,25 +917,25 @@ version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e678132f07ddb5bfa46857f0d7620fb9be675d3b" +git-tree-sha1 = "555d1076590a6cc2fdee2ef1469451f872d8b41b" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.6+0" +version = "1.5.6+1" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" +version = "5.11.0+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "d7015d2e18a5fd9a4f47de711837e980519781a4" +git-tree-sha1 = "b70c870239dc3d7bc094eb2d6be9b73d27bef280" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.43+1" +version = "1.6.44+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" +version = "1.59.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] diff --git a/docs/src/tutorials/getting_started_with_constraints.jl b/docs/src/tutorials/getting_started_with_constraints.jl index 5791d13..f05b16d 100644 --- a/docs/src/tutorials/getting_started_with_constraints.jl +++ b/docs/src/tutorials/getting_started_with_constraints.jl @@ -1,5 +1,5 @@ ### A Pluto.jl notebook ### -# v0.19.43 +# v0.20.3 using Markdown using InteractiveUtils @@ -20,7 +20,7 @@ md""" For this tutorial, we need to import the following modules of the Herb.jl framework: -* `HerbCore` for the necessary data strucutes, like `Hole`s and `RuleNode`s +* `HerbCore` for the necessary data structures, like `Hole`s and `RuleNode`s * `HerbGrammar` to define the grammar * `HerbConstraints` to define the constraints * `HerbSearch` to execute a constrained enumeration @@ -59,7 +59,7 @@ end # ╔═╡ 76478bc7-e1b0-44f7-b1e0-95573db9f0e3 md""" -Upon inspection, we can already see some redundant programs, like `1 * 1` and `-(-1)`. To eliminate these redundant programs, we will set up some constraints that prevent these patterns from appearing. Then we will create another iteratator to enumerate all programs that satisfy the defined grammar constraints. +Upon inspection, we can already see some redundant programs, like `1 * 1` and `-(-1)`. To eliminate these redundant programs, we will set up some constraints that prevent these patterns from appearing. Then we will create another iterator to enumerate all programs that satisfy the defined grammar constraints. To make the forbidden pattern constraint general, we will use a special type of rulenode: `VarNode(:A)`. This node matches with any subtree and can be used to forbid multiple forbidden patterns using a single constraint. For example, `Forbidden(RuleNode(minus, [RuleNode(minus, [VarNode(:A)])])))` forbids: @@ -261,7 +261,7 @@ In addition to tree manipulations, the following solver functions can be used to The solver manages all constraints and the program tree we propagate on. Applying tree manipulations might cause a chain reaction of other propagators, so the shape of the tree might update as we propagate. The get the latest information about the tree, we should use the following getter functions: * `get_tree(solver)` returns the root node of the current (partial) program tree -* `isfeasible(solver)` returns the a flag indicating if the solver is not violating any (other) constriants. +* `isfeasible(solver)` returns the a flag indicating if the solver is not violating any (other) constraints. * `get_path(solver, node)` returns the path at which the node is located. * `get_node_at_location(solver, path)` returns the node that is currently at the given path (be aware that this instance might be replaced by manipulations). * `get_hole_at_location(solver, path)` same as get node at location, but asserts the node is a hole (domain size >= 2). @@ -359,8 +359,8 @@ Posting a local constraint will trigger the initial propagation. To re-propagate Whenever the tree is manipulated, we will make a `shouldschedule` check to see if our constraint needs to be rescheduled for propagation based on the manipulation. In our case, we want to repropagate if either: -* a tree manipulation occured at the `constraint.path` -* a tree manipulation occured at the child of the `constraint.path` +* a tree manipulation occurred at the `constraint.path` +* a tree manipulation occurred at the child of the `constraint.path` """ # ╔═╡ 4e0989a8-7e63-45eb-80c9-a3a2f97c357c @@ -413,9 +413,9 @@ HerbSearch = "~0.3.0" PLUTO_MANIFEST_TOML_CONTENTS = """ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.4" +julia_version = "1.11.1" manifest_format = "2.0" -project_hash = "f550d76e5fc2109cce82f8527132b9929cc7271f" +project_hash = "d6768908e10e38cef55c4164dd6125cb3393d80e" [[deps.AbstractTrees]] git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" @@ -424,7 +424,7 @@ version = "0.4.5" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" +version = "1.1.2" [[deps.ArnoldiMethod]] deps = ["LinearAlgebra", "Random", "StaticArrays"] @@ -434,33 +434,35 @@ version = "0.4.0" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd" +git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.8+1" +version = "1.0.8+2" [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "a2f1c8c668c8e3cb4cca4e57a8efdb09067bb3fd" +git-tree-sha1 = "009060c9a6168704143100f36ab08f06c2af4642" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.0+2" +version = "1.18.2+1" [[deps.CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" +version = "0.3.1" [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.15.0" +version = "4.16.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -485,10 +487,12 @@ version = "0.18.20" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" [[deps.DocStringExtensions]] deps = ["LibGit2"] @@ -509,6 +513,7 @@ version = "2.6.2+0" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" +version = "1.11.0" [[deps.Fontconfig_jll]] deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] @@ -530,9 +535,9 @@ version = "0.21.0+0" [[deps.Glib_jll]] deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "7c82e6a6cd34e9d935e9aa4051b66c6ff3af59ba" +git-tree-sha1 = "674ff0db93fffcd11a3573986e550d66cd4fd71f" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.80.2+0" +version = "2.80.5+0" [[deps.Graphite2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -542,9 +547,9 @@ version = "1.3.14+0" [[deps.Graphs]] deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "4f2b57488ac7ee16124396de4f2bbdd51b2602ad" +git-tree-sha1 = "1dc470db8b1131cfc7fb4c115de89fe391b9e780" uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.11.0" +version = "1.12.0" [[deps.HarfBuzz_ICU_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "HarfBuzz_jll", "ICU_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] @@ -565,9 +570,9 @@ uuid = "1fa96474-3206-4513-b4fa-23913f296dfc" version = "0.2.2" [[deps.HerbCore]] -git-tree-sha1 = "923877c2715b8166d7ba9f9be2136d70eed87725" +git-tree-sha1 = "98a4c7b30a8a752bb33bddc2475f6554602b588b" uuid = "2b23ba43-8213-43cb-b5ea-38c12b45bd45" -version = "0.3.0" +version = "0.3.1" [[deps.HerbGrammar]] deps = ["AbstractTrees", "DataStructures", "HerbCore", "Serialization", "TreeView"] @@ -588,9 +593,9 @@ uuid = "3008d8e8-f9aa-438a-92ed-26e9c7b4829f" version = "0.3.0" [[deps.HerbSpecification]] -git-tree-sha1 = "5385b81e40c3cd62aeea591319896148036863c9" +git-tree-sha1 = "ce13a9a2b7970686ef4befc2e79c2e6f1a2c4dc6" uuid = "6d54aada-062f-46d8-85cf-a1ceaf058a06" -version = "0.1.0" +version = "0.1.1" [[deps.ICU_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -599,13 +604,14 @@ uuid = "a51ab1cf-af8e-5615-a023-bc2c838bba6b" version = "69.1.0+0" [[deps.Inflate]] -git-tree-sha1 = "ea8031dea4aff6bd41f1df8f2fdfb25b33626381" +git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" -version = "0.1.4" +version = "0.1.5" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" [[deps.IrrationalConstants]] git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" @@ -614,15 +620,15 @@ version = "0.2.2" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" +version = "1.6.1" [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c84a835e1a09b289ffcd2271bf2a337bbdda6637" +git-tree-sha1 = "25ee0be4d43d0269027024d75a24c24d6c6e590c" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.0.3+0" +version = "3.0.4+0" [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -632,20 +638,20 @@ version = "3.0.0+1" [[deps.LLVMOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "d986ce2d884d49126836ea94ed5bfb0f12679713" +git-tree-sha1 = "78211fb6cbc872f77cad3fc0b6cf647d923f4929" uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "15.0.7+0" +version = "18.1.7+0" [[deps.LZO_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "70c5da094887fd2cae843b8db33920bac4b6f07d" +git-tree-sha1 = "854a9c268c43b77b0a27f22d7fab8d33cdb3a731" uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.2+0" +version = "2.10.2+1" [[deps.LaTeXStrings]] -git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.3.1" +version = "1.4.0" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] @@ -655,16 +661,17 @@ version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.4.0+0" +version = "8.6.0+0" [[deps.LibGit2]] deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +version = "1.11.0" [[deps.LibGit2_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" +version = "1.7.2+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] @@ -673,6 +680,7 @@ version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" [[deps.Libffi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -682,21 +690,21 @@ version = "3.2.2+1" [[deps.Libgcrypt_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll"] -git-tree-sha1 = "9fd170c4bbfd8b935fdc5f8b7aa33532c991a673" +git-tree-sha1 = "8be878062e0ffa2c3f67bb58a595375eda5de80b" uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" -version = "1.8.11+0" +version = "1.11.0+0" [[deps.Libgpg_error_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fbb1f2bef882392312feb1ede3615ddc1e9b99ed" +git-tree-sha1 = "c6ce1e19f3aec9b59186bdf06cdf3c4fc5f5f3e6" uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" -version = "1.49.0+0" +version = "1.50.0+0" [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" +git-tree-sha1 = "61dfdba58e585066d8bce214c5a51eaa0539f269" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.17.0+0" +version = "1.17.0+1" [[deps.Libmount_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -719,6 +727,7 @@ version = "2.40.1+0" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" [[deps.LittleCMS_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pkg"] @@ -728,9 +737,9 @@ version = "2.12.0+0" [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" +git-tree-sha1 = "a2d09619db4e765091ee5c6ffe8872849de0feea" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.27" +version = "0.3.28" [deps.LogExpFunctions.extensions] LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" @@ -744,6 +753,7 @@ version = "0.3.27" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" [[deps.MLStyle]] git-tree-sha1 = "bc38dff0548128765760c79eb7388a4b37fae2c8" @@ -759,11 +769,12 @@ version = "0.5.13" [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" +version = "2.28.6+0" [[deps.Missings]] deps = ["DataAPI"] @@ -773,10 +784,11 @@ version = "1.2.0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" +version = "1.11.0" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" +version = "2023.12.12" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -785,7 +797,7 @@ version = "1.2.0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+4" +version = "0.3.27+1" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -795,9 +807,9 @@ version = "2.4.0+0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a12e56c72edee3ce6b96667745e6cbbe5498f200" +git-tree-sha1 = "ad31332567b189f508a3ea8957a2640b1147ab00" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "1.1.23+0" +version = "1.1.23+1" [[deps.OrderedCollections]] git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" @@ -816,9 +828,15 @@ uuid = "30392449-352a-5448-841d-b1acce4e97dc" version = "0.43.4+0" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" +version = "1.11.0" + + [deps.Pkg.extensions] + REPLExt = "REPL" + + [deps.Pkg.weakdeps] + REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Poppler_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "OpenJpeg_jll", "Pkg", "libpng_jll"] @@ -841,14 +859,12 @@ version = "1.4.3" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +version = "1.11.0" [[deps.Random]] deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" [[deps.Requires]] deps = ["UUIDs"] @@ -862,10 +878,12 @@ version = "0.7.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" [[deps.SharedArrays]] deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" +version = "1.11.0" [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] @@ -875,6 +893,7 @@ version = "0.9.4" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" [[deps.SortingAlgorithms]] deps = ["DataStructures"] @@ -885,13 +904,13 @@ version = "1.2.1" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" +version = "1.11.0" [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "9ae599cd7529cfce7fea36cf00a62cfc56f0f37c" +git-tree-sha1 = "777657803913ffc7e8cc20f0fd04b634f871af8f" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.4" +version = "1.9.8" [deps.StaticArrays.extensions] StaticArraysChainRulesCoreExt = "ChainRulesCore" @@ -902,14 +921,19 @@ version = "1.9.4" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [[deps.StaticArraysCore]] -git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.2" +version = "1.4.3" [[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] [[deps.StatsAPI]] deps = ["LinearAlgebra"] @@ -926,7 +950,7 @@ version = "0.34.3" [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.1+1" +version = "7.7.0+0" [[deps.TOML]] deps = ["Dates"] @@ -938,10 +962,6 @@ deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" version = "1.10.0" -[[deps.Test]] -deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - [[deps.TikzGraphs]] deps = ["Graphs", "LaTeXStrings", "TikzPictures"] git-tree-sha1 = "e8f41ed9a2cabf6699d9906c195bab1f773d4ca7" @@ -963,21 +983,23 @@ version = "0.5.1" [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" [[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] -git-tree-sha1 = "52ff2af32e591541550bd753c0da8b9bc92bb9d9" +git-tree-sha1 = "6a451c6f33a176150f315726eba8b92fbfdb9ae7" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.12.7+0" +version = "2.13.4+0" [[deps.XSLT_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] -git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "a54ee957f4c86b526460a720dbc882fa5edcbefc" uuid = "aed1982a-8fda-507f-9586-7b0439959a61" -version = "1.1.34+0" +version = "1.1.41+0" [[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] @@ -1017,9 +1039,9 @@ version = "0.1.1+0" [[deps.Xorg_libxcb_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] -git-tree-sha1 = "b4bfde5d5b652e22b9c790ad00af08b6d042b97d" +git-tree-sha1 = "bcd466676fef0878338c61e655629fa7bbc69d8e" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.15.0+0" +version = "1.17.0+0" [[deps.Xorg_xtrans_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1034,25 +1056,25 @@ version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e678132f07ddb5bfa46857f0d7620fb9be675d3b" +git-tree-sha1 = "555d1076590a6cc2fdee2ef1469451f872d8b41b" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.6+0" +version = "1.5.6+1" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" +version = "5.11.0+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "d7015d2e18a5fd9a4f47de711837e980519781a4" +git-tree-sha1 = "b70c870239dc3d7bc094eb2d6be9b73d27bef280" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.43+1" +version = "1.6.44+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" +version = "1.59.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] diff --git a/docs/src/tutorials/getting_started_with_herb.jl b/docs/src/tutorials/getting_started_with_herb.jl index 1ff6249..d127a6b 100644 --- a/docs/src/tutorials/getting_started_with_herb.jl +++ b/docs/src/tutorials/getting_started_with_herb.jl @@ -1,5 +1,5 @@ ### A Pluto.jl notebook ### -# v0.19.43 +# v0.20.3 using Markdown using InteractiveUtils @@ -129,7 +129,7 @@ begin problem_2 = HerbSpecification.Problem("example2", [HerbSpecification.IOExample(Dict(:x => x), 168) for x ∈ 1:5]) iterator_2 = HerbSearch.BFSIterator(g, :Number, max_depth=4, max_size=30) expr_2, flag_2 = HerbSearch.synth(problem_2, iterator_2) - print(expr_2) + println(expr_2) program_2 = rulenode2expr(expr_2, g) println(program_2) end @@ -145,7 +145,7 @@ In any case, this concludes our first introduction to the `Herb.jl` program synt begin problem_3 = HerbSpecification.Problem("example3", [HerbSpecification.IOExample(Dict(:x => x), 167) for x ∈ 1:5]) expr_3, flag_3 = HerbSearch.synth(problem_3, iterator_2) - print(expr_3) + println(expr_3) program_3 = rulenode2expr(expr_3, g) println(program_3) end @@ -171,9 +171,9 @@ HerbSpecification = "~0.1.0" PLUTO_MANIFEST_TOML_CONTENTS = """ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.4" +julia_version = "1.11.1" manifest_format = "2.0" -project_hash = "ec293deacc6b3fb0969b68da9eec7f6d9738e0e4" +project_hash = "cd9c07437bdefd21fcf7d796e4da704b478fdbbb" [[deps.AbstractTrees]] git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" @@ -182,7 +182,7 @@ version = "0.4.5" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" +version = "1.1.2" [[deps.ArnoldiMethod]] deps = ["LinearAlgebra", "Random", "StaticArrays"] @@ -192,33 +192,35 @@ version = "0.4.0" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd" +git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.8+1" +version = "1.0.8+2" [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "a2f1c8c668c8e3cb4cca4e57a8efdb09067bb3fd" +git-tree-sha1 = "009060c9a6168704143100f36ab08f06c2af4642" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.0+2" +version = "1.18.2+1" [[deps.CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" +version = "0.3.1" [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.15.0" +version = "4.16.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -243,10 +245,12 @@ version = "0.18.20" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" [[deps.DocStringExtensions]] deps = ["LibGit2"] @@ -267,6 +271,7 @@ version = "2.6.2+0" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" +version = "1.11.0" [[deps.Fontconfig_jll]] deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] @@ -288,9 +293,9 @@ version = "0.21.0+0" [[deps.Glib_jll]] deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "7c82e6a6cd34e9d935e9aa4051b66c6ff3af59ba" +git-tree-sha1 = "674ff0db93fffcd11a3573986e550d66cd4fd71f" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.80.2+0" +version = "2.80.5+0" [[deps.Graphite2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -300,9 +305,9 @@ version = "1.3.14+0" [[deps.Graphs]] deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "4f2b57488ac7ee16124396de4f2bbdd51b2602ad" +git-tree-sha1 = "1dc470db8b1131cfc7fb4c115de89fe391b9e780" uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.11.0" +version = "1.12.0" [[deps.HarfBuzz_ICU_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "HarfBuzz_jll", "ICU_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] @@ -323,9 +328,9 @@ uuid = "1fa96474-3206-4513-b4fa-23913f296dfc" version = "0.2.2" [[deps.HerbCore]] -git-tree-sha1 = "923877c2715b8166d7ba9f9be2136d70eed87725" +git-tree-sha1 = "98a4c7b30a8a752bb33bddc2475f6554602b588b" uuid = "2b23ba43-8213-43cb-b5ea-38c12b45bd45" -version = "0.3.0" +version = "0.3.1" [[deps.HerbGrammar]] deps = ["AbstractTrees", "DataStructures", "HerbCore", "Serialization", "TreeView"] @@ -346,9 +351,9 @@ uuid = "3008d8e8-f9aa-438a-92ed-26e9c7b4829f" version = "0.3.0" [[deps.HerbSpecification]] -git-tree-sha1 = "5385b81e40c3cd62aeea591319896148036863c9" +git-tree-sha1 = "ce13a9a2b7970686ef4befc2e79c2e6f1a2c4dc6" uuid = "6d54aada-062f-46d8-85cf-a1ceaf058a06" -version = "0.1.0" +version = "0.1.1" [[deps.ICU_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -357,13 +362,14 @@ uuid = "a51ab1cf-af8e-5615-a023-bc2c838bba6b" version = "69.1.0+0" [[deps.Inflate]] -git-tree-sha1 = "ea8031dea4aff6bd41f1df8f2fdfb25b33626381" +git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" -version = "0.1.4" +version = "0.1.5" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" [[deps.IrrationalConstants]] git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" @@ -372,15 +378,15 @@ version = "0.2.2" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" +version = "1.6.1" [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c84a835e1a09b289ffcd2271bf2a337bbdda6637" +git-tree-sha1 = "25ee0be4d43d0269027024d75a24c24d6c6e590c" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.0.3+0" +version = "3.0.4+0" [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -390,20 +396,20 @@ version = "3.0.0+1" [[deps.LLVMOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "d986ce2d884d49126836ea94ed5bfb0f12679713" +git-tree-sha1 = "78211fb6cbc872f77cad3fc0b6cf647d923f4929" uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "15.0.7+0" +version = "18.1.7+0" [[deps.LZO_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "70c5da094887fd2cae843b8db33920bac4b6f07d" +git-tree-sha1 = "854a9c268c43b77b0a27f22d7fab8d33cdb3a731" uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.2+0" +version = "2.10.2+1" [[deps.LaTeXStrings]] -git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.3.1" +version = "1.4.0" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] @@ -413,16 +419,17 @@ version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.4.0+0" +version = "8.6.0+0" [[deps.LibGit2]] deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +version = "1.11.0" [[deps.LibGit2_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" +version = "1.7.2+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] @@ -431,6 +438,7 @@ version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" [[deps.Libffi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -440,21 +448,21 @@ version = "3.2.2+1" [[deps.Libgcrypt_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll"] -git-tree-sha1 = "9fd170c4bbfd8b935fdc5f8b7aa33532c991a673" +git-tree-sha1 = "8be878062e0ffa2c3f67bb58a595375eda5de80b" uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" -version = "1.8.11+0" +version = "1.11.0+0" [[deps.Libgpg_error_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fbb1f2bef882392312feb1ede3615ddc1e9b99ed" +git-tree-sha1 = "c6ce1e19f3aec9b59186bdf06cdf3c4fc5f5f3e6" uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" -version = "1.49.0+0" +version = "1.50.0+0" [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" +git-tree-sha1 = "61dfdba58e585066d8bce214c5a51eaa0539f269" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.17.0+0" +version = "1.17.0+1" [[deps.Libmount_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -477,6 +485,7 @@ version = "2.40.1+0" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" [[deps.LittleCMS_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pkg"] @@ -486,9 +495,9 @@ version = "2.12.0+0" [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" +git-tree-sha1 = "a2d09619db4e765091ee5c6ffe8872849de0feea" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.27" +version = "0.3.28" [deps.LogExpFunctions.extensions] LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" @@ -502,6 +511,7 @@ version = "0.3.27" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" [[deps.MLStyle]] git-tree-sha1 = "bc38dff0548128765760c79eb7388a4b37fae2c8" @@ -517,11 +527,12 @@ version = "0.5.13" [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" +version = "2.28.6+0" [[deps.Missings]] deps = ["DataAPI"] @@ -531,10 +542,11 @@ version = "1.2.0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" +version = "1.11.0" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" +version = "2023.12.12" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -543,7 +555,7 @@ version = "1.2.0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+4" +version = "0.3.27+1" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -553,9 +565,9 @@ version = "2.4.0+0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a12e56c72edee3ce6b96667745e6cbbe5498f200" +git-tree-sha1 = "ad31332567b189f508a3ea8957a2640b1147ab00" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "1.1.23+0" +version = "1.1.23+1" [[deps.OrderedCollections]] git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" @@ -574,9 +586,15 @@ uuid = "30392449-352a-5448-841d-b1acce4e97dc" version = "0.43.4+0" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" +version = "1.11.0" + + [deps.Pkg.extensions] + REPLExt = "REPL" + + [deps.Pkg.weakdeps] + REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Poppler_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "OpenJpeg_jll", "Pkg", "libpng_jll"] @@ -599,14 +617,12 @@ version = "1.4.3" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +version = "1.11.0" [[deps.Random]] deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" [[deps.Requires]] deps = ["UUIDs"] @@ -620,10 +636,12 @@ version = "0.7.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" [[deps.SharedArrays]] deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" +version = "1.11.0" [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] @@ -633,6 +651,7 @@ version = "0.9.4" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" [[deps.SortingAlgorithms]] deps = ["DataStructures"] @@ -643,13 +662,13 @@ version = "1.2.1" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" +version = "1.11.0" [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "9ae599cd7529cfce7fea36cf00a62cfc56f0f37c" +git-tree-sha1 = "777657803913ffc7e8cc20f0fd04b634f871af8f" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.4" +version = "1.9.8" [deps.StaticArrays.extensions] StaticArraysChainRulesCoreExt = "ChainRulesCore" @@ -660,14 +679,19 @@ version = "1.9.4" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [[deps.StaticArraysCore]] -git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.2" +version = "1.4.3" [[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] [[deps.StatsAPI]] deps = ["LinearAlgebra"] @@ -684,7 +708,7 @@ version = "0.34.3" [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.1+1" +version = "7.7.0+0" [[deps.TOML]] deps = ["Dates"] @@ -696,10 +720,6 @@ deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" version = "1.10.0" -[[deps.Test]] -deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - [[deps.TikzGraphs]] deps = ["Graphs", "LaTeXStrings", "TikzPictures"] git-tree-sha1 = "e8f41ed9a2cabf6699d9906c195bab1f773d4ca7" @@ -721,21 +741,23 @@ version = "0.5.1" [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" [[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] -git-tree-sha1 = "52ff2af32e591541550bd753c0da8b9bc92bb9d9" +git-tree-sha1 = "6a451c6f33a176150f315726eba8b92fbfdb9ae7" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.12.7+0" +version = "2.13.4+0" [[deps.XSLT_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] -git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "a54ee957f4c86b526460a720dbc882fa5edcbefc" uuid = "aed1982a-8fda-507f-9586-7b0439959a61" -version = "1.1.34+0" +version = "1.1.41+0" [[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] @@ -775,9 +797,9 @@ version = "0.1.1+0" [[deps.Xorg_libxcb_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] -git-tree-sha1 = "b4bfde5d5b652e22b9c790ad00af08b6d042b97d" +git-tree-sha1 = "bcd466676fef0878338c61e655629fa7bbc69d8e" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.15.0+0" +version = "1.17.0+0" [[deps.Xorg_xtrans_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -792,25 +814,25 @@ version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e678132f07ddb5bfa46857f0d7620fb9be675d3b" +git-tree-sha1 = "555d1076590a6cc2fdee2ef1469451f872d8b41b" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.6+0" +version = "1.5.6+1" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" +version = "5.11.0+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "d7015d2e18a5fd9a4f47de711837e980519781a4" +git-tree-sha1 = "b70c870239dc3d7bc094eb2d6be9b73d27bef280" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.43+1" +version = "1.6.44+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" +version = "1.59.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] diff --git a/docs/src/tutorials/working_with_interpreters.jl b/docs/src/tutorials/working_with_interpreters.jl index 88f46ee..fc496cf 100644 --- a/docs/src/tutorials/working_with_interpreters.jl +++ b/docs/src/tutorials/working_with_interpreters.jl @@ -1,5 +1,5 @@ ### A Pluto.jl notebook ### -# v0.19.43 +# v0.20.3 using Markdown using InteractiveUtils @@ -52,7 +52,7 @@ symboltable = Dict{Symbol,Any}(:x => 2, :+ => +) # ╔═╡ 2a6f6456-2937-4520-8427-8d7595076ec5 md" -Now we can execute our program through the defaul interpreter available in `HerbInterpret`: +Now we can execute our program through the default interpreter available in `HerbInterpret`: " # ╔═╡ c0dcdbc8-2355-4f4d-85c2-ec37bfeab226 @@ -109,39 +109,6 @@ The idea behind this programming language is that the program specifies a set of As `RuleNode`s only store indices of derivation rules from the grammar, not the functions themselves, we will first pull the function call associated with every derivation rule. In Julia, this is indicated by the top-level symbol of the rules. For example, the top-level symbol for the derivation rule 6 is `:moveRight`; for rule 12, that is `:IF`. " -# ╔═╡ c99860ae-644d-4b72-b176-413095cd9b2c - - -# ╔═╡ 0be36600-9528-46b6-96e6-515e2c338f57 - - -# ╔═╡ 7f960487-8268-4b45-8bed-4e073fbbbb4e - - -# ╔═╡ 4a733a80-e98b-4f87-adf4-f72a16afd0c1 -md"" - -# ╔═╡ b55fa52d-75cc-4311-8387-1e6c2682282f - - -# ╔═╡ 204e7a43-ebc7-4caf-af46-7502be14a314 - - -# ╔═╡ 767cfc7d-de5a-4e86-9198-b99db4760634 - - -# ╔═╡ bd2b8c2d-c9a4-40b5-afcd-214daad9eccd - - -# ╔═╡ f7202e23-56e8-4611-9cde-633156e7e4da - - -# ╔═╡ 9db3b242-a14b-4932-80cd-75c54a21946b - - -# ╔═╡ ceb78d01-8e80-4356-95ad-bac889bc3fc1 - - # ╔═╡ 1f700607-3cdf-43bf-91f2-72de3c9abc85 md" The remaining functions follow a similar idea. (You can see the full implementation of this interpreter [here](https://github.com/Herb-AI/HerbBenchmarks.jl/blob/new-robots/src/data/Robots_2020/robots_primitives.jl))." @@ -161,9 +128,9 @@ HerbInterpret = "~0.1.3" PLUTO_MANIFEST_TOML_CONTENTS = """ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.4" +julia_version = "1.11.1" manifest_format = "2.0" -project_hash = "3d463631c2622b04eb5c06a35c60329ce68a7044" +project_hash = "737cdad29f13c7b9faba263eeed846cdd9576dee" [[deps.AbstractTrees]] git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" @@ -172,7 +139,7 @@ version = "0.4.5" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" +version = "1.1.2" [[deps.ArnoldiMethod]] deps = ["LinearAlgebra", "Random", "StaticArrays"] @@ -182,33 +149,35 @@ version = "0.4.0" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd" +git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.8+1" +version = "1.0.8+2" [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "a2f1c8c668c8e3cb4cca4e57a8efdb09067bb3fd" +git-tree-sha1 = "009060c9a6168704143100f36ab08f06c2af4642" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.0+2" +version = "1.18.2+1" [[deps.CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" +version = "0.3.1" [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.15.0" +version = "4.16.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -228,10 +197,12 @@ version = "0.18.20" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] @@ -246,6 +217,7 @@ version = "2.6.2+0" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" +version = "1.11.0" [[deps.Fontconfig_jll]] deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] @@ -267,9 +239,9 @@ version = "0.21.0+0" [[deps.Glib_jll]] deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "7c82e6a6cd34e9d935e9aa4051b66c6ff3af59ba" +git-tree-sha1 = "674ff0db93fffcd11a3573986e550d66cd4fd71f" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.80.2+0" +version = "2.80.5+0" [[deps.Graphite2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -279,9 +251,9 @@ version = "1.3.14+0" [[deps.Graphs]] deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "ebd18c326fa6cee1efb7da9a3b45cf69da2ed4d9" +git-tree-sha1 = "1dc470db8b1131cfc7fb4c115de89fe391b9e780" uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.11.2" +version = "1.12.0" [[deps.HarfBuzz_ICU_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "HarfBuzz_jll", "ICU_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] @@ -296,9 +268,9 @@ uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" version = "2.8.1+1" [[deps.HerbCore]] -git-tree-sha1 = "923877c2715b8166d7ba9f9be2136d70eed87725" +git-tree-sha1 = "98a4c7b30a8a752bb33bddc2475f6554602b588b" uuid = "2b23ba43-8213-43cb-b5ea-38c12b45bd45" -version = "0.3.0" +version = "0.3.1" [[deps.HerbGrammar]] deps = ["AbstractTrees", "DataStructures", "HerbCore", "Serialization", "TreeView"] @@ -313,9 +285,9 @@ uuid = "5bbddadd-02c5-4713-84b8-97364418cca7" version = "0.1.3" [[deps.HerbSpecification]] -git-tree-sha1 = "5385b81e40c3cd62aeea591319896148036863c9" +git-tree-sha1 = "ce13a9a2b7970686ef4befc2e79c2e6f1a2c4dc6" uuid = "6d54aada-062f-46d8-85cf-a1ceaf058a06" -version = "0.1.0" +version = "0.1.1" [[deps.ICU_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -331,18 +303,19 @@ version = "0.1.5" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" +version = "1.6.1" [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c84a835e1a09b289ffcd2271bf2a337bbdda6637" +git-tree-sha1 = "25ee0be4d43d0269027024d75a24c24d6c6e590c" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.0.3+0" +version = "3.0.4+0" [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -352,20 +325,20 @@ version = "3.0.0+1" [[deps.LLVMOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "d986ce2d884d49126836ea94ed5bfb0f12679713" +git-tree-sha1 = "78211fb6cbc872f77cad3fc0b6cf647d923f4929" uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "15.0.7+0" +version = "18.1.7+0" [[deps.LZO_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "70c5da094887fd2cae843b8db33920bac4b6f07d" +git-tree-sha1 = "854a9c268c43b77b0a27f22d7fab8d33cdb3a731" uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.2+0" +version = "2.10.2+1" [[deps.LaTeXStrings]] -git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.3.1" +version = "1.4.0" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] @@ -375,16 +348,17 @@ version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.4.0+0" +version = "8.6.0+0" [[deps.LibGit2]] deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +version = "1.11.0" [[deps.LibGit2_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" +version = "1.7.2+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] @@ -393,6 +367,7 @@ version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" [[deps.Libffi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -402,21 +377,21 @@ version = "3.2.2+1" [[deps.Libgcrypt_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll"] -git-tree-sha1 = "9fd170c4bbfd8b935fdc5f8b7aa33532c991a673" +git-tree-sha1 = "8be878062e0ffa2c3f67bb58a595375eda5de80b" uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" -version = "1.8.11+0" +version = "1.11.0+0" [[deps.Libgpg_error_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fbb1f2bef882392312feb1ede3615ddc1e9b99ed" +git-tree-sha1 = "c6ce1e19f3aec9b59186bdf06cdf3c4fc5f5f3e6" uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" -version = "1.49.0+0" +version = "1.50.0+0" [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" +git-tree-sha1 = "61dfdba58e585066d8bce214c5a51eaa0539f269" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.17.0+0" +version = "1.17.0+1" [[deps.Libmount_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -439,6 +414,7 @@ version = "2.40.1+0" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" [[deps.LittleCMS_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pkg"] @@ -448,6 +424,7 @@ version = "2.12.0+0" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" [[deps.MacroTools]] deps = ["Markdown", "Random"] @@ -458,18 +435,20 @@ version = "0.5.13" [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" +version = "2.28.6+0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" +version = "1.11.0" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" +version = "2023.12.12" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -478,7 +457,7 @@ version = "1.2.0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+4" +version = "0.3.27+1" [[deps.OpenJpeg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "Pkg", "libpng_jll"] @@ -488,9 +467,9 @@ version = "2.4.0+0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a12e56c72edee3ce6b96667745e6cbbe5498f200" +git-tree-sha1 = "ad31332567b189f508a3ea8957a2640b1147ab00" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "1.1.23+0" +version = "1.1.23+1" [[deps.OrderedCollections]] git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" @@ -509,9 +488,15 @@ uuid = "30392449-352a-5448-841d-b1acce4e97dc" version = "0.43.4+0" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" +version = "1.11.0" + + [deps.Pkg.extensions] + REPLExt = "REPL" + + [deps.Pkg.weakdeps] + REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Poppler_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "OpenJpeg_jll", "Pkg", "libpng_jll"] @@ -534,14 +519,12 @@ version = "1.4.3" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +version = "1.11.0" [[deps.Random]] deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" [[deps.Requires]] deps = ["UUIDs"] @@ -555,10 +538,12 @@ version = "0.7.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" [[deps.SharedArrays]] deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" +version = "1.11.0" [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] @@ -568,17 +553,18 @@ version = "0.9.4" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" +version = "1.11.0" [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "eeafab08ae20c62c44c8399ccb9354a04b80db50" +git-tree-sha1 = "777657803913ffc7e8cc20f0fd04b634f871af8f" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.7" +version = "1.9.8" [deps.StaticArrays.extensions] StaticArraysChainRulesCoreExt = "ChainRulesCore" @@ -594,14 +580,19 @@ uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" version = "1.4.3" [[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.1+1" +version = "7.7.0+0" [[deps.TOML]] deps = ["Dates"] @@ -613,10 +604,6 @@ deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" version = "1.10.0" -[[deps.Test]] -deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - [[deps.TikzGraphs]] deps = ["Graphs", "LaTeXStrings", "TikzPictures"] git-tree-sha1 = "e8f41ed9a2cabf6699d9906c195bab1f773d4ca7" @@ -638,15 +625,17 @@ version = "0.5.1" [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" [[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] -git-tree-sha1 = "d9717ce3518dc68a99e6b96300813760d887a01d" +git-tree-sha1 = "6a451c6f33a176150f315726eba8b92fbfdb9ae7" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.13.1+0" +version = "2.13.4+0" [[deps.XSLT_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "XML2_jll", "Zlib_jll"] @@ -709,25 +698,25 @@ version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e678132f07ddb5bfa46857f0d7620fb9be675d3b" +git-tree-sha1 = "555d1076590a6cc2fdee2ef1469451f872d8b41b" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.6+0" +version = "1.5.6+1" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" +version = "5.11.0+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "d7015d2e18a5fd9a4f47de711837e980519781a4" +git-tree-sha1 = "b70c870239dc3d7bc094eb2d6be9b73d27bef280" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.43+1" +version = "1.6.44+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" +version = "1.59.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] @@ -757,17 +746,6 @@ version = "0.13.1+0" # ╟─f765b471-74f8-4e17-8e1e-e556d88eb84b # ╠═1b251d0f-3a77-494f-a359-d8dc33ad5d44 # ╟─aff77be9-365f-4672-bbd4-07f23528e32e -# ╠═c99860ae-644d-4b72-b176-413095cd9b2c -# ╠═0be36600-9528-46b6-96e6-515e2c338f57 -# ╠═7f960487-8268-4b45-8bed-4e073fbbbb4e -# ╠═4a733a80-e98b-4f87-adf4-f72a16afd0c1 -# ╠═b55fa52d-75cc-4311-8387-1e6c2682282f -# ╠═204e7a43-ebc7-4caf-af46-7502be14a314 -# ╠═767cfc7d-de5a-4e86-9198-b99db4760634 -# ╠═bd2b8c2d-c9a4-40b5-afcd-214daad9eccd -# ╠═f7202e23-56e8-4611-9cde-633156e7e4da -# ╠═9db3b242-a14b-4932-80cd-75c54a21946b -# ╠═ceb78d01-8e80-4356-95ad-bac889bc3fc1 # ╠═1f700607-3cdf-43bf-91f2-72de3c9abc85 # ╟─00000000-0000-0000-0000-000000000001 # ╟─00000000-0000-0000-0000-000000000002 From e15b9bc8e00af9c41020a4127dad1f49d26b6e73 Mon Sep 17 00:00:00 2001 From: Issa Hanou Date: Thu, 14 Nov 2024 16:50:53 +0100 Subject: [PATCH 3/4] mermaid diagrams working with kroki. Pretty tables and ruleno2expr used for nicer reading code outputs in tutorials --- docs/Project.toml | 3 + docs/src/tutorials/abstract_syntax_trees.jl | 131 +++++++++++++----- docs/src/tutorials/advanced_search.jl | 123 ++++++++++++---- .../tutorials/working_with_interpreters.jl | 5 +- 4 files changed, 200 insertions(+), 62 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index f91b5e6..c986945 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -9,11 +9,14 @@ HerbGrammar = "4ef9e186-2fe5-4b24-8de7-9f7291f24af7" HerbInterpret = "5bbddadd-02c5-4713-84b8-97364418cca7" HerbSearch = "3008d8e8-f9aa-438a-92ed-26e9c7b4829f" HerbSpecification = "6d54aada-062f-46d8-85cf-a1ceaf058a06" +Kroki = "b3565e16-c1f2-4fe9-b4ab-221c88942068" Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781" PlutoSliderServer = "2fc8631c-6f24-4c5b-bca7-cbb509c42db4" PlutoStaticHTML = "359b1769-a58e-495b-9770-312e911026ad" PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] Documenter = "1" diff --git a/docs/src/tutorials/abstract_syntax_trees.jl b/docs/src/tutorials/abstract_syntax_trees.jl index 897373f..cd1e312 100644 --- a/docs/src/tutorials/abstract_syntax_trees.jl +++ b/docs/src/tutorials/abstract_syntax_trees.jl @@ -5,13 +5,15 @@ using Markdown using InteractiveUtils # ╔═╡ c784cbc3-19fc-45c9-b344-db10cf7a81fa -begin - using PlutoUI - - using HerbCore - using HerbGrammar - using HerbInterpret -end +# hide +using PlutoUI + +# ╔═╡ 8f3dba2b-cfdc-4042-9ca4-b3bf0dbaf637 +# hide +using Kroki + +# ╔═╡ 4ab41dab-63f0-4ee0-b30d-532513406a0f +using HerbCore, HerbGrammar, HerbInterpret # ╔═╡ 65fbf850-74ae-4ea4-85f0-683095c73fba md""" @@ -45,9 +47,6 @@ We first consider the simple program 5*(x+3). We will define a grammar that is s md""" ### Define the grammar""" -# ╔═╡ 4ab41dab-63f0-4ee0-b30d-532513406a0f - - # ╔═╡ 9f54f013-e8b9-4e0d-8bac-9867f5d1a393 grammar = @csgrammar begin Number = |(0:9) @@ -65,9 +64,8 @@ md""" The AST of this program is shown in the diagram below. The number in each node refers to the index of the corresponding rule in our grammar. """ # ╔═╡ 64c2a6ce-5e3b-413b-bcb7-84936137439f -md""" -```mermaid - flowchart TD +Diagram(:mermaid, """ +flowchart TD id1((13)) --- id2((6)) id1 --- id3((12)) @@ -75,15 +73,14 @@ md""" id5((4)) id3 --- id4 id3 --- id5 -``` -""" +""") # ╔═╡ 29b37a82-d022-453e-bf65-672aa94e4c87 md""" In `Herb.jl`, the `HerbCore.RuleNode` is used to represent both an individual node, but also entire ASTs or sub-trees. This is achieved by nesting instances of `RuleNode`. A `RuleNode` can be instantiated by providing the index of the grammar rule that the node represents and a vector of child nodes. """ # ╔═╡ 822d9601-284d-4d30-9551-605684f83d90 -syntaxtree = RuleNode(13, [RuleNode(6), RuleNode(12, [RuleNode(11), RuleNode(4)])]) +syntaxtree = HerbGrammar.RuleNode(13, [RuleNode(6), RuleNode(12, [RuleNode(11), RuleNode(4)])]) # ╔═╡ 351210d1-20b6-4695-b9fe-f1136d4447d5 md""" @@ -148,8 +145,7 @@ md""" Given the grammar, the AST of `fizzbuzz()` looks like this:""" # ╔═╡ 6a663bce-155b-4c0d-94ec-7dc5fbba348a -md""" -```mermaid +Diagram(:mermaid, """ flowchart TD id1((12)) --- id21((13)) id1--- id22((9)) @@ -195,8 +191,7 @@ flowchart TD id36 --- id410((9)) id410 --- id510((8)) id510 --- id63((1)) -``` -""" +""") # ╔═╡ d9272c48-a7da-4ca0-af15-98c0fe4a3f24 md""" @@ -331,13 +326,15 @@ PLUTO_PROJECT_TOML_CONTENTS = """ HerbCore = "2b23ba43-8213-43cb-b5ea-38c12b45bd45" HerbGrammar = "4ef9e186-2fe5-4b24-8de7-9f7291f24af7" HerbInterpret = "5bbddadd-02c5-4713-84b8-97364418cca7" +Kroki = "b3565e16-c1f2-4fe9-b4ab-221c88942068" PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" [compat] -HerbCore = "~0.2.0" -HerbGrammar = "~0.2.1" -HerbInterpret = "~0.1.2" -PlutoUI = "~0.7.59" +HerbCore = "~0.3.1" +HerbGrammar = "~0.4.0" +HerbInterpret = "~0.1.4" +Kroki = "~1.0.0" +PlutoUI = "~0.7.60" """ # ╔═╡ 00000000-0000-0000-0000-000000000002 @@ -346,7 +343,7 @@ PLUTO_MANIFEST_TOML_CONTENTS = """ julia_version = "1.11.1" manifest_format = "2.0" -project_hash = "d7f8bf7232fa30ef1b0ebfa845c2ec09e025cc88" +project_hash = "7bcd4eed8ad9f87a311a57027c1ef2b213fd532a" [[deps.AbstractPlutoDingetjes]] deps = ["Pkg"] @@ -377,6 +374,11 @@ version = "1.11.0" uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" version = "1.11.0" +[[deps.BitFlags]] +git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" +uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" +version = "0.1.9" + [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1" @@ -389,6 +391,12 @@ git-tree-sha1 = "009060c9a6168704143100f36ab08f06c2af4642" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" version = "1.18.2+1" +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "bce6804e5e6044c6daab27bb533d1295e4a2e759" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.6" + [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] git-tree-sha1 = "b10d0b65641d57b8b4d5e234446582de5047050d" @@ -416,6 +424,12 @@ deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" version = "1.1.1+0" +[[deps.ConcurrentUtilities]] +deps = ["Serialization", "Sockets"] +git-tree-sha1 = "ea32b83ca4fefa1768dc84e504cc0a94fb1ab8d1" +uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" +version = "2.4.2" + [[deps.DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] git-tree-sha1 = "1d0a14036acb104d9e89698bd408f63ab58cdc82" @@ -432,11 +446,23 @@ deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" version = "1.11.0" +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.3" + [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" version = "1.6.0" +[[deps.ExceptionUnwrapping]] +deps = ["Test"] +git-tree-sha1 = "dcb08a0d93ec0b1cdc4af184b26b591e9695423a" +uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" +version = "0.1.10" + [[deps.Expat_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "1c6317308b9dc757616f0b5cb379db10494443a7" @@ -489,6 +515,12 @@ git-tree-sha1 = "1dc470db8b1131cfc7fb4c115de89fe391b9e780" uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" version = "1.12.0" +[[deps.HTTP]] +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "1336e07ba2eb75614c99496501a8f4b233e9fafe" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "1.10.10" + [[deps.HarfBuzz_ICU_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "HarfBuzz_jll", "ICU_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] git-tree-sha1 = "6ccbc4fdf65c8197738c2d68cc55b74b19c97ac2" @@ -502,21 +534,21 @@ uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" version = "2.8.1+1" [[deps.HerbCore]] -git-tree-sha1 = "f3312458fa882d4adaeecadf8f4b5721ec6e3322" +git-tree-sha1 = "98a4c7b30a8a752bb33bddc2475f6554602b588b" uuid = "2b23ba43-8213-43cb-b5ea-38c12b45bd45" -version = "0.2.0" +version = "0.3.1" [[deps.HerbGrammar]] deps = ["AbstractTrees", "DataStructures", "HerbCore", "Serialization", "TreeView"] -git-tree-sha1 = "c5c7fd92a7502459db394115a10669f10643a440" +git-tree-sha1 = "0bd40db4936ad39926246ebddcee7b5df2a332ba" uuid = "4ef9e186-2fe5-4b24-8de7-9f7291f24af7" -version = "0.2.2" +version = "0.4.0" [[deps.HerbInterpret]] deps = ["HerbCore", "HerbGrammar", "HerbSpecification"] -git-tree-sha1 = "3723e5ace26a2f2cd342b28689dea543491687c6" +git-tree-sha1 = "2c1486af643e1abf4b191315db210068994f5b15" uuid = "5bbddadd-02c5-4713-84b8-97364418cca7" -version = "0.1.2" +version = "0.1.4" [[deps.HerbSpecification]] git-tree-sha1 = "ce13a9a2b7970686ef4befc2e79c2e6f1a2c4dc6" @@ -575,6 +607,12 @@ git-tree-sha1 = "25ee0be4d43d0269027024d75a24c24d6c6e590c" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" version = "3.0.4+0" +[[deps.Kroki]] +deps = ["Base64", "CodecZlib", "DocStringExtensions", "HTTP", "JSON", "Markdown", "Reexport"] +git-tree-sha1 = "8ff3884b3f5613214b520d6054f8df8ce0de1396" +uuid = "b3565e16-c1f2-4fe9-b4ab-221c88942068" +version = "1.0.0" + [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" @@ -684,6 +722,12 @@ version = "2.12.0+0" uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" version = "1.11.0" +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "f02b56007b064fbfddb4c9cd60161b6dd0f40df3" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.1.0" + [[deps.MIMEs]] git-tree-sha1 = "65f28ad4b594aebe22157d6fac869786a255b7eb" uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" @@ -700,6 +744,12 @@ deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" version = "1.11.0" +[[deps.MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] +git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.1.9" + [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" @@ -728,6 +778,12 @@ git-tree-sha1 = "76374b6e7f632c130e78100b166e5a48464256f8" uuid = "643b3616-a352-519d-856d-80112ee9badc" version = "2.4.0+0" +[[deps.OpenSSL]] +deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] +git-tree-sha1 = "38cb508d080d21dc1128f7fb04f20387ed4c0af4" +uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" +version = "1.4.3" + [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "ad31332567b189f508a3ea8957a2640b1147ab00" @@ -825,6 +881,11 @@ deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" version = "1.11.0" +[[deps.SimpleBufferStream]] +git-tree-sha1 = "f305871d2f381d21527c770d4788c06c097c9bc1" +uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" +version = "1.2.0" + [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" @@ -901,6 +962,11 @@ git-tree-sha1 = "79e2d29b216ef24a0f4f905532b900dcf529aa06" uuid = "37f6aa50-8035-52d0-81c2-5a1d08754b2d" version = "3.5.0" +[[deps.TranscodingStreams]] +git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.11.3" + [[deps.TreeView]] deps = ["CommonSubexpressions", "Graphs", "MacroTools", "TikzGraphs"] git-tree-sha1 = "41ddcefb625f2ab0f4d9f2081c2da1af2ccbbf8b" @@ -1031,7 +1097,8 @@ version = "0.13.1+0" # ╟─8ff96964-e39e-4762-ae03-e9166e163fca # ╟─bff155ab-ff0e-452b-a8f5-fe744e41a30f # ╟─caa3446e-c5df-4dac-905a-20515f681074 -# ╠═c784cbc3-19fc-45c9-b344-db10cf7a81fa +# ╟─c784cbc3-19fc-45c9-b344-db10cf7a81fa +# ╟─8f3dba2b-cfdc-4042-9ca4-b3bf0dbaf637 # ╠═4ab41dab-63f0-4ee0-b30d-532513406a0f # ╠═9f54f013-e8b9-4e0d-8bac-9867f5d1a393 # ╟─46fbbe87-ee6e-4874-9708-20a42347ff18 diff --git a/docs/src/tutorials/advanced_search.jl b/docs/src/tutorials/advanced_search.jl index ec0ac9c..c312480 100644 --- a/docs/src/tutorials/advanced_search.jl +++ b/docs/src/tutorials/advanced_search.jl @@ -8,13 +8,18 @@ using InteractiveUtils # hide using PlutoUI +# ╔═╡ d52591c1-7544-4543-a4a1-2a1b94bd1d87 +# hide +using PrettyTables + +# ╔═╡ c0748da9-24da-4365-ba67-43bd593d5ea6 +# hide +using Test + # ╔═╡ c4441fa4-09ec-4b81-9681-b13b93a9c9c0 using HerbGrammar, HerbSpecification, HerbSearch, HerbInterpret, HerbConstraints, HerbCore -# ╔═╡ e0b2bfe8-bad3-47a3-803f-04b4a9deb232 -using Test - # ╔═╡ dddca175-3d88-45ce-90da-575c0ba38175 md""" # Advanced Search Procedures in Herb.jl @@ -91,13 +96,19 @@ Solution for max_depth = 3: # ╔═╡ a6fb2e91-b73a-4032-930f-d884abd539e2 solution_1 = @time synth(problem_1, iterator_1) +# ╔═╡ d44afab4-dca1-4507-ab4d-0d2573603fa7 +rulenode2expr(solution_1[1], g_1) + # ╔═╡ d1b02aac-f93d-4643-98da-62eb74933e5b md""" Solution for max_depth = 6: """ # ╔═╡ e1d2cb58-5409-4eed-8ce1-9636e5ee2d1e -solution_2 = @time synth(problem_1, iterator_2) +begin + solution_2 = @time synth(problem_1, iterator_2) + rulenode2expr(solution_2[1], g_1) +end # ╔═╡ 58c1a904-4d87-43f7-bcc3-884a8663c1da md""" @@ -113,14 +124,20 @@ Let's explore how many enumerations are necessary to solve our simple problem. """ # ╔═╡ 3954dd49-07a2-4ec2-91b4-9c9596d5c264 -result = begin - arr = [] +begin + solutions = [] + times = [] + nodes = [] + iterations = [] for i in range(1, 50) iterator = BFSIterator(g_1, :Number, max_depth=i) - solution = @time synth(problem_1, iterator) - push!(arr, solution) + solution = @timed synth(problem_1, iterator) + push!(times, solution.time) + push!(nodes, solution[1][1]) + push!(solutions, rulenode2expr(solution[1][1], g_1)) + push!(iterations, i) end - arr + pretty_table(HTML, [iterations nodes solutions times], header=["Iteration", "RuleNode", "Program", "Duration"]) end # ╔═╡ 9892e91b-9115-4520-9637-f8d7c8905825 @@ -217,16 +234,19 @@ Let's verify that the iterator returns the programs we expect (keep in mind we u # ╔═╡ 07b54acf-0c0d-40ac-ae18-fb26094b4aca answer_programs = [ - RuleNode(1), - RuleNode(2), - RuleNode(3, [RuleNode(1), RuleNode(1)]), - RuleNode(3, [RuleNode(1), RuleNode(2)]), - RuleNode(3, [RuleNode(2), RuleNode(1)]), - RuleNode(3, [RuleNode(2), RuleNode(2)]) + RuleNode(1), + RuleNode(2), + RuleNode(3, [RuleNode(1), RuleNode(1)]), + RuleNode(3, [RuleNode(1), RuleNode(2)]), + RuleNode(3, [RuleNode(2), RuleNode(1)]), + RuleNode(3, [RuleNode(2), RuleNode(2)]) ] +# ╔═╡ a2ce4b5c-da9a-468a-8bf3-5a784e123266 +rulenode_programs = [rulenode2expr(r, g_3) for r in answer_programs] + # ╔═╡ 9efb01cf-b190-4e3e-aa19-11499ba46489 -all(p ∈ programs_bfs for p ∈ answer_programs) +found_all_programs = all(p ∈ programs_bfs for p ∈ answer_programs) # ╔═╡ 0020b79a-6352-4e2d-93f6-2a1d7b03ae2c md""" @@ -358,14 +378,19 @@ Run the following code block to define the iterator and perform the program synt # ╔═╡ 0a30fb40-cd45-4661-a501-ae8e45f1e07e begin - iterator_mh = MHSearchIterator(g_4, :X, examples_mh, cost_function, max_depth=3) - program_mh = synth(problem_mh, iterator_mh) - println("Solution using MH: ", program_mh) + rules = [] + programs = [] + iters = [] + for i in range(1, 3) + iterator_mh = MHSearchIterator(g_4, :X, examples_mh, cost_function, max_depth=3) + program_mh = synth(problem_mh, iterator_mh) + push!(rules, program_mh[1]) + push!(programs, rulenode2expr(program_mh[1], g_4)) + push!(iters, i) + end + pretty_table(HTML, [iters rules programs], header=["Run", "RuleNode", "Program"]) end -# ╔═╡ 3d29e321-e82e-4bf8-8be3-781ab5f561a2 - - # ╔═╡ 700270ea-90bd-474b-91d9-0e5ed329776a md""" ### Very Large Scale Neighbourhood Search @@ -456,7 +481,10 @@ problem_gs, examples_gs = create_problem(e_gs) iterator_gs = GeneticSearchIterator(g_4, :X, examples_gs, population_size = 10, mutation_probability = 0.8, maximum_initial_population_depth = 3) # ╔═╡ 5bef5754-d81b-4160-8ed6-396d02853d9a -program_gs, error_gs = synth(problem_gs, iterator_gs) +begin + program_gs, error_gs = synth(problem_gs, iterator_gs) + rulenode2expr(program_gs, g_4) +end # ╔═╡ 00000000-0000-0000-0000-000000000001 PLUTO_PROJECT_TOML_CONTENTS = """ @@ -468,6 +496,7 @@ HerbInterpret = "5bbddadd-02c5-4713-84b8-97364418cca7" HerbSearch = "3008d8e8-f9aa-438a-92ed-26e9c7b4829f" HerbSpecification = "6d54aada-062f-46d8-85cf-a1ceaf058a06" PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] @@ -478,6 +507,7 @@ HerbInterpret = "~0.1.3" HerbSearch = "~0.3.0" HerbSpecification = "~0.1.0" PlutoUI = "~0.7.59" +PrettyTables = "~2.4.0" """ # ╔═╡ 00000000-0000-0000-0000-000000000002 @@ -486,7 +516,7 @@ PLUTO_MANIFEST_TOML_CONTENTS = """ julia_version = "1.11.1" manifest_format = "2.0" -project_hash = "73f8122c6ae5b467aa0add1406bff57483e6e09d" +project_hash = "edca5a73f01350950590d222b2bce4d0cb1a613d" [[deps.AbstractPlutoDingetjes]] deps = ["Pkg"] @@ -556,6 +586,11 @@ deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" version = "1.1.1+0" +[[deps.Crayons]] +git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.1.1" + [[deps.DataAPI]] git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" @@ -567,6 +602,11 @@ git-tree-sha1 = "1d0a14036acb104d9e89698bd408f63ab58cdc82" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" version = "0.18.20" +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" @@ -725,6 +765,11 @@ git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" version = "0.2.2" +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b" @@ -986,6 +1031,12 @@ git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" uuid = "21216c6a-2e73-6563-6e65-726566657250" version = "1.4.3" +[[deps.PrettyTables]] +deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] +git-tree-sha1 = "1101cd475833706e4d0e7b122218257178f48f34" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "2.4.0" + [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" @@ -1082,6 +1133,12 @@ git-tree-sha1 = "5cf7606d6cef84b543b483848d4ae08ad9832b21" uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" version = "0.34.3" +[[deps.StringManipulation]] +deps = ["PrecompileTools"] +git-tree-sha1 = "a6b1675a536c5ad1a60e5a5153e1fee12eb146e3" +uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" +version = "0.4.0" + [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" @@ -1092,6 +1149,18 @@ deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" version = "1.0.3" +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.12.0" + [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" @@ -1242,6 +1311,8 @@ version = "0.13.1+0" # ╟─dddca175-3d88-45ce-90da-575c0ba38175 # ╟─a93d954d-0f09-4b6d-a3a5-62bfe39681e2 # ╟─6ab37bbc-73e2-4d9a-a8b2-e715a0b61c8f +# ╟─d52591c1-7544-4543-a4a1-2a1b94bd1d87 +# ╟─c0748da9-24da-4365-ba67-43bd593d5ea6 # ╟─61cee94c-2481-4268-823b-ca596592b63c # ╠═c4441fa4-09ec-4b81-9681-b13b93a9c9c0 # ╟─67931820-0f43-41e1-898e-5b5bd55e30d1 @@ -1254,6 +1325,7 @@ version = "0.13.1+0" # ╟─63e97576-1c34-464d-a106-d59d5fb1ee38 # ╠═7e251a07-0041-4dc2-ac09-94fb01075c03 # ╠═a6fb2e91-b73a-4032-930f-d884abd539e2 +# ╠═d44afab4-dca1-4507-ab4d-0d2573603fa7 # ╠═d1b02aac-f93d-4643-98da-62eb74933e5b # ╠═e1d2cb58-5409-4eed-8ce1-9636e5ee2d1e # ╟─58c1a904-4d87-43f7-bcc3-884a8663c1da @@ -1264,7 +1336,6 @@ version = "0.13.1+0" # ╠═9fb40ceb-8d41-491b-8941-20a8b240eb82 # ╠═94e0d676-a9c7-4291-8696-15301e541c30 # ╠═a4a7daed-f89b-44ad-8787-9199c05bf046 -# ╠═e0b2bfe8-bad3-47a3-803f-04b4a9deb232 # ╠═4821fd3a-ff2d-4991-99ad-76608d11b1da # ╟─b2eb08d7-3e53-46c5-84b1-e1fa0e07e291 # ╠═606070e1-83a7-4cca-a716-4fa459f78772 @@ -1278,6 +1349,7 @@ version = "0.13.1+0" # ╠═6aec7358-225a-4764-9a36-da86234b6cf8 # ╟─d3ff497e-d2c2-4df6-8e4c-cdca70fd0677 # ╠═07b54acf-0c0d-40ac-ae18-fb26094b4aca +# ╠═a2ce4b5c-da9a-468a-8bf3-5a784e123266 # ╠═9efb01cf-b190-4e3e-aa19-11499ba46489 # ╟─0020b79a-6352-4e2d-93f6-2a1d7b03ae2c # ╠═db5be2c3-0b36-40b4-bf14-20e2c7063ad7 @@ -1302,7 +1374,6 @@ version = "0.13.1+0" # ╠═afe1872c-6641-4fa0-a53e-50c6b4a712ee # ╟─69e91ae9-8475-47dd-826e-8c229faa11e8 # ╠═0a30fb40-cd45-4661-a501-ae8e45f1e07e -# ╠═3d29e321-e82e-4bf8-8be3-781ab5f561a2 # ╠═700270ea-90bd-474b-91d9-0e5ed329776a # ╠═e6e5c63b-34e8-40d6-bc12-bd31f40b4b16 # ╠═2397f65f-e6b4-4f11-bf66-83440c58b688 diff --git a/docs/src/tutorials/working_with_interpreters.jl b/docs/src/tutorials/working_with_interpreters.jl index fc496cf..69f3760 100644 --- a/docs/src/tutorials/working_with_interpreters.jl +++ b/docs/src/tutorials/working_with_interpreters.jl @@ -5,10 +5,7 @@ using Markdown using InteractiveUtils # ╔═╡ e0a7076c-9345-40ef-a26e-99e8bad31463 -begin - using HerbGrammar - using HerbInterpret -end +using HerbGrammar, HerbInterpret # ╔═╡ 55719688-3940-11ef-1f29-f51dea064ff3 md"# Using the Julia interpreter From e9c9f018b945972433c3a7abd129044effea6590 Mon Sep 17 00:00:00 2001 From: Reuben Gardos Reid <5456207+ReubenJ@users.noreply.github.com> Date: Wed, 4 Dec 2024 14:22:19 +0300 Subject: [PATCH 4/4] Add missing test project deps --- test/Project.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/Project.toml b/test/Project.toml index 52ed959..044e285 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -7,6 +7,8 @@ HerbGrammar = "4ef9e186-2fe5-4b24-8de7-9f7291f24af7" HerbInterpret = "5bbddadd-02c5-4713-84b8-97364418cca7" HerbSearch = "3008d8e8-f9aa-438a-92ed-26e9c7b4829f" HerbSpecification = "6d54aada-062f-46d8-85cf-a1ceaf058a06" +Kroki = "b3565e16-c1f2-4fe9-b4ab-221c88942068" PlutoStaticHTML = "359b1769-a58e-495b-9770-312e911026ad" PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"