Commit e5ced0de authored by Hynek Baran's avatar Hynek Baran

newresolve v. .02

Sent to MM
# TODO:
# * in remainder fails, references to source nonlinear fails are missing
# * recursive remainder generation is missing (we have single-pass only)
# * `resolve/nonresrat` is not implemented
parent 7e78debe
......@@ -105,10 +105,10 @@
</Group>
<Group labelreference="L976" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">jets_new_resolve_enable := true; </Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">jets_new_resolve_enable := &quot;../mc&quot;; </Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYoLUkjbWlHRiQ2JVE4amV0c19uZXdfcmVzb2x2ZV9lbmFibGVGJy8lJ2l0YWxpY0dRJXRydWVGJy8lLG1hdGh2YXJpYW50R1EnaXRhbGljRictSSNtb0dGJDYtUSM6PUYnL0YzUSdub3JtYWxGJy8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGPS8lKXN0cmV0Y2h5R0Y9LyUqc3ltbWV0cmljR0Y9LyUobGFyZ2VvcEdGPS8lLm1vdmFibGVsaW1pdHNHRj0vJSdhY2NlbnRHRj0vJSdsc3BhY2VHUSwwLjI3Nzc3NzhlbUYnLyUncnNwYWNlR0ZMLUYsNiVGMUYvRjIvJStmb3JlZ3JvdW5kR1EoWzAsMCwwXUYnLyUpcmVhZG9ubHlHRj1GOQ==">SSV0cnVlRyUqcHJvdGVjdGVkRw==</Equation></Text-field>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYoLUkjbWlHRiQ2JVE4amV0c19uZXdfcmVzb2x2ZV9lbmFibGVGJy8lJ2l0YWxpY0dRJXRydWVGJy8lLG1hdGh2YXJpYW50R1EnaXRhbGljRictSSNtb0dGJDYtUSM6PUYnL0YzUSdub3JtYWxGJy8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGPS8lKXN0cmV0Y2h5R0Y9LyUqc3ltbWV0cmljR0Y9LyUobGFyZ2VvcEdGPS8lLm1vdmFibGVsaW1pdHNHRj0vJSdhY2NlbnRHRj0vJSdsc3BhY2VHUSwwLjI3Nzc3NzhlbUYnLyUncnNwYWNlR0ZMLUkjbXNHRiQ2I1EmLi4vbWNGJy8lK2ZvcmVncm91bmRHUShbMCwwLDBdRicvJSlyZWFkb25seUdGPUY5">USYuLi9tYzYi</Equation></Text-field>
</Output>
</Group>
<Group hide-input="false" hide-output="false" labelreference="L935" drawlabel="true">
......@@ -116,9 +116,8 @@
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">read(&quot;../mc/Jets.s&quot;);</Text-field>
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">`Jets 5.91 RC 1 as of Oct 15, 2018`</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets.newresolve v 0.1 as of April 2018
Using the new implementation of resolve (not well tested yet!) </Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets 5.92 test1 as of Oct 19, 2018 (2018-10-19 09:42:25)</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets.newresolve v 0.2 as of Oct 2018 (2018-10-19 10:08:26)</Text-field>
</Output>
</Group>
<Group hide-output="false" labelreference="L936" drawlabel="true">
......
This diff is collapsed.
......@@ -2,10 +2,14 @@
# R e s o l v e - the new implementation (not well tested yet)
#
printf("Jets.newresolve v 0.1 as of April 2018");
printf("\nUsing the new implementation of resolve (not well tested yet!) \n");
#`resolve/nonresrat` := 3;
printf("Jets.newresolve v 0.2 as of Oct 2018 (%s)\n",
StringTools[FormatTime]("%Y-%m-%d %T", timestamp=FileTools[Status](__FILE__)[5]));
# TODO:
# * in remainder fails, references to source nonlinear fails are missing
# * recursive remainder generation is missing (we have single-pass only)
# * `resolve/nonresrat` is not implemented
#`resolve/nonresrat` := 3;
......@@ -130,7 +134,7 @@ printf("\nUsing the new implementation of resolve (not well tested yet!) \n");
Reportf(1, ["Combining %a nonlinear eqs given %a linear results", nops(AN), nops(AE)]);
Reportf(2, ["...witch properties are [price, size, VarL, LC]:\n%s",
StringTools:-Join(map(a -> sprintf("%q\n",[a:-price,a:-size,a:-Vars, a:-LC]), AE))]);
Reportf(0, ["Lets resolve combined %a linear eqs (out of %a nonlinear)...", nops(AE), nops(AN)]);
Reportf(0, ["Lets resolve combined %a eqs (generated from %a nonlinear)...", nops(AE), nops(AN)]);
ans := `resolve/lin/r`(convert(AE, set), ForceFail=ff);
fi;
......@@ -397,7 +401,7 @@ end:
if type(G:-LC, 'nonzero') then
return res;
else
Report(0, ["`resolve2/rem` failed for ", F:-LV, "nonzero coeff is", G:-LC]);
Report(2, ["`resolve2/rem` failed for ", F:-LV, "nonzero coeff is", G:-LC]);
Report(3, ["...remainder is", res]);
resdata := `resolve/data/collect/remainder` (res, F, G, source=''procname'');
`resolve/fails/collect`('remainder', resdata);
......@@ -479,7 +483,7 @@ end:
### rat := `resolve/nonresrat/test`(os, map(lhs-rhs, ans));
Report(0, [`bobo`, nops(ans), nops(aux), nops(rs)]);
#Report(0, [`FInally resolved`, nops(ans), nops(aux), nops(rs)]);
if ans = {} then
map(proc(a)
......
......@@ -188,6 +188,9 @@
# * NewIntSeq() introduced
# * Report macro changed to inlined function
# * New resolve implementation (jets_new_resolve_enable) removed from the Jets.s source file to the Jets.newresolve.s file
#
# v 5.92
# * testing new nonlinear resolve implementation in file (cat(jets_new_resolve_enable, "/Jets.newresolve.s"))
###########################################################################################
###########################################################################################
......@@ -196,7 +199,8 @@
###########################################################################################
interface(screenwidth=120):
lprint(`Jets 5.91 RC 1 as of Oct 15, 2018`);
printf("Jets 5.92 test1 as of Oct 19, 2018 (%s)\n",
StringTools[FormatTime]("%Y-%m-%d %T", timestamp=FileTools[Status](__FILE__)[5]));
#
# Source code configuration, options and parameters
......@@ -208,7 +212,7 @@ lprint(`Jets 5.91 RC 1 as of Oct 15, 2018`);
# Use assignments bellow (before reading Jets.s in) to enable such additional code.
#`Jets/opts`["Optionals"]["Multiord"] := true:
#jets_new_resolve_enable := true;
#jets_new_resolve_enable := ".";
#
# Debugging
......@@ -269,14 +273,14 @@ ProcBaseSYMBOL := proc() option inline; convert(StringTools:-UpperCase(ProcBaseN
Report := proc(l, m)
option inline;
`if` (`report/tab`[ProcBaseSymbol()] > l, # l<=0 or ... for some magic reason wont work
report(cat(ProcBaseSYMBOL(), '`:`'), [cat(ProcNameN(0),'`[[`',l,'`]]`',":"), `if`(type(m,list),op(m),m)]),
report(cat(ProcBaseSYMBOL(), '`:`'), [cat(ProcNameN(0),'`[`',l,'`]`',":"), `if`(type(m,list),op(m),m)]),
NULL);
end:
Reportf := proc(l, m)
option inline;
`if`(`report/tab`[ProcBaseSymbol()] > l,
report(cat(ProcBaseSYMBOL(), '`:`'), sprintf(cat("%a [[%a]]:", op(1,m)), ProcNameN(0), l, op(2..-1, m))),
report(cat(ProcBaseSYMBOL(), '`:`'), sprintf(cat("%a[%a]: ", op(1,m)), ProcNameN(0), l, op(2..-1, m))),
NULL);
end:
......@@ -3049,8 +3053,13 @@ resolve := proc({keepfails::truefalse:=false})
return (res);
end:
if not(assigned(jets_new_resolve_enable)) then
if assigned(jets_new_resolve_enable) and FileTools[Exists](cat(jets_new_resolve_enable, "/Jets.newresolve.s")) then # jets_new_resolve_enable
read (cat(jets_new_resolve_enable, "/Jets.newresolve.s"));
else # jets_new_resolve_enable
if assigned(jets_new_resolve_enable) and not(FileTools[Exists](cat(jets_new_resolve_enable, "/Jets.newresolve.s"))) then
printf("Error: Using old resolve implementation, %a file not found.\n", cat(jets_new_resolve_enable, "/Jets.newresolve.s"));
fi;
#
# R e s o l v e - the old implementation
#
......@@ -3162,13 +3171,10 @@ end:
`resolve/subs` := proc(a,v,q)
Simpl(subs(v = q, a)) # Correction: Simpl added 9.7.2007
end:
fi: # jets_new_resolve_enable
else # jets_new_resolve_enable
read ("../mc/Jets.newresolve.s");
fi: # jets_new_resolve_enable
#
......
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment