Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 22 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
gh release upload --repo runtimeverification/k --clobber "v${version}" "${tarball}"

cachix-release:
name: 'k-framework-binary cachix release'
name: 'Cachix release (binary cache `k-framework-binary` + dependency cache `k-framework`)'
strategy:
matrix:
include:
Expand Down Expand Up @@ -79,7 +79,14 @@ jobs:
with:
name: k-framework-binary

- name: 'Publish K to k-framework-binary cache'
# Both publishes build the same three derivations, so they run as sequential
# steps on one runner: the first populates the local Nix store and the second is
# a store hit. They run independently (continue-on-error) so a flaky upload to
# one cache neither blocks nor masks the other, and a final guard fails the job
# if either push failed.
- name: 'Publish K to k-framework-binary cache (private)'
id: binary
continue-on-error: true
uses: workflow/nix-shell-action@v3.3.2
env:
CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_PRIVATE_KFB_TOKEN }}'
Expand All @@ -91,7 +98,7 @@ jobs:
script: |
# Install kup
export PATH="$(nix build github:runtimeverification/kup --no-link --json | jq -r '.[].outputs | to_entries[].value')/bin:$PATH"

# Publish all three package variants using kup publish
# Using public macOS runner has proven reliable for large file uploads
kup publish --verbose k-framework-binary .#k --keep-days 180 || true
Expand All @@ -101,38 +108,9 @@ jobs:
# kup/cachix pin visibility can be flaky; verify pins and narinfo via public API
bash .github/scripts/check-cachix-pin.sh

cachix-release-dependencies:
name: 'k-framework cachix release'
strategy:
matrix:
include:
- runner: ubuntu-24.04
os: ubuntu-24.04
- runner: macos-latest
os: macos-15
runs-on: ${{ matrix.runner }}
timeout-minutes: 120
steps:
- name: 'Check out code'
uses: actions/checkout@v4

- name: 'Install Nix'
if: ${{ !startsWith(matrix.os, 'self') }}
uses: cachix/install-nix-action@v31.5.1
with:
install_url: https://releases.nixos.org/nix/nix-2.30.1/install
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = http://cache.nixos.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=

- name: 'Install Cachix'
if: ${{ !startsWith(matrix.os, 'self') }}
uses: cachix/cachix-action@v14
with:
name: k-framework-binary

- name: 'Build and cache K and K dependencies'
- name: 'Build and cache K and K dependencies (public)'
id: dependencies
continue-on-error: true
uses: workflow/nix-shell-action@v3
env:
GC_DONT_GC: 1
Expand All @@ -152,6 +130,14 @@ jobs:
DRV_K_OPENSSL_PROCPS_SECP256K1=$(nix-store --query --deriver ${K_OPENSSL_PROCPS_SECP256K1})
nix-store --query --requisites --include-outputs ${DRV_K_OPENSSL_PROCPS_SECP256K1} | cachix push k-framework

- name: 'Fail if either cachix publish failed'
run: |
binary='${{ steps.binary.outcome }}'
dependencies='${{ steps.dependencies.outcome }}'
echo "binary publish: ${binary}"
echo "dependencies publish: ${dependencies}"
[ "${binary}" = 'success' ] && [ "${dependencies}" = 'success' ]

pyk-build-wheel:
name: 'Pyk: Build Python wheel'
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -313,7 +299,7 @@ jobs:
name: 'Publish Release'
runs-on: [self-hosted, linux, normal]
environment: production
needs: [cachix-release, cachix-release-dependencies, source-tarball, ubuntu-jammy, ubuntu-noble, set-release-id]
needs: [cachix-release, source-tarball, ubuntu-jammy, ubuntu-noble, set-release-id]
steps:
- name: 'Check out code'
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion deps/haskell-backend_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.147
v0.1.150
14 changes: 7 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
llvm-backend.inputs.nixpkgs.follows = "nixpkgs";

haskell-backend = {
url = "github:runtimeverification/haskell-backend/v0.1.147";
url = "github:runtimeverification/haskell-backend/v0.1.150";
inputs.rv-nix-tools.follows = "rv-nix-tools";
inputs.nixpkgs.follows = "nixpkgs";
};
Expand Down
2 changes: 1 addition & 1 deletion haskell-backend/src/main/native/haskell-backend
Submodule haskell-backend updated 47 files
+1 −1 CLAUDE.md
+3 −1 booster/hs-backend-booster.cabal
+18 −2 booster/library/Booster/JsonRpc.hs
+78 −0 booster/library/Booster/Log/LogCapture.hs
+1 −1 booster/library/Booster/Pattern/ApplyEquations.hs
+3 −1 booster/library/Booster/Pattern/Implies.hs
+10 −4 booster/library/Booster/Pattern/Match.hs
+13 −1 booster/library/Booster/Pattern/Rewrite.hs
+2 −1 booster/package.yaml
+36 −0 booster/test/rpc-integration/resources/escalate-partial-match.k
+6 −0 booster/test/rpc-integration/resources/escalate-partial-match.kompile
+1 −0 booster/test/rpc-integration/resources/haskell-log-capture.kore
+5 −0 booster/test/rpc-integration/test-escalate-partial-match/params-000.json
+91 −0 booster/test/rpc-integration/test-escalate-partial-match/response-000.json
+65 −0 booster/test/rpc-integration/test-escalate-partial-match/state-000.execute
+23 −0 booster/test/rpc-integration/test-haskell-log-capture/README.md
+4 −0 booster/test/rpc-integration/test-haskell-log-capture/params-contexts.json
+3 −0 booster/test/rpc-integration/test-haskell-log-capture/params-control.json
+4 −0 booster/test/rpc-integration/test-haskell-log-capture/params-proxy-only.json
+1 −0 booster/test/rpc-integration/test-haskell-log-capture/state.execute
+62 −0 booster/test/rpc-integration/test-haskell-log-capture/test.sh
+1 −1 booster/test/rpc-integration/test-log-simplify-json/simplify-log.txt.golden
+239 −143 booster/tools/booster/Proxy.hs
+27 −13 booster/tools/booster/Server.hs
+10 −1 booster/unit-tests/Test/Booster/Fixture.hs
+9 −9 booster/unit-tests/Test/Booster/Pattern/MatchEval.hs
+1 −1 booster/unit-tests/Test/Booster/Pattern/MatchImplies.hs
+41 −3 booster/unit-tests/Test/Booster/Pattern/MatchRewrite.hs
+87 −1 booster/unit-tests/Test/Booster/Pattern/Rewrite.hs
+1 −1 dev-tools/hs-backend-booster-dev-tools.cabal
+1 −0 dev-tools/kore-rpc-dev/Server.hs
+1 −1 dev-tools/package.yaml
+6 −4 docs/2022-07-18-JSON-RPC-Server-API.md
+2 −1 kore-rpc-types/kore-rpc-types.cabal
+16 −2 kore-rpc-types/src/Kore/JsonRpc/Types.hs
+28 −0 kore-rpc-types/src/Kore/JsonRpc/Types/ContextLog.hs
+54 −0 kore-rpc-types/src/Kore/JsonRpc/Types/LogCapture.hs
+2 −1 kore/kore.cabal
+1 −1 kore/src/Kore/Equation/Application.hs
+30 −8 kore/src/Kore/Equation/DebugEquation.hs
+20 −7 kore/src/Kore/JsonRpc.hs
+19 −8 kore/src/Kore/Log/BoosterAdaptor.hs
+1 −1 kore/src/Kore/Log/KoreLogOptions.hs
+115 −0 kore/src/Kore/Log/LogCapture.hs
+1 −1 package/debian/changelog
+1 −1 package/version
+5 −1 scripts/booster-integration-tests.sh
2 changes: 1 addition & 1 deletion install-k
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

K_VERSION=7.1.329
K_VERSION=7.1.333

if [ `id -u` -ne 0 ]; then
echo "$0: error: This script must be run as root."
Expand Down
2 changes: 1 addition & 1 deletion package/debian/kframework/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kframework (7.1.329) unstable; urgency=medium
kframework (7.1.333) unstable; urgency=medium

* Initial Release.

Expand Down
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.1.329
7.1.333
4 changes: 2 additions & 2 deletions pyk/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
project = 'pyk'
author = 'Runtime Verification, Inc'
copyright = '2024, Runtime Verification, Inc'
version = '7.1.329'
release = '7.1.329'
version = '7.1.333'
release = '7.1.333'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
2 changes: 1 addition & 1 deletion pyk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "kframework"
version = "7.1.329"
version = "7.1.333"
description = ""
readme = "README.md"
requires-python = ">=3.10"
Expand Down
7 changes: 7 additions & 0 deletions pyk/src/pyk/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,18 @@ def exec_prove(options: ProveOptions) -> None:

kprove = KProve(kompiled_directory, use_directory=options.temp_directory)

haskell_log_dir: Path | None = None
if options.haskell_logging:
if options.save_directory is None:
raise ValueError('--haskell-logging requires --save-directory to write the per-request log bundles')
haskell_log_dir = options.save_directory / 'haskell-logs'

@contextmanager
def explore_context() -> Iterator[KCFGExplore]:
with cterm_symbolic(
definition=kprove.definition,
definition_dir=kprove.definition_dir,
haskell_log_dir=haskell_log_dir,
) as cts:
yield KCFGExplore(cts)

Expand Down
26 changes: 26 additions & 0 deletions pyk/src/pyk/cli/pyk.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,10 @@ class ProveOptions(LoggingOptions, SpecOptions, SaveDirOptions):
kore_rpc_command: str | Iterable[str] | None
max_depth: int | None
max_iterations: int | None
step_timeout: int | None
assume_defined: bool
show_kcfg: bool
haskell_logging: bool

@staticmethod
def default() -> dict[str, Any]:
Expand All @@ -328,8 +330,10 @@ def default() -> dict[str, Any]:
'kore_rpc_command': None,
'max_depth': None,
'max_iterations': None,
'step_timeout': None,
'assume_defined': False,
'show_kcfg': False,
'haskell_logging': False,
}

@staticmethod
Expand Down Expand Up @@ -513,13 +517,35 @@ def create_argument_parser() -> ArgumentParser:
type=int,
help='Maximum number of KCFG explorations to take in attempting to discharge proof.',
)
prove_args.add_argument(
'--step-timeout',
dest='step_timeout',
type=int,
default=None,
help=(
'Per-step wall-clock budget in whole seconds (floored at 1). When a symbolic-execution step'
' exceeds it, the step is interrupted, its execution depth is halved, and it is retried;'
' proving stops once the depth cannot be reduced further. Omit to disable the timeout.'
),
)
prove_args.add_argument(
'--kore-rpc-command',
dest='kore_rpc_command',
type=str,
default=None,
help='Custom command to start RPC server.',
)
prove_args.add_argument(
'--haskell-logging',
dest='haskell_logging',
default=None,
action='store_true',
help=(
"Request the haskell-backend's per-request log bundle on every RPC and write it to"
' <save-directory>/haskell-logs/<request_id>.jsonl (one JSON value per line).'
' Requires --save-directory.'
),
)

show_args = pyk_args_command.add_parser(
'show',
Expand Down
Loading
Loading