GithubHelp home page GithubHelp logo

facebook / sparta Goto Github PK

View Code? Open in Web Editor NEW
609.0 26.0 49.0 824 KB

SPARTA is a library of software components specially designed for building high-performance static analyzers based on the theory of Abstract Interpretation.

License: MIT License

CMake 0.82% Shell 0.07% C++ 78.97% Rust 20.15%

sparta's Issues

Documentation to Use SPARTA

Hi Team,

Thank you for releasing SPARTA. I am trying to explore different functionalities and APIs of SPARTA.However I am not able to find any document which explains the usage of SPARTA. Please let me know if there is any detailed document and examples to use SPARTA for different applications.
@int3 @facebook-github-bot , Any help is highly appreciated.
Thank you.
Ashis

SPARTA build cmake failure

Hi,
I followed installation steps and got the following error (Ubuntu 18.04):

$ mkdir build-cmake
$ cd build-cmake
$ cmake ..
$ cmake --build . 
make: *** No targets specified and no makefile found.  Stop.

and indeed there is no Makefile inside SPARTA/build-cmake.
What am I doing wrong ? Thanks !

Purely virtual function and CRTP

Hello together,

first of all: Thank you for releasing SPARTA on Github. As someone highly interested in static analysis and abstract interpretation I'm really excited about this. So again: Thank you.

I've got a question regarding your use of CRTP in the definition of AbstractDomain and AbstractValue. Nevertheless these classes are designed to use CRTP, they contain purely virtual functions.

Regarding libraries using CRTP you often see a function like this

Derived& derived() { return *static_cast<Derived*>(this); }

and a const version of that. A purely virtual function virtual void foo() = 0; can then be replaced by

inline void foo() { return derived().foo(); }

A method call to foo will then be completely statically dispatched. This would maybe decrease the binary size (since vtables are smaller) and could increase the performance (due to static dispatching). We use this approach at the high performance linear algebra library Eigen and I guess it works quite well.

I see the following downsides:

  1. Code gets more complicated and looks less clean
  2. No inbuilt compile-time check if a subclass implements a method (a call to a former purely virtual function will seg. fault at runtime). However, since SPARTA already depends on Boost, we could use Boost TTI to add checks in the (still virtual) destructor.
  3. No inbuilt override (and I have no idea how to mimic one)

I guess performance is crucial if you want a static analysis tool to be widely adopted and therefore want to advertise the changes suggested above.

If you are interested in a pull request addressing the ideas above, I would prepare something.

Cheers,
David

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.