Giter Club home page Giter Club logo

Comments (4)

anadon avatar anadon commented on August 11, 2024

Quite possibly. I'll ask about it. Thank you for bringing this to attention.

from graph.

anadon avatar anadon commented on August 11, 2024

Looks like the general advice is to avoid using aborts, with Peter Dimov pointing me towards https://github.com/boostorg/graph/blob/develop/include/boost/graph/isomorphism.hpp#L316 . This seems like an easy PR, so would you like the credit? If not, I should be able to get to it this weekend.

from graph.

vjcitn avatar vjcitn commented on August 11, 2024

I am not concerned with getting credit. There are a few other instances in graph:

%vjcair> # #define BOOST_LIB_VERSION "1_69"
%vjcair> pwd
/Library/Frameworks/R.framework/Resources/library/BH/include/boost/graph
%vjcair> grep abort *
grep: detail: Is a directory
grep: distributed: Is a directory
isomorphism.hpp:              abort();
grep: parallel: Is a directory
grep: planar_detail: Is a directory
grep: property_maps: Is a directory
%vjcair> grep abort */*
distributed/adjacency_list.hpp:      abort();
grep: distributed/adjlist: Is a directory
grep: distributed/detail: Is a directory
grep: parallel/detail: Is a directory
%vjcair> grep abort */*/*
distributed/detail/mpi_process_group.ipp:    abort();
distributed/detail/mpi_process_group.ipp:    abort();

from graph.

jeremy-murphy avatar jeremy-murphy commented on August 11, 2024

I just happened to notice this issue and yeah, wow, library code should never call abort() or exit(), except in the guise of an assert, which the code in graph/include/boost/graph/isomorphism.hpp does as well. Weird.
The abort() was introduced in 2012 as part of a fix to the algorithm and I guess it escaped review, as the same change also introduces considerable use of goto. :\ Now I'm not saying that goto is universally bad, but these dubious changes together are... suspicious.

I wouldn't recommend replacing it with throwing an exception; the abort() is really just an over-eager debugging tool.

from graph.

Related Issues (20)

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.