WIP
This commit is contained in:
parent
20201692a1
commit
c67110d17f
4 changed files with 7 additions and 2 deletions
|
|
@ -2,3 +2,4 @@ image: microsoft/dotnet:latest
|
|||
|
||||
build:
|
||||
script: dotnet build
|
||||
script: dotnet run
|
||||
|
|
|
|||
4
DFA.fs
4
DFA.fs
|
|
@ -4,6 +4,9 @@ open System
|
|||
|
||||
type State = { name: String }
|
||||
|
||||
///
|
||||
/// A deterministic finite automaton
|
||||
///
|
||||
type DFA = {
|
||||
sigma: Char list
|
||||
states: State list
|
||||
|
|
@ -12,6 +15,7 @@ type DFA = {
|
|||
acceptingStates: State list
|
||||
}
|
||||
|
||||
/// Returns true if the DFA is valid, false otherwise
|
||||
let validateDFA (dfa:DFA) =
|
||||
|
||||
let allAcceptingStatesAreStates =
|
||||
|
|
|
|||
1
NFA.fs
1
NFA.fs
|
|
@ -4,6 +4,7 @@ open System
|
|||
|
||||
type State = { name: String }
|
||||
|
||||
/// A non-deterministic finite automaton
|
||||
type NFA = {
|
||||
sigma: Char list
|
||||
states: State list
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
// Learn more about F# at http://fsharp.org
|
||||
|
||||
|
||||
open System
|
||||
|
||||
[<EntryPoint>]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue