[system] / trunk / pg / lib / Parser / List.pm Repository:
ViewVC logotype

Log of /trunk/pg/lib/Parser/List.pm

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 5509 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 15 00:56:51 2007 UTC (12 years, 2 months ago) by dpvc
File length: 7562 byte(s)
Diff to previous 5432
Formula objects and Context objects contain reference loops, which
prevent them from being freed properly by perl when they are no longer
needed.  This is a source of an important memory leak in WeBWorK.  The
problem has been fixed by using Scalar::Util::weaken for these
recursive references, so these objects can be freed properly when they
go out of scope.  This should cause an improvement in the memory usage
of the httpd child processes.

Revision 5432 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Aug 26 18:53:23 2007 UTC (12 years, 3 months ago) by dpvc
File length: 7545 byte(s)
Diff to previous 5121
Only try to form intervals from lists that could be intervals when
they are of length 2.

Revision 5121 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 4 17:02:26 2007 UTC (12 years, 5 months ago) by dpvc
File length: 7562 byte(s)
Diff to previous 5119
Cosmetic change.

Revision 5119 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 4 01:19:18 2007 UTC (12 years, 5 months ago) by dpvc
File length: 7569 byte(s)
Diff to previous 5107
Removed some unneeded spaces in the comments.

Revision 5107 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jul 1 18:25:24 2007 UTC (12 years, 5 months ago) by dpvc
File length: 7571 byte(s)
Diff to previous 5001
Arrange for creation of constant Matrices to produce 1 x n matrices
(rather than vectors) properly.  (This involves including an extra
array reference in List.pm, which must be removed in list types that
don't need them, namely intervals and absolute value.)

Revision 5001 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 12 04:05:56 2007 UTC (12 years, 5 months ago) by dpvc
File length: 7569 byte(s)
Diff to previous 4994
More fixes for creating items in the corret context.  Also added a
method for looking up the package associated with a particular Parser
class (for consistency with the Value->Package call).

Revision 4994 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 10 01:17:29 2007 UTC (12 years, 5 months ago) by dpvc
File length: 7694 byte(s)
Diff to previous 3637
Update to handle the fact that the Value package now includes the
context with all MathObjects.  (This may still need some work.)

Revision 3637 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 19 00:16:24 2005 UTC (14 years, 2 months ago) by dpvc
File length: 7611 byte(s)
Diff to previous 3523
Prevent the empty list from having open and close be set to 'start'
(a value used internally).

Revision 3523 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 13 22:38:39 2005 UTC (14 years, 3 months ago) by dpvc
File length: 7543 byte(s)
Diff to previous 3466
Added canBeInUnion and isSetOfReals methods to the Parser package
(similar to the ones in the Value package), replacing the
canBeInterval flag and other ad hoc checks.

Removed ability to form interval like [a] now that we have sets.

Revision 3466 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 11 14:19:26 2005 UTC (14 years, 3 months ago) by dpvc
File length: 7801 byte(s)
Diff to previous 3370
Added new Set object class to the Parser.  It implements a finite set
of real numbers, for use with unions and intervals.  E.g., (1,2) U {3}
or (1,2) U {3,4,5}.  You can created Set objects in your perl code via
the Set() command, e.g, Set(3,4,5) or Set("{1,2,3}").  You should set
the Context to Context("Interval") if you plan to use Set objects, as
this defined the braces to form sets (rather than using them as
parentheses, which is the default WW behavior).  Note that in Interval
context, you can NOT use braces as parentheses.

Current, Set objects are only allowed to be sets of numbers.  It would
be possible to extend that in the future.

Revision 3370 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 12 22:29:53 2005 UTC (14 years, 4 months ago) by dpvc
File length: 7684 byte(s)
Diff to previous 3352
A first pass at making parser error messages localizable.  The
Context()->{error}{msg} hash can be used to specify translations of
the standard messages.  For example,

    Context()->{error}{msg}{'Division by zero'} = "Don't divide by zero, dude!";
    Context()->{error}{msg}{'Function '%s' has too many inputs'} =
        "You passed too many arguments to '%s'";

(I didn't translate into another language, here, but you could do
that, too.)

The msg hash could also be used within answer checkers to make certain
answer messages more appropriate for the given type of expected answer.

Revision 3352 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 5 01:38:19 2005 UTC (14 years, 5 months ago) by dpvc
File length: 7679 byte(s)
Diff to previous 3267
Modified the perl() method to make calles to Value:: directly rather
than to the main:: stubs for creating Value objects.  This will make
it work better from within packages or when Parser.pl hasn't been
loaded.

A few things still won't work in this case; e.g., calls to Closed()
for intervals (these could be handled better using ->with()) and to
functions like Factorial and log10 that are defined in Parser.pl.

Finally, there should be better object-based control over what
routines are called to create these objects, so that subclasses of the
Value objects will be able to be generated correctly.

Revision 3267 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 5 23:25:20 2005 UTC (14 years, 6 months ago) by dpvc
File length: 7665 byte(s)
Diff to previous 2800
Allow for vectors to be marked as Column Vectors.

Revision 2800 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Sep 19 14:27:39 2004 UTC (15 years, 2 months ago) by dpvc
File length: 7559 byte(s)
Diff to previous 2796
Added isZero and isOne checks for Parser::Value objects (i.e., for
constants within formulas).  These now correctly handle vector and
matrices, in particular.  The isOne and isZero checks are used in the
reduce() method to simplify formulas.

Revision 2796 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Sep 19 01:15:03 2004 UTC (15 years, 2 months ago) by dpvc
File length: 7414 byte(s)
Diff to previous 2678
Added flags that control the reductions performed by
Formula()->reduce.  Each reduction operation can be individually
enabled or disabled in the context, and in the reduce() call itself.

More complex reductions need to be developed.

Revision 2678 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 23 23:55:37 2004 UTC (15 years, 3 months ago) by dpvc
File length: 7314 byte(s)
Diff to previous 2675
Modified the parser so that the classes for the various object
constructors are stored in the context table rather than hard-coded
into the parser.  That way, you can override the default classes with
your own.  This gives you even more complete control to modify the
parser.  (You had been able to replace the definitions of operators,
functions and list-like objects, but could not override the behaviour
of numbers, strings, variables, and so on.  Now you can.)

This effects most of the files, but only by changing the name of the
calls that create the various objects.

There are also a couple of other minor fixes.

Revision 2675 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 23 04:59:05 2004 UTC (15 years, 3 months ago) by dpvc
File length: 7256 byte(s)
Diff to previous 2626
Get the type right when evaluating an AbsoluteValue and obtaining a
Value object.

Revision 2626 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 16 19:44:26 2004 UTC (15 years, 3 months ago) by dpvc
File length: 7233 byte(s)
Diff to previous 2625
One more fix for handling intervals properly (I think it's really
right this time).  Also, named constants that end in numbers will
produce TeX output with the number as a subscript (this was already
true for variable names).

Revision 2625 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 16 18:35:12 2004 UTC (15 years, 3 months ago) by dpvc
File length: 7132 byte(s)
Diff to previous 2624
Added string comparison to all Value object classes (to compare the
string value of an object to another string).

Overloaded perl '.' operator to do dot product when the operands are
formulas returning vectors.  (Part of the auto-generation of
formulas).

A few improvements to real and complex class output results.

Made Union class slightly more robust and removed need for makeUnion
method other than in the Union itself.

Revision 2624 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 16 13:44:45 2004 UTC (15 years, 3 months ago) by dpvc
File length: 7321 byte(s)
Diff to previous 2594
Added support for unorderd list or formulas with partial credit.
Fixed type mismatch reporting in formula answer checker.
Fixed an error with Unions producing incorrect perl versions under
some circumstances.

Revision 2594 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 12 20:17:18 2004 UTC (15 years, 3 months ago) by dpvc
File length: 7042 byte(s)
Diff to previous 2579
Fixes for handling intervals better.  In particular, deal better with
ambiguous situations, like (1,2) that could be a point.

You can use [a,a] to specify the single point a.  I'd like to make {a}
represent this (and maybe even {a,b,c} to form finite sets), but this
would interfere with the use of { and } as alternative parentheses.
(Does anyone really use these?)

Do we need a cross product for intervals (and sets) as a means of
representing regions in R^2 (or higher)?

Revision 2579 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 9 21:38:01 2004 UTC (15 years, 3 months ago) by dpvc
File length: 6636 byte(s)
Diff to previous 2558
Significant update to new parser.

New features include:

  Better control over format of vector output (you can now
    specify ijk-format rather than <...> format)

  "Fuzzy" reals, where the relations like == return true when the
    two values are "close enough".  (This is controlable using
    parameters similar to those used in NUM_CMP).

  The fuzzy reals are now used in vectors/points/matrices/complexes/intervals
    and so on so that their relations will also be fuzzy.  E.g.,
    (1E-13,2) == (0,3) will be true, and norm(Vector(0,1E-13)) will
    equal 0.

  The two main portions of the parser (the Parser and Value packages)
    now share a common context object for configuration purposes.

Revision 2558 - (view) (download) (as text) (annotate) - [select for diffs]
Added Wed Jul 28 20:32:33 2004 UTC (15 years, 4 months ago) by sh002i
File length: 6638 byte(s)
merged changes from rel-2-1-a1 -- stop using that branch.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9