[system] / trunk / pg / lib / Value / Context Repository:
ViewVC logotype

Log of /trunk/pg/lib/Value/Context

View Directory Listing Directory Listing

Sticky Revision:

Revision 5509 - Directory Listing
Modified Sat Sep 15 00:56:51 2007 UTC (12 years, 5 months ago) by dpvc
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 5125 - Directory Listing
Modified Wed Jul 4 20:26:24 2007 UTC (12 years, 7 months ago) by dpvc
Use precompiled patterns for efficiency.

Revision 5116 - Directory Listing
Modified Tue Jul 3 10:44:30 2007 UTC (12 years, 7 months ago) by dpvc
Modified the method used to tokenize a formula to use one large
pattern that includes all the token types rather than individual
patterns for variables, strings, operators, and so on.  This allows
the Parser to handle the situation where a token of one type is a
prefix of a token of another type (e.g., < as a parenthesis but <- as
an operator) without worrying about which one is checked first.  The
new mtheod is also more flexible about having additional patterns
(like quoted strings, or arbitrary variable names) and about
specifying the order in which they are applied.

Revision 4975 - Directory Listing
Modified Wed Jun 6 21:44:05 2007 UTC (12 years, 8 months ago) by dpvc
This begins some major updates to the Parser and Value libraries.
This may make the MathObjects unstable as things shake down, but I'll
try to keep that to a minimum.

This update reorganizes how the overloading of operations are
implemented.  The base Value class is now overloaded rather than the
individual Value classes.  This makes it easier to make subclasses
that take advantage of the overloading.

The code that handles promoting one MathObject to another has been
updated as a part of this.  This should also make subclassing the
existing MathObjects more flexible.

In the past, Formula objects included a pointer to the Context in
which the object was created, but other MathObject did not.  This
update is the first round of updates to include the context in the
other MathObjects, but more work needs to be done.

The changes here should not affect existing problems; it is possible
that some macro files will need to be updated, but none of the
standard ones in pg/macros seem to need it at the moment.

Revision 4823 - Directory Listing
Modified Sat Mar 3 00:17:12 2007 UTC (12 years, 11 months ago) by dpvc
Improved Formula diagonstics when adaptive parameters are used.  They
now allow you to graph the functions (they are no longer considered
multi-variable functions), and the values reported are the adapted
values rather then the unadapted correct answers.  This now correctly
reflects the tests that are being performed.

Revision 3714 - Directory Listing
Modified Sun Oct 16 02:44:34 2005 UTC (14 years, 4 months ago) by dpvc
Modified context data objects to provide a copy method so that the
various types of data can copy themselves (and can provide a more
comprehensive copy if necessary).

Revision 3510 - Directory Listing
Modified Sat Aug 13 17:32:58 2005 UTC (14 years, 6 months ago) by dpvc
Fixed a problem with redefine when used with classes that store their
data in a on-standard form (i.e., by overridding the create()
method).  Now they can define uncreate() to get the original data back
for use with redefine().

Revision 3483 - Directory Listing
Modified Fri Aug 12 01:21:48 2005 UTC (14 years, 6 months ago) by dpvc
Added redefine() function to complement undefine() for various
Context() values.  For example


makes '+' undefined, but


will put it back.  You can specify a context from which to take the
redefinition, and a name in that context, as in


where $content is a reference to a Context object.

The undefine() function lets you undefine several items at once, as in


For redefine, you must put multiple names in square brackets because
of the optional parmeters:


Revision 3370 - Directory Listing
Modified Tue Jul 12 22:29:53 2005 UTC (14 years, 7 months ago) by dpvc
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 3333 - Directory Listing
Modified Sun Jul 3 20:06:33 2005 UTC (14 years, 7 months ago) by dpvc
Adjusted some spacing

Revision 2771 - Directory Listing
Modified Sat Sep 11 17:11:29 2004 UTC (15 years, 5 months ago) by dpvc
Fixed a bug with constants where the values were being cached so that
changes in the context were not being reflected in the formulas that
use them.

Revision 2658 - Directory Listing
Modified Fri Aug 20 11:17:06 2004 UTC (15 years, 6 months ago) by dpvc
Make blank patterns be ^$ (which should never match) rather than empty
(which always matches).  this fixes a problem where if a context has
no functions, for example, the parser would attempt to create function
calls to a function named ''.

Revision 2649 - Directory Listing
Modified Thu Aug 19 14:19:32 2004 UTC (15 years, 6 months ago) by dpvc
Fixed an error in the generation of regexp patterns for the various
data types.

Revision 2579 - Directory Listing
Added Mon Aug 9 21:38:01 2004 UTC (15 years, 6 months ago) by dpvc
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.

Sort log by:

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9