This commit is contained in:
joachimschmidt557 2019-02-06 22:10:18 +01:00
parent b1e26541ce
commit 7652c5b86d

6
DFA.fs
View file

@ -18,7 +18,8 @@ let validateDFA (dfa:DFA) =
dfa.acceptingStates
|> List.map (fun x -> List.contains x dfa.states)
|> List.filter not
|> List.length < 1
|> List.length
|> (<) 1
let deltaIsComplete =
// Gets the cartesian product of states * sigma
@ -31,7 +32,8 @@ let validateDFA (dfa:DFA) =
// Checks if there is any result from delta which is not
// a valid state
|> List.filter (fun x -> not (List.contains x dfa.states))
|> List.length < 1
|> List.length
|> (<) 1
List.contains dfa.beginState dfa.states ||
allAcceptingStatesAreStates ||