removing jas dependency for Factoring polynomials

13 views
Skip to first unread message

Sherm Ostrowsky

unread,
Oct 14, 2011, 2:24:50 PM10/14/11
to mathpi...@googlegroups.com
I have begun the task of removing dependency on JAS from the polynomial factoring functions, and replacing it with "native" MathPiper code.

I am working in a private directory until things become sufficiently stable, so nothing will show up in the repository for a while.

Question:  In going over the code which is needed for this job, I seem to have found quite a few functions which seem to be predicates but have not been converted to the new notation.  Some are in the "factors" directory, but others are scattered elsewhere (e.g., "univar").  Should I systematically rename all of these as I find them?  I worry that doing so might break a lot of other code!  Example: CanBeUni.mpw.

Sherm

Ted Kosan

unread,
Oct 14, 2011, 2:37:19 PM10/14/11
to mathpi...@googlegroups.com
Sherm wrote:

If you post the names of predicate functions that need to be changed
to the new notation, I will make the changes using Netbeans (which has
very good refactoring and search-and-replace tools).

Ted
Ted

Sherm Ostrowsky

unread,
Oct 14, 2011, 3:45:34 PM10/14/11
to mathpi...@googlegroups.com
OK.  I'll make a search of reasonable places and see how many I can pick up.  Glad you can do the substitution "the easy way"!

Sherm

Sherm Ostrowsky

unread,
Oct 15, 2011, 12:01:33 AM10/15/11
to mathpi...@googlegroups.com
First response:

I am puzzled.  I did a complete checkout of MathPiper2 from the repository, to be sure I have the latest stuff.

I know that a lot of work has recently gone into changing the names of all predicates so that they use a "?" at end, and that all the code files have been adjusted accordingly.

But when I checked through all the .mpw files in the directory
C:\mathpiper_ide\src\library_apps\mathpiper2\src\org\mathpiper\scripts4\factors,
I found the following Predicate functions (without "?") called within If() statements:
=
Contains()
InVerboseMode()
IsAtom()
IsBound()
IsComplex()
IsConstant()
IsDiagonal()
IsEqual()
IsEven()
IsInteger()
IsLessThan()
IsList()
IsListOfLists()
IsMonomial()
IsNegativeNumber()
IsNumber()
IsNumericList()
IsPowerOf2()
IsRational()
IsRationalFunction()
IsZero()

I have not yet checked some other directories, such as univar and multivar, but I expect to find similar things there, too.
 
OK.  So, either these particular predicates have not yet undergone the revision process, or the functions in directory    factors   were for some reason omitted from undergoing this process.  What is actually happening here?

Sherm

Ted Kosan

unread,
Oct 15, 2011, 12:19:27 AM10/15/11
to mathpi...@googlegroups.com
Sherm wrote:

> I am puzzled.  I did a complete checkout of MathPiper2 from the repository,
> to be sure I have the latest stuff.
>
> I know that a lot of work has recently gone into changing the names of all
> predicates so that they use a "?" at end, and that all the code files have

> been adjusted accordingly. <snip>

All of the changes I have been making recently have been in the
following branch:

branches/mathpiper2ide

If you check this branch out, you will receive a complete copy of the
whole IDE which will also include mathpiper2.

Ted

Sherm Ostrowsky

unread,
Oct 15, 2011, 12:29:26 AM10/15/11
to mathpi...@googlegroups.com
The command I have been using to do the checkout is given below:

svn checkout https://mathpiper.googlecode.com/svn/branches/mathpiperide2

Apparently, somehow I got this copied with the "2" in the wrong place?   What the heck have I been working with, then?

Sherm


Ted Kosan

unread,
Oct 15, 2011, 12:40:37 AM10/15/11
to mathpi...@googlegroups.com
Sherm wrote:

> The command I have been using to do the checkout is given below:
>
> svn checkout https://mathpiper.googlecode.com/svn/branches/mathpiperide2
>
> Apparently, somehow I got this copied with the "2" in the wrong place?
> What the heck have I been working with, then?

That's a good question. My thought is to delete all your old copies of
MathPiper and MathPiperIDE and check out this branch again.

Ted

Sherm Ostrowsky

unread,
Oct 15, 2011, 1:09:01 AM10/15/11
to mathpi...@googlegroups.com
Yes, but do I want /mathpiperide2, or /mathpiper2ide ?

Sherm

Ted Kosan

unread,
Oct 15, 2011, 1:18:00 AM10/15/11
to mathpi...@googlegroups.com
Sherm wrote:

> Yes, but do I want /mathpiperide2, or /mathpiper2ide ?

/mathpiperide2 with the 2 on the end.

Ted

Sherm Ostrowsky

unread,
Oct 15, 2011, 2:39:50 PM10/15/11
to mathpi...@googlegroups.com
OK.  That worked.  At this moment, I see only two predicates left (IN USE in the 'factor" directory) without "?" at the end:  these are InVerboseMode() and "=".

The former works as-is, which means that its definition was never modified for the new terminology.

The second required me to change every "=" to "=?" on many lines in several functions;  after that, it worked.

I will continue to search for more, but also will begin work on my main project objective here.

Sherm
Reply all
Reply to author
Forward
0 new messages