This is not a class assignment - indeed I'm a professor who has used haskell in classes (and is currently being fired for having done so - it seems teaching anything other than c++ is questionable). I'd like to have a program that will take a description of a regular language and produce a list of strings in that language in order of size. If the lists are infinite (a* and the like) things work fine, but when the lists are finite, things dont work. I have two programs that I've tried to use and both have been hacked a bit in my process of experimentation so they're not the nicely honed final product I'd like to have. The first is based on my original ideas but with some attempt to cajole the finite/infinite list problem - it still seems to me that this would be a good way to go if possible, but I'm stumped. It is at : http://cs.eou.edu/jefu/reglang.hs The second is built on the idea of remembering if a list is finite or infinite and handling it accordingly. This one manages to segfault hugs and ghci also just quits about half the time (linux, redhat 7). This one is at : http://cs.eou.edu/jefu/nreglang.hs Any suggestions ? jefu -- jeff putnam -- jefu@eou.edu -- http://cs.eou.edu/~jefu
At 11:33 AM -0500 5/8/01, jefu wrote: [...]
I'd like to have a program that will take a description of a regular language and produce a list of strings in that language in order of size. [...]
Any suggestions ?
Have a look at http://www.cs.utexas.edu/users/pete/research/enumeration.html. --Ham ------------------------------------------------------------------ Hamilton Richards, PhD Department of Computer Sciences Senior Lecturer Mail Code C0500 512-471-9525 The University of Texas at Austin Taylor Hall 5.138 Austin, Texas 78712-1188 ham@cs.utexas.edu ------------------------------------------------------------------
participants (2)
-
Hamilton Richards -
jefu