RosettaCodeData/Task/Topological-sort/EchoLisp/topological-sort-3.l
2023-07-01 13:44:08 -04:00

13 lines
400 B
Common Lisp
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(define g (make-graph "VHDL"))
(add-dependencies g dependencies)
(graph-print g)
(t-sort g)
t-sort (std synopsys ieee dware dw02 dw05 dw06 dw07 gtech dw01 dw03 dw04 ramlib
std_cell_lib des_system_lib)
;; Error case
;; add dw01 -> dw04
(t-sort g)
t-sort (std synopsys ieee dware dw02 dw05 dw06 dw07 gtech ramlib std_cell_lib)
error: t-sort:cyclic (dw04 dw01)