Giter Club home page Giter Club logo

dfa's Introduction

Deterministic Finite Automaton (DFA)

A deterministic finite automaton (DFA) is an abstract machine that recognizes a regular language. Usually a DFA is defined by a 5-tuple, but instead we'll use a map with 5 keys:

  • :states is the set of states for the DFA.
  • :alphabet is the set of symbols included in the language recognized by the DFA.
  • :start is the start state of the DFA.
  • :accepts is the set of accept states in the DFA.
  • :transitions is the transition function for the DFA, mapping :states ? :alphabet onto :states.

For the description of a fully generic DFA, two keys could be added:

  • :fn-transform-payload is the users' function for transformation of the specified payload
  • :fns-transform-conditions is a map {q-i -> [q-j, condition-ij]}, where condition-ij rules on the transformation from q-i to q-j

The usage of these additional keys could be straight forward included in the dfa.core code base.

Reference: 4clojure Problem #164

Usage

dfa.core/dfa-seq
([dfa])
Function
 lazy-seq of status defived from DFA definition map.

License

Copyright © 2013 fbmnds

Distributed under the Eclipse Public License, the same as Clojure.

dfa's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.