Coder Social home page Coder Social logo

jennalwise / graphblas-verif Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 3.62 MB

Formal verification of the GraphBLAS C API implementation by Tim Davis using Frama-C/WP.

License: Other

CMake 0.03% C++ 1.40% C 94.41% Objective-C 0.29% MATLAB 2.11% Shell 0.02% TeX 1.64% Makefile 0.02% M 0.02% Mathematica 0.06%

graphblas-verif's Introduction

graphblas-verif

*** THIS README AND REPOSITORY ARE WORKS IN PROGRESS: Mostly finalized versions will be available after August 24, 2018 ***

Formal verification of the GraphBLAS C API implementation by Tim Davis using Frama-C/WP and VeriFast (potentially). Modified versions of GraphBLAS 2.0.1 (for verification) are contained within this repository as well as an unmodified version for comparison.

For those interested, the most recent version of GraphBLAS is packaged with SuiteSparse and can be downloaded here.

Documentation

For more information and documentation, please visit the Wiki.

Acknowledgments

Mentors

We would like to thank Tim Davis (Texas A&M University) for allowing the use, modification, and distribution of his GraphBLAS implementation.

We would also like to thank IBM for funding this research.

graphblas-verif's People

Contributors

jennalwise avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

zeta1999

graphblas-verif's Issues

Possible bug in identity_is_zero_bool_valid predicate for monoid validation

EVA is crashing with an error claiming it doesn't support ACSL logic inductive types. identity_is_zero_bool_valid is the predicate where the logic inductive types apparently show up. Determine if logic inductive types are used (I didn't think they were) and try to get around it, otherwise leave it out. Commented out for now.

GraphBLAS struct memory footprints may be incorrect and need refactored

  • Need to refactor memory footprint logic functions into separated predicates, because WP doesn't support most heterogeneous pointer casts, Alt-Ergo throws an error when using logic functions which return set<T>, and \separated does not ensure pointers within a set are separated from themselves, but rather it ensures those pointers are separated from pointers in other argument sets to \separated. This will make the logic/annotations significantly longer. [The last reason is the most important, because the others can be resolved through the Value Analysis plug-in]
  • Need to take a second look at how I deal with pointers to other GraphBLAS structs within the current GraphBLAS struct
  • Some pointers can alias within and between structs, ie. type and function pointers, so make sure this is handled correctly within footprints and when they are used

Move assigns/frees/allocates clauses out of behaviors

WP doesn't support assigns clauses well within behaviors, particularly when verifying a call hierarchy. WP doesn't support frees/allocates clauses at all, but may in the future and most likely will not support them well within behaviors as with assigns clauses.

  • GrB_Matrix_free and dependencies
  • GrB_Matrix_new and dependencies
  • GrB_Matrix_nrows and dependencies - no assigns/frees/allocates clauses
  • GrB_Matrix_ncols and dependencies - no assigns/frees/allocates clauses
  • GB_AxB_numeric dependencies

Null pointers alias to eachother in EVA memory model; fix use of separated predicates

Use of separation predicates should involve checking for null pointers as EVA's memory model ensures null pointers alias, ie. \separated(null,null) == false.

  • Matrix footprint separated predicate
  • GrB_Matrix_new and dependencies
  • GrB_Matrix_free and dependencies
  • GrB_Matrix_nrows/ncols and dependencies
  • GB_shallow_cast and dependencies
  • GB_Matrix_clear and dependencies
  • GB_Work_alloc/free and dependencies
  • Other footprint separated predicates

Refactor annotlib.acsl preds & logic functions to ensure sound casting of ptrs (void ptrs in particular)

WP's Typed+cast memory model (Byte not implemented yet) does support heterogeneous casts of polymorphic void ptrs, so long as it is casted to the proper type ptr that it should be.

Ie.

    bool b = (bool)true;
    bool *b_ptr = &b;
    void* f = (void*)b_ptr;
    //@ assert \valid((bool*)f);

Therefore, annotlib.acsl predicates and logic functions must be refactored to ensure sound casting of void ptrs. Otherwise, proofs will be unsound following the Typed+cast memory model.

EVA crashing on shallow_cast annotation

Annotations for shallow_cast and cast_array written with minimal testing for matrix multiply. WP can parse the annotations fine, but EVA is crashing when being run on shallow_cast + its dependencies. Does not crash on cast_array. Need to fix this.

Something in matrix_valid predicate is crashing it.

A valid semiring should have a valid commutative monoid

Should check that the valid monoid within a semiring is in fact commutative. Monoid validity should check for algebraic properties of monoid structures, such as having an associative binary operator and a proper identity for that operator. Therefore, resolution of this issue depends on resolution of issue 2.

Added extra requires clauses for RTE gaurds where behaviors exist

RTE gaurds can't be proven by behaviors - need top level requires clauses to discharge the proofs.

  • GrB_Matrix_free and dependencies
  • GrB_Matrix_new and dependencies
  • GrB_Matrix_nrows and dependencies - no assigns/frees/allocates clauses
  • GrB_Matrix_ncols and dependencies - no assigns/frees/allocates clauses
  • GB_AxB_numeric and dependencies

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.