-
Notifications
You must be signed in to change notification settings - Fork 44
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
uc-crux-llvm: Serialization of data structures #994
Conversation
Needs more work on the error handling...
Needs more work on the errors
These warnings are false positives.
95acc90
to
6f4f656
Compare
I'm having trouble reproducing the CI failures. Here's what they look like:
I can't reproduce this with |
I was also unable to reproduce the failure using an Ubuntu 20.04 Dockerfile. DockerfileFROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq && apt-get install -y -qq build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 libz-dev
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
ENV PATH=$PATH:/root/.ghcup/bin:/root/.cabal/bin
RUN ghcup install ghc 9.2.1 && \
ghcup install cabal 3.6.2
CMD bash
|
Encountered weird errors in CI with QuickCheck: view-shape: *** Failed! (after 1 test): Exception while generating shrink-list: Test.QuickCheck.resize: negative size CallStack (from HasCallStack): error, called at src/Test/QuickCheck/Gen.hs:135:22 in QuickCheck-2.14.2-0c Exception thrown while showing test case: Test.QuickCheck.resize: negative size CallStack (from HasCallStack): error, called at src/Test/QuickCheck/Gen.hs:135:22 in QuickCheck-2.14.2-0c Later commits will port the remainder of the view tests; this commit is a minimal switch which compiles, passes tests, and shows the feasibility of using Hedgehog. Unfortunately, both libraries for creating Hedgehog generators from Generic instances turned out to be unsuitable. - hedgehog-generic didn't work for modern GHC - hedgehog-gen needed *all* the datatypes involved to be Generic, which e.g., Alignment is not.
b937f82
to
2af65d0
Compare
Introduce functions for (de)serializing the many type-indexed GADTs in UC-Crux. The reasoning behind the overall shape of the implementation is recorded in the module comment on
UCCrux.LLVM.View
. This will enable features like #982.This is still a draft because error handling would need to be improved, many of the errors lack sufficient context to really make it easy to see what went wrong during deserialization. However, since this is already fairly large, I wanted to get some initial feedback on the direction before polishing it off.