Dao is a a functional logic solver (similar to lambdaProlog, Curry) written in python. The links related to dao are here:
pypi distribution and document: http://pypi.python.org/pypi/daot code repository: https://github.com/chaosim/dao dao groups on google: Group name: daot, Group home page: http://groups.google.com/group/daot, Group email address: d...@googlegroups.com old stuffs: http://code.google.com/p/daot(old, deprecated) google+ pages: https://plus.google.com/112050694070234685790 Dao has the features such as * lisp style programming: * call/cc, block/return-from, unwind-protect, catch/throw; Dao is implemented by continuation passing style, so it is natural to implement such stuff. And I have some little improvement to the trampoline technology because I need it coexist with the technology of using yield statement to implement unifying and backtracking. The code for evaluating lisp style expression is borrowed from the book "Lisp in Small Pieces" wrote by Christian Queinnec and Ecole Polytechnique. * function and macro; The concept of function and macro in dao become more general than in lisp, because we can define them with multiple rules and take advantage of unifying and backtracking. * eval, so called meta circular evaluation. * prolog style programming: * logic variable and unify; * backtracking; * findall, repeat/fail, call, once, and so on; * cut. At first, unify is implemented by using exception, and backtracking by using two continuations(succeed continuation and fail continuation) technology, borrowed the code from pypy prolog. Now, the fail continuation is removed, and both unifying and backtracking is implemented by using 'yield' statement, which I learned from YieldProlog (http://yieldprolog.sourceforge.net). Dao run faster than before by using yield statement, removing class definition of continuation, and not boxing atomic and list values(compare to pypy prolog without translation or jit). Up to now I do not use the pypy's translation or jit feature to speedup, and all of the tests in dao 0.7.3 run in about two minutes. * many other useful builtins that simulate lisp and prolog primitives. * some builtins that cooperate with python. * builtin parser, which is the most powerful parser I have seen. The parser in dao is basically a recursive decent parser with backtracking, but It also support direct or indirect left recursive rules by using memorization when needed. The programmer can toggle memorization of any command that is not left recursive. the grammar in dao is some similar to DCG(definite clause grammar), but is more flexible than DCG. It have the expressive power beyond context free or sensitive grammar, parsing expression grammar. Dao can be used to parse any object, not limiting to text. Many builtin terminal and combinative parsing primitives are provided. In dao, I have found and implemented the unrivalled technology to uniting parser and evaluator by the meta circular evaluation. So Dao can be used to implement a programming language in which the syntax is dynamic, that is to say, the syntax can be defined on the fly by the programmer easily. A little sample to demonstrate this technology is given in the files dao/samples/sexpression.py and dao/dao/tests/ testsexpresson.py. ------------------------------------------------------------------------- Dinpy: a child language born and live in python. Dinpy can be looked as the syntax sugar for dao in python. It arises accidentally when I wrote tests for dao. A detailed introduction is as follows: I hate the too many parentheses when I wrote tests for the 'let' statement of lisp, so I replace embedded tuples with dict for the bindings, and after the spark of inspiration, the door to dinpy was open. I learned a new method for inventing a new language from it: use the syntax based on the operator of the mother language for building the child language. -------------------------------------------------------------------------- I have written some Chinese documents for dao, but few English. The Chinese document is not complete yet. With the functional logic programming and dynamic grammar on the shoulders of the great python, many possibilities arises with dao, such as parsing, inventing embedded DSL with operator syntax, independent domain specific language or general language, text processing, natural language processing, expert system, artificial intelligence, web application, and so on. Now: * I hope more people know and use dao. Or maybe something wrong in dao prevent it being used in real application, and I hope to know what it is. * Maybe anyone have interest and time to join in developing dao or writing some documents or articles? * More tests are needed always, and I hope to get some bug report from any other people. * the benchmarks of the dao, comparation with similar package, and so on. * I have a long todo list, I hope someone else can join in dao project. -- http://mail.python.org/mailman/listinfo/python-list