4748723...
by
Robert Dodier <email address hidden>
Packages solve_rec and Zeilberger: modifications to get correct results from rtest_simplify_sum.
* makeGosperForm.mac: quote argument in lambda expression to defeat
evaluation; variable denItem is an expression such as n - r + 1 where
r might have a value assigned to it, so we need to be careful to
evaluate denItem exactly once. The previous (nonlexical) version of
makeGosperForm.mac had that behavior, now we have it again.
* rtest_simplify_sum.mac: need to load simplify_sum first in order to
ensure product_use_gamma is known to be nonlexical when defining
test_sum; also return [actual = ..., expected = ..., difference = ...]
from test_case to get more info when a test fails.
* simplify_sum.mac: load functions after defining variables so the
variables are known to be nonlexical when defining the functions.
* testsuite.lisp: renumber expected failure for rtest_simplify_sum.mac
(a case which was failing in the previous, nonlexical version as well).
With these changes, run_testsuite(share_tests = only) reports no
unexpected errors for rtest_simplify_sum.
c5b3b13...
by
Robert Dodier <email address hidden>
5b964fa...
by
Robert Dodier <email address hidden>
create_test_cases.mac: assume/restore assumptions before evaluating test case;
process several test cases and collect output into separate files.
5c5bc5f...
by
Robert Dodier <email address hidden>
create_test_cases.mac: capture definition of test_sum before redefining it in generate_intermediate_result_test_cases.
5b0130b...
by
Robert Dodier <email address hidden>
Modifications to solve_rec and Zeilberger code to get correct results from simplify_sum.
* share/contrib/Zeilberger/makeGosperForm.mac: construct lambda expression via substitution
(specifically buildq) in order to carry value of local variable along.
* share/solve_rec/simplify_sum.mac: revise list of nonlexical variables,
based on output from find_possible_dynamic_binding applied to solve_rec
and Zeilberger code.
* share/solve_rec/solve_rec.mac: bind lexical variable %j1 to global '%j1
instead of leaving %j1 unbound; this has the effect of preventing the
lexical symbol from leaking out in the return value from simplify_product.
49ec101...
by
Robert Dodier <email address hidden>
Update function to generate test cases, and use it to create test cases for simplify_sum.
* share/lexical_symbols_tools/generate_intermediate_result_test_cases.mac: handle global variables correctly
* share/solve_rec/create_test_cases.mac: generate test cases for an example from simplify_sum
Process to create test cases is:
$ maxima # execute nonlexical Maxima
(%o1) batch ("share/solve_rec/create_test_cases.mac");
then evaluate the test cases in the same Maxima version,
$ maxima
(%o1) batch ("share/solve_rec/rtest_simplify_sum_results.mac", test);
and then in lexical Maxima,
$ sh maxima-local
(%o1) batch ("rtest_simplify_sum_results.mac", test);
For the test cases created by create_test_cases.mac, I find that in
both version (nonlexical, and lexical with some changes I am about to
commit), all tests pass except for several differences which are
caused by factored expressions containing minus signs not matching
(e.g. factor(-(x + 1)) is not ALIKE1 to -(x + 1)), which is unrelated
to simplify_sum or lexical symbols.
561a0ed...
by
Robert Dodier <email address hidden>
descriptive.mac: declare local variable to avoid possibility of name collision.
b7605df...
by
Robert Dodier <email address hidden>
Package lexical_symbols_tools: new script generate_intermediate_result_test_cases.mac to automatically generate test case pairs.
53eaf27...
by
Robert Dodier <email address hidden>
find_dynamic_binding.mac: assess top-level binding of nonlexicals by looking at nonlexicals in functions.
dabafcb...
by
Robert Dodier <email address hidden>
Fix up external link in readme about lexical symbols.