[GiNaC-devel] [SCM] GiNaC -- a C++ library for symbolic computations branch, master, updated. release_1-4-0-126-ga377cee

Jens Vollinga git at ginac.de
Tue Sep 30 11:43:26 CEST 2008


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GiNaC -- a C++ library for symbolic computations".

The branch, master has been updated
       via  a377cee53b71348235ec36f83afeced7e10288a8 (commit)
       via  546bababce8ef2b3c5ed3011cb7e49bd78016844 (commit)
       via  8c732512ca284f2a586694c7c33f1a0a4a68cef7 (commit)
       via  b84032466e31ff23d4be3b81a3f535b2c70202e5 (commit)
       via  6f64b39dd25e4d2dcc869995b3d19724fa72afa6 (commit)
       via  95bec2b8af126412b2e27b51e6bfd8d9ab18d5d7 (commit)
       via  3324b2f0f035490940b1a9d7cf5dc210776f6d87 (commit)
       via  1261c54df6548cf558405a118b2134805f63376d (commit)
       via  d4593e1981a168677f98e4d3b098696bd31088e2 (commit)
       via  05157f89a3db97fff79e33fd53156b380107011f (commit)
       via  dbe5029ed72f406f45ec2a9d3584a828653ab34a (commit)
       via  14d8318d10eb608300e006af3bc261690c14d041 (commit)
       via  ef06261c6354bea6d35e8bcdb89806056d4cccb9 (commit)
       via  58a84c0adac7cbaa63a50c06815aed9c7a0bcdcc (commit)
       via  949508429ea9850b8ec36d862f4e4d291773c313 (commit)
       via  4cbc8e8bdf06fd91ec652e9645965a5f1a808d76 (commit)
       via  1f7f3c85ec1b8063f475789544e9392ce59beb40 (commit)
       via  bd3ecf75ed2a77b9f56fc31f7923fc0f4d1982d4 (commit)
       via  5d367f84b43b0636f943fe239f7a58b4d147f002 (commit)
       via  502e76319b484c32246707e33e70a428ac5dc6ad (commit)
       via  4f596b14ac1cdb03163c74e210cab493358ababf (commit)
       via  3918e4767063fb45e5728bd9b3a09dd8ac30d055 (commit)
      from  2a5d912dc9407c6bd1dbee6cb99cfdc206c4e42c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a377cee53b71348235ec36f83afeced7e10288a8
Merge: 2a5d912dc9407c6bd1dbee6cb99cfdc206c4e42c 546bababce8ef2b3c5ed3011cb7e49bd78016844
Author: Jens Vollinga <jensv at nikhef.nl>
Date:   Tue Sep 30 11:47:25 2008 +0200

    Merge branch 'master' of git://ffmssmsc.jinr.ru:443/varg/ginac

commit 546bababce8ef2b3c5ed3011cb7e49bd78016844
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sat Sep 20 23:18:46 2008 +0400

    Implemented modular GCD algorithm for univariate polynomials.

commit 8c732512ca284f2a586694c7c33f1a0a4a68cef7
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sun Sep 14 07:13:01 2008 +0400

    Wipe out the old (bison/flex generated) parser.
    
    Bison generated parser has a number of problems:
    
    1. Bad performance. Parsing a sum seems to be O(N^{2 + a}) (a > 0).
       For example, parsing a sum (actually, a univariate polynomial) of 32768
       terms takes about 90 sec. on my box, parsing a sum of 10^6 terms takes
       "eternity".
    2. The user is expected to provide list of all symbols in the expression.
       Often this is very annoying (and useless), sometimes it is not possible
       at all.
    3. Parser is not reentrant (bison *can* produce reentrant parsers, but that
       won't solve other problems).
    4. Parser is difficult to extend.
    
    Since the new parser handles almost everything (useful) as the old one, let's
    remove the latter.

commit b84032466e31ff23d4be3b81a3f535b2c70202e5
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sun Sep 14 06:57:21 2008 +0400

    check: time_parser.cpp: don't run the same benchmark twice.
    
    Since ex(const string&, lst&) ctor uses the new parser now comparing its
    performance (and result) with one of direct invocation of the parser is
    pointless.

commit 6f64b39dd25e4d2dcc869995b3d19724fa72afa6
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sun Sep 14 06:41:12 2008 +0400

    Document the new parser, provide an example.

commit 95bec2b8af126412b2e27b51e6bfd8d9ab18d5d7
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sun Sep 14 06:24:29 2008 +0400

    Use the new parser in the ex(const string&, lst&) ctor.
    
    Note: this is certainly not the optimal way to use the parser. It's provided
    for backward compatibility only.

commit 3324b2f0f035490940b1a9d7cf5dc210776f6d87
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sun Sep 14 06:01:53 2008 +0400

    Parser can parse (some) floating point numbers now.

commit 1261c54df6548cf558405a118b2134805f63376d
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sun Sep 14 03:26:33 2008 +0400

    parser: add necessary checks to operator() to stop accepting nonsense.
    
    Since the parser is recursive parse_* methods (in particular,
    parse_binop_rhs()) does NOT check if the last unparsed token is valid.
    Thus parse_expression() stops if it encounters an unknown token. That's
    why parser::operator() needs to make sure nothing is left in the input
    stream.

commit d4593e1981a168677f98e4d3b098696bd31088e2
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sun Sep 14 02:36:16 2008 +0400

    [bugfix] parser::parse_literal_expr(): don't forget to consume the token...
    
    ... so parser won't process it twice (and get either spurious error or
    wrong result).

commit 05157f89a3db97fff79e33fd53156b380107011f
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sun Sep 14 03:19:05 2008 +0400

    [bugfix]: parser::parse_unary_expr() parses '-a-b' correctly now.
    
    Also added regression test.

commit dbe5029ed72f406f45ec2a9d3584a828653ab34a
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sat Sep 13 05:12:31 2008 +0400

    ginac.h: include parser.hpp

commit 14d8318d10eb608300e006af3bc261690c14d041
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sat Sep 13 04:55:23 2008 +0400

    parser: change order of the constructor optional arguments.
    
    Functions/methods having multiple optional arguments are not very convenient
    to use in C++ (to put it mildly). Shuffle parser ctor arguments so not so
    frequently used argument is the last one.

commit ef06261c6354bea6d35e8bcdb89806056d4cccb9
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sat Sep 13 04:40:12 2008 +0400

    parser: allow read/write access to symbol table and strictness.
    
    Intended usage:
    
    parser reader;
    ifstream input_file1, input_file2;
    // read the first file...
    ex e1 = reader(input_file1);
    // ... add extra entry into the symbol table used by parser
    symbol x;
    parser.get_syms()["x"] = x;
    // Disable the parser to introduce new symbols, e.g. to ensure the expression
    // in input_file2 contains the same symbols as e1 (read from input_file1).
    parser.strict = true;
    ex e2;
    try {
    	e2 = reader(input_file2);
    } catch (...) {
    	abort();
    }

commit 58a84c0adac7cbaa63a50c06815aed9c7a0bcdcc
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sat Sep 13 04:30:22 2008 +0400

    parser: map input strings onto arbitrary expressions (not only symbols).
    
    So it's possible to make abbreviations, e.g.
    
    symbol x;
    symtab table;
    table["x"] = x + log(x) + 1;
    parser reader(table);
    ex e = reader("1 + x^2 + 5*x^3");

commit 949508429ea9850b8ec36d862f4e4d291773c313
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Sat Sep 13 04:21:27 2008 +0400

    [BUGFIX] parser.hpp: fix include guard so the header is actually usable.

commit 4cbc8e8bdf06fd91ec652e9645965a5f1a808d76
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Fri Sep 12 19:55:36 2008 +0400

    [nitpick] power::expand_add(): don't use int instead of std::size_t.
    
    This shuts a few 'comparison between signed and unsigned integer expressions'
    warnings.

commit 1f7f3c85ec1b8063f475789544e9392ce59beb40
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Fri Sep 12 19:55:36 2008 +0400

    [nitpick] inifcns_nstdsums: don't use int instead of std::size_t.
    
    This shuts up quite a number of 'comparison between signed and unsigned
    integer expressions'  warnings.

commit bd3ecf75ed2a77b9f56fc31f7923fc0f4d1982d4
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Fri Sep 12 19:55:36 2008 +0400

    [nitpick] don't use int instead of std::size_t.
    
    This shuts up (some of) 'comparison between signed and unsigned integer
    expressions'  warnings.

commit 5d367f84b43b0636f943fe239f7a58b4d147f002
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Thu Sep 11 15:16:21 2008 +0400

    G_numeric: use cl_N and int to manipulate numbers (instead of ex).
    
    Convert helper functions G_do_hoelder and G_do_trafo in the same manner,
    update all call sites. This should speed up numerical calculation of
    multiple polylogarithms a little bit, and reduce the memory usage.

commit 502e76319b484c32246707e33e70a428ac5dc6ad
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Wed Sep 10 15:43:35 2008 +0400

    G_numeric: put convergence/acceleration transofrmations into helper functions.
    
    This is simple code move, everything else should be considered a bug.
    The helper functions (as well as G_numeric itself) will be improved by
    subsequent patches.

commit 4f596b14ac1cdb03163c74e210cab493358ababf
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Fri Sep 12 14:55:42 2008 +0400

    match() (find()): use exmap (exset) to store matched subexpressions.
    
    There's no need to re-invent associative arrays and wrap them into
    a GiNaC class.

commit 3918e4767063fb45e5728bd9b3a09dd8ac30d055
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date:   Thu Sep 11 16:59:30 2008 +0400

    expairseq::match(): remove the code which works around basic::match bug.
    
    basic::match() used to have side effects in a case of a failed match. As
    a result of that bug exparsed::match did not work correctly in some cases,
    see [1] for more details. These false negatives were worked around by [2].
    Now that match() has no unwanted side effects [3] we don't need any work
    arounds any more.
    
    Just in a case add a regression test (from [1]).
    
    [1] http://www.ginac.de/pipermail/ginac-devel/2006-April/000942.html
    [2] Commit 73f0ce4cf8d91f073f35a45443f5fbe886921c5c ("Fixed bugs in ::match").
    [3] Commit 192ed7390b7b2b705ad100e3db0a92eedd2b20ad ("match: don't modify
        subexpression list if expression doesn't match the pattern.").

-----------------------------------------------------------------------

Summary of changes:
 check/Makefile.am                |   19 ++-
 check/error_report.hpp           |   17 ++
 check/exam_cra.cpp               |  120 ++++++++++
 check/exam_mod_gcd.cpp           |   85 +++++++
 check/match_bug.cpp              |   66 +++++
 check/parser_bugs.cpp            |   94 ++++++++
 check/time_parser.cpp            |   40 +---
 doc/examples/Makefile.am         |    2 +-
 doc/examples/derivative.cpp      |   30 +++
 doc/examples/ginac-examples.texi |    7 +
 doc/tutorial/ginac.texi          |  102 ++++++--
 ginac/Makefile.am                |   25 ++-
 ginac/basic.cpp                  |   23 +-
 ginac/basic.h                    |    2 +-
 ginac/ex.cpp                     |   20 +--
 ginac/ex.h                       |    8 +-
 ginac/expairseq.cpp              |   20 +--
 ginac/expairseq.h                |    2 +-
 ginac/ginac.h                    |    6 +
 ginac/indexed.cpp                |    4 +-
 ginac/inifcns_nstdsums.cpp       |  488 ++++++++++++++++++++-----------------
 ginac/input_lexer.h              |   69 ------
 ginac/input_lexer.ll             |  211 ----------------
 ginac/input_parser.yy            |  201 ----------------
 ginac/matrix.cpp                 |    2 +-
 ginac/mul.cpp                    |   22 +-
 ginac/ncmul.cpp                  |    8 +-
 ginac/parser/lexer.cpp           |   12 +-
 ginac/parser/parse_context.cpp   |   21 +-
 ginac/parser/parse_context.hpp   |    9 +-
 ginac/parser/parser.cpp          |   45 +++--
 ginac/parser/parser.hpp          |   16 +-
 ginac/parser/parser_compat.cpp   |   49 ++++
 ginac/polynomial/cra_garner.cpp  |   88 +++++++
 ginac/polynomial/cra_garner.hpp  |   12 +
 ginac/polynomial/debug.hpp       |   29 +++
 ginac/polynomial/gcd_euclid.tcc  |   45 ++++
 ginac/polynomial/mod_gcd.cpp     |  165 +++++++++++++
 ginac/polynomial/mod_gcd.hpp     |   11 +
 ginac/polynomial/normalize.tcc   |   93 +++++++
 ginac/polynomial/remainder.tcc   |  116 +++++++++
 ginac/polynomial/ring_traits.hpp |   32 +++
 ginac/polynomial/upoly.hpp       |  129 ++++++++++
 ginac/polynomial/upoly_io.cpp    |   53 ++++
 ginac/polynomial/upoly_io.hpp    |   12 +
 ginac/power.cpp                  |   34 ++-
 ginac/structure.h                |    2 +-
 ginac/wildcard.cpp               |    2 +-
 ginac/wildcard.h                 |    2 +-
 ginsh/ginsh_parser.yy            |   18 +-
 tools/Makefile.am                |    2 +-
 51 files changed, 1792 insertions(+), 898 deletions(-)
 create mode 100644 check/error_report.hpp
 create mode 100644 check/exam_cra.cpp
 create mode 100644 check/exam_mod_gcd.cpp
 create mode 100644 check/match_bug.cpp
 create mode 100644 check/parser_bugs.cpp
 create mode 100644 doc/examples/derivative.cpp
 delete mode 100644 ginac/input_lexer.h
 delete mode 100644 ginac/input_lexer.ll
 delete mode 100644 ginac/input_parser.yy
 create mode 100644 ginac/parser/parser_compat.cpp
 create mode 100644 ginac/polynomial/cra_garner.cpp
 create mode 100644 ginac/polynomial/cra_garner.hpp
 create mode 100644 ginac/polynomial/debug.hpp
 create mode 100644 ginac/polynomial/gcd_euclid.tcc
 create mode 100644 ginac/polynomial/mod_gcd.cpp
 create mode 100644 ginac/polynomial/mod_gcd.hpp
 create mode 100644 ginac/polynomial/normalize.tcc
 create mode 100644 ginac/polynomial/remainder.tcc
 create mode 100644 ginac/polynomial/ring_traits.hpp
 create mode 100644 ginac/polynomial/upoly.hpp
 create mode 100644 ginac/polynomial/upoly_io.cpp
 create mode 100644 ginac/polynomial/upoly_io.hpp


hooks/post-receive
--
GiNaC -- a C++ library for symbolic computations


More information about the GiNaC-devel mailing list