diff --git a/README.md b/README.md index d2d1594..7f59b3d 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ nix fmt # format Nix sources (treefmt) Tests live in `t/` and run under [cl-weave](https://github.com/nerima-lisp/cl-weave), the org's test framework; parser-table invariants are additionally checked as executable -[cl-prolog](https://github.com/nerima-lisp/cl-prolog) queries. The suite also +[cl-prolog-kit](https://github.com/nerima-lisp/cl-prolog-kit) queries. The suite also runs from a raw checkout without Nix: ```sh diff --git a/cl-parser-kit.asd b/cl-parser-kit.asd index 5772bf1..6890463 100644 --- a/cl-parser-kit.asd +++ b/cl-parser-kit.asd @@ -16,7 +16,7 @@ :source-control (:git "https://github.com/nerima-lisp/cl-parser-kit.git") ;; DEPENDENCY_POLICY.md places this package at L1 (general-purpose ;; utility): the runtime system depends on nothing outside the standard. - ;; cl-weave and cl-prolog are test-only and belong to cl-parser-kit/test. + ;; cl-weave and cl-prolog-kit are test-only and belong to cl-parser-kit/test. :depends-on () :pathname "src" :serial t @@ -67,7 +67,7 @@ :homepage "https://github.com/nerima-lisp/cl-parser-kit" :bug-tracker "https://github.com/nerima-lisp/cl-parser-kit/issues" :source-control (:git "https://github.com/nerima-lisp/cl-parser-kit.git") - :depends-on ("cl-parser-kit" "cl-weave" "cl-prolog/weave") + :depends-on ("cl-parser-kit" "cl-weave" "cl-prolog-kit/weave") :pathname "t" :serial t :components diff --git a/docs/src/getting-started.md b/docs/src/getting-started.md index 1d7a8f8..97348be 100644 --- a/docs/src/getting-started.md +++ b/docs/src/getting-started.md @@ -1,7 +1,7 @@ # Getting Started The library system (`cl-parser-kit`) has **no runtime dependencies** — only -the test system (`cl-parser-kit-test`) pulls in `cl-weave` and `cl-prolog`. +the test system (`cl-parser-kit-test`) pulls in `cl-weave` and `cl-prolog-kit`. Loading it into an application never drags in the test tooling. ## ASDF @@ -56,11 +56,11 @@ To load the repository test system explicitly: (asdf:load-system :cl-parser-kit-test) ``` -The test system depends on `cl-weave` and `cl-prolog`, which are not +The test system depends on `cl-weave` and `cl-prolog-kit`, which are not distributed through Quicklisp/Ultralisp; the Nix dev shell (`nix develop`) and `nix flake check` resolve the pinned versions automatically. Outside Nix, make matching checkouts of [`cl-weave`](https://github.com/nerima-lisp/cl-weave) -and [`cl-prolog`](https://github.com/nerima-lisp/cl-prolog) discoverable by +and [`cl-prolog-kit`](https://github.com/nerima-lisp/cl-prolog-kit) discoverable by ASDF (see [`scripts/bootstrap.lisp`](https://github.com/nerima-lisp/cl-parser-kit/blob/main/scripts/bootstrap.lisp) for the exact roots it expects). Running the library itself never requires these. @@ -73,7 +73,7 @@ From a repository checkout on a supported system, run the full suite with: nix flake check ``` -This resolves the pinned `cl-weave` and `cl-prolog` test dependencies, runs +This resolves the pinned `cl-weave` and `cl-prolog-kit` test dependencies, runs the full suite, generates the coverage report, and checks Lisp structure with `paredit-cli`. diff --git a/docs/src/index.md b/docs/src/index.md index 128fb04..5de1e89 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -91,7 +91,7 @@ usable. The current codebase includes: - exported resource-limit specials so hostile input fails gracefully instead of exhausting memory or the control stack - a test system wired into `asdf:test-system`, with parser-table invariants - additionally checked as executable `cl-prolog/weave` queries + additionally checked as executable `cl-prolog-kit/weave` queries - runnable examples under `examples/`, regression-tested as user-facing workflows @@ -137,11 +137,11 @@ The [flake.nix](https://github.com/nerima-lisp/cl-parser-kit/blob/main/flake.nix at the repository root packages `cl-parser-kit` as a Nix flake: - `nix develop` — a devShell with SBCL and Perl, with `CL_PARSER_KIT_CL_WEAVE_ROOT` - and `CL_PARSER_KIT_CL_PROLOG_ROOT` pre-wired to the pinned test dependencies, + and `CL_PARSER_KIT_CL_PROLOG_KIT_ROOT` pre-wired to the pinned test dependencies, and [`paredit-cli`](https://github.com/nerima-lisp/paredit-cli) for structural S-expression lint checks. - `nix flake check` — the full reproducible CI gate: the library package - build, the `cl-weave`/`cl-prolog` test suite, the 90%/80% coverage gate, + build, the `cl-weave`/`cl-prolog-kit` test suite, the 90%/80% coverage gate, `paredit-lint`, the `nixfmt` formatting gate, and the `--strict` docs build, for `x86_64-linux`, `aarch64-linux`, and `aarch64-darwin`. - `nix build .#docs` — builds this documentation site with MkDocs (Material) diff --git a/docs/src/project/development.md b/docs/src/project/development.md index 71f9725..d73e1a0 100644 --- a/docs/src/project/development.md +++ b/docs/src/project/development.md @@ -45,11 +45,11 @@ Tests live in `t/` and run under `scripts/bootstrap.lisp` loads the project and its two test dependencies by reading the `.asd` forms directly, so the suite runs from a raw checkout without an ASDF source registry. Point it at the dependencies either by placing -`cl-weave` and `cl-prolog` next to this checkout, or by setting: +`cl-weave` and `cl-prolog-kit` next to this checkout, or by setting: ```sh export CL_PARSER_KIT_CL_WEAVE_ROOT=/path/to/cl-weave -export CL_PARSER_KIT_CL_PROLOG_ROOT=/path/to/cl-prolog +export CL_PARSER_KIT_CL_PROLOG_KIT_ROOT=/path/to/cl-prolog-kit sbcl --script run-tests.lisp ``` diff --git a/docs/src/reference/api.md b/docs/src/reference/api.md index 2d8c1ad..0f94218 100644 --- a/docs/src/reference/api.md +++ b/docs/src/reference/api.md @@ -627,7 +627,7 @@ AST and CST helpers keep tree-shaped output simple and explicit. ## Testing -The repository test system runs on `cl-weave`, with `cl-prolog/weave` +The repository test system runs on `cl-weave`, with `cl-prolog-kit/weave` providing declarative contract checks for parser behavior. - primary entry point: `asdf:test-system "cl-parser-kit-test"` diff --git a/flake.lock b/flake.lock index a452bfe..9920aa3 100644 --- a/flake.lock +++ b/flake.lock @@ -25,7 +25,7 @@ "cl-nix-forge_2": { "inputs": { "nixpkgs": [ - "cl-prolog", + "cl-prolog-kit", "nixpkgs" ], "treefmt-nix": "treefmt-nix_2" @@ -68,7 +68,7 @@ "type": "github" } }, - "cl-prolog": { + "cl-prolog-kit": { "inputs": { "cl-nix-forge": "cl-nix-forge_2", "cl-weave": [ @@ -85,17 +85,17 @@ ] }, "locked": { - "lastModified": 1785918678, - "narHash": "sha256-Xr2Ga1qzz08MApO5N4v+bs/wmCC4FdJlYyjsC8TnXxU=", + "lastModified": 1786948477, + "narHash": "sha256-3qn9W1Jmbxnr0Si77J7Klo26oX/zjgBVwb5ye74NsTY=", "owner": "nerima-lisp", - "repo": "cl-prolog", - "rev": "7581f72c7d080afd4c863e1d44010ccb5d7258ad", + "repo": "cl-prolog-kit", + "rev": "239368e1001bc3a8576d45770c9e91da11515d09", "type": "github" }, "original": { "owner": "nerima-lisp", - "ref": "v1.4.3", - "repo": "cl-prolog", + "ref": "v1.5.0", + "repo": "cl-prolog-kit", "type": "github" } }, @@ -185,7 +185,7 @@ "root": { "inputs": { "cl-nix-forge": "cl-nix-forge", - "cl-prolog": "cl-prolog", + "cl-prolog-kit": "cl-prolog-kit", "cl-weave": "cl-weave", "nixpkgs": "nixpkgs", "paredit-cli": "paredit-cli", @@ -237,7 +237,7 @@ "treefmt-nix_2": { "inputs": { "nixpkgs": [ - "cl-prolog", + "cl-prolog-kit", "cl-nix-forge", "nixpkgs" ] diff --git a/flake.nix b/flake.nix index b32d8db..07457dc 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - # cl-weave and cl-prolog are the test-only dependencies of the + # cl-weave and cl-prolog-kit are the test-only dependencies of the # `cl-parser-kit/test` system (see cl-parser-kit.asd `:depends-on`). # # Both are full flakes now, where they used to be `flake = false` source @@ -49,8 +49,8 @@ inputs.paredit-cli.follows = "paredit-cli"; inputs.treefmt-nix.follows = "treefmt-nix"; }; - cl-prolog = { - url = "github:nerima-lisp/cl-prolog/v1.4.3"; + cl-prolog-kit = { + url = "github:nerima-lisp/cl-prolog-kit/v1.5.0"; inputs.nixpkgs.follows = "nixpkgs"; inputs.cl-weave.follows = "cl-weave"; inputs.paredit-cli.follows = "paredit-cli"; @@ -82,7 +82,7 @@ nixpkgs, cl-nix-forge, cl-weave, - cl-prolog, + cl-prolog-kit, paredit-cli, treefmt-nix, }: @@ -105,32 +105,32 @@ # cl-weave as an ASDF SYSTEM, for `lispCheckDependencies`. # # Taken straight off the flake rather than rebuilt from its source with - # `lispDerivation`, which is what cl-json-kit and cl-prolog still do: + # `lispDerivation`, which is what cl-json-kit and cl-prolog-kit still do: # v1.1.0 is migrated, so `packages..cl-weave` IS the # registry-composable ASDF system. (`packages.default` is a different # thing -- the delivered CLI binary -- and is not what belongs here.) clWeaveSystem = ctx: cl-weave.packages.${ctx.system}.cl-weave; - # cl-prolog as an ASDF SYSTEM. Built from the input's source because + # cl-prolog-kit as an ASDF SYSTEM. Built from the input's source because # v1.1.0 predates its own migration: it has no `cl-nix-forge` input at - # all, so there is no `packages.cl-prolog` attribute to consume. + # all, so there is no `packages.cl-prolog-kit` attribute to consume. # - # `cl-prolog/weave` and not `cl-prolog`: that is the system + # `cl-prolog-kit/weave` and not `cl-prolog-kit`: that is the system # cl-parser-kit.asd names, so building it is what validates the thing # actually needed. The derivation still carries the whole source tree, # so the other systems in the same .asd stay resolvable. clPrologSystem = ctx: ctx.cl.lispDerivation { - pname = "cl-prolog"; - version = ctx.cl.fromAsdSystem "${cl-prolog}/cl-prolog.asd"; - src = cl-prolog; - lispSystem = "cl-prolog/weave"; + pname = "cl-prolog-kit"; + version = ctx.cl.fromAsdSystem "${cl-prolog-kit}/cl-prolog-kit.asd"; + src = cl-prolog-kit; + lispSystem = "cl-prolog-kit/weave"; lispDependencies = [ (clWeaveSystem ctx) ]; }; # scripts/bootstrap.lisp does NOT use `asdf:load-system` for cl-weave - # and cl-prolog: it reads their `.asd` `defsystem` forms and `load`s the + # and cl-prolog-kit: it reads their `.asd` `defsystem` forms and `load`s the # listed source files itself. So it never consults CL_SOURCE_REGISTRY, # and cl-nix-forge composing that registry transitively -- correct as it # is, and what makes `lispCheckDependencies` above worth declaring -- @@ -147,7 +147,7 @@ # gain -- bootstrap loads `.lisp` files, never fasls. dependencyRoots = { CL_PARSER_KIT_CL_WEAVE_ROOT = "${cl-weave}"; - CL_PARSER_KIT_CL_PROLOG_ROOT = "${cl-prolog}"; + CL_PARSER_KIT_CL_PROLOG_KIT_ROOT = "${cl-prolog-kit}"; }; # `nix run .#test`, and through `apps.default` the README's headline @@ -320,7 +320,7 @@ treefmt.evalModule = treefmt-nix.lib.evalModule; # The interactive-only extras, and only those. sbcl, cl-weave and - # cl-prolog all arrive through `inputsFrom` on the derivation the preset + # cl-prolog-kit all arrive through `inputsFrom` on the derivation the preset # builds this shell from -- the CHECK-ENABLED one, whose `registryPath` # carries `lispCheckDependencies` -- so naming any of them again here # would be a second source of truth. Verified with diff --git a/scripts/bootstrap.lisp b/scripts/bootstrap.lisp index 2ec13c4..36e7de9 100644 --- a/scripts/bootstrap.lisp +++ b/scripts/bootstrap.lisp @@ -6,8 +6,8 @@ (defparameter *test-dependency-specs* '(("CL_PARSER_KIT_CL_WEAVE_ROOT" "cl-weave" "cl-weave.asd" ("cl-weave")) - ("CL_PARSER_KIT_CL_PROLOG_ROOT" "cl-prolog" "cl-prolog.asd" - ("cl-prolog" "cl-prolog/weave")))) + ("CL_PARSER_KIT_CL_PROLOG_KIT_ROOT" "cl-prolog-kit" "cl-prolog-kit.asd" + ("cl-prolog-kit" "cl-prolog-kit/weave")))) (defun current-project-root () *project-root*) diff --git a/t/prolog-contract-test.lisp b/t/prolog-contract-test.lisp index 3163a55..d22f0cf 100644 --- a/t/prolog-contract-test.lisp +++ b/t/prolog-contract-test.lisp @@ -18,21 +18,21 @@ (ecase fixity (:prefix (let ((entry (gethash key (pratt-table-prefixes table)))) - (cl-prolog:make-clause + (cl-prolog-kit:make-clause `(operator ,key :prefix ,(cl-parser-kit::pratt-prefix-entry-binding-power entry) ,(cl-parser-kit::pratt-prefix-entry-binding-power entry)) nil))) (:infix (let ((entry (gethash key (pratt-table-infixes table)))) - (cl-prolog:make-clause + (cl-prolog-kit:make-clause `(operator ,key :infix ,(cl-parser-kit::pratt-infix-entry-left-binding-power entry) ,(cl-parser-kit::pratt-infix-entry-right-binding-power entry)) nil))) (:postfix (let ((entry (gethash key (pratt-table-postfixes table)))) - (cl-prolog:make-clause + (cl-prolog-kit:make-clause `(operator ,key :postfix ,(cl-parser-kit::pratt-postfix-entry-binding-power entry) ,(cl-parser-kit::pratt-postfix-entry-binding-power entry)) @@ -47,12 +47,12 @@ (%pratt-operator-clause table :bang :postfix))) (contract-clauses (list - (cl-prolog:make-clause '(associativity :plus :left) nil) - (cl-prolog:make-clause '(associativity :star :left) nil) - (cl-prolog:make-clause '(precedence-edge :bang :star) nil) - (cl-prolog:make-clause '(precedence-edge :star :plus) nil)))) + (cl-prolog-kit:make-clause '(associativity :plus :left) nil) + (cl-prolog-kit:make-clause '(associativity :star :left) nil) + (cl-prolog-kit:make-clause '(precedence-edge :bang :star) nil) + (cl-prolog-kit:make-clause '(precedence-edge :star :plus) nil)))) (let ((rulebase - (cl-prolog:prolog + (cl-prolog-kit:prolog ((higher-priority ?higher ?lower) (precedence-edge ?higher ?lower)) ((higher-priority ?higher ?lower) @@ -62,9 +62,9 @@ (operator ?operator :infix ?left-binding ?right-binding) (associativity ?operator :left))))) (dolist (clause (append operator-clauses contract-clauses) rulebase) - (cl-prolog:rulebase-insert-clause! rulebase clause))))) + (cl-prolog-kit:rulebase-insert-clause! rulebase clause))))) -(cl-prolog/weave:deftest-queries pratt-relational-contracts +(cl-prolog-kit/weave:deftest-queries pratt-relational-contracts ((%make-pratt-contract-rulebase)) ("projects the registered Pratt table as relational data" (operator ?operator ?fixity ?left ?right)