Repository navigation
Add tamarin-prover + its Maude runtime backend (5 packages) #449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c5a4b40
700cc99
16a534a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # BuDDy — a Binary Decision Diagram (BDD) library (C++). A Maude build | ||
| # prerequisite; see pkgmgr-rs#528. | ||
| let { subsetOf, Attrs, BuildSpec, Local, OutputData, OutputLib, Source, .. } = | ||
| import "minimal.ncl" | ||
| in | ||
| let base = import "../base/build.ncl" in | ||
| let make = import "../make/build.ncl" in | ||
| let toolchain = import "../toolchain/build.ncl" in | ||
| let glibc = import "../glibc/build.ncl" in | ||
| let gcc = import "../gcc/build.ncl" in | ||
| let version = "2.4" in | ||
| { | ||
| name = "buddy", | ||
| build_deps = [ | ||
| { file = "build.sh" } | Local, | ||
| { | ||
| url = "gs://minimal-staging-archives/buddy-%{version}.tar.gz", | ||
| sha256 = "8cfe7d86537a0d7edb44e2cbf0624716b55adcafb10140751c40ad9430f3d0b8", | ||
| extract = true, | ||
| strip_prefix = "buddy-%{version}", | ||
| } | Source, | ||
| base, | ||
| make, | ||
| toolchain, | ||
| ], | ||
| runtime_deps = [ | ||
| glibc, | ||
| subsetOf gcc ["libgcc", "libstdcpp"], | ||
| ], | ||
| cmd = "./build.sh", | ||
| build_args = { | ||
| include version, | ||
| }, | ||
| outputs = { | ||
| libs = { glob = "usr/lib/*.{a,so*}" } | OutputLib, | ||
| includes = { glob = "usr/include/**" } | OutputData, | ||
| }, | ||
| attrs = | ||
| { | ||
| upstream_version = version, | ||
| # BuDDy ships its own permissive academic license (Jørn Lind-Nielsen, in | ||
| # src/*.h): grants use / derivative works / distribute for any purpose with | ||
| # attribution + no-warranty, and lets modifications be relicensed. No exact | ||
| # SPDX match — GitHub licensee returns NOASSERTION; the closest standard is | ||
| # SWL (identical disclaimer + modification clause) but the grant wording | ||
| # differs — so a LicenseRef per minimal convention (cf. LicenseRef-Public-Domain). | ||
| license_spdx = "LicenseRef-BuDDy", | ||
| source_provenance = { | ||
| category = 'GithubRepo, | ||
| owner = "utwente-fmt", | ||
| repo = "buddy", | ||
| }, | ||
| } | Attrs, | ||
| } | BuildSpec |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/bin/bash | ||
| # BuDDy — standard automake, but the release tarball ships configure/install-sh | ||
| # WITHOUT the execute bit (noted in Maude's INSTALL), so restore it first. C++. | ||
| set -euo pipefail | ||
|
|
||
| chmod +x configure install-sh 2>/dev/null || true | ||
|
|
||
| export CFLAGS="-O2 -pipe -gno-record-gcc-switches -ffile-prefix-map=$(pwd)=/builddir" | ||
| export CXXFLAGS="$CFLAGS" | ||
| export LDFLAGS="-Wl,--build-id=none" | ||
|
|
||
| ./configure \ | ||
| --prefix=/usr \ | ||
| --enable-shared \ | ||
| --disable-static \ | ||
| --enable-deterministic-archives | ||
|
|
||
| make -j"$(nproc)" | ||
| make DESTDIR="$OUTPUT_DIR" install | ||
|
|
||
| find "$OUTPUT_DIR" -name '*.la' -delete |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # libsigsegv — GNU library for page-fault / stack-overflow handling in user | ||
| # mode. A Maude (rewriting engine) build prerequisite; see pkgmgr-rs#528. | ||
| let { Attrs, BuildSpec, Local, OutputData, OutputLib, Source, .. } = import "minimal.ncl" in | ||
| let base = import "../base/build.ncl" in | ||
| let make = import "../make/build.ncl" in | ||
| let toolchain = import "../toolchain/build.ncl" in | ||
| let glibc = import "../glibc/build.ncl" in | ||
| let version = "2.14" in | ||
| { | ||
| name = "libsigsegv", | ||
| build_deps = [ | ||
| { file = "build.sh" } | Local, | ||
| { | ||
| url = "gs://minimal-staging-archives/libsigsegv-%{version}.tar.gz", | ||
| sha256 = "cdac3941803364cf81a908499beb79c200ead60b6b5b40cad124fd1e06caa295", | ||
| extract = true, | ||
| strip_prefix = "libsigsegv-%{version}", | ||
| } | Source, | ||
| base, | ||
| make, | ||
| toolchain, | ||
| ], | ||
| runtime_deps = [ | ||
| glibc, | ||
| ], | ||
| cmd = "./build.sh", | ||
| build_args = { | ||
| include version, | ||
| }, | ||
| outputs = { | ||
| libs = { glob = "usr/lib/*.{a,so*}" } | OutputLib, | ||
| includes = { glob = "usr/include/**" } | OutputData, | ||
| }, | ||
| attrs = | ||
| { | ||
| upstream_version = version, | ||
| license_spdx = "GPL-2.0-or-later", | ||
| source_provenance = { | ||
| category = 'GnuProject, | ||
| name = "libsigsegv", | ||
| }, | ||
| } | Attrs, | ||
| } | BuildSpec |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/bin/bash | ||
| # libsigsegv — standard GNU autotools. Source is pre-extracted (extract=true), | ||
| # so we configure in-tree. Shared lib only (Maude links it dynamically). | ||
| set -euo pipefail | ||
|
|
||
| export CFLAGS="-O2 -pipe -gno-record-gcc-switches -ffile-prefix-map=$(pwd)=/builddir" | ||
| export LDFLAGS="-Wl,--build-id=none" | ||
|
|
||
| ./configure \ | ||
| --prefix=/usr \ | ||
| --enable-shared \ | ||
| --disable-static \ | ||
| --enable-deterministic-archives | ||
|
|
||
| make -j"$(nproc)" | ||
| make DESTDIR="$OUTPUT_DIR" install | ||
|
|
||
| # Drop libtool archives — they embed absolute build-time paths. | ||
| find "$OUTPUT_DIR" -name '*.la' -delete |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # libtecla (Tecla) — interactive command-line editing library. A Maude build | ||
| # prerequisite; see pkgmgr-rs#528. MIT-style permissive (Martin C. Shepherd). | ||
| # Upstream is an academic site (sites.astro.caltech.edu) with no git host or | ||
| # canonical release archive, so the tarball is mirrored to gs:// like the other | ||
| # archive sources; there is no `source_provenance` category that fits it. | ||
| let { Attrs, BuildSpec, Local, OutputData, OutputLib, Source, .. } = import "minimal.ncl" in | ||
| let base = import "../base/build.ncl" in | ||
| let make = import "../make/build.ncl" in | ||
| let toolchain = import "../toolchain/build.ncl" in | ||
| let ncurses = import "../ncurses/build.ncl" in | ||
| let glibc = import "../glibc/build.ncl" in | ||
| let version = "1.6.3" in | ||
| { | ||
| name = "libtecla", | ||
| build_deps = [ | ||
| { file = "build.sh" } | Local, | ||
| # libtecla's bundled config.guess/config.sub are from 2003 and don't know | ||
| # aarch64; build.sh overwrites them with these modern (2024) GNU config | ||
| # scripts so configure can canonicalize the build triple on both arches. | ||
| # FETCHED, not vendored — the pair is ~4k lines / ~90 KB, and the pkgs repo | ||
| # is cloned by every consumer. Immutable, sha256-pinned. (#528) | ||
| { | ||
| url = "gs://minimal-staging-archives/build-aux/gnu-config-config.guess", | ||
| sha256 = "e3d148130e9151735f8b9a8e69a70d06890ece51468a9762eb7ac0feddddcc2f", | ||
| extract = false, | ||
| } | Source, | ||
| { | ||
| url = "gs://minimal-staging-archives/build-aux/gnu-config-config.sub", | ||
| sha256 = "11c54f55c3ac99e5d2c3dc2bb0bcccbf69f8223cc68f6b2438daa806cf0d16d8", | ||
| extract = false, | ||
| } | Source, | ||
| { | ||
| url = "gs://minimal-staging-archives/libtecla-%{version}.tar.gz", | ||
| sha256 = "f2757cc55040859fcf8f59a0b7b26e0184a22bece44ed9568a4534a478c1ee1a", | ||
| extract = true, | ||
| # The tarball entries are `./libtecla/…` (a leading `./`), so a | ||
| # `strip_prefix = "libtecla"` doesn't match — extract as-is and `cd | ||
| # libtecla` in build.sh instead. Tecla builds in its own source tree. | ||
| } | Source, | ||
| base, | ||
| make, | ||
| toolchain, | ||
| ncurses, | ||
| ], | ||
| runtime_deps = [ | ||
| glibc, | ||
| ncurses, | ||
| ], | ||
| cmd = "./build.sh", | ||
| build_args = { | ||
| include version, | ||
| }, | ||
| outputs = { | ||
| libs = { glob = "usr/lib/*.{a,so*}" } | OutputLib, | ||
| includes = { glob = "usr/include/**" } | OutputData, | ||
| }, | ||
| attrs = | ||
| { | ||
| upstream_version = version, | ||
| license_spdx = "MIT", | ||
| } | Attrs, | ||
| } | BuildSpec |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #!/bin/bash | ||
| # libtecla — an autoconf configure plus a custom install target | ||
| # (install_lib/install_inc/install_man/install_bin) that predates DESTDIR, so we | ||
| # redirect the install via the LIBDIR/INCDIR overrides below. Builds in its own | ||
| # source tree (it can't build in a subdir). #528. | ||
| set -euo pipefail | ||
|
|
||
| # libtecla's bundled config.guess/config.sub are from 2003 (pre-aarch64), so | ||
| # configure "cannot guess build type". Overwrite them with the modern GNU config | ||
| # scripts (fetched as Sources — see build.ncl) before configuring. | ||
| cp gnu-config-config.guess libtecla/config.guess | ||
| cp gnu-config-config.sub libtecla/config.sub | ||
|
|
||
| # The tarball extracts to `./libtecla/` (no strip_prefix), so enter it first. | ||
| cd libtecla | ||
| chmod +x config.guess config.sub | ||
|
|
||
| export CFLAGS="-O2 -pipe -gno-record-gcc-switches -ffile-prefix-map=$(pwd)=/builddir" | ||
| export LDFLAGS="-Wl,--build-id=none" | ||
|
|
||
| ./configure --prefix=/usr | ||
| make | ||
|
|
||
| # libtecla's Makefile has no DESTDIR and copies to $(LIBDIR)/$(INCDIR) — which | ||
| # configure already substituted to /usr/lib, /usr/include, NOT $(prefix)/… — so | ||
| # override those dir vars directly to redirect the install under $OUTPUT_DIR. | ||
| # (There's a rule that mkdir's them.) Only the lib + header are wanted; skip the | ||
| # demo programs (install_bin) + man pages (install_man). | ||
| make install_lib install_inc \ | ||
| LIBDIR="$OUTPUT_DIR/usr/lib" \ | ||
| INCDIR="$OUTPUT_DIR/usr/include" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| # Maude — a high-performance reflective rewriting-logic engine (C++). The runtime | ||
| # backend tamarin-prover shells out to. Source-built: the release ships prebuilt | ||
| # linux-x86_64 only (no aarch64), and minimal builds both arches. Links minimal's | ||
| # SHARED gmp/libsigsegv/libtecla/buddy — Maude's INSTALL assumes STATIC libs (and | ||
| # hides the .so's), but minimal ships them --disable-static, so we link | ||
| # dynamically. CVC4 + Yices2 SMT backends disabled to start. See pkgmgr-rs#528. | ||
| let { subsetOf, Attrs, BuildSpec, Local, OutputBin, OutputData, Source, .. } = | ||
| import "minimal.ncl" | ||
| in | ||
| let base = import "../base/build.ncl" in | ||
| let make = import "../make/build.ncl" in | ||
| let toolchain = import "../toolchain/build.ncl" in | ||
| let autoconf = import "../autoconf/build.ncl" in | ||
| let automake = import "../automake/build.ncl" in | ||
| let libtool = import "../libtool/build.ncl" in | ||
| let m4 = import "../m4/build.ncl" in | ||
| let flex = import "../flex/build.ncl" in | ||
| let bison = import "../bison/build.ncl" in | ||
| let gmp = import "../gmp/build.ncl" in | ||
| let libsigsegv = import "../libsigsegv/build.ncl" in | ||
| let libtecla = import "../libtecla/build.ncl" in | ||
| let buddy = import "../buddy/build.ncl" in | ||
| let ncurses = import "../ncurses/build.ncl" in | ||
| let glibc = import "../glibc/build.ncl" in | ||
| let gcc = import "../gcc/build.ncl" in | ||
| let version = "3.5.1" in | ||
| { | ||
| name = "maude", | ||
| build_deps = [ | ||
| { file = "build.sh" } | Local, | ||
| { | ||
| url = "gs://minimal-staging-archives/maude-%{version}.tar.gz", | ||
| sha256 = "3dce4f7b42fae2430a08ab2663303d1be244792bb3cc365c58cdb2f3f7bff170", | ||
| extract = true, | ||
| strip_prefix = "Maude-Maude%{version}", | ||
| } | Source, | ||
| base, | ||
| make, | ||
| toolchain, | ||
| autoconf, | ||
| automake, | ||
| libtool, | ||
| m4, | ||
| flex, | ||
| bison, | ||
| gmp, | ||
| libsigsegv, | ||
| libtecla, | ||
| buddy, | ||
| ncurses, | ||
| ], | ||
| runtime_deps = [ | ||
| glibc, | ||
| gmp, | ||
| libsigsegv, | ||
| libtecla, | ||
| buddy, | ||
| ncurses, | ||
| subsetOf gcc ["libgcc", "libstdcpp"], | ||
| ], | ||
| cmd = "./build.sh", | ||
| build_args = { | ||
| include version, | ||
| }, | ||
| outputs = { | ||
| maude = { glob = "usr/bin/maude" } | OutputBin, | ||
| share = { glob = "usr/share/**" } | OutputData, | ||
| }, | ||
| attrs = | ||
| { | ||
| upstream_version = version, | ||
| license_spdx = "GPL-2.0-or-later", | ||
| source_provenance = { | ||
| category = 'GithubRepo, | ||
| owner = "maude-lang", | ||
| repo = "Maude", | ||
| }, | ||
| build_cost_multiple = 5, | ||
| } | Attrs, | ||
| } | BuildSpec |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| #!/bin/bash | ||
| # Maude — C++ rewriting engine. The github tag archive is raw git source (no | ||
| # generated build scripts), so autoreconf first. Maude's INSTALL links 3rd-party | ||
| # libs STATICALLY (and hides the .so's to force it); minimal ships them | ||
| # --disable-static (shared only), so we link DYNAMICALLY — configure's default | ||
| # *_LIB flags already point at the shared libs (see below). CVC4 + Yices2 | ||
| # disabled to start. See pkgmgr-rs#528. | ||
| set -euo pipefail | ||
|
|
||
| export CFLAGS="-O2 -pipe -fno-stack-protector -gno-record-gcc-switches -ffile-prefix-map=$(pwd)=/builddir" | ||
| export CXXFLAGS="$CFLAGS" | ||
| export LDFLAGS="-Wl,--build-id=none -L/usr/lib" | ||
| export CPPFLAGS="-I/usr/include" | ||
|
|
||
| # The tag archive has no generated ./configure — build it. | ||
| autoreconf -i | ||
|
|
||
| # Maude's configure defaults the link vars to the right DYNAMIC `-l` flags when | ||
| # they're unset — GMP_LIBS="-lgmpxx -lgmp", LIBSIGSEGV_LIB="-lsigsegv", | ||
| # BUDDY_LIB="-lbdd" — and AUTO-DETECTS TECLA_LIBS="-ltecla -lncurses" (tecla needs | ||
| # a terminfo lib; hardcoding "-ltecla" would drop it). So we pass none of them and | ||
| # just disable the SMT backends (not packaged). --enable-compiler is experimental | ||
| # and not needed for tamarin's use — leave it off (default). | ||
| ./configure \ | ||
| --prefix=/usr \ | ||
| --with-cvc4=no \ | ||
| --with-yices2=no | ||
|
|
||
| make -j"$(nproc)" | ||
| make DESTDIR="$OUTPUT_DIR" install | ||
|
|
||
| # Smoke-test: maude's compiled-in prelude path is the runtime /usr/share (absent | ||
| # in the build sandbox), so point MAUDE_LIB at the freshly-installed share dir | ||
| # and REQUIRE a version print. The sandbox hides stdout, but a nonzero exit here | ||
| # fails the build — so this genuinely proves the binary links + finds its | ||
| # prelude, not just that `make install` ran. (#528) | ||
| export MAUDE_LIB="$OUTPUT_DIR/usr/share" | ||
| ver_out="$("$OUTPUT_DIR/usr/bin/maude" --version 2>&1 || true)" | ||
| echo "maude --version → $ver_out" | ||
| echo "$ver_out" | grep -qE "3\.5" \ | ||
| || { echo "smoke test FAILED: maude did not print its version (got: '$ver_out')" >&2; exit 1; } | ||
|
Comment on lines
+32
to
+41
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '--- packages/maude/build.sh ---\n'
nl -ba packages/maude/build.sh | sed -n '1,120p'
printf '\n--- search for MAUDE_LIB / version smoke test references ---\n'
rg -n "MAUDE_LIB|--version|findPrelude|smoke test" packages/maude -S || trueRepository: gominimal/pkgs Length of output: 243 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '--- packages/maude/build.sh ---'
nl -ba packages/maude/build.sh | sed -n '1,140p'
echo
echo '--- search for MAUDE_LIB / version smoke test references ---'
rg -n "MAUDE_LIB|--version|findPrelude|smoke test" packages/maude -S || trueRepository: gominimal/pkgs Length of output: 224 🌐 Web query:
💡 Result: In Maude 3.5.1, the MAUDE_LIB environment variable is the standard mechanism used to specify the directory where the system searches for the prelude.maude file and other library files [1][2]. When the Maude interpreter starts, it searches for the required prelude file in the following locations, in order [1][3]: 1. The directories specified in the MAUDE_LIB environment variable [1][3]. 2. The directory containing the Maude executable [1]. 3. The current working directory [1]. If you are experiencing issues with finding the prelude, you can define MAUDE_LIB to point to the directory containing your prelude.maude file [2]. Regarding the command line syntax mentioned: - There is no standard command-line argument called --version or findPrelude in the Maude executable itself that outputs this information [4][1]. The Maude binary is typically invoked simply as maude [1][2]. - If you are writing C++ code and interacting with the Maude source code, the logic for locating the prelude is handled internally by the interpreter's initialization routines, which check these environment variables and directory paths [1][3]. - If you are using the Maude bindings (e.g., in Python), the library provides an init function where you can explicitly control whether the prelude is loaded using the loadPrelude parameter [5]. If you need to verify where your environment is looking, you can check the value of the environment variable in your terminal using the command echo $MAUDE_LIB [6]. If it is unset or incorrect, you can set it in your shell configuration (e.g., export MAUDE_LIB=/path/to/maude/lib) [2]. Citations:
🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '--- packages/maude/build.sh ---'
cat -n packages/maude/build.sh | sed -n '1,160p'
echo
echo '--- search for MAUDE_LIB / version smoke test references ---'
rg -n "MAUDE_LIB|--version|findPrelude|smoke test|prelude" packages/maude -S || trueRepository: gominimal/pkgs Length of output: 3140 🌐 Web query:
💡 Result: In the Maude source code, main.cc serves as the entry point for the Maude interpreter [1][2]. The internal function findPrelude is responsible for locating the standard prelude.maude file, which is essential for the initialization of the Maude environment. Regarding the command-line usage, Maude does not use the specific syntax main.cc --version to display version information. Instead, you can verify the version of the installed Maude interpreter by executing the maude command directly in your terminal, which typically displays the version banner upon startup, or by checking the release notes and documentation provided in the official repository [3][2][4]. Maude 3.5.1 is a released version of the software, as documented in the project's official GitHub repository [3][5]. Citations:
🏁 Script executed: #!/bin/bash
set -euo pipefail
sed -n '1,160p' packages/maude/build.shRepository: gominimal/pkgs Length of output: 2119 Exercise a prelude-backed reduction here instead of 🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: gominimal/pkgs
Length of output: 3403
🏁 Script executed:
Repository: gominimal/pkgs
Length of output: 6239
🏁 Script executed:
Repository: gominimal/pkgs
Length of output: 1699
🏁 Script executed:
Repository: gominimal/pkgs
Length of output: 1830
🏁 Script executed:
Repository: gominimal/pkgs
Length of output: 1100
Add deterministic archive flags to the remaining autotools builds.
packages/maude/build.sh: pass--enable-deterministic-archivesand remove*.laafter install.packages/libtecla/build.sh: pass--enable-deterministic-archives.📍 Affects 4 files
packages/maude/build.sh#L10-L30(this comment)packages/buddy/build.sh#L8-L10packages/libsigsegv/build.sh#L6-L7packages/libtecla/build.sh#L17-L30🤖 Prompt for AI Agents
Source: Coding guidelines