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

Log of /trunk/pg/lib/Parser/Variable.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: 3558 byte(s)
Diff to previous 5001
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 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: 3523 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, 6 months ago) by dpvc
File length: 3561 byte(s)
Diff to previous 4454
Update to handle the fact that the Value package now includes the
context with all MathObjects.  (This may still need some work.)

Revision 4454 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 7 01:18:08 2006 UTC (13 years, 3 months ago) by dpvc
File length: 3591 byte(s)
Diff to previous 3370
Added ability to overrid TeX and perl versions by specifying a TeX or
perl field in the variable definition.  Also made vector-valued
variables show up in bold.

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: 3408 byte(s)
Diff to previous 3343
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 3343 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 4 16:21:04 2005 UTC (14 years, 5 months ago) by dpvc
File length: 3390 byte(s)
Diff to previous 2687
Handle TeX versions of variables whose names include underscores
better.

Revision 2687 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 27 00:28:27 2004 UTC (15 years, 3 months ago) by dpvc
File length: 3386 byte(s)
Diff to previous 2678
Added ability to have linear adaptive parameters in the function
answer checker.  It only works for real-valued functions, though.
To use a parameter, use

       Context()->variables->add(a=>'Parameter');

and then use 'a' as a variable within your answer.  The student will
not be allowed to enter the parameter, but the professor will.

Note that the correct answer will show the full professor's answer,
including the parameters, even though the student can't type it.  Is
this the right behaviour?

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: 3209 byte(s)
Diff to previous 2621
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 2621 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Aug 15 17:05:41 2004 UTC (15 years, 3 months ago) by dpvc
File length: 3067 byte(s)
Diff to previous 2609
Improved error messages, particularly when the student enters a
formula in an answer that should be constant, and also for incorrect
answers in lists of answers.  There are a few other miscellaneous output
improvements as well.

Revision 2609 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 14 13:54:52 2004 UTC (15 years, 3 months ago) by dpvc
File length: 3022 byte(s)
Diff to previous 2558
Added a String type to the Value package.  Mostly this is to make it
possible to generate an answer checker for it that uses the parser.
It also makes it more consistent for handling things like stringify,
especially when they are recursively called internally.

Added new default strings "NONE" and "DNE", since these get used a
lot.

Modified how the default parameters are set up for the answer
checkers, and how the answer checker reports the expected answer type
in type mismatch error messages.

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