You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 -->
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!
The text was updated successfully, but these errors were encountered:
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.
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 :The text was updated successfully, but these errors were encountered: