Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a65180a
bump fourmolu and accept reformatting
jberthold Feb 24, 2025
e62cbb5
upgrade hlint to 3.8, ignoring some new hints
jberthold Feb 24, 2025
5505e0c
add missing case to C type conversion function (avoids a warning)
jberthold Feb 24, 2025
e05968e
eliminate all head/tail warnings from the code
jberthold Feb 24, 2025
8685ee5
Format with fourmolu
invalid-email-address Feb 24, 2025
a3d5f0c
prevent hlint from suggestion to use the head function
jberthold Feb 24, 2025
5924c5a
Revert "add missing case to C type conversion function (avoids a warn…
jberthold Feb 10, 2026
890e754
Set compiler ghc-9.10.3 and resolver lts-24.30
jberthold Feb 11, 2026
8de6e47
resolve build dependency version mismatches (by upgrading)
jberthold Feb 11, 2026
d47126b
Fix problems arising from newer GHC and package set (kore)
jberthold Feb 11, 2026
2d6eb10
adjust cabal freeze file to new package set (allow-newer for hashtabl…
jberthold Feb 11, 2026
0000780
booster integration test: Changed expectations (different hashing)
jberthold Feb 11, 2026
3e1b614
WIP use latest nixpkgs-unstable. FIXME!
jberthold Feb 11, 2026
2eaad68
flake.nix: use ghc9103, remove custom package versions
jberthold Feb 11, 2026
22b1e23
WIP reformatting with fourmolu-0.19.0.0 (in nixpkgs)
jberthold Feb 11, 2026
8426ad6
HLint 3.10 (in nixpkgs), suppressing a warning that would harm readab…
jberthold Feb 11, 2026
0d4643f
WIP fiddle with nix flake to allow decision-diagrams package build
jberthold Feb 11, 2026
27698c7
WIP more fiddling with the nix derivation (correct place in the file …
jberthold Feb 12, 2026
dfa4da3
Reapply "add missing case to C type conversion function (avoids a war…
jberthold Feb 13, 2026
12b0d07
Remove foldl' imports to avoid warnings (now in Prelude)
jberthold Feb 13, 2026
5a85e31
Adjust expected output: extended json parse errors, error call stacks…
jberthold Feb 13, 2026
f5851cc
switch all workflow jobs from ubuntu 22.04 to 24.04 (jammy->noble)
jberthold Feb 13, 2026
72e79ec
rename debian package helper files
jberthold Feb 13, 2026
864065b
update cabal freeze file
juliankuners Feb 15, 2026
41cb684
install build-essentials for debian package build
jberthold Feb 18, 2026
3d12b30
Revert "update cabal freeze file"
jberthold Feb 18, 2026
28e4f7e
make `stack` work in the nix develop shell
juliankuners Jul 6, 2026
05c1654
Merge remote-tracking branch 'origin/master' into hs-dependency-upgra…
juliankuners Jul 6, 2026
60b9348
fix cabal build in nix `haskell cabal shell`
juliankuners Jul 7, 2026
7189689
fix crash in kompile & clang caused by hardening flag
juliankuners Jul 7, 2026
3c69dd5
update golden rpc-integration test case
juliankuners Jul 7, 2026
4316c39
Merge branch 'master' into hs-dependency-upgrade-ghc-9.10.3
juliankuners Jul 7, 2026
fb1e909
fourmolu formatting
juliankuners Jul 7, 2026
eb4b40d
Use local nixpkgs rev for `k#kore-integration-tests` nix develop shell
juliankuners Jul 8, 2026
0a78f10
Remove `--update-input haskell-backend` from `nix develop shell`
juliankuners Jul 8, 2026
3e04b7b
Add `shallow=1` in nix develop shell for CI
juliankuners Jul 8, 2026
a5631ed
remove backtraces from integration test outputs in Makefile
juliankuners Jul 9, 2026
4d2243f
remove backtraces from integration test golden outputs
juliankuners Jul 9, 2026
e6a0923
add git to `nix develop .#cabal` shell
juliankuners Jul 9, 2026
318a145
increase timeout for integration test workflow to two hours
juliankuners Jul 9, 2026
ab2786e
empty commit
juliankuners Jul 9, 2026
891c536
debug integration workflow
juliankuners Jul 9, 2026
20dc8d3
fix debug integration workflow
juliankuners Jul 9, 2026
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
6 changes: 3 additions & 3 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ concurrency:
cancel-in-progress: true

env:
ghc_version: "9.6.5"
stack_version: "2.15.1"
ghc_version: "9.10.3"
stack_version: "3.7.1"
hpack_version: '0.36'

jobs:
cache-stack:
name: 'Cache Stack'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Install prerequisites
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
- release

env:
ghc_version: "9.6.5"
stack_version: "2.15.1"
ghc_version: "9.10.3"
stack_version: "3.7.1"
hpack_version: '0.36'

jobs:
Expand Down Expand Up @@ -35,7 +35,7 @@ jobs:
release:
name: 'Release'
needs: draft-release
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Check out code
uses: actions/checkout@v6
Expand All @@ -49,7 +49,7 @@ jobs:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = http://cache.nixos.org https://cache.iog.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=

- name: Install Cachix
uses: cachix/cachix-action@v17
Expand All @@ -73,7 +73,7 @@ jobs:
ubuntu-package:
name: 'Build Ubuntu package'
needs: draft-release
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Check out code
uses: actions/checkout@v6
Expand Down
99 changes: 84 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ concurrency:
cancel-in-progress: true

env:
ghc_version: "9.6.5"
stack_version: "2.15.1"
ghc_version: "9.10.3"
stack_version: "3.7.1"
hpack_version: '0.36'

jobs:
formatting:
name: 'Formatting and Style'
runs-on: ubuntu-22.04
needs: nix-integration-early
runs-on: ubuntu-24.04
steps:
- name: 'Check out code'
uses: actions/checkout@v6
Expand All @@ -33,7 +34,7 @@ jobs:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = http://cache.nixos.org https://cache.iog.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=

# - name: 'Install Cachix'
# uses: cachix/cachix-action@v17
Expand Down Expand Up @@ -61,8 +62,8 @@ jobs:
fail-fast: false
matrix:
include:
- runner: ubuntu-22.04
os: ubuntu-22.04
- runner: ubuntu-24.04
os: ubuntu-24.04
nix: x86_64-linux
- runner: self-macos-latest
os: self-macos-latest
Expand All @@ -89,7 +90,7 @@ jobs:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = http://cache.nixos.org https://cache.iog.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=

# - name: 'Install Cachix'
# if: ${{ !startsWith(matrix.os, 'self') }}
Expand All @@ -99,14 +100,15 @@ jobs:

- name: Build
run: GC_DONT_GC=1 nix build .#kore-exec .#kore-rpc-booster

- name: Test
run: GC_DONT_GC=1 nix develop .#cabal --command bash -c "hpack ./booster && hpack dev-tools && cabal update && cabal build all && cabal test --enable-tests --test-show-details=direct kore-test unit-tests"

nix-integration:
name: 'Nix / Integration'
needs: formatting
runs-on: [self-hosted, linux, normal]
timeout-minutes: 120
steps:
- name: Check out code
uses: actions/checkout@v6
Expand All @@ -122,7 +124,7 @@ jobs:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = http://cache.nixos.org https://cache.iog.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=

# - name: Install Cachix
# uses: cachix/cachix-action@v17
Expand Down Expand Up @@ -166,17 +168,84 @@ jobs:
if: ${{ (steps.changes.outputs.kore == 'true' || steps.changes.outputs.kore_rpc_types == 'true' || steps.changes.outputs.kore_tests == 'true' || steps.changes.outputs.project == 'true') }}
run: |
GC_DONT_GC=1 nix develop github:runtimeverification/k/v$(cat deps/k_release)#kore-integration-tests \
--override-input haskell-backend . --update-input haskell-backend \
--override-input haskell-backend . \
--override-input haskell-backend/nixpkgs \
"github:NixOS/nixpkgs/$(nix eval --raw --impure --expr '(builtins.getFlake ("git+file://" + toString ./. + "?shallow=1")).inputs.nixpkgs.rev')" \
--command bash -c "cd test && make -j2 --output-sync test"

nix-integration-early:
name: 'Nix / Integration (early)'
runs-on: [self-hosted, linux, normal]
timeout-minutes: 120
steps:
- name: Check out code
uses: actions/checkout@v6
with:
# Check out pull request HEAD instead of merge commit.
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive

- name: Install Nix
uses: cachix/install-nix-action@v26
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 https://cache.iog.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=

# - name: Install Cachix
# uses: cachix/cachix-action@v17
# with:
# name: k-framework
# skipPush: true

- uses: dorny/paths-filter@v4
id: changes
with:
filters: |
kore:
- 'kore/**'
kore_rpc_types:
- 'kore-rpc-types/**'
booster:
- 'booster/**'
dev_tools:
- 'dev-tools/**'
project:
- 'stack.yaml*'
- 'cabal.project*'
- 'Makefile'
- '*.mk'
- 'flake.nix'
- 'deps/*'
- scripts/booster-integration-tests.sh
kore_tests:
- 'test/**'

- name: Run kore integration tests
# do not run this unless anything has changed in a relevant directory
if: ${{ (steps.changes.outputs.kore == 'true' || steps.changes.outputs.kore_rpc_types == 'true' || steps.changes.outputs.kore_tests == 'true' || steps.changes.outputs.project == 'true') }}
run: |
echo nix develop github:runtimeverification/k/v$(cat deps/k_release)#kore-integration-tests \
--override-input haskell-backend . \
--override-input haskell-backend/nixpkgs \
"github:NixOS/nixpkgs/$(nix eval --raw --impure --expr '(builtins.getFlake ("git+file://" + toString ./. + "?shallow=1")).inputs.nixpkgs.rev')" \
--command bash -c "cd test && make -j2 --output-sync test"
GC_DONT_GC=1 nix develop github:runtimeverification/k/v$(cat deps/k_release)#kore-integration-tests \
--override-input haskell-backend . \
--override-input haskell-backend/nixpkgs \
"github:NixOS/nixpkgs/$(nix eval --raw --impure --expr '(builtins.getFlake ("git+file://" + toString ./. + "?shallow=1")).inputs.nixpkgs.rev')" \
--command bash -c "cd test && make -j2 --output-sync test"

stack:
name: 'Stack / Unit Tests'
needs: formatting
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Install prerequisites
run: |
sudo apt install --yes debhelper z3 libsecp256k1-dev
sudo apt install --yes build-essential debhelper z3 libsecp256k1-dev

- uses: actions/checkout@v6
with:
Expand Down Expand Up @@ -216,12 +285,12 @@ jobs:
run: stack test kore:kore-test hs-backend-booster:unit-tests

- name: Build Ubuntu package
run: ./package/debian/build-package jammy k-haskell-backend.deb
run: ./package/debian/build-package noble k-haskell-backend.deb

hlint:
name: 'HLint'
needs: formatting
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: 'Check out code'
uses: actions/checkout@v6
Expand All @@ -237,7 +306,7 @@ jobs:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = http://cache.nixos.org https://cache.iog.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=

# - name: 'Install Cachix'
# uses: cachix/cachix-action@v17
Expand Down
13 changes: 12 additions & 1 deletion .hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
# applied to Kore.Rewrite.SMT.Evaluator.evaluate.
- ignore: {name: "Redundant evaluate"}

# This warning should apply to Data.NonEmpty.unzip but is mistakenly
# applied to Data.List.unzip
- ignore: {name: "Avoid NonEmpty.unzip", within: [Booster.Pattern.Rewrite]}

# This suggestion is invalid since ghc-9.8.4 decided to emit a warning about partial functions
- ignore: {name: "Use head"}

# Corporate style
- ignore: {name: "Move brackets to avoid $" }
- ignore: {name: "Use tuple-section"}
Expand Down Expand Up @@ -94,7 +101,11 @@
name: "Redundant bracket"
within:
- Kore.Internal.TermLike.TermLike

# decreases readability
- ignore: {name: "Functor law"}
- ignore: {name: "Move filter"}
- ignore: {name: "Move mapMaybe"}
- ignore: {name: "Move reverse out"}

# Haskell names match K names
- ignore:
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ cd booster/test/rpc-integration && ./runDirectoryTest.sh test-<name>
# First, enter the integration nix shell:
nix develop \
github:runtimeverification/k/v$(cat deps/k_release)#kore-integration-tests \
--override-input haskell-backend . --update-input haskell-backend
--override-input haskell-backend .

# Then:
make test-k # all integration tests
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ To use this nix shell, execute
``` sh
me@somewhere:haskell-backend$ nix develop \
github:runtimeverification/k/v$(cat deps/k_release)#kore-integration-tests \
--override-input haskell-backend . --update-input haskell-backend
--override-input haskell-backend .
...
...(nix output)
integration-shell:me@somewhere:haskell-backend$
Expand Down
12 changes: 6 additions & 6 deletions booster/library/Booster/Builtin/LIST.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ listGetHook [KList _ heads mbRest, intArg] =
if i < headLen
then pure $ Just $ heads !! i -- positive index in range
else -- headLen <= i
case mbRest of
Nothing ->
-- index too large
pure Nothing -- actually #Bottom
Just _ ->
pure Nothing
case mbRest of
Nothing ->
-- index too large
pure Nothing -- actually #Bottom
Just _ ->
pure Nothing
| otherwise -> -- i < 0, negative index, consider rest
case mbRest of
Nothing
Expand Down
3 changes: 1 addition & 2 deletions booster/library/Booster/CLOptions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,7 @@ parseSMTOptions =
( metavar "SMT_ARG"
<> long "smt-arg"
<> help
( "Arguments to be passed to the SMT solver process"
)
("Arguments to be passed to the SMT solver process")
)
)
)
Expand Down
4 changes: 3 additions & 1 deletion booster/library/Booster/Definition/Ceil.hs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ computeCeil (KMap _ keyVals rest) = do
symbols <- mkInKeysMap . (.definition.symbols) <$> getConfig
pure $
[Left $ Predicate $ mkNeq a b | a <- map fst keyVals, b <- map fst keyVals, a /= b]
<> [ Left $ Predicate $ NotBool (mkInKeys symbols a rest') | a <- map fst keyVals, rest' <- maybeToList rest
<> [ Left $ Predicate $ NotBool (mkInKeys symbols a rest')
| a <- map fst keyVals
, rest' <- maybeToList rest
]
<> recArgs
computeCeil (KList _ heads rest) = concatMapM computeCeil $ heads <> maybe [] (uncurry (:)) rest
Expand Down
9 changes: 5 additions & 4 deletions booster/library/Booster/GlobalState.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ data EquationOptions = EquationOptions
{ maxIterations :: Bound "Iterations"
, maxRecursion :: Bound "Recursion"
, maxLocalSteps :: Bound "LocalSteps"
-- ^ how many equations may be applied in place at a rewritten
-- subterm (per chain of in-place rewrites) before falling back
-- to restarting the traversal from the top (0, the default, is
-- restart-only evaluation)
{- ^ how many equations may be applied in place at a rewritten
subterm (per chain of in-place rewrites) before falling back
to restarting the traversal from the top (0, the default, is
restart-only evaluation)
-}
}
deriving stock (Show, Eq)

Expand Down
15 changes: 7 additions & 8 deletions booster/library/Booster/JsonRpc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Data.Foldable
import Data.List (singleton)
import Data.Map.Strict (Map)
import Data.Map.Strict qualified as Map
import Data.Maybe (catMaybes, fromMaybe, isJust, mapMaybe)
import Data.Maybe (catMaybes, fromMaybe, isJust, listToMaybe, mapMaybe)
import Data.Proxy qualified
import Data.Sequence (Seq)
import Data.Set qualified as Set
Expand Down Expand Up @@ -481,9 +481,9 @@ execStateToKoreJson RpcTypes.ExecuteState{term = t, substitution, predicate} =
innerSorts = mapMaybe sortOfJson $ KoreJson.term t : subAndPred
topLevelSort = case innerSorts of
[] -> KoreJson.SortApp (KoreJson.Id "SortGeneratedTopCell") []
xs ->
if all (== head xs) (tail xs) -- we know xs is non-empty, hence `head` is safe here
then KoreJson.SortApp (head xs).name []
x : xs ->
if all (== x) xs
then KoreJson.SortApp x.name []
else KoreJson.SortApp (KoreJson.Id "SortGeneratedTopCell") []
in t
{ KoreJson.term =
Expand All @@ -507,8 +507,7 @@ execResponse req (d, traces, rr) unsupported = case rr of
, nextStates =
Just
$ map
( \(rewritten, ruleMetadata) -> toExecState rewritten (Just ruleMetadata) unsupported
)
(\(rewritten, ruleMetadata) -> toExecState rewritten (Just ruleMetadata) unsupported)
$ toList nexts
, rule = Nothing
, unknownPredicate = Nothing
Expand Down Expand Up @@ -686,10 +685,10 @@ mkLogRewriteTrace
{ reason = "Uncertain about a condition in rule"
, _ruleId = Just $ getUniqueId (uniqueId $ Definition.attributes r)
}
RewriteRemainderPredicate rs _ _ ->
RewriteRemainderPredicate rules _ _ ->
Failure
{ reason = "Uncertain about the remainder after applying a rule"
, _ruleId = Just $ getUniqueId (uniqueId $ Definition.attributes (head rs))
, _ruleId = fmap (getUniqueId . uniqueId . Definition.attributes) $ listToMaybe rules
}
DefinednessUnclear r _ undefReasons ->
Failure
Expand Down
1 change: 1 addition & 0 deletions booster/library/Booster/LLVM/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ cTypeToHs = \case
C.TyDouble -> ''Foreign.C.CDouble
C.TyLDouble -> error "TyLDouble unsupported"
C.TyFloatN _ _ -> error "TyFloatN unsupported"
C.TyBFloat16{} -> error "TyBFloat16 unsupported"
C.TyComplex _floatType -> error "TyComplex unsupported"
C.TyComp _compTypeRef -> error "TyComp unsupported"
C.TyEnum _enumTypeRef -> error "TyEnum unsupported"
Expand Down
Loading