turingMachine-1.0.0.0: An implementation of Turing Machine and Automaton

Copyright(c) Jorge Santiago Alvarez Cuadros 2016
LicenseGPL-3
Maintainersanjorgek@ciencias.unam.mx
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010
Extensions
  • TypeSynonymInstances
  • FlexibleInstances

Data.Sigma

Contents

Description

Alphabet and symbols of languaje

Synopsis

Symbols

type Symbol = Char Source #

Symbols are character, and with Unicode CharSet we have a big amount of them.

blank :: Symbol Source #

Blank symbol

type Wd = [Symbol] Source #

List symbol alias, Word are defined in Prelude

Alphabets

type Alphabet = Set Symbol Source #

An alphabet is a set of symbols

enumWord :: Alphabet -> Wd -> Integer Source #

For every alphabet there is a function h that maps one symbol to one natural. For every h function there is a function that enumerete every words in that alphabet

closureAlph :: Alphabet -> [Wd] Source #

Gives the Kleene Closure for all alphabets. closureAlph is a infinite list of words.

lessKWords :: Alphabet -> Integer -> [Wd] Source #

For some alphabet S and a natural number n take all words of length n or less

kWords :: Alphabet -> Integer -> [Wd] Source #

For some alphabet S and a natural number n take all words of length n

Orphan instances

Monoid Symbol Source #

Symbol type are forced to be a monoid