GithubHelp home page GithubHelp logo

galoisinc / lean-llvm Goto Github PK

View Code? Open in Web Editor NEW
31.0 21.0 1.0 475 KB

LLVM support for the lean theorem prover

License: Apache License 2.0

Lean 60.94% Makefile 1.35% C 0.07% Shell 0.23% C++ 37.09% CMake 0.32%
lean4

lean-llvm's Introduction

lean-llvm

This contains a Lean 4 library with bindings to the LLVM library. It is intended to make it easy to work with LLVM in Lean.

See https://github.com/galoisinc/reopt-vcg for most up-to-date info on how this library is currently used/built/etc.

It is made available under the Apache 2 license. See the LICENSE file for more details.

lean-llvm's People

Contributors

joehendrix avatar robdockins avatar simonjwinwood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

pnwamk

lean-llvm's Issues

Can I try this out

I am very interested in this project. Is it possible to provide me with some instructions to build the code and try the examples out?

`parseBitcodeFile` error reporting is broken

Calling llvm.ffi.parseBitcodeFile with an invalid file (e.g., an LLVM source assembly file instead of a bitcode file) causes an internal lean assertion to fail, e.g.:

../../bin/../src/runtime/lean.h:634: lean_ctor_num_objs: Assertion `lean_is_ctor(o)' failed.

Presumably there's just something off in how we're using set_io_error here.

Also, we may want a slightly more explicit return type---e.g. IO (Except String Module) or similar instead of just IO Module---to match the underlying LLVM parsing interface (it returns an Except essentially as well) and leave raising an IO error for unexpected behaviors. This last note about return types also applies to the llvm.ffi.parseAssembly function recently added (at the moment in a branch), which currently just gets the underlying LLVM error message string and calls set_io_error (here).

Test that change to `src/llvm_exports.cpp` is sound

This is the change I'm not positive is correct =\

Here is a commit removing various usages of cnstr_get_scalar and cnstr_set_scalar right before the commit that removed those two template functions from lean4: leanprover/lean4@16d88b0

Those don't end up using cnstr_set... however, there is other code in the test directories that seems very similar to what we're doing here, e.g. https://github.com/leanprover/lean4/blob/ec9f4b579dc6b4a20407d2735f8ad91de29bfdb5/src/tests/util/object.cpp#L266

So yah, I'm not sure.

Originally posted by @pnwamk in #16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.