Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into new-type-inference
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott-Guest committed Oct 16, 2023
2 parents f05088a + f34edc7 commit 72c2109
Show file tree
Hide file tree
Showing 91 changed files with 718 additions and 560 deletions.
9 changes: 1 addition & 8 deletions .github/actions/with-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,13 @@ runs:
run: |
set -euxo pipefail
Z3_VERSION=4.8.15
Z3_VERSION=$(cat deps/z3)
K_VERSION=$(cat ${SUBDIR}package/version)
USER=$(id -un)
USER_ID=$(id -u)
GROUP=$(id -gn)
GROUP_ID=$(id -g)
docker build ${SUBDIR} \
--build-arg USER=${USER} --build-arg USER_ID=${USER_ID} \
--build-arg GROUP=${GROUP} --build-arg GROUP_ID=${GROUP_ID} \
--build-arg BASE_OS=${BASE_OS} \
--build-arg BASE_DISTRO=${BASE_DISTRO} \
--tag z3:${BASE_DISTRO}-${Z3_VERSION} \
--file ${SUBDIR}${DOCKERFILE}.z3
docker build ${SUBDIR} \
--build-arg USER=${USER} --build-arg USER_ID=${USER_ID} \
--build-arg GROUP=${GROUP} --build-arg GROUP_ID=${GROUP_ID} \
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
ARG BASE_OS
ARG BASE_DISTRO
ARG K_VERSION

ARG Z3_VERSION
FROM z3:${BASE_DISTRO}-${Z3_VERSION} as Z3
FROM runtimeverificationinc/z3:${BASE_OS}-${BASE_DISTRO}-${Z3_VERSION} as Z3

ARG BASE_OS
ARG BASE_DISTRO
Expand Down Expand Up @@ -46,6 +47,7 @@ RUN apt-get update \
libncurses5-dev \
libnss3-dev \
libreadline-dev \
libsecp256k1-dev \
libsqlite3-dev \
libssl-dev \
libyaml-dev \
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/Dockerfile.stack-deps
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ RUN apt-get update \
&& apt-get upgrade --yes \
&& apt-get install --yes \
curl \
libtinfo-dev
libsecp256k1-dev \
libtinfo-dev \
pkg-config

RUN curl -sSL https://get.haskellstack.org/ | sh

Expand All @@ -31,4 +33,4 @@ RUN cd /home/$USER/.tmp-haskell && stack build --only-snapshot
ENV LC_ALL=C.UTF-8
ADD --chown=$USER:$GROUP hs-backend-booster/src/main/native/hs-backend-booster/stack.yaml /home/$USER/.tmp-booster/
ADD --chown=$USER:$GROUP hs-backend-booster/src/main/native/hs-backend-booster/package.yaml /home/$USER/.tmp-booster/
RUN cd /home/$USER/.tmp-booster && stack build --only-snapshot
RUN cd /home/$USER/.tmp-booster && stack build --only-snapshot
24 changes: 0 additions & 24 deletions .github/workflows/Dockerfile.z3

This file was deleted.

68 changes: 8 additions & 60 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
- name: Upload release.nix
uses: ttuegel/upload-release.nix@v1.0
uses: runtimeverification/upload-release.nix@v1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -117,59 +117,7 @@ jobs:
name: kore-exec.tar.gz
path: |
**/kore-exec.tar.gz
ubuntu-focal:
name: 'K Ubuntu Focal Package'
runs-on: [self-hosted, linux, normal]
timeout-minutes: 90
steps:
- uses: actions/checkout@v3
- name: 'Build and Test Package'
uses: ./.github/actions/test-package
with:
os: ubuntu
distro: focal
llvm: 12
jdk: 11
pkg-name: kframework_amd64_ubuntu_focal.deb
build-package: package/debian/build-package focal
test-package: package/debian/test-package
- name: 'Upload Package to Release'
env:
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }}
run: |
set -x
version=$(cat package/version)
cp kframework_amd64_ubuntu_focal.deb kframework_${version}_amd64_ubuntu_focal.deb
gh release upload --repo runtimeverification/k --clobber v${version} kframework_${version}_amd64_ubuntu_focal.deb
- name: 'Build, Test, and Push Dockerhub Image'
shell: bash {0}
env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
DOCKERHUB_REPO: runtimeverificationinc/kframework-k
run: |
set -euxo pipefail
version=$(cat package/version)
version_tag=ubuntu-focal-${version}
docker login --username rvdockerhub --password ${DOCKERHUB_PASSWORD}
docker image build . --file package/docker/Dockerfile.ubuntu-focal --tag ${DOCKERHUB_REPO}:${version_tag}
docker run --name k-package-docker-test-focal-${GITHUB_SHA} --rm -it --detach ${DOCKERHUB_REPO}:${version_tag}
docker exec -t k-package-docker-test-focal-${GITHUB_SHA} bash -c 'cd ~ && echo "module TEST imports BOOL endmodule" > test.k'
docker exec -t k-package-docker-test-focal-${GITHUB_SHA} bash -c 'cd ~ && kompile test.k --backend llvm'
docker exec -t k-package-docker-test-focal-${GITHUB_SHA} bash -c 'cd ~ && kompile test.k --backend haskell'
docker image push ${DOCKERHUB_REPO}:${version_tag}
- name: 'Clean up Docker Container'
if: always()
run: |
docker stop --time=0 k-package-docker-test-focal-${GITHUB_SHA}
- name: On Failure, Upload the kore-exec.tar.gz file to the Summary Page
if: failure()
uses: actions/upload-artifact@v2
with:
name: kore-exec.tar.gz
path: |
**/kore-exec.tar.gz
debian-bookworm:
name: 'K Debian Bookworm Package'
runs-on: [self-hosted, linux, normal]
Expand Down Expand Up @@ -220,7 +168,7 @@ jobs:
macos-build:
name: 'Build MacOS Package'
runs-on: macos-11
runs-on: macos-13
timeout-minutes: 120
environment: production
needs: [set-release-id, source-tarball]
Expand Down Expand Up @@ -273,7 +221,7 @@ jobs:
git commit Formula/$PACKAGE.rb -m "Update ${PACKAGE} to ${VERSION}: part 1"
../kframework/package/macos/brew-build-and-update-to-local-bottle ${PACKAGE} ${VERSION} ${ROOT_URL}
git reset HEAD^
LOCAL_BOTTLE_NAME=$(basename $(find . -name "kframework--${VERSION}.big_sur.bottle*.tar.gz"))
LOCAL_BOTTLE_NAME=$(basename $(find . -name "kframework--${VERSION}.ventura.bottle*.tar.gz"))
BOTTLE_NAME=$(echo ${LOCAL_BOTTLE_NAME#./} | sed 's!kframework--!kframework-!')
../kframework/package/macos/brew-update-to-final ${PACKAGE} ${VERSION} ${ROOT_URL}
echo "path=${LOCAL_BOTTLE_NAME}" >> ${GITHUB_OUTPUT}
Expand Down Expand Up @@ -302,7 +250,7 @@ jobs:

macos-test:
name: 'Test MacOS Package'
runs-on: macos-11
runs-on: macos-13
timeout-minutes: 60
environment: production
needs: [macos-build, set-release-id]
Expand Down Expand Up @@ -400,7 +348,7 @@ jobs:
name: 'Publish Release'
runs-on: [self-hosted, linux, normal]
environment: production
needs: [nix-release, macos-build, macos-test, source-tarball, ubuntu-jammy, ubuntu-focal, debian-bookworm, set-release-id, arch]
needs: [nix-release, macos-build, macos-test, source-tarball, ubuntu-jammy, debian-bookworm, set-release-id, arch]
steps:
- name: 'Check out code'
uses: actions/checkout@v3
Expand All @@ -416,7 +364,7 @@ jobs:
server-id: runtime.verification.snapshots
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

# Build and Run Tests in Docker
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
Expand Down Expand Up @@ -477,7 +425,7 @@ jobs:
run: |
sudo apt update --yes
sudo apt install --yes wget texlive-xetex
sudo wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin version=5.42.0
sudo wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin version=5.44.0
sudo wget https://github.com/jgm/pandoc/releases/download/2.18/pandoc-2.18-1-amd64.deb -O /tmp/pandoc.deb
sudo dpkg -i /tmp/pandoc.deb
- name: 'Checkout code and set up web build'
Expand Down
2 changes: 1 addition & 1 deletion deps/hs-backend-booster_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6c2f5ab988e2c5f98b1cdeb04b8a5787d8a7c566
5a283f7c85c5b4f66ff477b494c5d138c54706e6
1 change: 1 addition & 0 deletions deps/z3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.12.1
42 changes: 21 additions & 21 deletions flake.lock

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

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
description = "K Framework";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.05";
haskell-backend.url = "github:runtimeverification/haskell-backend/63397c713d21322434d572281c1407d929a1189e";
haskell-backend.url = "github:runtimeverification/haskell-backend/cdc83446c302961cd6abd2bca8c3e73dde8f6eab";
booster-backend = {
url = "github:runtimeverification/hs-backend-booster/6c2f5ab988e2c5f98b1cdeb04b8a5787d8a7c566";
url = "github:runtimeverification/hs-backend-booster/5a283f7c85c5b4f66ff477b494c5d138c54706e6";
# NB booster-backend will bring in another dependency on haskell-backend,
# but the two are not necessarily the same (different more often than not).
# We get two transitive dependencies on haskell-nix.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public List<Module> getKompileModules() {
mods.add(new AbstractModule() {
@Override
protected void configure() {
binder().requireAtInjectOnConstructors();
bindOptions(HaskellBackendKModule.this::kompileOptions, binder());
installHaskellBackend(binder());
}
Expand Down Expand Up @@ -54,6 +55,7 @@ public List<Module> getKRunModules() {
return Collections.singletonList(new AbstractModule() {
@Override
protected void configure() {
binder().requireAtInjectOnConstructors();
installHaskellRewriter(binder());
}
});
Expand All @@ -74,6 +76,7 @@ public List<Module> getKProveModules() {
return Collections.singletonList(new AbstractModule() {
@Override
protected void configure() {
binder().requireAtInjectOnConstructors();
installHaskellBackend(binder());
installHaskellRewriter(binder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
package org.kframework.backend.haskell;

import com.beust.jcommander.Parameter;
import com.google.inject.Inject;
import org.kframework.backend.kore.ModuleToKORE;
import org.kframework.utils.inject.RequestScoped;
import org.kframework.utils.options.BaseEnumConverter;

@RequestScoped
public class HaskellKRunOptions {
@Inject
public HaskellKRunOptions() {}

@Parameter(names="--haskell-backend-command", descriptionKey = "command",
description="Command to run the Haskell backend execution engine.", hidden = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
package org.kframework.backend.haskell;

import com.beust.jcommander.Parameter;
import com.google.inject.Inject;
import org.kframework.utils.inject.RequestScoped;

@RequestScoped
public class HaskellKompileOptions {

@Inject
public HaskellKompileOptions() {}
@Parameter(names="--haskell-backend-command", description="Command to run the Haskell backend execution engine.", descriptionKey = "command", hidden = true)
public String haskellBackendCommand = "kore-exec";

Expand Down
2 changes: 1 addition & 1 deletion haskell-backend/src/main/native/haskell-backend
Submodule haskell-backend updated 72 files
+3 −3 .github/workflows/release.yml
+3 −3 .github/workflows/test.yml
+1 −0 cabal.project.freeze
+1 −1 deps/k_release
+9 −0 docs/hooks.md
+5 −6 flake.nix
+2 −1 kore-rpc-types/kore-rpc-types.cabal
+7 −1 kore-rpc-types/src/Kore/JsonRpc/Types.hs
+26 −5 kore-rpc-types/src/Kore/Syntax/Json/Types.hs
+2 −1 kore/app/rpc/Main.hs
+3 −0 kore/kore.cabal
+2 −2 kore/src/Kore/Attribute/Pattern/ConstructorLike.hs
+2 −2 kore/src/Kore/Attribute/Pattern/Defined.hs
+2 −2 kore/src/Kore/Attribute/Pattern/Function.hs
+4 −4 kore/src/Kore/Attribute/Pattern/Simplified.hs
+2 −2 kore/src/Kore/Attribute/Pattern/Total.hs
+40 −0 kore/src/Kore/Builtin/Krypto.hs
+6 −6 kore/src/Kore/Internal/From.hs
+10 −10 kore/src/Kore/Internal/Predicate.hs
+8 −8 kore/src/Kore/Internal/TermLike.hs
+8 −6 kore/src/Kore/Internal/TermLike/TermLike.hs
+1 −1 kore/src/Kore/JsonRpc.hs
+16 −6 kore/src/Kore/Parser/Parser.y
+2 −2 kore/src/Kore/Rewrite/SMT/Translate.hs
+2 −2 kore/src/Kore/Simplify/And.hs
+3 −3 kore/src/Kore/Simplify/Or.hs
+8 −8 kore/src/Kore/Simplify/Predicate.hs
+2 −2 kore/src/Kore/Simplify/SubstitutionSimplifier.hs
+5 −0 kore/src/Kore/Syntax.hs
+17 −11 kore/src/Kore/Syntax/And.hs
+61 −0 kore/src/Kore/Syntax/BinaryAnd.hs
+86 −0 kore/src/Kore/Syntax/BinaryOr.hs
+13 −11 kore/src/Kore/Syntax/Json/Internal.hs
+25 −20 kore/src/Kore/Syntax/Or.hs
+36 −4 kore/src/Kore/Validate/PatternVerifier.hs
+21 −0 kore/src/Options/SMT.hs
+4 −1 kore/src/SMT.hs
+10 −2 kore/src/SMT/SimpleSMT.hs
+16 −2 kore/test/Test/Kore.hs
+2 −2 kore/test/Test/Kore/Attribute/Pattern/Defined.hs
+6 −6 kore/test/Test/Kore/Attribute/Pattern/FreeVariables.hs
+2 −2 kore/test/Test/Kore/Attribute/Pattern/Function.hs
+6 −6 kore/test/Test/Kore/Attribute/Pattern/Sort.hs
+2 −2 kore/test/Test/Kore/Attribute/Pattern/Total.hs
+4 −2 kore/test/Test/Kore/Builtin/External.hs
+4 −4 kore/test/Test/Kore/Internal/From.hs
+45 −60 kore/test/Test/Kore/Parser/Parser.hs
+4 −4 kore/test/Test/Kore/Simplify/And.hs
+3 −3 kore/test/Test/Kore/Simplify/Or.hs
+2 −2 kore/test/Test/Kore/Syntax/Json.hs
+4 −8 kore/test/Test/Kore/Validate/DefinitionVerifier/PatternVerifier.hs
+3 −0 test/ecdsa/Makefile
+1 −0 test/ecdsa/addr1.ecdsa
+3 −0 test/ecdsa/addr1.ecdsa.out.golden
+1 −0 test/ecdsa/addr2.ecdsa
+3 −0 test/ecdsa/addr2.ecdsa.out.golden
+1 −0 test/ecdsa/addr3.ecdsa
+3 −0 test/ecdsa/addr3.ecdsa.out.golden
+85 −0 test/ecdsa/ecdsa.k
+15 −15 test/imp/max-symbolic.imp.out.golden
+4 −4 test/issue-2010/1.test.out.golden
+7 −0 test/parser/json/README.md
+507 −467 test/parser/json/bool.json
+385 −369 test/parser/json/list.json
+259 −243 test/parser/json/nat.json
+44 −42 test/parser/json/test-issue-94-2.json
+17 −15 test/parser/json/test-pattern-3.json
+17 −15 test/parser/json/test-pattern-4.json
+1 −1 test/rpc-server/add-module/add/response.golden
+1 −1 test/rpc-server/implies/not-implied-stuck/response.golden
+20 −2 test/rpc-server/runTests.py
+10 −10 test/smt-none/program.test.out.golden
2 changes: 1 addition & 1 deletion hs-backend-booster/src/main/native/hs-backend-booster
Submodule hs-backend-booster updated 43 files
+3 −1 .github/workflows/Dockerfile
+24 −5 .github/workflows/test.yml
+7 −0 .github/workflows/update-deps.yml
+2 −2 cabal.project
+6 −0 cabal.project.freeze
+1 −1 deps/blockchain-k-plugin_release
+1 −1 deps/haskell-backend_release
+1 −1 deps/k_release
+4 −4 flake.lock
+2 −1 flake.nix
+3 −3 library/Booster/JsonRpc.hs
+26 −25 library/Booster/JsonRpc/Utils.hs
+6 −1 library/Booster/Pattern/Base.hs
+140 −54 library/Booster/Pattern/Rewrite.hs
+19 −0 library/Booster/Pattern/Util.hs
+7 −5 library/Booster/Syntax/Json/Externalise.hs
+18 −27 library/Booster/Syntax/Json/Internalise.hs
+9 −9 library/Booster/Syntax/ParsedKore/Internalise.hs
+16 −6 library/Booster/Syntax/ParsedKore/Parser.y
+2 −0 package.yaml
+1 −1 stack.yaml
+8 −8 stack.yaml.lock
+393 −400 test/jsonrpc-examples/expected/[email protected]
+390 −397 test/jsonrpc-examples/expected/[email protected]
+519 −479 test/parser/bool.kore.json
+390 −374 test/parser/list.kore.json
+261 −245 test/parser/nat.kore.json
+44 −42 test/parser/test-issue-94-2.kore.json
+17 −15 test/parser/test-pattern-3.kore.json
+17 −15 test/parser/test-pattern-4.kore.json
+1 −1 test/rpc-integration/test-diamond/response-infeasible-branching.booster-dev
+1 −1 test/rpc-integration/test-foundry-bug-report/response-004.json
+1 −1 test/rpc-integration/test-foundry-bug-report/response-005.json
+393 −453 test/rpc-integration/test-foundry-bug-report/response-007.json
+393 −453 test/rpc-integration/test-foundry-bug-report/response-009.json
+393 −453 test/rpc-integration/test-foundry-bug-report/response-011.json
+393 −453 test/rpc-integration/test-foundry-bug-report/response-013.json
+193 −223 test/rpc-integration/test-foundry-bug-report/response-015.json
+3 −2 test/rpc-integration/test-logTiming/test.sh
+1 −1 test/rpc-integration/test-module-addition/response-03-add-new-module.json
+5 −2 tools/booster/Server.hs
+1 −1 tools/rpc-client/RpcClient.hs
+2 −2 unit-tests/Test/Booster/Syntax/Json.hs
Loading

0 comments on commit 72c2109

Please sign in to comment.