nicer
This commit is contained in:
parent
b1e26541ce
commit
7652c5b86d
1 changed files with 4 additions and 2 deletions
6
DFA.fs
6
DFA.fs
|
|
@ -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 ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue