Git Product home page Git Product logo

halex's People

Contributors

alcinocunha avatar fuuzetsu avatar joaosaraiva avatar jorgecunhamendes avatar kinnzo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

halex's Issues

Extra Double Quotes in graphViz file generated

The dot file so generated by the functions ndfa2graphviz, dfa2graphviz, ndfa2graphvizfile and dfa2graphvizfile has extra double quotes in initial state, final state and state labels. This dot file thus cannot be directly processed by graphViz using gvedit. We have to manually edit and remove the extra quotes which may be tedious for big programs. A fix is required for this issue either by using some extra code that removes the bugs or changing the functions which generate the files.
issue

I have used some extra code for now to fix it and also made a pull request which solves this issue. Please verify and update the library. It's really helpful!

Lack of documentation!

  • I have tried using Language.HaLex.FaAsDiGraph and Language.HaLex.Ndfa to generate the dot files but there are no example codes of how to use it.

  • By this I mean I initially started with my own data type for Ndfa and later I had to convert an instance of my type into an instance of the Ndfa data type defined in the module.

  • The documentation on hackage just gives you the type definition of Ndfa and of other functions. There are no clear examples of how to use it.

  • I faced a lot of trouble in converting an instance of my Ndfa data type into an instance of Ndfa type defined in the library. Basically the definition of delta function or transition function is not clear.

data Ndfa st sy = Ndfa [sy]                            -- Vocabulary
                       [st]                            -- Finite set of states
                       [st]                            -- The set of start state
                       [st]                            -- The set of final states
                       (st -> Maybe sy -> [st])        -- Transition function
  • An example for instance of Ndfa would make it much more clearer. For example we can realize the Ndfa in the given figure as -->

aorb

myNdfa :: Ndfa Int Char
myNdfa = Ndfa ['a','b'] [0,1,2,3,4,5] [0] [5] delta

delta :: Int -> Maybe Char -> Int
delta 0 Nothing  = [1,3]
delta 1 Just 'a' = [2]
delta 3 Just 'b' = [4]
delta 2 Nothing = [5]
delta 4 Nothing = [5]
delta _ _ = []

  • In the entire documentation no where it is stated that Nothing corresponds to an Epsilon rule in the documentation. Also it is not mentioned what the resulting list returned by the transition function should be like.
    Should it be an epsilon closure of final states reachable from the input state or it should just be the list of final states?

  • Another important thing is they have not specified for what the input [Char] is required. Intuitively it makes sense that it should be the file name but this is where it troubles the user, I mean the lack of documentation. Hackage just says to Print a Ndfa in GraphViz use :

ndfa2graphviz :: (Eq sy, Show a, Show sy, Ord a) => Ndfa a sy -> [Char] -> [Char]
  • Since I was to use just these two modules, I felt lack of documentation while using them. This is one of the best libraries to realize finite state automatas. But essentially the lack of documentation makes it quite troublesome to use. Please update the documentation. It would really be helpful!

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.