Commit 56ab2164 authored by Nicolas Lenz's avatar Nicolas Lenz

Refactoring, get rid of graph stuff

parent 5715f637
......@@ -98,9 +98,6 @@ data ENFA : (state : Type) -> (alph : Type) -> Type where
||| @ accepting The states that accept
MkENFA : (delta : state -> Maybe alph -> List state) -> (start : state) -> (accepting : List state) -> ENFA state alph
[epsilon] Graph (ENFA state alph) state where
neighbors (MkENFA delta _ _) state = delta state Nothing
-- TODO: make total (breadth-/depth-first-search?)
partial runENFAEpsilon : ENFA state alph -> state -> List state
runENFAEpsilon a@(MkENFA delta _ _) st = (delta st Nothing) >>= (\x => runENFAEpsilon a x)
......
module Data.Graph
%access export
interface Graph a node where
neighbors : a -> node -> List node
--||| Calculates the transitive closure of a graph using the (floyd-)warshall algorithm
--closure : Graph g => g -> (node -> List node)
......@@ -2,6 +2,7 @@ module Main
import Data.Automata
import Data.Fin
import Data.Listable
nenTuples : List (Fin 4, Fin 2, Fin 4)
nenTuples = [(0, 0, 1), (0, 1, 0), (1, 0, 1), (1, 1, 2), (2, 0, 3), (2, 1, 0), (3, 0, 3), (3, 1, 3)]
......@@ -26,3 +27,6 @@ l1 = listed-}
drei : Nat
drei = 3
testlel : Nat
testlel = testkek
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment