nl_tokens: / * Given a Digraph ** g ** this function returns true if the graph has no cycles and returns false if it does . This algorithm returns as soon as it detects the first cycle .
pl_tokens: function isAcyclic ( g ) { <mask> { topsort ( g ) ; } catch ( e ) { if ( e instanceof topsort . CycleException ) return false ; throw e ; } return true ; }