Compatibility Notes

The Monash examples have been written for clp(R). Nevertheless, all but rkf45 complete nicely in clp(Q). With rkf45, clp(Q) runs out of memory. This is an instance of the problem discussed in Numerical Precision.

The Monash University clp(R) interpreter features a dump/n predicate. It is used to print the target variables according to the given ordering. Within this version of clp(Q,R), the corresponding functionality is provided via ordering/1. The difference is that ordering/1 does only specify the ordering of the variables and no printing is performed. We think Prolog has enough predicates to perform output already. You can still run the examples referring to dump/n from the Prolog top-level:

     clp(r) ?- expand, [library('clpqr/examples/monash/mortgage')], noexpand.
     
     % go2
     %
     clp(r) ?- mg(P,120,0.01,0,MP), dump([P,MP]).
     
     {P=69.7005220313972*MP}
     
     % go3
     %
     clp(r) ?- mg(P,120,0.01,B,MP), dump([P,B,MP]).
     
     {P=0.30299477968602706*B+69.7005220313972*MP}
     
     % go4
     %
     clp(r) ?- mg(999, 3, Int, 0, 400), dump.
     
     clpr:{_B-_B*Int+_A+400.0=0.0},
     clpr:{_A-_A*Int+400.0=0.0},
     {_B=599.0+999.0*Int}