all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Sören Tempel" <soeren@soeren-tempel.net>
To: Julien Lepiller <julien@lepiller.eu>
Cc: 68296@debbugs.gnu.org
Subject: [bug#68296] [PATCH] gnu: Add KLEE.
Date: Tue, 13 Feb 2024 15:09:12 +0100	[thread overview]
Message-ID: <3TGIYFPTVHXE1.3QGMCQNGUI376@8pit.net> (raw)
In-Reply-To: <CE0F11CA-6E29-4456-B537-6D36EEE1498C@lepiller.eu>

Hi Julien,

Thanks a lot for your feedback! I send an updated revision of the
patchset based on your feedback. More information on changes below.

Julien Lepiller <julien@lepiller.eu> wrote:
> First, could you separate this in two patches, one per package?

Sorry, oversight on my part. Fixed!

> Is there a reason why this is limited to the x86_64 architecture?

Yes, despite operating on LLVM IR abstraction, KLEE is tightly
integrated with the host architecture. Therefore, upstream currently
only support x86_64. Packages for other package manager (e.g. Nix)
also only support KLEE on x86_64 [1].

I added a comment explaining this.

> You have mixed native and normal inputs. In uclibc, since python is
> only used for the build, it should be native.

Fixed, ncurses should also be native as it is only used for menuconfig.

> Does it make sense to propagate uclibc in klee, when it only contains
> a static library? Some for clang and llvm. Isn't z3 used at runtime?
> Shouldn't it be propagated?

Sorry, I should have done a better job at explaining this: KLEE is a
symbolic analyzer for LLVM IR. Users of KLEE will need to translate
their C/C++ source to LLVM IR in order to analyze it with KLEE [2].
Furthermore, as KLEE is tightly integrated with a specific LLVM version,
it makes (at least from my point of view) sense to propagate a specific
clang toolchain so users can just run `guix shell klee` and get started
with it. However, if preferred I can also remove the propagation.

z3 isn't used at runtime, KLEE just uses the Z3 library interface and
links against z3. AFAIK, it doesn't use any binaries from z3. Does z3
still need to be propagated in this case?

uclibc does not need to be a propagated input since the KLEE build
systems generates LLVM IR from the .a archive [3]. I fixed this.

> Using #$klee-uclibc directly in the phase could be problematic I
> think, you should use this-package-inputs or similar (can't remember
> the exact name or syntax right now, you can leave it to me if you
> don't find it).

Sorry, I am new to Guix so I am not sure what you mean. Let me know if
you have more information on this but also feel free to just adjust this
as you wish :)

Greetings
Sören

[1]: https://github.com/NixOS/nixpkgs/blob/40a7b182e0a00245d69f6b8c1dfd3ea4bfc6257c/pkgs/applications/science/logic/klee/default.nix
[2]: https://klee.github.io/tutorials/testing-function/#compiling-to-llvm-bitcode
[3]: https://github.com/klee/klee/blob/v3.0/CMakeLists.txt#L473-L487




  reply	other threads:[~2024-02-13 14:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-06 20:40 [bug#68296] [PATCH] gnu: Add KLEE soeren
2024-02-13  8:49 ` Julien Lepiller
2024-02-13 14:09   ` Sören Tempel [this message]
2024-02-13 14:08 ` [bug#68296] [PATCH v2 1/2] gnu: Add klee-uclibc soeren
2024-02-13 14:08   ` [bug#68296] [PATCH v2 2/2] gnu: Add klee soeren
2024-02-28 17:04 ` [bug#68296] [PATCH v3 1/2] gnu: Add klee-uclibc soeren
2024-02-28 17:04   ` [bug#68296] [PATCH v3 2/2] gnu: Add klee soeren
2024-03-11  9:54 ` [bug#68296] gnu: Add KLEE Sören Tempel
2024-03-28 19:20 ` [bug#68296] [PATCH v4 1/2] gnu: Add klee-uclibc soeren
2024-03-28 19:20   ` [bug#68296] [PATCH v4 2/2] gnu: Add klee soeren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3TGIYFPTVHXE1.3QGMCQNGUI376@8pit.net \
    --to=soeren@soeren-tempel.net \
    --cc=68296@debbugs.gnu.org \
    --cc=julien@lepiller.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.