Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > overview on dao

Reply
Thread Tools

overview on dao

 
 
Simeon Chaos
Guest
Posts: n/a
 
      11-08-2011
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:
http://www.velocityreviews.com/forums/(E-Mail Removed)
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.
 
Reply With Quote
 
 
 
 
Dennis Lee Bieber
Guest
Posts: n/a
 
      11-08-2011
On Mon, 7 Nov 2011 21:10:59 -0800 (PST), Simeon Chaos
<(E-Mail Removed)> declaimed the following in
gmane.comp.python.general:

> Dao is a a functional logic solver (similar to lambdaProlog, Curry)
> written in python. The links related to dao are here:
>

Unfortunately the name is in conflict with M$ DAO (Data Access
Objects), the precursor to ADO. Every time I see "Dao" my mind goes "JET
database".
--
Wulfraed Dennis Lee Bieber AF6VN
(E-Mail Removed) HTTP://wlfraed.home.netcom.com/

 
Reply With Quote
 
 
 
 
Simeon Chaos
Guest
Posts: n/a
 
      11-09-2011
On Nov 9, 1:52*am, Dennis Lee Bieber <(E-Mail Removed)> wrote:
> On Mon, 7 Nov 2011 21:10:59 -0800 (PST), Simeon Chaos
> <(E-Mail Removed)> declaimed the following in
> gmane.comp.python.general:
>
> > Dao is a a functional logic solver (similar to lambdaProlog, Curry)
> > written in python. The links related to dao are here:

>
> * * * * Unfortunately the name is in conflict with M$ DAO (Data Access
> Objects), the precursor to ADO. Every time I see "Dao" my mind goes "JET
> database".
> --
> * * * * Wulfraed * * * * * * * * Dennis Lee Bieber * * * * AF6VN
> * * * * (E-Mail Removed) * *HTTP://wlfraed.home.netcom.com/


Yeah, here "dao" is from The book of Dao" by Laozi, means the way of
the world go.
 
Reply With Quote
 
MRAB
Guest
Posts: n/a
 
      11-09-2011
On 09/11/2011 00:13, Simeon Chaos wrote:
> On Nov 9, 1:52 am, Dennis Lee Bieber<(E-Mail Removed)> wrote:
>> On Mon, 7 Nov 2011 21:10:59 -0800 (PST), Simeon Chaos
>> <(E-Mail Removed)> declaimed the following in
>> gmane.comp.python.general:
>>
>>> Dao is a a functional logic solver (similar to lambdaProlog, Curry)
>>> written in python. The links related to dao are here:

>>
>> Unfortunately the name is in conflict with M$ DAO (Data Access
>> Objects), the precursor to ADO. Every time I see "Dao" my mind goes "JET
>> database".
>> --
>> Wulfraed Dennis Lee Bieber AF6VN
>> (E-Mail Removed) HTTP://wlfraed.home.netcom.com/

>
> Yeah, here "dao" is from The book of Dao" by Laozi, means the way of
> the world go.


Perhaps you should call it "LaoZiDao".
 
Reply With Quote
 
Simeon Chaos
Guest
Posts: n/a
 
      11-09-2011
On Nov 9, 8:55*am, MRAB <(E-Mail Removed)> wrote:
> On 09/11/2011 00:13, Simeon Chaos wrote:
>
>
>
>
>
>
>
>
>
> > On Nov 9, 1:52 am, Dennis Lee Bieber<(E-Mail Removed)> *wrote:
> >> On Mon, 7 Nov 2011 21:10:59 -0800 (PST), Simeon Chaos
> >> <(E-Mail Removed)> *declaimed the following in
> >> gmane.comp.python.general:

>
> >>> Dao is a a functional logic solver (similar to lambdaProlog, Curry)
> >>> written in python. The links related to dao are here:

>
> >> * * * * *Unfortunately the name is in conflict with M$ DAO (Data Access
> >> Objects), the precursor to ADO. Every time I see "Dao" my mind goes "JET
> >> database".
> >> --
> >> * * * * *Wulfraed * * * * * * * * Dennis LeeBieber * * * * AF6VN
> >> * * * * *(E-Mail Removed) * *HTTP://wlfraed.home.netcom.com/

>
> > Yeah, *here "dao" is from The book of Dao" by Laozi, means the way of
> > the world go.

>
> Perhaps you should call it "LaoZiDao".


I just prefer shorter name.
 
Reply With Quote
 
Prasad, Ramit
Guest
Posts: n/a
 
      11-15-2011
>> Perhaps you should call it "LaoZiDao".

>I just prefer shorter name.


DAO as Data Access Objects is a common acronym in several languages (i.e. Java),
so you will continually have this naming conflict. Just be aware that this
conflict will happen frequently in the minds of many programmers.

Ramit

P.S. I votefor PyLaoziDao


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

--


This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.
 
Reply With Quote
 
MRAB
Guest
Posts: n/a
 
      11-15-2011
On 15/11/2011 17:26, Prasad, Ramit wrote:
>>> Perhaps you should call it "LaoZiDao".

>> I just prefer shorter name.

>
> DAO as Data Access Objects is a common acronym in several languages (i.e. Java),
> so you will continually have this naming conflict. Just be aware that this
> conflict will happen frequently in the minds of many programmers.
>
> Ramit
>
> P.S. I vote for PyLaoziDao
>

Just don't confuse it with PyDao, which is already taken.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
simpler over view on dao: a functional logic solver with builtinparsing power, and dinpy, the sugar syntax for dao in python Simeon Chaos Python 0 11-08-2011 05:34 AM
Cooling Overview - Lower Noise, Better Thermals Silverstrand Front Page News 0 01-10-2006 12:36 AM
two setup overview questions =?Utf-8?B?Q2hyaXM=?= ASP .Net 9 01-17-2005 03:32 PM
Computer Certification: Overview Rowdy Yates MCSE 0 04-30-2004 02:15 PM
70-229 Exam Overview Matthew Carr MCSD 1 08-12-2003 06:55 AM



Advertisments