overview on dao

Discussion in 'Python' started by Simeon Chaos, Nov 8, 2011.

  1. Simeon Chaos

    Simeon Chaos Guest

    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:

    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.
    Simeon Chaos, Nov 8, 2011
    #1
    1. Advertising

  2. On Mon, 7 Nov 2011 21:10:59 -0800 (PST), Simeon Chaos
    <> 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
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Nov 8, 2011
    #2
    1. Advertising

  3. Simeon Chaos

    Simeon Chaos Guest

    On Nov 9, 1:52 am, Dennis Lee Bieber <> wrote:
    > On Mon, 7 Nov 2011 21:10:59 -0800 (PST), Simeon Chaos
    > <> 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
    >            HTTP://wlfraed.home.netcom.com/


    Yeah, here "dao" is from The book of Dao" by Laozi, means the way of
    the world go.
    Simeon Chaos, Nov 9, 2011
    #3
  4. Simeon Chaos

    MRAB Guest

    On 09/11/2011 00:13, Simeon Chaos wrote:
    > On Nov 9, 1:52 am, Dennis Lee Bieber<> wrote:
    >> On Mon, 7 Nov 2011 21:10:59 -0800 (PST), Simeon Chaos
    >> <> 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
    >> 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".
    MRAB, Nov 9, 2011
    #4
  5. Simeon Chaos

    Simeon Chaos Guest

    On Nov 9, 8:55 am, MRAB <> wrote:
    > On 09/11/2011 00:13, Simeon Chaos wrote:
    >
    >
    >
    >
    >
    >
    >
    >
    >
    > > On Nov 9, 1:52 am, Dennis Lee Bieber<>  wrote:
    > >> On Mon, 7 Nov 2011 21:10:59 -0800 (PST), Simeon Chaos
    > >> <>  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
    > >>              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.
    Simeon Chaos, Nov 9, 2011
    #5
  6. >> 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 :p


    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.
    Prasad, Ramit, Nov 15, 2011
    #6
  7. Simeon Chaos

    MRAB Guest

    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 :p
    >

    Just don't confuse it with PyDao, which is already taken. :)
    MRAB, Nov 15, 2011
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Q2hyaXM=?=

    two setup overview questions

    =?Utf-8?B?Q2hyaXM=?=, Jan 16, 2005, in forum: ASP .Net
    Replies:
    9
    Views:
    350
    Scott Allen
    Jan 17, 2005
  2. darrel

    Security overview help

    darrel, May 23, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    379
    darrel
    May 23, 2005
  3. Bernard Segonnes

    Print and print overview and current page

    Bernard Segonnes, Nov 4, 2004, in forum: Java
    Replies:
    0
    Views:
    446
    Bernard Segonnes
    Nov 4, 2004
  4. jacksu
    Replies:
    1
    Views:
    779
    Riyad
    Nov 30, 2004
  5. Angus Parvis

    looking for java technology overview

    Angus Parvis, Apr 5, 2005, in forum: Java
    Replies:
    2
    Views:
    396
    Angus Parvis
    Apr 6, 2005
Loading...

Share This Page