SRFI 234: Topological Sorting

by John Cowan and Arne Babenhauserheide

status: draft (2022-08-10)

keywords: Algorithm

Abstract

Topological sorting is an algorithm that takes a graph consisting of nodes and other nodes that depend on them, forming a partial order, and returns a list representing a total ordering of the graph. If the graph is cyclic, the topological sort will fail. With the procedure topological-sort, failure results in returning #false and additional information is provided via multiple values. With topological-sort/exception, an error will be signalled on failure. This SRFI includes utilities to operate on simple edgelists.