diff --git a/check/coverage.frm b/check/coverage.frm index b03b7ccb..ca02044a 100644 --- a/check/coverage.frm +++ b/check/coverage.frm @@ -685,3 +685,17244 @@ assert result("test7") =~ expr("f(1)*y1^3*y2^2 + f(1,1)*n1^3*n2^2 + 2*f(2,1)*y1^ assert result("test8") =~ expr("0") assert result("test9") =~ expr("0") *--#] cov_transform : + +*--#[ cov_stmt_tableops : +* covers Fill, PrintTable, ClearTable statements +Symbols x,y; +CTable,sparse tbl(1); +Fill tbl(2) = x^2+y; +Local F = tbl(2); +Print F; +.sort +ClearTable tbl; +Fill tbl(2) = 2*y; +Local G = tbl(2); +Print G; +PrintTable tbl; +.end +assert succeeded? +assert result("G") =~ expr("2*y") +assert nterms("F") == 2 +*--#] cov_stmt_tableops : +*--#[ cov_stmt_compress : +* covers Compress on/off and FunPowers (all options) declarations +Symbols x; +Compress on; +CFunction f; +Local F = (x+1)^3; +Print; +.sort +Compress off; +Print; +.sort +FunPowers allfunpowers; +Local G = f(x)^3; +Print G; +.sort +FunPowers nofunpowers; +.end +assert succeeded? +assert result("F") =~ expr("1 + 3*x + 3*x^2 + x^3") +assert result("G") =~ expr("f(x)^3") +*--#] cov_stmt_compress : +*--#[ cov_stmt_unittrace : +* covers UnitTrace statement +Index mu; +Local F = gi_(1)*g_(1,mu)*g_(1,mu); +Trace4,1; +Print F; +.sort +UnitTrace 7; +Local G = gi_(2)*g_(2,mu)*g_(2,mu); +Trace4,2; +Print G; +.end +assert succeeded? +assert result("F") =~ expr("16") +assert result("G") =~ expr("28") +*--#] cov_stmt_unittrace : +*--#[ cov_stmt_ratio : +* covers Ratio statement (partial fractioning with c = b-a) +Symbols a,b,c; +Local F = 1/(a^2*b^2); +Ratio a,b,c; +Print +s F; +.end +assert succeeded? +assert nterms("F") == 4 +*--#] cov_stmt_ratio : +*--#[ cov_stmt_chisholm : +* covers Chisholm statement +Index a,b,mu,nu; +Local F = g_(1,a,mu,b)*g_(2,mu)*g_(2,nu)*g_(1,nu); +Chisholm 2; +Print F; +.end +assert succeeded? +*--#] cov_stmt_chisholm : +*--#[ cov_stmt_switch : +* covers Switch/Case/Break/Default/EndSwitch statements +Symbols x; +Local F = x; +.sort +#$num = 2; +Switch $num; + Case 1; + Multiply 10; + Break; + Case 2; + Multiply 20; + Break; + Default; + Multiply 99; +EndSwitch; +Print F; +.end +Symbols x; +Local G = x; +.sort +#$num = 5; +Switch $num; + Case 1; + Multiply 10; + Break; + Case 2; + Multiply 20; + Break; + Default; + Multiply 99; +EndSwitch; +Print G; +.end +assert succeeded? +assert result("F") =~ expr("20*x") +assert result("G") =~ expr("99*x") +*--#] cov_stmt_switch : +*--#[ cov_stmt_ifelse : +* covers If with dollar comparisons, ElseIf, Else and the one-line If form +Symbols x; +Local F = x; +.sort +#$num = 2; +If ($num == 2); + Multiply 3; +ElseIf ($num == 1); + Multiply 11; +Else; + Multiply 13; +EndIf; +If ($num > 5) Multiply 7; +Print F; +.end +assert succeeded? +assert result("F") =~ expr("3*x") +*--#] cov_stmt_ifelse : +*--#[ cov_stmt_setexit : +* covers SetExitFlag statement (graceful stop; after it the sort is skipped) +Symbols x; +Local F = x; +Print F; +.sort +SetExitFlag; +.end +#pend_if mpi? +assert succeeded? +*--#] cov_stmt_setexit : +*--#[ cov_stmt_exit : +* covers Exit statement (abnormal termination) +Symbols x; +Local F = x; +Print F; +Exit "stopping early"; +.end +assert runtime_error? +*--#] cov_stmt_exit : +*--#[ cov_stmt_writenwrite : +* covers Write and NWrite format statements with various options +Symbols x; +Write stats; +NWrite statistics; +Write shortstats; +NWrite warnings; +Write allwarnings; +NWrite setup; +Write names; +NWrite allnames; +Write codes; +NWrite highfirst; +Write lowfirst; +NWrite powerfirst; +Write tokens; +Local F = x; +Print F; +.end +assert succeeded? +assert result("F") =~ expr("x") +*--#] cov_stmt_writenwrite : +*--#[ cov_pp_random : +* covers #setrandom and the random_ preprocessor function +#setrandom 8938 +#$r = random_(6); +#$s = random_(6); +Symbols x; +Local F = $r*x; +Local G = $s*x; +Print F; +Print G; +.end +assert nterms("F") == 1 +assert nterms("G") == 1 +*--#] cov_pp_random : +*--#[ cov_pp_directives : +* covers #breakdo, #show, #debug and #commentchar +* (with #debug 1 the preprocessor runs in preprocess-only mode) +#debug 1 +#show +#commentchar % +% comment via the changed comment character +#do i = 1,5 + #breakdo +#enddo +*--#] cov_pp_directives : +*--#[ cov_pp_appendexchange : +* covers #append/#write/#close and #exchange for expressions and $variables +#append +#write "new line" +#close +S x,y; +Local F = x; +Local G = 2*y; +.sort +#exchange F,G +#$a = 1; +#$b = 2; +#exchange $a,$b +Local H = $a + $b + F; +Print H; +.end +#prepare write "outappend.txt", "old line\n" +assert succeeded? +assert result("H") =~ expr("3 + 2*y") +*--#] cov_pp_appendexchange : +*--#[ cov_opt_format : +* covers the optimization options of the Format statement and +* #optimize/#clearoptimize/#skipextrasymbols/Delete extrasymbols +Symbols a,b,c,d,e; +Local F1 = (a+b+c)*(d+e)*(a+c) + (a+c)*(b+d)*(e+1) + a^2*e - b^3; +Format O1,method=cse; +.sort +#optimize F1 +#write "%O" +#clearoptimize +Local F2 = (a+b+c)*(d+e)*(a+c) + (a+c)*(b+d)*(e+1) + a^2*e - b^3; +Format O2,greedyminnum=3,greedymaxperc=2,horner=occurrence, + hornerdirection=forwardandbackward,stats=on; +.sort +#optimize F2 +#write "%O" +#skipextrasymbols +Delete extrasymbols; +#clearoptimize +Local F3 = (a+b+c)*(d+e)*(a+c) + (a+c)*(b+d)*(e+1) + a^2*e - b^3; +Format O3,mctsnumexpand=5,mctsnumkeep=2,mctsnumrepeat=1,mctsconstant=0.5, + mctsdecaymode=0,mctstimelimit=1; +.sort +#optimize F3 +#write "%O" +#clearoptimize +Local F4 = (a+b+c)*(d+e)*(a+c) + (a+c)*(b+d)*(e+1) + a^2*e - b^3; +Format O4,saIter=10,saMinT=1,saMaxT=2,method=csegreedy,greedytimelimit=1, + timelimit=1,printscheme=off,debugflag=2; +.sort +#optimize F4 +#write "%O" +#clearoptimize +.end +assert succeeded? +*--#] cov_opt_format : +*--#[ cov_opt_scheme : +* Scheme option of the Format,Optimize statement (CoOptimizeOption) +Symbols a,b,c,d; +Local F1 = (a+b+c)*(d+a); +Format O1,scheme=(a,b,c,d); +.sort +#optimize F1 +#write "%O" +#clearoptimize +Local F2 = (a+b+c)*(d+a); +Format O2,horner=sa,method=greedy,scheme=(a,c,b),printscheme=on; +.sort +#optimize F2 +#write "%O" +#clearoptimize +.end +assert succeeded? +*--#] cov_opt_scheme : +*--#[ cov_opt_badopts : +* error branches of the Format,Optimize option parser (CoOptimizeOption) +Symbols x,y; +Local F = x*y; +Format O1,foo=5; +Format O2,horner=wrong,method=wrong,stats=wrong; +.sort +.end +assert compile_error? +*--#] cov_opt_badopts : +*--#[ cov_totensor : +* ToTensor statement (FindAll in pattern.c): vector occurrences in +* dotproducts, contractions and function arguments become tensor arguments +Vectors p; +CTensors t; +Indices i,j; +CFunction g; +Local F = p(i)*p(i)*p(1)*p(j); +ToTensor t,p; +Print F; +.end +assert succeeded? +assert result("F") == "t(1,j,N1_?,N1_?)" +*--#] cov_totensor : +*--#[ cov_totensor2 : +* ToTensor statement: dotproduct conversion and function-argument vectors +Vectors p,q; +CTensors t; +CFunction g; +Indices i,j; +Local F = g(p(i),p(j)) + p(i)*q(i)*q(j); +ToTensor t,p; +Print F; +.end +assert succeeded? +assert result("F") == "t(q)*q(j)+g(p(i),p(j))" +*--#] cov_totensor2 : +*--#[ cov_contentexpr : +* content_/firstterm_ expression functions (GetContent/GetFirstTerm in execute.c) +Symbols x,y; +Local F = (x/3+2/y)^2; +.sort +Local C = content_(F); +Local T = firstterm_(F); +Print C, T; +.end +assert succeeded? +assert result("C") == "1/9*y^-2" +assert result("T") == "4*y^-2" +*--#] cov_contentexpr : +*--#[ cov_contentmerge : +* content_ over the ContentMerge object cases (execute.c): multi-term +* expressions with symbols/dotproducts/indices/vectors/gammas/deltas/ +* functions, plus the stored-expression branch of GetContent +Symbols x,y; +Vectors p,q; +Indices i,j; +Functions G; +Local F = 2*x*p.q*i*p*G(j) + 4*x*p.q*i*p*G(j) + 8*x*p.q*i*p*G(j); +Local F2 = 2*g_(1,i)*x + 6*g_(1,i)*x + 14*g_(1,i)*x; +Local F3 = 3*g_(p,q)*x + 6*g_(p,q)*x + 5*g_(p,q)*x; +Local F4 = 3*x^2*y^2 + 6*x*y^3 + 9*y^4; +.sort +Local C = content_(F); +Local C2 = content_(F2); +Local C3 = content_(F3); +Local C4 = content_(F4); +Global G5 = 3*x^2*y^2 + 6*x*y^3 + 9*y^4; +.sort +Print C, C2, C3, C4; +.store +Local D = content_(G5); +Print D; +.end +assert succeeded? +assert result("C") == "14*G(j)*p*i*p.q*x" +assert result("C2") == "22*g_(1,i)*x" +assert result("C3") == "14*g_(p,q)*x" +assert result("C4") == "3*y^2" +assert result("D") == "3*y^2" +*--#] cov_contentmerge : +*--#[ cov_contentmerge2 : +* content_ of dollar expressions: the factors of a $-expression are merged +* by ContentMerge (normal.c CONTENTTERM route), exercising its DOTPRODUCT, +* INDEX, VECTOR, DELTA/GAMMA and negative-power object cases +Symbols a,b,x,y; +Vectors p,q; +Indices i,j; +Functions G; +Local F = 2*x*p.q*i*p*G(j) + 4*x*p.q*i*p*G(j) + 8*x*p.q*i*p*G(j); +#$pd = (x*p.q*i*G(j))*(p.q)*(3+5*x); +#$pe = (g_(1,i)*x)*(g_(p,q))*(2+4*g_(1,i)); +#$pf = (p*i*x)*(3+7*p*i); +#$pg = (x^-2)*(x^-2*y^-3+2); +#$ph = (p.q^-2)*(p.q^-2*x+2); +#$pi = (p.q*x^-2)*(2+3*p.q*x^-2); +#$pj = (p.q^-2*x)*(2+3*p.q^-2); +#$pk = (b)*(a^-2+3*b); +#$pl = (x^-2)*(p.q^-2*x^-2+2); +#$cd = content_($pd); +#$ce = content_($pe); +#$cf = content_($pf); +#$cg = content_($pg); +#$ch = content_($ph); +#$ci = content_($pi); +#$cj = content_($pk); +#$ck = content_($pj); +#$cl = content_($pl); +.sort +Local CA = $cd; +Local CB = $ce; +Local CC = $cf; +Local CD = $cg; +Local CE = $ch; +Local CF = $ci; +Local CI = $ck; +Local CJ = $cj; +Local CL = $cl; +Local CM = content_(F); +.sort +Print CA, CB, CC, CD, CE, CF, CI, CJ, CL, CM; +.end +assert succeeded? +assert result("CA") == "G(j)*i*p.q^2*x" +assert result("CB") == "2*g_(p,q)*x" +assert result("CC") == "p*i*x" +assert result("CD") == "x^-4*y^-3" +assert result("CE") == "p.q^-4" +assert result("CF") == "p.q*x^-4" +assert result("CI") == "p.q^-4*x" +assert result("CJ") == "a^-2*b" +assert result("CL") == "p.q^-2*x^-4" +assert result("CM") == "14*G(j)*p*i*p.q*x" +*--#] cov_contentmerge2 : +*--#[ cov_tracengen : +* tracen: recursion (6/8 gammas), n-4 dimension indices, repeated indices +* (TraceNgen in opera.c) +Symbols n; +Symbols [n-4]; +Dimension n:[n-4]; +Indices ind,m1,m2,m3,m4,m5,m6,m7,m8; +Local F = g_(1,m1,m2,m3,m4,m5,m6); +Local G = g_(1,m1,m2,m3,m4,m5,m6,m7,m8); +Local H = g_(ind,m1,m2,m1,m2); +Local I = g_(ind,m1,m2,m1,m2,m3,m4,m5,m6); +Local J = g_(ind,m1,m2,m3,m1,m2,m3,m4,m5); +Local K = g_(ind,m1,m2,m3,m4,m1,m2,m3,m4); +tracen,1; +tracen,ind; +.sort +* switch to a symbolic dimension without the [n-4] companion: indices +* declared from here on have no nmin4 (TraceNgen else-branches) +Dimension n; +Indices m11,m12,m13,m14,m15; +Local L = g_(1,m11,m12,m13,m11,m12,m13,m14,m15); +Local M = g_(1,m11,m12,m13,m14,m15,m11,m12,m13,m14,m15); +Local N = g_(1,m1,m2,m3,m4,m1); +Local O = g_(1,m1,m1,m2,m3); +tracen,1; +.sort +Local n1 = nterms_(F); +Local n2 = nterms_(G); +Local n3 = nterms_(H); +Local n4 = nterms_(I); +Local n5 = nterms_(J); +Local n6 = nterms_(K); +Local n7 = nterms_(L); +Local n8 = nterms_(M); +Local n9 = nterms_(N); +Local n10 = nterms_(O); +Print n1, n2, n3, n4, n5, n6, n7, n8, n9, n10; +.end +assert succeeded? +assert result("n1") == "15" +assert result("n2") == "105" +assert result("n3") == "2" +assert result("n4") == "6" +assert result("n5") == "3" +assert result("n6") == "4" +assert result("n7") == "3" +assert result("n8") == "5" +assert result("n9") == "0" +assert result("n10") == "1" +*--#] cov_tracengen : +*--#[ cov_bracketpow : +* powers of bracketed expressions (DoOnePow/FindBracket in proces.c/index.c) +Symbols x,y; +Local F = (x+y)*(x+y); +Bracket x; +.sort +Local G = F^2; +Print G; +.end +assert succeeded? +assert result("G") == "y^4+4*x*y^3+6*x^2*y^2+4*x^3*y+x^4" +*--#] cov_bracketpow : +*--#[ cov_printoptions : +* covers option syntax and string form of Print/NPrint statements +Symbols x; +#$d = 3; +Local F = (x+1)^2; +Print +s; +.sort +Print -s F; +.sort +Print +ss; +.sort +Print -ss; +.sort +Print +f; +.sort +Print "%$ is the value",$d; +Print -f; +.sort +NPrint; +.end +assert succeeded? +assert result("F") =~ expr("1 + 2*x + x^2") +*--#] cov_printoptions : +*--#[ cov_onoff : +* covers On/Off statements with most option keywords and arguments +On insidefirst; +Off insidefirst; +On propercount; +Off propercount; +On allnames; +Off allnames; +On allwarnings; +Off allwarnings; +On powerfirst; +On lowfirst; +On highfirst; +On setup; +Off setup; +On codes; +Off codes; +On tokens; +Off tokens; +On properorder; +Off properorder; +On nospacesinnumbers; +Off nospacesinnumbers; +On totalsize; +Off totalsize; +On backtrace; +Off backtrace; +On flag,1; +Off flag,1; +On innertest; +Off innertest; +On oldfactarg; +Off oldfactarg; +On memdebugflag; +Off memdebugflag; +On oldgcd; +Off oldgcd; +On oldprfsign; +Off oldprfsign; +On wtimestats; +Off wtimestats; +On sortreallocate; +Off sortreallocate; +On humanstats; +Off humanstats; +On humanstatistics; +Off humanstatistics; +On fewerstats; +Off fewerstats; +On fewerstatistics; +Off fewerstatistics; +On processstats; +Off processstats; +On finalstats; +Off finalstats; +On shortstats; +Off shortstats; +On shortstatistics; +Off shortstatistics; +On grccverbose; +Off grccverbose; +On sortverbose; +Off sortverbose; +On indentspace 5; +Off indentspace; +On compress; +Off compress; +On compress gzip 8; +Off compress; +On compress zstd 5; +Off compress; +On statistics; +Off statistics; +.end +assert succeeded? +*--#] cov_onoff : +*--#[ cov_onflint : +* On/Off flint on a FLINT-less build only prints a warning, so it needs the +* tolerant assert (upstream polynomial.frm precedent); kept out of cov_onoff +* so the rest of the option sweep runs unchanged without FLINT. +On flint; +Off flint; +.end +assert succeeded? || warning?("FORM was not built with FLINT support.") +*--#] cov_onflint : +*--#[ cov_onopt_unknown : +* On with an unknown keyword +On nosuchoption; +.end +assert compile_error?('Unrecognized option in ON statement') +*--#] cov_onopt_unknown : + +*--#[ cov_onopt_checkpoint : +* On checkpoint with an unparsable interval (after the deprecation warning) +On checkpoint 5z; +.end +assert compile_error?('Unrecognized time interval in ON Checkpoint statement') +*--#] cov_onopt_checkpoint : + +*--#[ cov_onopt_compress : +* On compress with an unknown keyword +On compress badthing; +.end +assert compile_error?('Unrecognized option in ON compress statement') +*--#] cov_onopt_compress : + +*--#[ cov_onopt_indentspace : +* IndentSpace above the maximum is clamped with a warning, not an error +On indentspace 50; +Off indentspace; +.end +assert warning?('IndentSpace parameter adjusted') +*--#] cov_onopt_indentspace : +*--#[ cov_factdollar : +* covers FactDollar statement and If with indexed (factorized) $-variables +Symbols x,y; +CFunction f1,f2; +Local F = f1(x^2+2*x*y+y^2)+f1(x^4-y^4); +id f1(x?$x) = f2(x); +FactDollar,$x; +Do $i = 1,$x[0]; + Print "in %t factor %$ is %$",$i,$x[$i]; +Enddo; +Print F; +.sort +Local G = $x[0]; +Local H = 1; +If ( $x[1] != 0 ); + Print "factor 1 ok"; + Multiply 2; +EndIf; +Print H; +Print G; +.end +# Under threads the module with $-assignments is forced to sequential mode +# (a warning is printed) and the dollar is captured once per thread. +#pend_if threaded? || mpi? +assert succeeded? +assert nterms("G") == 1 +assert result("H") =~ expr("2") +*--#] cov_factdollar : +*--#[ cov_factdollar_error : +* error paths: undefined dollar with factor index in If; too many %$ in Print format +Symbols x; +#$d = 2; +If ( $nosuch[1] == 0 ); + Print "x"; +EndIf; +Print "%$ %$",$d; +.end +assert compile_error? +*--#] cov_factdollar_error : +*--#[ cov_modulus : +* covers Modulus statement and its option keywords +Symbols x; +Modulus 7; +Local F = (x+5)^2; +Print F; +.sort +Modulus plusmin,positive,3; +Local G = (x+2)*(x+1); +Print G; +.sort +Modulus nofunctions,coefficientsonly,5; +Local H = (x+1)*(x+4); +Print H; +.sort +Modulus alsodollars,inversetable,nopowers,101; +#$dd = 8*8; +Local I = $dd + 1; +Print I; +.sort +Modulus nodollars,noinversetable,alsopowers,printpowersof(2),13; +Local J = 3*x^2+99; +Print J; +.end +assert succeeded? +assert result("F") =~ expr("4 + 3*x + x^2") +*--#] cov_modulus : +*--#[ cov_traceopts : +* covers Trace4 with option keywords and TraceN +Vectors p,q; +Index mu,nu; +Local F = g_(1,p,mu,q,mu); +Trace4,contract,1; +Print F; +.sort +Local A = g_(1,p,nu,q,nu); +Trace4,nocontract,1; +Print A; +.sort +Local B = g_(1,p,mu,q,mu); +Trace4,notrick,1; +Print B; +.sort +Local C = g_(1,p,mu,q,mu); +Trace4,trick,1; +Print C; +.sort +Local D = g_(1,p,mu,q,mu); +Trace4,nosymmetrize,1; +Print D; +.sort +Local E = g_(1,p,mu,q,mu); +Trace4,symmetrize,1; +Print E; +.sort +Local H = g_(2,p,mu,q,mu); +TraceN 2; +Print H; +.end +assert succeeded? +*--#] cov_traceopts : +*--#[ cov_traceopts_error : +* error paths of Trace4: undefined index, empty argument +Vectors p; +Index mu; +Local F = g_(1,p,mu,mu); +Trace4 notanindex; +Trace4 ; +.end +assert compile_error? +*--#] cov_traceopts_error : +*--#[ cov_createall : +* CreateAll loops and CreateAll paths on graphs of function arguments +Symbols a1,a2,a3; +CFunction f,g,outf; +Local F = f(a1,a2)*f(a2,a3)*f(a3,a1) + f(a1,a2) + f(a1,a3); +CreateAll loops,f,g,type=symbol,ifnoloop=0; +Print F; +.end +Symbols a1,a2,a3; +CFunction f,g,outf; +Local G = f(a1,a2)*f(a2,a3) + f(a1,a2)*f(a3,a2); +CreateAll paths,f,g,outf,type=symbol,ifnopath=0; +Print G; +.end +assert nterms("F") == 1 +assert result("F") =~ expr("f(a1,a2)*f(a2,a3)*f(a3,a1)*g(a1,a2,a3)") +assert result("G") =~ expr("f(a1,a2)*f(a2,a3)*outf(a2) + f(a1,a2)*f(a3,a2)*outf(a2)") +*--#] cov_createall : +*--#[ cov_replaceloop : +* ReplaceLoop statement and the findloop() condition of If +Index i1,i2,i3,j1,j2,j3; +CFunction fv(Symmetric),ofn; +Local F2 = fv(i1,i2,j1)*fv(i2,i3,j2)*fv(i1,i3,j3); +ReplaceLoop fv,arguments=3,loopsize=3,outfun=ofn,include=i1; +Print F2; +.sort +Local F3 = fv(i1,i2,j1)*fv(i2,i1,j2) + fv(i1,i2,j1); +If ( findloop(fv,arguments=3,loopsize=2) ); + Multiply 3; +EndIf; +Print F3; +.end +assert succeeded? +*--#] cov_replaceloop : +*--#[ cov_mergestuffle : +* Merge/Shuffle/Stuffle statements with once variants +CFunction mf; +Local F3 = mf(1,2)*mf(3,4); +Shuffle mf; +Print F3; +.sort +Local F4 = mf(1,2)*mf(3,4); +Merge mf; +Print F4; +.sort +Local F5 = mf(1,2)*mf(3,4); +Merge,once,mf; +Print F5; +.sort +Stuffle mf+; +Print F3; +.sort +Stuffle,once,mf-; +Print F4; +.sort +Stuffle mf-; +Print F5; +.end +assert succeeded? +*--#] cov_mergestuffle : +*--#[ cov_sumstmt : +* Sum statement with a list of replacement values +CFunction sf; +Index mu,nu; +Local T2 = sf(mu,mu); +Local T3 = sf(mu,nu)*sf(mu,nu); +Sum mu,0,1,2, nu,0,1,2; +Print; +.end +assert succeeded? +assert result("T2") =~ expr("sf(0,0) + sf(1,1) + sf(2,2)") +assert nterms("T3") == 9 +*--#] cov_sumstmt : +*--#[ cov_putinside : +* PutInside with bracket information (cf. manual example) +Symbols b1,c1,z; +Function pif; +Local PI = b1 + c1 + (b1+c1)*z; +Bracket b1; +.sort +PutInside pif; +Print; +.end +assert succeeded? +*--#] cov_putinside : +*--#[ cov_factorize : +* Factorize/UnFactorize on a named expression +Symbols x,y; +Local F7 = x^2*y^2 + x*y + 1; +Factorize F7; +Print F7; +.sort +UnFactorize F7; +Print F7; +.end +assert succeeded? +assert nterms("F7") == 3 +*--#] cov_factorize : +*--#[ cov_symmetrize_stmt : +* Symmetrize family on (a)symmetric functions +CFunction syf1,syf2,syf3; +Symbol a,b,c; +Local F8 = syf1(b,a)*syf2(b,a) + syf3(b,a,c); +Symmetrize syf1; +AntiSymmetrize syf2; +CycleSymmetrize syf3; +RCycleSymmetrize syf3; +Print F8; +.end +assert succeeded? +*--#] cov_symmetrize_stmt : +*--#[ cov_chisholm_dollar : +* Chisholm with a dollar-variable level and option keywords +Symbols x,z; +CFunction c1; +#$d = 3; +Local F = c1((x+z)^2) + c1(x+z); +Chisholm,symmetrize $d; +Chisholm,nosymmetrize 2; +Print F; +.end +assert succeeded? +*--#] cov_chisholm_dollar : +*--#[ cov_printfiles : +* Print to a file: the +f form and the form +Symbols q; +Local F9 = q^2; +#write "opened"; +Print +f, F9; +Print , F9; +.sort +Print , F9; +Print +f; +.end +#pend_if mpi? +assert succeeded? +*--#] cov_printfiles : +*--#[ cov_checkpoint_on : +* On checkpoint with an interval and a run script (deprecated mechanism, +* prints a DeprecationWarning unless FORM_IGNORE_DEPRECATION is set, so +* the asserts are warning-independent and hold in both environments) +On checkpoint 1s,run="true"; +Local F10 = 1; +Print; +.end +assert succeeded? || warning? +assert result("F10") =~ expr("1") +*--#] cov_checkpoint_on : +*--#[ cov_external : +* the #external preprocessor block +Symbols x; +#external cat +Local FX = (1+x)^3; +#rmexternal +Print; +.end +assert succeeded? +*--#] cov_external : +*--#[ cov_createrrors : +* error paths for CreateAll/ReplaceLoop/Print/On checkpoint +Symbols x; +CFunction f,g,h; +Local F = 1; +CreateAll cuts,f,g; +Print; +.end +assert compile_error? +assert stdout =~ /Illegal subkey/ +*--#] cov_createrrors : +*--#[ cov_preifdollar : +* #if/#elseif/#else/#ifdef/#ifndef with preprocessor dollars +#$d1 = 7; +#if ( $( $d1 == 7 ) ) +#write "if branch"; +#elseif ( $( $d1 > 7 ) ) +#write "elseif branch1"; +#else +#write "else branch"; +#endif +#if ( $( $d1 != 7 ) ) +#write "neg branch"; +#elseif ( $( $d1 < 7 ) ) +#write "elseif branch2"; +#else +#write "else2 branch"; +#endif +#ifdef $d1 +#write "d1 defined"; +#endif +#ifndef nosuchvar +#write "nosuch undefined"; +#endif +Local F = 1; +Print; +.end +assert succeeded? +assert stdout =~ /if branch/ +assert stdout =~ /else2 branch/ +assert stdout =~ /d1 defined/ +assert stdout =~ /nosuch undefined/ +*--#] cov_preifdollar : +*--#[ cov_prewrite : +* #create/#write/#append/#close/#remove with a channel +#$wv = 3; +#create "start"; +#write "wv=%$",$wv; +#append "more"; +#close ; +#remove ; +#write "plain %$",$wv; +Local F = 1; +Print; +.end +assert succeeded? +*--#] cov_prewrite : +*--#[ cov_symmetricmatch : +* id-matching for symmetric, cyclic and reversecyclic functions +Symbols x,y,z; +CFunction fsym(Symmetric),fcyc(Cyclic),frc(ReverseCyclic); +Symbol a,b,c,d; +Local M = fsym(b,a)*fsym(a,b) + fcyc(a,b,c)*fcyc(c,a,b) + + frc(b,a,c)*frc(c,a,b); +id fsym(x?,y?)*fsym(y?,x?) = fsym(x+y,0); +id fcyc(x?,y?,z?)*fcyc(z?,x?,y?) = fcyc(x,y,0); +id frc(x?,y?,z?)*frc(z?,x?,y?) = frc(x,y,0); +Print; +.end +assert succeeded? +assert nterms("M") == 3 +*--#] cov_symmetricmatch : +*--#[ cov_factdollar2 : +* FactDollar on a multi-term dollar and error path +Symbols x,y; +Local F = (x+1)*(y+1) + (x-1)*(y-1); +.sort +$e = F; +FactDollar $e; +Print "%$",$e; +.end +# The $-assignment module is forced to sequential mode under threads +# (produces a warning). +#pend_if threaded? || mpi? +assert succeeded? +*--#] cov_factdollar2 : +*--#[ cov_replaceloop2 : +* ReplaceLoop variants: no include, loopsize<, multiple loops in one term +Index i1,i2,i3,i4,i5,j1,j2,j3,j4,j5,k1; +CFunction fv(Symmetric),ofn; +Local F1 = fv(i1,i2,j1)*fv(i2,i1,j2); +ReplaceLoop fv,arguments=3,loopsize=2,outfun=ofn; +Print F1; +.sort +Local F2 = fv(i1,i2,j1)*fv(i2,i3,j2)*fv(i1,i3,j3)*fv(i4,i5,j5) + + fv(i1,i2,j1)*fv(i2,i1,j2)*fv(i3,i4,j4)*fv(i4,i3,j5); +ReplaceLoop fv,arguments=3,loopsize<4,outfun=ofn; +Print F2; +.end +assert succeeded? +*--#] cov_replaceloop2 : +*--#[ cov_gettable_err : +* sparse table lookup: unfilled elements stay as table calls +CTable,sparse ttt(1); +Fill ttt(1) = 7; +Local TT = ttt(2) + ttt(1) + ttt(2); +Print; +.end +assert succeeded? +assert result("TT") =~ expr("7 + 2*ttt(2)") +*--#] cov_gettable_err : +*--#[ cov_writeformats : +* #write format specifiers: %d %s %e %E %X %O and %% +Symbols x; +#define str "abc" +#$dd = 5; +Local F = x; +.sort +#write "A%d B%s"; +#write "S:%s",str; +#write "D:%$",$dd; +#write "E:%e",F; +#write "O:%O"; +#write "X:%X",F; +Print; +.end +assert succeeded? +assert stdout =~ /S:str/ +assert stdout =~ /D:5/ +assert stdout =~ /E:x;/ +assert stdout =~ /X:/ +*--#] cov_writeformats : +*--#[ cov_tryreplace : +* TryReplace swaps a pair of objects (only when it sorts better) +Symbols x,y,z; +Local F = y*z + y*x^2; +TryReplace x,z; +Print; +.sort +Local G = y*z + y*x^2; +TryReplace z,x; +Print G; +Print; +.end +assert succeeded? +assert nterms("F") == 2 +assert nterms("G") == 2 +*--#] cov_tryreplace : +*--#[ cov_table_err : +* table with a bounded index range, filled and read back +Table ttt(1:3); +Fill ttt(1) = 7; +Fill ttt(2) = 8; +Local TT = ttt(2)*ttt(1); +Print; +.end +assert succeeded? +assert result("TT") == "56" +*--#] cov_table_err : +*--#[ cov_symmetricmatch2 : +* deeper symmetric matching: nested (anti)symmetric arguments, cyclic wildcards +CFunction fs(Symmetric),fa(AntiSymmetric),fc(Cyclic),frc(ReverseCyclic); +Symbols a,b,c,d,x,y,z,q1,q2; +Local F = fa(b,a)*fa(a,c)*fa(c,b) + fs(a,b)*fs(b,a) + + fs(fa(a,b),fa(c,d))*fs(fa(c,d),fa(a,b)); +id fa(x?,y?)*fa(y?,z?) = fa(x,z); +id fs(x?,y?)*fs(y?,x?) = fs(x,y); +Print; +.sort +Local G = fc(a,b,c)*frc(a,b,c) + fc(q1,q2,a)*fc(a,q1,q2); +id fc(x?,y?,z?)*frc(x?,y?,z?) = fc(x,y,z); +id fc(x?,y?,z?)*fc(y?,z?,x?) = fc(1,x,y); +Print G; +Print; +.end +assert succeeded? +*--#] cov_symmetricmatch2 : +*--#[ cov_shapezoo1 : +* metric deltas, epsilon tensors and dotproducts +Vectors p1,p2,p3,p4; +Index i1,i2,i3; +Local ShpE = d_(i1,i2)*d_(i2,i3) + d_(i1,i1) + e_(p1,p2,p3,p4) + + e_(p1,p1,p3,p4) + p1.p2 + p4.p4; +Print ShpE; +.end +* nested functions, empty and numeric arguments +CFunction f,g,f2; +Symbols a,b,x,y,z; +Local ShpF = f(g(a,b),b) + f() + f(0) + f(f2(a)) + g(a^2-1) + f(x,y,z); +Print ShpF; +.end +assert succeeded? +assert nterms("ShpE") == 5 +*--#] cov_shapezoo1 : +*--#[ cov_shapezoo2 : +* Sqrt_, sum_ and denominators +Symbols x,k; +CFunction shpf; +Local ShpA = Sqrt_(x+1) + sum_(k,1,5,shpf(k)); +Print ShpA; +.sort +Symbols y; +Local ShpD = 1/(x^2+y) + (x-y)^-2; +Print ShpD; +.end +* bignum coefficients and high powers +Symbols x; +Local ShpB = 12345678901234567890^2 + (x+1)^61; +Print ShpB; +.end +assert succeeded? +*--#] cov_shapezoo2 : +*--#[ cov_wildzoo1 : +* set membership, dynamic sets and exclusions for wildcards +Symbols x,y,w,a,a1,a2,a3,b1,b2,c,nn; +CFunction wzf,wzg; +Set aa: a1,a2,a3; +Local W1 = wzf(a1) + wzf(b1) + wzf(a3); +id wzf(x?aa) = wzg(x); +Print W1; +.sort +Set bb: a1,a2,a3; +Local W2 = wzf(a2) + wzf(c) + wzf(a3); +id wzf(y?bb[nn]) = wzg(nn); +Print W2; +.end +Symbols z,d1,d2; +CFunction h1,h2,h3; +Local W3 = h1(0) + h1(5); +id h1(z?!{0,0}) = h2(z); +Print W3; +.sort +Symbols w,p,q,r,a3; +Local W4 = h3(p,q,a3,r); +id h3(w?{p,q,a3}) = h2(w); +Print W4; +.end +assert succeeded? +assert nterms("W3") == 2 +*--#] cov_wildzoo1 : +*--#[ cov_wildzoo2 : +* number and dummy-index wildcards in powers and tensors +Symbols x,x1,n; +CFunction t; +Local P1 = x^3 + x1^2; +id x^n? = t(x,n); +Print P1; +.end +Symbols q1,q2; +CFunction wzf,wzg; +Index i1,i2; +Local P2 = wzf(i1,i2)*wzf(i2,i1); +id wzf(N1_?,N2_?)*wzf(N2_?,N1_?) = wzg(N1_?,N2_?); +Print P2; +.end +assert succeeded? +assert nterms("P1") == 2 +*--#] cov_wildzoo2 : +*--#[ cov_idmodifiers : +* Many/Once/Only/Select id modifiers and bare-vector substitution +Symbols x,y; +CFunction f,g,h; +Local IdF = f(x)*f(y); +Many f(x?) = g(x); +Print IdF; +.sort +Local IdG = f(x)*f(y); +Once f(x?) = g(x); +Print IdG; +.sort +Local IdH = f(x)*f(y); +Only f(x?) = h(x); +Print IdH; +.sort +Local IdS = f(x); +Select f(x?) = h(x); +Print IdS; +Print; +.end +Vector p1,p2; +CFunction f; +Local IdV = f(p1,p2); +id p1 = p2; +Print IdV; +.end +assert succeeded? +assert result("IdF") =~ expr("g(x)*g(y)") +*--#] cov_idmodifiers : +*--#[ cov_dollarrhs : +* runtime dollars assigned in one module, used in the next +Symbols x,y; +CFunction f,g; +Local Dr0 = 1; +Print Dr0; +.sort +$d = x^2; +Print "%$",$d; +.sort +Local DrF = $d + f($d); +Print DrF; +Print; +.end +Symbols x,y; +CFunction f,g; +Local DrQ = f(y) + 1; +.sort +$w = f(y) + 1; +id f(x?) = g($w,x); +Print DrQ; +.end +#pend_if threaded? || mpi? +assert succeeded? +*--#] cov_dollarrhs : +*--#[ cov_errzoo_powerparen : +* unmatched parentheses inside a power +Symbols x,y; +Local Err1 = x^((y); +.end +assert compile_error?('Unmatched ()') +*--#] cov_errzoo_powerparen : + +*--#[ cov_errzoo_unkstmt : +* a statement name FORM does not know +UnrecognizedStatement; +.end +assert compile_error?('Unrecognized statement') +*--#] cov_errzoo_unkstmt : + +*--#[ cov_errzoo_dimfunc : +* d_ as a CFunction name is rejected at declaration, and its use with +* a symbol argument is rejected in the tensor +Symbols y1; +CFunction d_; +Local Err4 = d_(y1); +.end +assert compile_error?('Illegally formed function/tensor name') +*--#] cov_errzoo_dimfunc : + +*--#[ cov_errzoo_dotnum : +* a dotproduct needs a vector as its second element, not a number +Vector p2,p3; +Local Err5 = p2.5; +.end +assert compile_error?('Illegal second element in dotproduct') +*--#] cov_errzoo_dotnum : + +*--#[ cov_errzoo_paren : +* unmatched nested parentheses +Local Err7 = ((x); +.end +assert compile_error?('Unmatched ()') +*--#] cov_errzoo_paren : + +*--#[ cov_errzoo_dollarname : +* a $ in a symbol name is illegal +Symbols aa$b; +Local Err8 = 1; +.end +assert compile_error?('Illegally formed name in symbol statement') +*--#] cov_errzoo_dollarname : + +*--#[ cov_errzoo_dotprod : +* a dotproduct needs vectors; symbols are not a legal second element +Vector p4,p5; +Symbols r,s; +Local Err10 = p4.r + p4.s; +.end +assert compile_error?('Illegal second element in dotproduct') +*--#] cov_errzoo_dotprod : + +*--#[ cov_errzoo_printgt : +* Print with a %-format but no expression name +#pend_if mpi? +Symbols x9; +Print >%s Err10; +.end +assert compile_error?('Illegal object in (n)print statement') +*--#] cov_errzoo_printgt : + +*--#[ cov_errzoo_factorunfactor : +* Factor and UnFactor statements do not exist (use FactArg/Factorize) +Symbols x9; +CFunction FX; +Local Err9 = x9^3; +Factor FX; +.sort +UnFactor FX(???); +.end +assert compile_error?('Unrecognized statement Factor') +*--#] cov_errzoo_factorunfactor : +*--#[ cov_errpre : +* preprocessor-error zoo +Symbols x; +Local Ep1 = x; +.sort +#inside Ep1 +Local Epx = 2; +#endinside +Print Epx; +.end +#pend_if mpi? +assert preprocess_error? +*--#] cov_errpre : +*--#[ cov_polyratfun : +* PolyRatFun accumulation +Symbols x,y; +CFunction acc; +PolyRatFun acc; +Local PrFA = 3*x^2*acc(1+y+y^2,1-y) + 2*x^2*acc(1-y+y^2,1+y); +Print PrFA; +.end +* PolyRatFun with Denominators +Symbols a,x,y; +CFunction rat,den; +Local PrFB = 1/(x+y) + 1/(x-y^2); +.sort +PolyRatFun rat; +Denominators den; +id den(a?) = rat(1,a); +Print PrFB; +.end +* PolyRatFun reduction and default mode reset +Symbols x; +CFunction rat; +PolyRatFun rat; +Local PrFC = rat(x^2+1,x-1) + rat(x,x)/x; +Print PrFC; +.sort +PolyRatFun; +Local PrFD = rat(x,x); +Print PrFD; +.end +#pend_if mpi? +assert succeeded? +assert result("PrFA") =~ expr("x^2*acc(-y^3-10*y^2-2*y-5,y^2-1)") +assert nterms("PrFC") == 2 +*--#] cov_polyratfun : +*--#[ cov_precondzoo : +* preprocessor dollar conditions and do-loop bounds +#$n = 7; +#if ( $( $n > 5 ) ) +Local Q1 = 1; +#endif +#if ( $( $n < 3 ) ) +Local Q2 = 1; +#endif +#if ( $( $n == 7 ) ) +Local Q3 = 3; +#endif +#$k6 = 21; +#if ( $( $k6 / 3 == 7 ) ) +Local Q4 = 2; +#endif +Print Q1,Q3,Q4; +.end +* #do loop with plain and dollar bounds +#$n = 3; +#do p3 = 1,3 +Local T`p3' = `p3'+1; +Print T`p3'; +.sort +#EndDo +Print T1,T2,T3; +.end +#$n = 3; +#do p4 = 1,`$n' +Local U`p4' = `p4'*2; +Print U`p4'; +.sort +#EndDo +Print U1,U3; +.end +assert succeeded? +assert nterms("U3") == 1 +*--#] cov_precondzoo : +*--#[ cov_bracketkeep : +* brackets with Keep Brackets across modules +Symbols x; +CFunction f; +Local B1 = f(x)*x^2 + f(x)*x^3; +bracket x; +.sort +Keep Brackets; +Print B1; +.sort +Local B2 = B1; +Print B2; +.end +assert succeeded? +*--#] cov_bracketkeep : +*--#[ cov_optimize : +* optimizer: Horner + CSE with #optimize and #clearoptimize +CFunction f; +Symbols a,b,c; +Local OpH = f(a)+f(b)+(a+b+c)^2; +Local OpG = f(c)+(a+b+c)^3; +Format O2; +Print +f; +.sort +ExtraSymbols,array,w; +#optimize OpG +#write "%O" +#clearoptimize +.sort +#optimize OpH +#write "%O" +.end +* Format Optimize options and mcts Horner +Symbols a,b,c,d; +CFunction f; +Local OpM = (a+b)^2*(c+d)^3 + f((a+b)*(c+d)); +.sort +#optimize OpM +#write "%O" +#clearoptimize +.sort +Format Optimize horner=mcts,hornerdirection=backward; +.sort +#optimize OpM +#write "%O" +#clearoptimize +.sort +Format Optimize method=cse; +#optimize OpM +#write "%O" +#clearoptimize +.sort +Format Optimize method=csegreedy; +#optimize OpM +#write "%O" +#clearoptimize +.sort +Format Optimize method=greedy,horner=sa,hornerdirection=forwardandbackward; +#optimize OpM +#write "%O" +#clearoptimize +.end +#pend_if mpi? +assert succeeded? +*--#] cov_optimize : +*--#[ cov_precondmembers : +* $( ) special keywords set_ and multipleof_ inside #if +Symbols a,b,c,z; +Set s3: a,b; +#if $( b == set_(s3) ) +Local Pk1 = 1; +#endif +#if $( z == set_(s3) ) +Local Pk2 = 2; +#endif +#if $( z != set_(s3) ) +Local Pk3 = 3; +#endif +#if $( 6 == multipleof_(2) ) +Local Pk4 = 4; +#endif +#if $( 7 == multipleof_(3) ) +Local Pk5 = 5; +#endif +Print Pk1,Pk3,Pk4; +.end +assert succeeded? +assert result("Pk1") =~ expr("1") +*--#] cov_precondmembers : + +*--#[ cov_inside : +* #inside $var executes statements on the contents of a $ variable +CFunction f; +Local Inx1 = f(3); +.sort +$dd = f(3); +Print "%$",$dd; +.sort +#inside $dd + Multiply 2; +#endinside +.sort +Local Inx2 = f($dd); +Print Inx2; +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("Inx2") =~ expr("f(2*f(3))") +*--#] cov_inside : +*--#[ cov_termsinbracket : +* termsinbracket_() with Keep Brackets machinery +CFunction f,g; +Symbols x,y; +Local Te1 = (f(x)+f(y))*(g(x)+g(y)) + termsinbracket_(); +Print; +.sort +Keep Brackets; +Brackets x; +.sort +id f(x?) = termsinbracket_(0)*f(x) + g(x); +Print; +.sort +Local Te2 = termsinbracket_() + x; +Print Te2; +.end +assert succeeded? +*--#] cov_termsinbracket : +*--#[ cov_polyratsave : +* Save/Load of expressions with PolyRatFun (storage round trip) +Off Statistics; +CFunction acc,accinv; +Symbols x,y; +PolyRatFun acc,accinv; +Global F1 = acc(1+x,1) + acc(x,1+2*x); +Print F1; +.sort +.store +Save cov_prf.dat F1; +.end +Off Statistics; +CFunction acc,accinv; +Symbols x,y; +PolyRatFun acc,accinv; +Load cov_prf.dat F1; +Local F5 = F1 + acc(1,x); +Print F5; +.sort +.end +assert succeeded? +assert result("F5") =~ expr("acc(2*x^3 + 4*x^2 + 3*x + 1,2*x^2 + x)") +*--#] cov_polyratsave : +*--#[ cov_idfun : +* id_() intrinsic: crossbreed of replace_ and id statements +CFunction f; +Symbols a,b,c,x,y,u,v,z; +Local Id1 = x^2*id_(x^2,y+z+1,y,u+v,x,z+u)*y*3; +Print Id1; +.sort +Local Id2 = id_(a,3,c,2)*f(a,c); +Print Id2; +.sort +.end +assert succeeded? +assert result("Id1") =~ expr("3*v + 3*v*z + 3*u + 3*u*z + 3*y*v + 3*y*u") +*--#] cov_idfun : +*--#[ cov_trace4 : +* 4-dimensional gamma traces with Trace4 (spin lines 1 and 2) +Vector p1,p2,p3,p4,p5; +Symbols x,e; +Local Tr1 = g_(1,p1,p2,p3,p4); +Local Tr2 = g_(1,p1,p2,p3,p4,p5); +Local Tr3 = g5_(1,p1,p2,p3,p4); +Local Tr4 = g5_(1,p1,p2,p3,p4,p5); +Local Tr5 = g5_(1,p1,p2,p3,p4,p5,p2,p3,p4,p1); +Local Tr6 = g_(1,p1,p2,p3,p4,p5,p2,p3,p4,p1); +Local Tr7 = gi_(1,p1,p2,p3); +Local Tr8 = g_(1,p1,p2,p3,p4)*g5_(2,p1,p2,p3,p4); +Trace4,1; +id p1.p2 = x; +id p1.p1 = 3; +id p2.p2 = 2; +id p3.p3 = 4; +id p4.p4 = 5; +id p5.p5 = 6; +Print; +.sort +Trace4,2; +id x = 7; +Print; +.sort +Trace4,notrick,1; +Trace4,nosymmetrize,1; +Trace4,trick,1; +Print Tr1; +.sort +.end +assert succeeded? +assert result("Tr1") =~ expr("-4*p1.p3*p2.p4 + 4*p1.p4*p2.p3 + 28*p3.p4") +assert result("Tr3") =~ expr("4*e_(p1,p2,p3,p4)") +assert result("Tr2") == "0" +*--#] cov_trace4 : +*--#[ cov_diagrams : +* Feynman diagram generation via diagrams_ (grcc engine), manual: diagrams.tex +Model QCD; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle glu, +3; + Vertex QUA,qua,glu: g; + Vertex GHO,gho,glu: g; + Vertex glu,glu,glu: g; + Vertex glu,glu,glu,glu: g^2; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8; +Vector k1,k2,k3,k4,k5,k6,k7,k8; +Set ext : q1,q2,q3,q4,q5,q6,q7,q8; +Set int : k1,k2,k3,k4,k5,k6,k7,k8; +Local gluglu1 = diagrams_(QCD, {glu}, {glu}, int, ext, 1, + `WithEdges_'+`OnShell_'+`NoTadpole_'+`NoSnail_'); +Print gluglu1; +.sort +Local gg2 = diagrams_(QCD, {glu}, {glu}, int, ext, 2, 0); +Local gg2b = diagrams_(QCD, {glu}, {glu}, int, ext, 2, + `WithBlocks_'+`WithOnePISets_'+`WithoutNodes_'); +Local gg2t = diagrams_(QCD, {glu,glu}, {glu}, int, ext, 2, `TopologiesOnly_'); +Local vac = diagrams_(QCD, {}, {}, int, ext, 2, `Floop_'); +Print gg2; +.sort +Print gg2b; +.sort +Print gg2t; +.sort +Print vac; +.sort +.end +Model PHI3; + Particle phi, +1; + Vertex phi,phi,phi: g; +EndModel; +On GrccVerbose; +Vector q1,q2,k1,k2; +Set ext : q1,q2; +Set int : k1,k2; +Local t1 = diagrams_(PHI3, {phi}, {phi}, int, ext, 1, `TopologiesOnly_'); +Local gg = diagrams_(PHI3, {phi}, {phi}, int, ext, g^2, 0); +Print t1; +.sort +Off GrccVerbose; +Print gg; +.sort +.end +assert succeeded? +assert nterms("gluglu1") == 3 +assert nterms("gg2") == 127 +assert nterms("gg2b") == 65 +assert nterms("gg2t") == 217 +assert nterms("vac") == 5 +assert result("gluglu1") =~ /node_\(3,g,QUA\(-q1\),qua\(-q2\),glu\(k1\)/ +assert result("vac") =~ /topo_/ +assert nterms("t1") == 2 +assert nterms("gg") == 2 +assert result("t1") =~ /topo_\(2\)/ +*--#] cov_diagrams : +*--#[ cov_modstmts : +* module-level statements: insidefirst, propercount, notinparallel, nhide, +* nfactorize (CoInsideFirst, CoProperCount, CoNotInParallel, CoNoHide, +* CoNFactorize + DoFactorize without-factor mode) +S x; +CFunction f; +InsideFirst off; +ProperCount off; +NotInParallel; +NHide; +Local F = f(x)^2; +id f(x?) = x^2; +id x^2 = 4; +Factorize F; +NFactorize F; +Print F; +.sort +S c; +Local G = (x+1)^5*c + x^3*c; +Factorize G; +NFactorize G; +Print "%t"; +.sort +Print G; +.end +assert succeeded? +assert result("F") == "16" +*--#] cov_modstmts : +*--#[ cov_dolconv : +* dollar->long/index conversions: #do loop with dollar bound (DolToLong), +* trace with dollar spin line + index dollar (DolToIndex), sizeof/termsin +* preprocessor conditions on dollar variables +* dollar loop bounds force sequential modules -> pending under threads +#pend_if threaded? || mpi? +S a; Vector p1,p2; +CFunction e; +Local w0 = 1; +$d = 2; +.sort +#do i = 1,$d +Local u`i' = e(a)^`i'; +#enddo +Local T = g_(1,p1,p2); +$n = 1; +Trace4,$n; +.sort +Print +s T; +Print u1,u2; +.end +S x; +Local q = x; +$xs = 2*x+1; +.sort +#if ( sizeof($xs) > 2 && termsin($xs) == 2 ) +Local q2 = 1; +#endif +Print q2; +.end +assert succeeded? +assert nterms("u1") == 1 && nterms("u2") == 1 +assert result("u1") == "e(a)" +assert nterms("q2") == 1 +*--#] cov_dolconv : +*--#[ cov_loadzoo : +* Save/Load round trip with >INFILEINDEX expressions (index buffer +* overflow -> SeekFile/ReadSaveIndex reload path), the silent-load +* option, and the illegal-option error path +Auto S x; +#do i = 1,15 +Global g`i' = x^`i' + `i'; +#enddo +.store +Save cov1a.dat; +.end +#pend_if mpi? +Load cov1a.dat; +Local T = g1+g5+g13; +.sort +Print T; +.end +Load,-s,cov1a.dat; +Local U = g2+g14; +.sort +Print U; +.end +Load,-x,cov1a.dat; +.end +assert nterms("T") == 4 +assert result("T") =~ expr("19 + x + x^5 + x^13") +assert nterms("U") == 3 +assert result("U") =~ /x\^14/ +assert runtime_error? +assert stdout =~ /Illegal option in Load statement/ +*--#] cov_loadzoo : +*--#[ cov_dolwild : +* wildcard-argument list capture ?ww$x (DOLWILDARGS dollars) plus +* termsin/sizeof preprocessor branches on wildargs and empty dollars +#pend_if threaded? || mpi? +S a,b,c; +CFunction g,h; +Local E = g(a,b,c); +$z = 0; +id g(?ww$x) = h($x); +.sort +#if ( termsin($x) == 3 ) +Local W3 = a; +#endif +#if ( sizeof($x) > 2 ) +Local W2 = b; +#endif +#if ( termsin($z) == 0 ) +Local Z1 = c; +#endif +Local E2 = g(5); +id g(?wv$x2) = h($x2); +.sort +#if ( termsin($x2) == 1 && sizeof($x2) >= 1 ) +Local W1 = a; +#endif +Print E,E2,W3,W2,Z1,W1; +.end +assert nterms("W3") == 1 && nterms("W2") == 1 && nterms("Z1") == 1 +assert nterms("W1") == 1 +assert result("E2") == "h(5)" +assert nterms("E") == 1 +*--#] cov_dolwild : +*--#[ cov_exprprop : +* re-declaration of existing expressions (Local/Global/Factorized +* property changes, DoExpr else branch) and the invalid-name error path +S x; +Local F = x^2; +LocalFactorized G = 2*(x+1)*(x+2); +.sort +Global F; +Local F; +GlobalFactorized G; +LocalFactorized G; +.sort +Print F,G; +.end +S x; +Local H = x; +.sort +Global Nosuch; +.end +assert nterms("F") == 1 +assert result("F") == "x^2" +assert nterms("G") == 5 +assert runtime_error? +assert stdout =~ /Nosuch is not a valid expression/ +*--#] cov_exprprop : +*--#[ cov_bernoulli : +* builtin Bernoulli number function bernoulli_(n) (BERNOULLIFUNCTION +* normalisation path, reken.c Bernoulli()) +Auto S x; +Local B = bernoulli_(0)+bernoulli_(1)+bernoulli_(2)+bernoulli_(6)-bernoulli_(7); +Print B; +.end +assert nterms("B") == 1 +assert result("B") == "47881/30240" +*--#] cov_bernoulli : +*--#[ cov_polygcd : +* PolyRatFun with multi-term numerator and denominator (gcd via +* GCDfunction3 multi-term branch -> TakeSymbolContent/GCDclean) and +* products of PolyRatFun functions (MULfunc) +Symbol x,y; +CFunction rat; +PolyRatFun rat; +Local E = rat((x^2+3*x+2)*(x^3-1),(x^2+3*x+2)*(x^3+x^2)); +Local Pr2 = rat((x^2+y^2)*(x^2-y^2),(x^2+y^2)*(x^4+x*y^2+x^2*y)); +Local G = rat((x-y)*(x+y)^2,(x-y)*(x+y)); +.sort +Print E,Pr2,G; +.end +assert result("E") == "rat(x^3-1,x^3+x^2)" +assert result("Pr2") == "rat(x^2-y^2,x^4+x^2*y+x*y^2)" +assert result("G") == "rat(x+y,1)" +*--#] cov_polygcd : +*--#[ cov_mescerr : +* illegal name in declaration statement (MesCerr) +Symbol 1x; +.end +assert compile_error? +assert stdout =~ /Illegal name/ +*--#] cov_mescerr : +*--#[ cov_mescomp : +* illegal character in the Load expression list (MesComp) +S x; +Global g = x; +.store +Save m3.dat; +.end +Load m3.dat,g+2; +.end +assert runtime_error? +assert stdout =~ /Illegal character/ +*--#] cov_mescomp : +*--#[ cov_mescomp2 : +* illegal character in the Save expression list (MesComp) +S x; +Global h = x; +.store +Save m2.dat,h+1; +.end +#pend_if mpi? +assert runtime_error? +assert stdout =~ /Illegal character/ +*--#] cov_mescomp2 : +*--#[ cov_extcomm2 : +* #fromexternal into dollar and preprocessor variables with maxlength, +* from without listing, and the no-channel error path +#pend_if threaded? +Symbols x,a,b; +#external "n" cat -u +#toexternal "(a+b)^2\n\n" +#prompt +#fromexternal+ "$d2" 7 +Local T = $d2; +#toexternal "(a+b)^3\n\n" +#fromexternal- "rsp" +#message rsp=`rsp' +#rmexternal `n' +Print T; +.end +assert result("T") == "b^2+2*a*b+a^2" +assert stdout =~ /rsp=\(a\+b\)\^3/ +*--#] cov_extcomm2 : +*--#[ cov_extnochannel : +* #fromexternal with the external channel not set (DoFromExternal error path) +Symbols x; +#fromexternal "v" +.end +assert runtime_error? +assert stdout =~ /No current external channel/ +*--#] cov_extnochannel : +*--#[ cov_dict : +* preprocessor dictionaries: #opendictionary/#add/#usedictionary + output +* (DoPreOpenDictionary/DoPreAddDictionary/WriteLists->WriteDictionary) +On names; +Symbols x1,mu,N; +CFunction f; +#OpenDictionary dic + #add x1: "x_1" + #add mu: "\mu" + #add f: "\ln" +#CloseDictionary +Local F = x1*mu*f(x1)+N; +#usedictionary dic +Print +s; +.sort +Print F; +.end +assert succeeded? +assert nterms("F") == 2 +assert stdout =~ /Contents of dictionary dic/ +assert stdout =~ /x_1/ +assert stdout =~ /\\ln/ +*--#] cov_dict : +*--#[ cov_declmisc : +* NTensors/CTensors/NFunctions/Commuting/Indexes declarations, ProcessBucketSize, +* GFactorized and the NHide/NUnHide/NFactorize/NUnFactorize specification statements +NTensors t1,t2; +CTensors c1; +NFunctions nf1; +Commuting cf1; +Indexes i,j; +Symbols x,y; +ProcessBucketSize 100; +GFactorized GF = (x+1)*(x+2); +Local F = t1(i,j)*nf1(x)*cf1(y); +.sort +NHide GF; +NUnHide; +NFactorize GF; +NUnFactorize GF; +.sort +Print GF; +.end +assert succeeded? +assert nterms("F") == 1 +assert result("GF") == "(1+x)*(2+x)" +*--#] cov_declmisc : +*--#[ cov_metric : +* the metric statement is inactive and only issues a message +Symbols x,y; +Metric m; +Local F = x+y; +.sort +Print F; +.end +assert compile_error? "does not do anything yet" +*--#] cov_metric : +*--#[ cov_cycsym : +* CycleSymmetrize and RCycleSymmetrize canonicalize function arguments +CFunction f,g,h; +Symbols x,y,z; +Local F = f(2,1)+f(1,2)+g(2,1)+g(1,2); +.sort +CycleSymmetrize f; +RCycleSymmetrize g; +Identify f(?a) = h(?a); +Identify g(?a) = h(?a); +.sort +Print F; +.end +assert succeeded? +assert result("F") == "4*h(1,2)" +*--#] cov_cycsym : +*--#[ cov_ifmatch : +* ifmatch/ifnomatch shorthand with labels and the IdNew/IdOld statements +#pend_if threaded? || mpi? +Symbols x,y; +CFunction f,g; +Local F = f(x)+g(x)+f(1)+g(y); +.sort +ifmatch-> gotit f(x?$a) = f($a); +goto done; +Label gotit; +Label done; +IdNew f(?a) = f(?a); +IdOld g(?a) = g(?a); +.sort +Print F; +.end +assert succeeded? +assert result("F") == "f(x)+f(1)+g(x)+g(y)" +*--#] cov_ifmatch : +*--#[ cov_spectator : +* the full spectator cycle: CreateSpectator, ToSpectator, CopySpectator, +* EmptySpectator, RemoveSpectator +Symbols x,y; +CreateSpectator S1,"s1.spec"; +Local F = x+y; +Local H = x*3; +.sort +Drop F; +ToSpectator S1; +.sort +CopySpectator NewE = S1; +.sort +EmptySpectator S1; +RemoveSpectator S1; +.sort +Print NewE; +.end +assert succeeded? +assert result("NewE") == "3*x" +*--#] cov_spectator : +*--#[ cov_globalmod : +* the .global module terminator keeps declarations alive across a .sort +Symbols x,y; +Local F = x+y; +.sort +Symbols z; +.global +Local G = z+F; +.sort +Print G; +.end +assert succeeded? +assert result("G") == "z+y+x" +*--#] cov_globalmod : +*--#[ cov_globalmod_err : +* non-global expressions are removed by a .store after .global +Symbols x,y; +Local F = x+y; +.global +.store +Symbols z; +Local G = z+F; +.end +assert compile_error? "Undeclared variable F" +*--#] cov_globalmod_err : +*--#[ cov_polyratexp : +* PolyRatFun with the expand option (relative) +Symbol x,ep; +CFunction rat; +PolyRatFun rat(expand,x,2,relative); +Local F = rat(x^3+1,x^5+x^2); +Print F; +.end +assert succeeded? +assert result("F") == "rat(x^-2)" +*--#] cov_polyratexp : +*--#[ cov_polyratexp2 : +* PolyRatFun with the expand option (fixed) including a power of a ratio +Symbol x,ep; +CFunction rat; +PolyRatFun rat(expand,x,2,fixed); +Local F = rat(x^3+1,x^5+x^2); +Local G = rat(x^2-1,x^4-1)^2; +Print F; +Print G; +.end +assert succeeded? +assert result("F") == "rat(x^-2)" +assert result("G") == "rat(1-2*x^2)" +*--#] cov_polyratexp2 : +*--#[ cov_polyratdiv : +* PolyRatFun with the finddivergence option +Symbol x,ep; +CFunction rat; +PolyRatFun rat(finddivergence,ep); +Local F = rat(x^3+1,x^5+x^2); +Print F; +.end +assert succeeded? +assert result("F") == "rat(1,1)" +*--#] cov_polyratdiv : +*--#[ cov_polyratexp_err : +* ExpandRat error path when the PolyRatFun is not expandable in the variable +Symbol x,ep; +CFunction rat; +PolyRatFun rat(expand,x,3,fixed); +Local F = rat(ep+x^2+x^3*ep^2, x+x^2*ep); +.sort +Print F; +.end +assert runtime_error? "incorrect variable inside" +*--#] cov_polyratexp_err : +*--#[ cov_abrackets : +* ABrackets with AntiPutInside and PutInside +Symbols x,y; +CFunction f,g; +Local F = f(x,y)*g(x,y)+f(y,x); +.sort +APutInside g,x; +PutInside g; +ABrackets f; +.sort +Print F; +.end +assert succeeded? +assert result("F") == "g(g(f(x,y)*g(x,y)))+g(g(f(y,x)))" +*--#] cov_abrackets : +*--#[ cov_polygcd3 : +* multiterm GCD inside PolyRatFun normalization (GCDfunction3) +Symbol x,ep; +CFunction rat; +PolyRatFun rat; +Local F = rat(x^2-1, x^3-1); +Local G = rat(x^2+2*x*ep+ep^2, x+ep); +Print F; +Print G; +.end +assert succeeded? +assert result("F") == "rat(x+1,x^2+x+1)" +assert result("G") == "rat(x+ep,1)" +*--#] cov_polygcd3 : +*--#[ cov_fmatchcy : +* pattern matching on cyclic functions (FunMatchCy): rotation machinery +CFunction f(cyclic),g; +Symbols n,m; +Local F = f(1,2,3)+f(4,5,6); +.sort +Identify f(n?,3,m?) = g(n,m); +Identify f(?a,3) = g(?a); +Identify f(?a,6) = g(?a); +.sort +Print F; +.end +assert succeeded? +assert result("F") == "g(2,1)+g(4,5)" +*--#] cov_fmatchcy : +*--#[ cov_fmatchcy2 : +* pattern matching on reverse-cyclic functions (FunMatchCy) +CFunction f(rcyclic),g; +Symbols n,m; +Local F = f(1,2,3)+f(4,5,6); +.sort +Identify f(n?,3,m?) = g(n,m); +Identify f(?a,3) = g(?a); +Identify f(?a,6) = g(?a); +.sort +Print F; +.end +assert succeeded? +assert result("F") == "g(1,2)+g(4,5)" +*--#] cov_fmatchcy2 : +*--#[ cov_fmatchsy : +* pattern matching on symmetric functions (FunMatchSy) +CFunction h(symmetric),k; +Symbols n,m; +Local G = h(1,2,3)+h(4,5,6); +.sort +Identify h(n?,3,m?) = k(n,m); +Identify h(1,n?,m?) = k(n,m); +.sort +Print G; +.end +assert succeeded? +assert result("G") == "h(4,5,6)+k(2,1)" +*--#] cov_fmatchsy : +*--#[ cov_select : +* Select statement with sets (SUBSELECT idoption; TestSelect in pattern.c) +* The substitution survives only on terms containing no element of the +* listed sets; terms with a set element are restored. +Symbols x,y,z,w,m,n; +Vectors p,q,r,p2; +Indices i,j,k2; +Tensor t1; +Functions f,g,f2,f3,f4,f5,f6,f7,f8,g2,f; +#$x = 5; +Set Ssym: x,y; +Set Svec: p,q; +Set Sidx: i,j; +Set Sfun: f,g; +Local F = x*z + w*z + p(i)*z + p.q*z + f(z)*w + g(z)*w; +.sort +Select Ssym, Svec, Sidx, Sfun, z = n; +.sort +Local G = w*p(i) + w*r(i) + w*p.q + w*d_(i,j) + w*f(z) + w*g_(1,i) + w*x ++ w*f2(z) + w*f3(p) + w*f4(-p) + w*f5(i) + w*f6(g2(z)) + w*f7(n) ++ w*r(k2) + w*r.p2 + w*f3(r) + w*f5(k2) + w*t1(-p) + w*t1(k2) ++ w*f7(g2) + w*f7($x) + w*i; +Select Ssym, Svec, Sidx, Sfun, w = m; +.sort +Print F; +Print G; +.end +assert succeeded? +assert result("F") =~ expr("m*n + x*z + p.q*z + p(i)*z + f(z)*w + g(z)*w") +assert result("G") =~ expr("x*w + p.q*w + r.p2*m + p(i)*w + r(i)*w + r(k2)*m + i*w + d_(i,j)*w - t1(p)*w + t1(k2)*m + g_(1,i)*w + f(z)*w + f2(z)*m + f3(p)*w + f3(r)*m + f4(-p)*w + f5(i)*w + f5(k2)*m + f6(g2(z))*m + f7(n)*m + f7(5)*m + f7(g2)*m") +*--#] cov_select : +*--#[ cov_polyfun : +* PolyFun statement: the polyfun argument is the coefficient of the term. +* Equal terms are merged by adding their polyfun arguments (AddArgs in +* sort.c) for all argument types: bare functions (commuting and not), +* symbols, short and long numbers, and with a modulus active. +Symbols x,y; +Function g2; +CFunction h2,acc; +PolyFun acc; +Local F1 = x^2*acc(g2) + x^2*acc(g2); +Local F2 = x^2*acc(g2) + x^2*acc(h2); +Local F2b = x^2*acc(h2) + x^2*acc(g2); +Local F3 = x^2*acc(g2) + x^2*acc(y); +Local F4 = x^2*acc(g2) + x^2*acc(3); +Local F5 = x^2*acc(y) + x^2*acc(g2); +Local F6 = x^2*acc(y) + x^2*acc(-3); +Local F6b = x^2*acc(-3) + x^2*acc(y); +Local F7 = x^2*acc(3) + x^2*acc(g2); +Local F8 = x^2*acc(3) + x^2*acc(-3); +Local F9 = x^2*acc(3) + x^2*acc(-5); +Local F11 = x^2*acc(g2) + x^2*acc(x^2); +Local F12 = x^2*acc(x^2) + x^2*acc(y); +Local F13 = x^2*acc(x^2) + x^2*acc(3); +Local F14 = x^2*acc(x^2) + x^2*acc(g2); +Local F15 = x^2*acc(1000000000) + x^2*acc(1000000000); +Local F17 = x^2*acc(-1000000000) + x^2*acc(-1000000000); +Local F18 = x^2*acc(2000000000) + x^2*acc(2000000000); +Local F19 = x^2*acc(-2000000000) + x^2*acc(-2000000000); +.sort +Print; +.sort +Modulus 1000000000000007; +Local FN = x^2*acc(2000000000) + x^2*acc(2000000000); +Print FN; +.end +assert succeeded? +assert result("F1") =~ expr("x^2*acc(2*g2)") +assert result("F2") =~ expr("x^2*acc(g2 + h2)") +assert result("F2b") =~ expr("x^2*acc(g2 + h2)") +assert result("F3") =~ expr("x^2*acc(y + g2)") +assert result("F4") =~ expr("x^2*acc(3 + g2)") +assert result("F5") =~ expr("x^2*acc(y + g2)") +assert result("F6") =~ expr("x^2*acc(-3 + y)") +assert result("F6b") =~ expr("x^2*acc(-3 + y)") +assert result("F7") =~ expr("x^2*acc(3 + g2)") +assert result("F8") == "0" +assert result("F9") =~ expr("x^2*acc(-2)") +assert result("F11") =~ expr("x^2*acc(x^2 + g2)") +assert result("F12") =~ expr("x^2*acc(y + x^2)") +assert result("F13") =~ expr("x^2*acc(3 + x^2)") +assert result("F14") =~ expr("x^2*acc(x^2 + g2)") +assert result("F15") =~ expr("x^2*acc(2000000000)") +assert result("F17") =~ expr("x^2*acc(-2000000000)") +assert result("F18") =~ expr("x^2*acc(4000000000)") +assert result("F19") =~ expr("x^2*acc(-4000000000)") +assert result("FN") =~ expr("x^2*acc(4000000000)") +*--#] cov_polyfun : +*--#[ cov_findall : +* Vector substitution, id = , and the simultaneous +* substitution of consecutive id/also statements (FindAll in pattern.c, +* the SUBVECTOR case of DoSubst/DoIfSubst). Vectors are replaced in +* indexed vector objects (p(i)), dot products (p.q, p.p) and chains of +* them; also-chains replace all chain members in a single pass. +Vectors p,q,r,s; +Indices i,j; +Symbols x; +Local A = p(i) + x*p.q; +id p = s; +Print A; +.sort +Local B = x*p.q + p.p; +id p = s; +Print B; +.sort +Local C = p(i)*p(j)*q(i); +id p = s; +Print C; +.sort +Local D = p(i)*q(j)*r(i); +id p = q; +Print D; +.sort +Local E = p.q + p(i); +id p = q; +also q = r; +Print E; +.sort +Local F = p(i)*q(j)*p(j); +id p = q; +also q = r; +Print F; +.end +assert succeeded? +assert result("A") =~ expr("q.s*x + s(i)") +assert result("B") =~ expr("q.s*x + s.s") +assert result("C") =~ expr("s(j)*q.s") +assert result("D") =~ expr("q(j)*q.r") +assert result("E") =~ expr("q.r + q(i)") +assert result("F") =~ expr("q(i)*q.r") +*--#] cov_findall : +*--#[ cov_tensdollar : +* Dollar variables in tensor-function arguments (InFunction in proces.c): +* a $-reference inside a tensor argument is stored as a FUNNYDOLLAR +* placeholder and replaced by the dollar's current value when the term is +* generated. The value can come from a wildcard binding: a number +* (DOLNUMBER), zero (DOLZERO) or a wildarg list (DOLWILDARGS). With +* Modulus and the alsofunctions option, function arguments are reduced +* modulo the modulus while the dollars are substituted. +Symbols x,a; +Indices i,j,k; +Tensor t1; +CFunction f,g; +Modulus 7, alsofunctions; +Local T1 = f(2)*g(0)*t1(i,j); +id f(x?$d1) = 1; +id g(x?$d2) = 1; +id t1(?a$d3) = 1; +$z = t1($d1,j); +$z0 = t1($d2,j); +$zw = t1($d3); +Print T1; +Print " z1=%$;", $z; +Print " z2=%$;", $z0; +Print " z3=%$;", $zw; +.end +# Under threads the $-assignments force sequential mode and the +# wildcard-bound dollars are captured per thread. +#pend_if threaded? || mpi? +assert succeeded? +assert result("T1") =~ expr("1") +assert result("z1") =~ expr("t1(2,j)") +assert result("z2") =~ expr("0") +assert result("z3") =~ expr("t1(i,j)") +*--#] cov_tensdollar : +*--#[ cov_tensdollar2 : +* A dollar bound to a symbol has the wrong type for a tensor-function +* argument substitution: InFunction reports the error and the program +* terminates at run time. +Symbols x; +Indices i,j; +Tensor t1; +CFunction f; +Local T = f(x); +id f(x?$d4) = 1; +$z = t1($d4,j); +.end +# Under threads the $-assignments force sequential mode and the +# wildcard-bound dollars are captured per thread. +#pend_if threaded? || mpi? +assert runtime_error? +*--#] cov_tensdollar2 : +*--#[ cov_tensdollar3 : +* A wildcard-bound dollar that never got a value is undefined in a tensor +* substitution (InFunction reports the error and the program terminates). +Symbols x; +Indices i,j; +Tensor t1; +CFunction f; +Local T = t1(i,j); +id f(x?$d5) = 1; +$z = t1($d5,j); +.end +# Under threads the $-assignments force sequential mode and the +# wildcard-bound dollars are captured per thread. +#pend_if threaded? || mpi? +assert runtime_error? +*--#] cov_tensdollar3 : + +*--#[ cov_reset : +* The .store module terminator: saves the state, globalizes all +* declarations and then empties the memory (PopVariables -> ResetVariables +* in names.c) so that the following modules start from scratch. +Symbols a; +Vectors v; +Indices i; +CFunction f; +Table,sparse t(1); +AutoDeclare Symbol az; +Set vecs: v; +Fill t(1) = 5; +Local E = t(1) + f(a) + v(i) + az; +.sort +Print E; +.store +Symbols b; +CFunction g; +Local G = g(b); +.sort +Print G; +* The .clear terminator frees everything, including tables (ResetVariables +* with par = 2 in names.c). +.clear +.end +assert succeeded? +assert result("E") =~ expr("5 + az + v(i) + f(a)") +assert result("G") =~ expr("g(b)") +*--#] cov_reset : +*--#[ cov_rootsunity : +* Roots of unity (Symbols w#3, w2#-4) and their normalization in +* Normalize (normal.c): powers are reduced modulo the root order, and +* for an even order (w2#-4) half the order evaluates to -1. The sig_ +* numerical function of a root of unity contributes the root itself to +* the term's symbol-power table. +Symbols w#3,w2#-4,x; +Local N1 = w^4; +Local N2 = w^-1; +Local N3 = w2^2; +Local N4 = w2^6; +Local F = sig_(w)*x; +Local G = sig_(w)*sig_(w); +Local H = sig_(w*w2); +Local I = sig_(w^2); +Local J = sig_(x+w); +Local K = sig_(w2)*sig_(w2); +Local P3 = sig_(w)^3; +Print N1, N2, N3, N4, F, G, H, I, J, K, P3; +.end +assert succeeded? +assert result("N1") =~ expr("w") +assert result("N2") =~ expr("w^2") +assert result("N3") =~ expr("-1") +assert result("N4") =~ expr("-1") +assert result("F") =~ expr("w*x") +assert result("G") =~ expr("w^2") +assert result("H") =~ expr("w*w2") +assert result("I") =~ expr("w^2") +assert result("J") =~ expr("sig_(x + w)") +assert result("K") =~ expr("-1") +assert result("P3") =~ expr("1") +*--#] cov_rootsunity : +*--#[ cov_modfunc : +* The mod_ and mod2_ numerical functions in Normalize (normal.c): +* short/short arguments, a single argument, and long-number arguments +* with a short or a long modulus. +Symbols x; +Local Q1 = mod_(5,3); +Local Q2 = mod2_(5,3); +Local Q3 = mod_(2,3); +Local Q4 = mod2_(2,3); +Local Q5 = mod_(-2,3); +Local Q6 = mod2_(-2,3); +Local Q7 = mod_(0,3); +Local Q8 = mod_(5); +Local Q9 = mod_(0); +Local Q10 = mod_(21474836470,3); +Local Q11 = mod2_(21474836470,3); +Local Q12 = mod_(-21474836470,3); +Local Q13 = mod2_(-21474836470,3); +Local R1 = mod_(5,21474836470); +Local R2 = mod2_(5,21474836470); +Local R5 = mod_(123456789012345,21474836470); +Local R6 = mod2_(-5,21474836470); +Local R9 = mod2_(21474836469,21474836470); +Print Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10, Q11, Q12, Q13; +Print R1, R2, R5, R6, R9; +.end +assert succeeded? +assert result("Q1") =~ expr("2") +assert result("Q2") =~ expr("-1") +assert result("Q3") =~ expr("2") +assert result("Q4") =~ expr("-1") +assert result("Q5") =~ expr("1") +assert result("Q6") =~ expr("1") +assert result("Q7") =~ expr("0") +assert result("Q8") =~ expr("5") +assert result("Q9") =~ expr("0") +assert result("Q10") =~ expr("1") +assert result("Q11") =~ expr("1") +assert result("Q12") =~ expr("2") +assert result("Q13") =~ expr("-1") +assert result("R1") =~ expr("5") +assert result("R2") =~ expr("5") +assert result("R5") =~ expr("19428982785") +assert result("R6") =~ expr("-5") +assert result("R9") =~ expr("-1") +*--#] cov_modfunc : +*--#[ cov_makerational : +* makerational_(a,m) finds a fraction f1/f2, both less than sqrt(m), +* with f1/f2 = a mod m (manual: reconstruct fractions after modular +* calculus). Under the modulus the fraction reproduces a; degenerate +* calls go through the general MakeLongRational path in Normalize +* (normal.c). The dollar keeps the unreduced fraction. +#$m = prime_(1); +Local P4 = makerational_(12345678,$m); +Local A = makerational_(2,3)*makerational_(5,7); +$r = makerational_(12345678,$m); +Print P4; +.sort +Modulus `$m'; +Print P4, A; +Print " r=%$;", $r; +.end +# Under threads the $ assignments force sequential mode. +#pend_if threaded? || mpi? +assert succeeded? +assert result("P4") =~ expr("12345678") +assert result("A") =~ expr("2147483586") +assert result("r") =~ expr("9719/38790") +*--#] cov_makerational : +*--#[ cov_wildsub : +* WildFill (wildcard.c) on the replacement of argument wildcards: when +* a wildcard bound to a symbol or subexpression is used as the power of +* a dot product in the replacement, an EXPONENT function is built with +* the bound value inside. +Symbol a,x,y; +Vector p,q,r,s,t; +CFunction f,h; +Local T1 = f(x); +Local T2 = f(p.q); +Local T3 = f(q.s*r.t); +Local T4 = f(x,p.q); +Print T1, T2, T3, T4; +.sort +id f(a?) = h(1)*(p.q^a); +Print T1, T2, T3, T4; +.sort +id f(a?,p?.q?) = h(3)*(p.q^a); +Print T1, T2, T3, T4; +.end +assert succeeded? +assert result("T1") =~ expr("(p.q)^(x)*h(1)") +assert result("T2") =~ expr("(p.q)^(p.q)*h(1)") +assert result("T3") =~ expr("(p.q)^(q.s*r.t)*h(1)") +assert result("T4") =~ expr("(p.q)^(x)*h(3)") +*--#] cov_wildsub : +*--#[ cov_cycargwild : +* Cyclic functions with multiple argument-list wildcards (FunMatchCy +* Case 3): splitting the arguments between ?a and ?b, and the repeated +* name multiplicity machinery of ?a ?a. Both occurrences of ?a must +* match the same argument list, so f(1,1,1) and f(1,1,2) do not match +* in the ?a ?a module (the later f(x?,?a,?b) rule does match them). +CFunction f(cyclic),g,h; +Tensor t(cyclic); +Symbols x; +Local A = f(1,2,3); +Local B = f(1,2,3,4); +.sort +id f(?a,?b) = g(?a)*h(?b); +.sort +Local C = f(1,1); +Local D = f(1,1,1); +Local E = f(1,1,2); +.sort +id f(?a,?a) = h(?a); +.sort +Local F = f(1,x,2,3); +Local G = t(1,1); +.sort +id f(x?,?a,?b) = g(?a)*h(?b); +id t(?a,?a) = g(2); +.sort +Print A, B, C, D, E, F, G; +.end +assert succeeded? +assert result("A") =~ expr("g*h(1,2,3)") +assert result("B") =~ expr("g*h(1,2,3,4)") +assert result("C") =~ expr("h(1)") +assert result("D") =~ expr("g*h(1,1)") +assert result("E") =~ expr("g*h(1,1)") +assert result("F") =~ expr("g*h(1,x,2)") +assert result("G") =~ expr("g(2)") +*--#] cov_cycargwild : +*--#[ cov_ifdolindex : +* Runtime if-statement with a DOLINDEX dollar (a dollar assigned an +* index). DoIfStatement rejects such dollars because their index +* number is always >= AM.OffsetIndex, giving "$... is of wrong type". +Indices i; +Symbols s; +Local T = s; +$d = i; +$e = 0; +.sort +if ( $d > 0 ) $e = 1; +Print " e=%$;", $e; +.end +#pend_if mpi? +assert runtime_error? +*--#] cov_ifdolindex : +*--#[ cov_ifdolwildargs : +* Runtime if-statement with a dollar bound to an argument wildcard +* (?a$d, type DOLWILDARGS). Such bindings always start with a zero +* count word, which DoIfStatement cannot compare numerically: the +* DOLWILDARGS check passes and the DOLARGUMENT case reports +* "$... is of wrong type". +CFunction f,g,h; +Symbols s; +Local T = f(2,3); +$e = 0; +.sort +id f(?a$d) = h(?a); +if ( $d == 2 ) $e = 1; +Print " e=%$;", $e; +.end +#pend_if mpi? +assert runtime_error? +*--#] cov_ifdolwildargs : +*--#[ cov_bracketindex : +* Bracket index lookups that fall between two indexed brackets force +* FindBracket to scan the stored terms forward (index.c 188-266). +* The bracket w does not occur in F, so the result is zero. +Symbols a,b,c,w,x; +Local F = a*x^2+b*x+c; +B+ x; +.sort +Local D = F[w]*F[x]; +Print D; +.end +assert succeeded? +assert result("D") == "0" +*--#] cov_bracketindex : +*--#[ cov_bracketindex_nocompress : +* Same as cov_bracketindex, but with Compress off the stored terms are +* uncompressed, so FindBracket scans take the no-compression branches. +Symbols a,b,c,w,x; +Compress off; +Local F = a*x^2+b*x+c; +B+ x; +.sort +Local D = F[w]*F[x]; +Print D; +.end +assert succeeded? +assert result("D") == "0" +*--#] cov_bracketindex_nocompress : +*--#[ cov_oncevecwild : +* once-statement patterns with a vector wildcard inside a dotproduct +* (p.q?): FindOnce walks the dotproduct lists and binds the wildcard +* vector to the term's second vector. The second pattern has two +* dotproducts and matches nothing; it exercises the failure paths. +Vectors a,b,p,q,r; +Symbols y; +Local T = p.q + p.p + q.q; +.sort +once p.q? = 2*y; +once p.q?*a.b = 2*y; +Print T; +.end +assert succeeded? +assert result("T") =~ expr("4*y + q.q") +*--#] cov_oncevecwild : +*--#[ cov_tablebase_use : +* tablebase cycle with named load/use: the load and use statements take +* a table name, and a second use statement finds the elements already +* loaded (ELEMENTLOADED path in CoTBuse). +CTable,sparse f(1); +#do i = 1,10 + Fill f(`i') = `i'; +#enddo +.sort +TableBase "test4.tbl" create; +TableBase "test4.tbl" addto f; +.end +TableBase "test4.tbl" open; +Tablebase "test4.tbl" load f; +.sort +Local test = f(3)*f(20); +TestUse f; +.sort +TableBase "test4.tbl" use f; +TableBase "test4.tbl" use f; +Apply; +Print; +.end +#pend_if mpi? +assert succeeded? +assert result("test") =~ expr("3*f(20)") +*--#] cov_tablebase_use : +*--#[ cov_tablebase_useerr : +* error path of the tablebase use statement: no open tablebase +TableBase "nouse.tbl" use; +.end +#pend_if mpi? +assert compile_error?('No open tablebase with the name nouse.tbl') +*--#] cov_tablebase_useerr : +*--#[ cov_tablebase_useerr2 : +* error path of the tablebase use statement: argument is not a table +CTable,sparse g(1); +Fill g(1) = 5; +.sort +TableBase "test5.tbl" create; +TableBase "test5.tbl" addto g; +Symbol z; +TableBase "test5.tbl" use z; +.end +#pend_if mpi? +assert compile_error?('z should be a previously declared table') +*--#] cov_tablebase_useerr2 : +*--#[ cov_tablebase_useerr3 : +* error path of the tablebase use statement: table is not sparse +CTable,sparse g(1); +Fill g(1) = 5; +.sort +TableBase "test7.tbl" create; +TableBase "test7.tbl" addto g; +Table n(2); +TableBase "test7.tbl" use n; +.end +#pend_if mpi? +assert compile_error?('n should be a sparse table') +*--#] cov_tablebase_useerr3 : +*--#[ cov_tablebase_noload : +* using a tablebase table that has not been loaded (FindTableTree fails) +CTable,sparse f(1); +Fill f(1) = 5; +.sort +TableBase "test6.tbl" create; +TableBase "test6.tbl" addto f; +.end +TableBase "test6.tbl" open; +TableBase "test6.tbl" use f; +.end +#pend_if mpi? +assert runtime_error?('has not been loaded properly') +*--#] cov_tablebase_noload : + +*---[ Saturation campaign batch: transforms, stuffle, preprocessor ]--- + +*--#[ cov_transform_specs : +* transform statement on a tensor with a mix of index/vector/number args +Index mu,nu; +Vector p; +Tensor t; +Local test = t(mu,nu,p,3,5); +Transform t encode(1,last):base=10; +Transform t decode(1,last):base=10; +Transform t replace(1,last)=(3,4); +Transform t implode(1,last); +Transform t explode(1,last); +Transform t permute(1,3); +Transform t reverse(1,last); +Transform t dedup(1,last); +Transform t cycle(2,4)=+1; +Print; +.end +assert result("test") =~ expr("t(5,nu,4,mu,p)") +*--#] cov_transform_specs : + +*--#[ cov_transform_rangefar : +* transform ranges pointing beyond the available arguments +CFunction f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11; +Symbol x; +Local test = f1(1,2)+f2(1,2)+f3(1,2)+f4(1,2)+f5(1,x)+f6(1,2) + +f7(1,2)+f8(1,x,2)+f9(1,2)+f10(1,x)+f11(1,x); +Transform f1 encode(3,7):base=10; +Transform f2 decode(3,7):base=10; +Transform f3 implode(3,7); +Transform f4 explode(3,7); +Transform f5 replace(3,7)=(xarg_,0); +Transform f6 permute(3,4,5); +Transform f7 reverse(3,7); +Transform f8 dedup(3,7); +Transform f9 cycle(3,7)=+1; +Transform f10 addargs(3,7); +Transform f11 mulargs(3,7); +Print; +.end +assert result("test") =~ + expr("f1(1,2)+f2(1,2)+f3(1,2)+f4(1,2)+f5(1,x)+f6(1,2)+f7(1,2)+f8(1,x,2)+f9(1,2)+f10(1,x)+f11(1,x)") +*--#] cov_transform_rangefar : + +*--#[ cov_transform_replace : +* replace with xarg_ wildcards, pairs of arguments and multi-pair lists +CFunction f1,f2,f3; +Symbol a,b,x,y; +Local test = f1(1,y+2) + f2(2,3,a) + f3(3,x); +Transform f1 replace(1,last)=(xarg_,2*xarg_+1); +Transform f2 replace(1,last)=(2,y,3,x); +Transform f3 replace(1,2)=(3,4,xarg_,0); +Print; +.end +assert result("test") =~ expr("f1(3,5+2*y)+f2(y,x,a)+f3(4,0)") +*--#] cov_transform_replace : + +*--#[ cov_transform_bigout : +* encode results that do not fit in one word; negative and zero digits +CFunction f1,f2,f3,f4; +Local test = f1(8,8,8,8) + f2(-1,2) + f3(0,1,1) + + f4(0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + ,1,1,1,1,1,1,1,1,1,1); +Transform f1 encode(1,last):base=8191; +Transform f2 encode(1,last):base=10; +Transform f3 encode(1,last):base=10; +Transform f4 encode(1,last):base=2; +Print; +.end +assert result("test") =~ + expr("f1(4396972900352)+f2(8)+f3(11)+f4(35184372088831)") +*--#] cov_transform_bigout : + +*--#[ cov_transform_dollarbase : +* encode/decode with a dollar-valued base ($ assigned in the same module) +#pend_if threaded? +CFunction f1,f2,f3; +Local test = f1(1,2,1,0,1) + f2(1,2,1,0,1) + f3(13); +$b = 3; +Transform f1 encode(1,last):base=$b; +Transform f2 decode(1,5):base=$b; +Transform f3 decode(1,5):base=$b; +Print; +.end +assert result("test") =~ + expr("f1(145)+f2(0,0,0,0,1,2,1,0,1)+f3(0,0,1,1,1)") +*--#] cov_transform_dollarbase : + +*--#[ cov_dollarbase_err : +* encode with a dollar base that has no acceptable number value +#pend_if threaded? || mpi? +CFunction f; +Local test = f(1,2,1); +$b = 1; +Transform f encode(1,last):base=$b; +Print; +.end +assert runtime_error?('does not have a number value > 1') +*--#] cov_dollarbase_err : + +*--#[ cov_transform_single : +* transform on single-element and tight ranges +CFunction f1,f2,f3,f4; +Local test = f1(7) + f2(2,7,9) + f3(13) + f4(1,2,3,4); +Transform f1 encode(1,1):base=10; +Transform f2 encode(2,2):base=10; +Transform f3 decode(1,1):base=10; +Transform f4 reverse(2,3); +Print; +.end +assert result("test") =~ + expr("f1(7)+f2(2,7,9)+f3(13)+f4(1,3,2,4)") +*--#] cov_transform_single : + +*--#[ cov_argstage : +* ArgImplode/SplitArg with ranges and zero arguments +CFunction f1,f2; +Symbol x,y; +Local test = f1(,...,) + f2(1,0,1,0); +ArgImplode f2; +SplitArg f1; +Print; +.end +assert result("test") =~ expr("f1(x^5,x^4,x^3,x^2,x)+f2(1,2,0)") +*--#] cov_argstage : + +*--#[ cov_setextattr : +* preprocessor statement for external command attributes +#setexternalattr shell=noshell,kill=9,killall=false +Symbol x; +Local E = x; +Print; +.end +assert succeeded? +assert result("E") =~ expr("x") +*--#] cov_setextattr : + +*--#[ cov_pifarith : +* a parenthesised multiplication inside #if is rejected by the preprocessor +Symbol x; +#if ( ( (2+3)*(4-1) ) == 15 ) +Local E = x; +#endif +Local test = x; +Print; +.end +assert preprocess_error?('illegal operator') +*--#] cov_pifarith : + +*--#[ cov_pifarith_false : +* simple arithmetic #if conditions evaluate silently to false +Symbol x; +#if ( ( 3*4+2 - 4 ) == 10 ) +Local E1 = x; +#endif +#if ( ( -7 + 2 ) == -5 ) +Local E2 = x; +#endif +Local test = E1+E2; +Print; +.end +assert compile_error?('Undeclared variable E1') +*--#] cov_pifarith_false : + +*--#[ cov_replace_bad : +* replace pair list with a dangling comma +CFunction f; +Symbol a; +Local test = f(1,2); +Transform f replace(1,last)=(3,); +Print; +.end +assert compile_error?('Illegal position for closing parenthesis') +*--#] cov_replace_bad : + +*--#[ cov_transform_badopt : +* unknown transformation name inside a Transform statement +CFunction f; +Local test = f(1,2); +Transform f bogusopt(1,last); +Print; +.end +assert compile_error?('Unknown transformation inside a Transform statement') +*--#] cov_transform_badopt : + +*--#[ cov_transform_lyndonerr : +* islyndon does not accept a range without an = list +CFunction f; +Symbol y; +Local test = f(1,2,3); +Transform f islyndon(1,last); +Print; +.end +assert compile_error?('should be followed by') +*--#] cov_transform_lyndonerr : + +*--#[ cov_tensor_adderr : +* addargs on a tensor is illegal +Index mu; +Tensor t; +Local test = t(mu,1,2); +Transform t addargs(1,last); +Print; +.end +assert runtime_error?('Illegal attempt to add arguments of a tensor') +*--#] cov_tensor_adderr : + +*--#[ cov_tensor_mulerr : +* mulargs on a tensor is illegal +Index mu; +Tensor t; +Local test = t(mu,1,2); +Transform t mulargs(1,last); +Print; +.end +assert runtime_error?('Illegal attempt to multiply arguments of a tensor') +*--#] cov_tensor_mulerr : + +*--#[ cov_replace_nopairs : +* replace without an = pair list +CFunction f; +Local test = f(1,2); +Transform f replace(1,last); +Print; +.end +assert compile_error?('should be followed by an = sign') +*--#] cov_replace_nopairs : + +*--#[ cov_transform_baseone : +* encode/decode base must be at least two +CFunction f; +Local test = f(1,2); +Transform f encode(1,last):base=1; +Print; +.end +assert compile_error?('Illegal value for base') +*--#] cov_transform_baseone : + +*---[ Saturation campaign batch 2: LLM-authored probes (wildcards, brackets, #write) ]--- + +*--#[ cov_wildargtomatch : +* ?a wildcards comparing whole argument lists between two functions +CFunction f,g,h; +Symbol x,y,z; +Local t = f(g(x),g(x)) + f(g(x),g(y)) + f(h(x,y),h(x,y)) + f(h(x,y),h(x,z)) + + f(h(x),h(x,y)); +id f(g(?a),g(?a)) = 1; +id f(h(?a),h(?a)) = 1; +Print; +.end +assert result("t") =~ + expr("2+f(g(x),g(y))+f(h(x),h(x,y))+f(h(x,y),h(x,z))") +*--#] cov_wildargtomatch : + +*--#[ cov_bracketsetvec : +* Bracket with a set of vectors +Vector v,p; +CFunction f; +Set vs: v, p; +Local e = v(1)*f(2); +Bracket vs; +Print; +.end +assert succeeded? +*--#] cov_bracketsetvec : + +*--#[ cov_wildsetnum : +* Set statement referencing not-yet-declared names +Set even: 2,4,6; +Set sb: a,b; +Symbol x,y,a,b; +CFunction f,g; +Local t = f(2,4) + f(2,3); +id f(x?even_,x?even_) = 1; +Print +s; +.end +assert compile_error?('has not been declared') +*--#] cov_wildsetnum : + +*--#[ cov_bracketdeltaerr : +* Bracket on the delta function g_ is illegal +CFunction f; +Local e = g_(1,2)*f(3); +Bracket g_(1,2); +Print; +.end +assert compile_error?('Illegal separator: Bracket') +*--#] cov_bracketdeltaerr : + +*--#[ cov_wildbracerr : +* id on an undeclared function +Symbol a,x; +Local F = (a+1)*f((a+1)^2); +Keep Brackets; +id f(?a) = g(?a); +Print +s; +.end +assert compile_error?('Undeclared variable') +*--#] cov_wildbracerr : + +*--#[ cov_wildbrac : +* wildcard id applied while brackets are kept +Symbol a,x; +CFunction f,g; +Keep Brackets; +Local F = (a+1)*f((a+1)^2); +id f(?a) = g(?a); +Print +s; +.end +assert succeeded? +*--#] cov_wildbrac : + +*--#[ cov_wch_width : +* #write number formats with explicit field widths +Symbol x; +Local e = x; +#write "n=%5d, k=%12d end\n" 42 7 +#write "m=%1d end\n" 9 +Print; +.end +assert succeeded? +assert result("e") =~ expr("x") +*--#] cov_wch_width : + +*--#[ cov_wch_plusnum : +* the - flag is not a legal #write format modifier +Symbol x; +Local e = x; +#write "n=%-4d end\n" 7 +Print; +.end +#pend_if mpi? +assert preprocess_error?('Illegal control sequence') +*--#] cov_wch_plusnum : + +*--#[ cov_wch_dollar : +* #write of a preprocessor dollar value +#$s = 123456789012345; +#write "val=%$ end\n" $s +Symbol x; +Local e = x; +Print; +.end +assert succeeded? +assert result("e") =~ expr("x") +*--#] cov_wch_dollar : + +*--#[ cov_wch_undol : +* #write %$ of an undefined dollar +#write "a=%$ end\n" $nosuchdollar1 +Symbol x; +Local e = x; +Print; +.end +#pend_if mpi? +assert preprocess_error?('has not been defined') +*--#] cov_wch_undol : + +*--#[ cov_wch_dolerr : +* #write %$ with a non-dollar argument +#write "a=%$ end\n" 5 +Symbol x; +Local e = x; +Print; +.end +#pend_if mpi? +assert preprocess_error?('$-variable expected') +*--#] cov_wch_dolerr : + +*--#[ cov_wch_noclose : +* unterminated #write format string +#write "unterminated format string +Symbol x; +Local e = x; +Print; +.end +#pend_if mpi? +assert warning?('end instruction generated') +*--#] cov_wch_noclose : + +*--#[ cov_wch_illch : +* illegal characters after a $-variable in #write +Symbol x; +#$s = 3; +#write "a=%$ end\n" $s+ +Local e = x; +Print; +.end +#pend_if mpi? +assert preprocess_error?('illegal characters after $-variable') +*--#] cov_wch_illch : + +*--#[ cov_funcncerr : +* illegal symmetry specification in a Functions declaration +Functions f,g,nc(nocom); +Symbol x; +Local t = f(x)*g(x); +Print; +.end +assert compile_error?('Illegal specification for symme') +*--#] cov_funcncerr : + +*--#[ cov_polyraterr : +* PolyRatFun on a function that is not a regular commutative function +Symbols x; +PolyRatFun rat; +Local t = rat(x^2+1,x^3-2); +Print +s; +.end +assert compile_error?('should be a regular commuting') +*--#] cov_polyraterr : + +*--#[ cov_dotseterr : +* dot product with an illegal second element +Vector p,q; +CFunction f; +Local e = p.f(3); +Print; +.end +assert compile_error?('Illegal second element in dotpr') +*--#] cov_dotseterr : + +*--#[ cov_onfortran : +* On fortran after statement code in the same module +Symbol x; +Local e = x; +On fortran; +Print; +.end +assert compile_error?('Declaration out of order') +*--#] cov_onfortran : + +*---[ Saturation campaign batch 3: FactArg and if/match statement paths ]--- + +*--#[ cov_factarg_num : +* FactArg on argument 1 of a function +Symbol x,y; +Function f; +Local test = f((x+y)^2,(x-y)^2); +FactArg 1,f; +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(y+x,y+x,y-x,y-x)") +*--#] cov_factarg_num : + +*--#[ cov_factarg_delta : +* FactArg moving a delta factor out of function arguments +Symbol x,y; +Vector p,q; +Function f; +Local test = f(x*d_(p,q) + y*d_(p,q)); +FactArg f; +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(y+x,p.q)") +*--#] cov_factarg_delta : + +*--#[ cov_factarg_idx : +* FactArg on function arguments carrying indices terminates +Symbol x,y; +Index i,j; +Function f; +Local test = f(x*i + y*i); +FactArg f; +Print; +.end +assert runtime_error? +*--#] cov_factarg_idx : + +*--#[ cov_factarg_negpow : +* FactArg combining negative powers inside function arguments +Symbol x,y; +Function f; +Local test = f(1/x + 2/x); +FactArg f; +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(3,x^-1)") +*--#] cov_factarg_negpow : + +*--#[ cov_factarg_tensor : +* FactArg moving tensor elements out of function arguments +Symbol x,y; +Index i; +Tensor t1; +Function f; +Local test = f(t1(i)*x + t1(i)*y); +FactArg f; +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(y+x,t1(i))") +*--#] cov_factarg_tensor : + +*--#[ cov_ifdivnum : +* integer division in an if condition evaluates to 1 +Local a = 0; +if ( 3/2 ) id x = 1; +Print a, x; +.end +assert runtime_error?('is not the name of an active expression') +*--#] cov_ifdivnum : + +*--#[ cov_matchcond_undec : +* match() inside if with an undeclared variable +CFunction f; +Local t = f(x); +if ( match(f(x?)) > 0 ) id x = 2; +Print t; +.end +assert compile_error?('Undeclared variable') +*--#] cov_matchcond_undec : + +*--#[ cov_barelse : +* else statement with undeclared variable in the condition +Local t = 5; +if ( count(x,1) > 0 ) id x = 1; +else id t = 2; +endif; +Print t; +.end +assert compile_error?('No extra text allowed') +*--#] cov_barelse : + +*--#[ cov_factdollar_err : +* Factorize on a dollar variable is illegal +Symbol a,b; +Factorize $f1; +$f1 = (a+b)*(a+c); +.sort +Print $f1; +.end +assert compile_error?('Illegal object in (N)Factorize statement') +*--#] cov_factdollar_err : + +*--#[ cov_lowfirst_modfact : +* unrecognized LowFirst statement plus large modulus with Factorize +Symbol a,b; +LowFirst; +Modulus 10000000000000; +Factorize $m2; +$m2 = (a+b)^2; +.sort +Print $m2; +.end +assert compile_error?('Unrecognized statement LowFirst') +assert compile_error?('Illegal object in (N)Factorize statement') +*--#] cov_lowfirst_modfact : + +*---[ Saturation campaign batch 4: DoTail child flags, FillExpression, preproc exists/isnumber ]--- + +*--#[ cov_dootail_ok : +* FORM child processes with silent command-line flags +#system cd $TESTFILEDIR && printf ".end\n" > $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -c $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -l $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -M $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -W $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -d foo=bar $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -d bar $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -L -C $TESTTMPDIR/l1.log $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -f -C $TESTTMPDIR/l2.log $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -F -C $TESTTMPDIR/l3.log $TESTTMPDIR/dt.frm +Symbol oks; +Local ok = 1; +Print; +.end +assert succeeded? +*--#] cov_dootail_ok : + +*--#[ cov_dootail_paths : +* FORM child processes with path-related command-line flags +#system cd $TESTFILEDIR && printf ".end\n" > $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -t $TESTTMPDIR $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -T $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -s /dev/null $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -i x $TESTTMPDIR/dt.frm 2>/dev/null +#system cd $TESTFILEDIR && $FORM -I $TESTTMPDIR $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -I=$TESTTMPDIR $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -C=$TESTTMPDIR/l4.log $TESTTMPDIR/dt.frm +Symbol oks; +Local ok = 1; +Print; +.end +assert succeeded? +*--#] cov_dootail_paths : + +*--#[ cov_dootail_err : +* a failing child FORM process makes the #system statement terminate +#system cd $TESTFILEDIR && printf ".end\n" > $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM $TESTTMPDIR/nosuchfile.frm +Symbol oks; +Local ok = 1; +Print; +.end +assert runtime_error? +*--#] cov_dootail_err : + +*--#[ cov_dootail_pipe : +* the -pipe flag without preset external channels +#system cd $TESTFILEDIR && printf ".end\n" > $TESTTMPDIR/dt.frm +#system cd $TESTFILEDIR && $FORM -pipe $TESTTMPDIR/dt.frm < /dev/null +Symbol oks; +Local ok = 1; +Print; +.end +assert succeeded? +*--#] cov_dootail_pipe : + +*--#[ cov_exists_dollar : +* preprocessor exists() on dollars and file names +$x = 5; +#if ( exists($x) ) + #message "dollar exists" +#else + #message "dollar missing" +#endif +#if ( exists($nosuchdollar) ) + #message "oops" +#else + #message "undefined dollar absent" +#endif +#if ( exists("no_such_file_here_xyz") ) + #message "oops" +#else + #message "file absent" +#endif +Symbol a; +Local f = a; +Print; +.end +assert compile_error?('Declaration out of order') +*--#] cov_exists_dollar : + +*--#[ cov_isnum_cond : +* isnumber() on a non-dollar argument inside #if +Symbol a,b; +Local num = 5; +Local poly = a^2 + 1; +#if ( isnumber(num) ) + #message "num is a number" +#else + #message "num not a number" +#endif +#if ( isnumber(poly) ) + #message "oops" +#else + #message "poly not a number" +#endif +Print; +.end +assert preprocess_error?('Unmatched parentheses') +*--#] cov_isnum_cond : + +*--#[ cov_fill_expr : +* FillExpression from an expression bracketed in its cell symbols +Symbol x,y; +Table t(0:2,0:2); +Local e = (x*y)*(1 + x + y); +Bracket x,y; +.sort +FillExpression t = e(x,y); +Local out = t(1,1) + t(2,1) + t(1,2); +Print out; +.end +assert succeeded? +assert result("out") =~ expr("3") +*--#] cov_fill_expr : + +*--#[ cov_fill_exprfun : +* FillExpression from an expression bracketed in a function +CFunction f; +Table u(0:2,0:2); +Local e2 = f(1,1)+f(2,1)+f(1,2)*3; +Bracket f; +.sort +FillExpression u = e2(f); +Local out2 = u(1,1) + u(2,1) + u(1,2); +Print out2; +.end +assert succeeded? +assert result("out2") =~ expr("5") +*--#] cov_fill_exprfun : + +*--#[ cov_trunc_include : +* nonexistent include file under truncated output lines +#truncate 16 +#include "no_such_file_with_a_very_long_name_for_overflow_test.frm" +Symbol x; +Local t = x; +Print; +.end +assert preprocess_error?('Improper syntax for file') +assert preprocess_error?('Unrecognized preprocessor') +*--#] cov_trunc_include : + +*--#[ cov_tablebase_load : +* Load on a TableBase without a file name +TableBase tb; +Load tb; +.end +assert compile_error?('Proper syntax: TableBase') +*--#] cov_tablebase_load : + +*--#[ cov_plusminus : +* unary plus/minus expressions in if conditions +Symbol x; +Local b = 0; +if ( +1 ) id x = 1; +if ( -1 ) id x = 2; +Print b; +.end +assert succeeded? +assert result("b") =~ expr("0") +*--#] cov_plusminus : +*--#[ cov_takearg_index : +* target: TakeArgContent INDEX branch, argument.c:2863-2903 +* probe: clean +* target: TakeArgContent INDEX branch, argument.c:2863-2903 +Symbol x,y; +Index i,j; +Function f; +Local test = f(x*i + y*i); +FactArg f; +Print +s; +.end +assert runtime_error? +*--#] cov_takearg_index : + +*--#[ cov_bracketsetvec_2 : +* set of vectors in bracket: bset INDEX branch (execute.c 1445-1489) +* probe: clean +* set of vectors in bracket: bset INDEX branch (execute.c 1445-1489) +Vector v,p; +CFunction f; +Set vs: v, p; +Local e = v(1)*f(2); +Bracket vs; +Print; +.end +assert succeeded? +assert result("e") =~ expr("+ v(1) * ( f(2) )") +*--#] cov_bracketsetvec_2 : + +*--#[ cov_thr_bucketsize : +* farm probe 0032_thr_bucketsize_11 (+9 lines) +* probe: clean +On threads; +Symbol x,y,z; +ProcessBucketSize 1; +ThreadBucketSize 1; +Local f = (x+y+z)^18; +.sort +Print; +.end +assert succeeded? +assert result("f") =~ expr("z^18 + 18*y*z^17 + 153*y^2*z^16 + 816*y^3*z^15 + 3060*y^4*z^14 + 8568* +y^5*z^13 + 18564*y^6*z^12 + 31824*y^7*z^11 + 43758*y^8*z^10 + 48620*y^9* +z^9 + 43758*y^10*z^8 + 31824*y^11*z^7 + 18564*y^12*z^6 + 8568*y^13*z^5 ++ 3060*y^14*z^4 + 816*y^15*z^3 + 153*y^16*z^2 + 18*y^17*z + y^18 + 18*x +*z^17 + 306*x*y*z^16 + 2448*x*y^2*z^15 + 12240*x*y^3*z^14 + 42840*x*y^4* +z^13 + 111384*x*y^5*z^12 + 222768*x*y^6*z^11 + 350064*x*y^7*z^10 + +437580*x*y^8*z^9 + 437580*x*y^9*z^8 + 350064*x*y^10*z^7 + 222768*x*y^11* +z^6 + 111384*x*y^12*z^5 + 42840*x*y^13*z^4 + 12240*x*y^14*z^3 + 2448*x* +y^15*z^2 + 306*x*y^16*z + 18*x*y^17 + 153*x^2*z^16 + 2448*x^2*y*z^15 + +18360*x^2*y^2*z^14 + 85680*x^2*y^3*z^13 + 278460*x^2*y^4*z^12 + 668304* +x^2*y^5*z^11 + 1225224*x^2*y^6*z^10 + 1750320*x^2*y^7*z^9 + 1969110*x^2* +y^8*z^8 + 1750320*x^2*y^9*z^7 + 1225224*x^2*y^10*z^6 + 668304*x^2*y^11* +z^5 + 278460*x^2*y^12*z^4 + 85680*x^2*y^13*z^3 + 18360*x^2*y^14*z^2 + +2448*x^2*y^15*z + 153*x^2*y^16 + 816*x^3*z^15 + 12240*x^3*y*z^14 + 85680 +*x^3*y^2*z^13 + 371280*x^3*y^3*z^12 + 1113840*x^3*y^4*z^11 + 2450448*x^3 +*y^5*z^10 + 4084080*x^3*y^6*z^9 + 5250960*x^3*y^7*z^8 + 5250960*x^3*y^8* +z^7 + 4084080*x^3*y^9*z^6 + 2450448*x^3*y^10*z^5 + 1113840*x^3*y^11*z^4 ++ 371280*x^3*y^12*z^3 + 85680*x^3*y^13*z^2 + 12240*x^3*y^14*z + 816*x^3 +*y^15 + 3060*x^4*z^14 + 42840*x^4*y*z^13 + 278460*x^4*y^2*z^12 + 1113840 +*x^4*y^3*z^11 + 3063060*x^4*y^4*z^10 + 6126120*x^4*y^5*z^9 + 9189180*x^4 +*y^6*z^8 + 10501920*x^4*y^7*z^7 + 9189180*x^4*y^8*z^6 + 6126120*x^4*y^9* +z^5 + 3063060*x^4*y^10*z^4 + 1113840*x^4*y^11*z^3 + 278460*x^4*y^12*z^2 ++ 42840*x^4*y^13*z + 3060*x^4*y^14 + 8568*x^5*z^13 + 111384*x^5*y*z^12 ++ 668304*x^5*y^2*z^11 + 2450448*x^5*y^3*z^10 + 6126120*x^5*y^4*z^9 + +11027016*x^5*y^5*z^8 + 14702688*x^5*y^6*z^7 + 14702688*x^5*y^7*z^6 + +11027016*x^5*y^8*z^5 + 6126120*x^5*y^9*z^4 + 2450448*x^5*y^10*z^3 + +668304*x^5*y^11*z^2 + 111384*x^5*y^12*z + 8568*x^5*y^13 + 18564*x^6*z^12 ++ 222768*x^6*y*z^11 + 1225224*x^6*y^2*z^10 + 4084080*x^6*y^3*z^9 + +9189180*x^6*y^4*z^8 + 14702688*x^6*y^5*z^7 + 17153136*x^6*y^6*z^6 + +14702688*x^6*y^7*z^5 + 9189180*x^6*y^8*z^4 + 4084080*x^6*y^9*z^3 + +1225224*x^6*y^10*z^2 + 222768*x^6*y^11*z + 18564*x^6*y^12 + 31824*x^7* +z^11 + 350064*x^7*y*z^10 + 1750320*x^7*y^2*z^9 + 5250960*x^7*y^3*z^8 + +10501920*x^7*y^4*z^7 + 14702688*x^7*y^5*z^6 + 14702688*x^7*y^6*z^5 + +10501920*x^7*y^7*z^4 + 5250960*x^7*y^8*z^3 + 1750320*x^7*y^9*z^2 + +350064*x^7*y^10*z + 31824*x^7*y^11 + 43758*x^8*z^10 + 437580*x^8*y*z^9 ++ 1969110*x^8*y^2*z^8 + 5250960*x^8*y^3*z^7 + 9189180*x^8*y^4*z^6 + +11027016*x^8*y^5*z^5 + 9189180*x^8*y^6*z^4 + 5250960*x^8*y^7*z^3 + +1969110*x^8*y^8*z^2 + 437580*x^8*y^9*z + 43758*x^8*y^10 + 48620*x^9*z^9 ++ 437580*x^9*y*z^8 + 1750320*x^9*y^2*z^7 + 4084080*x^9*y^3*z^6 + +6126120*x^9*y^4*z^5 + 6126120*x^9*y^5*z^4 + 4084080*x^9*y^6*z^3 + +1750320*x^9*y^7*z^2 + 437580*x^9*y^8*z + 48620*x^9*y^9 + 43758*x^10*z^8 ++ 350064*x^10*y*z^7 + 1225224*x^10*y^2*z^6 + 2450448*x^10*y^3*z^5 + +3063060*x^10*y^4*z^4 + 2450448*x^10*y^5*z^3 + 1225224*x^10*y^6*z^2 + +350064*x^10*y^7*z + 43758*x^10*y^8 + 31824*x^11*z^7 + 222768*x^11*y*z^6 ++ 668304*x^11*y^2*z^5 + 1113840*x^11*y^3*z^4 + 1113840*x^11*y^4*z^3 + +668304*x^11*y^5*z^2 + 222768*x^11*y^6*z + 31824*x^11*y^7 + 18564*x^12* +z^6 + 111384*x^12*y*z^5 + 278460*x^12*y^2*z^4 + 371280*x^12*y^3*z^3 + +278460*x^12*y^4*z^2 + 111384*x^12*y^5*z + 18564*x^12*y^6 + 8568*x^13*z^5 ++ 42840*x^13*y*z^4 + 85680*x^13*y^2*z^3 + 85680*x^13*y^3*z^2 + 42840* +x^13*y^4*z + 8568*x^13*y^5 + 3060*x^14*z^4 + 12240*x^14*y*z^3 + 18360* +x^14*y^2*z^2 + 12240*x^14*y^3*z + 3060*x^14*y^4 + 816*x^15*z^3 + 2448* +x^15*y*z^2 + 2448*x^15*y^2*z + 816*x^15*y^3 + 153*x^16*z^2 + 306*x^16*y* +z + 153*x^16*y^2 + 18*x^17*z + 18*x^17*y + x^18") +*--#] cov_thr_bucketsize : + +*--#[ cov_powden : +* exponent wildcards in products with negative powers +Symbol x,y,n,m; +CFunction f; +Local t = x^2/y^-4; +id x^n?*y^m? = f(n,m); +Print; +.sort +Local u = x^2*y^-3; +id, once, x^n?*y^m? = f(n,m); +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(0,0)*f(2,4)") +assert result("u") =~ expr("f(2,-3)") +*--#] cov_powden : + +*--#[ cov_fill_warn : +* bracket with out-of-range power should be skipped with a warning +* probe: clean +* bracket with out-of-range power should be skipped with a warning +Symbol x,y; +Table t(0:2,0:2); +Local e = (x^5*y)*(1 + x*y); +Keep Brackets; +.sort +FillExpression t = e(x,y); +Local out = t(1,1); +Print out; +.end +assert compile_error?('Specification out of') +*--#] cov_fill_warn : + +*--#[ cov_ifelse : +* if/else with a true and a false condition +Symbol x; +Local u = x; +if ( count(x,1) > 0 ); + multiply 2; +else; + multiply 3; +endif; +Print u; +.sort +Local v = 1; +if ( count(x,1) > 0 ); + multiply 2; +else; + multiply 3; +endif; +Print v; +.end +assert succeeded? +assert result("v") =~ expr("3") +*--#] cov_ifelse : + +*--#[ cov_wildsym : +* exponent wildcards on symbol powers: x^n? patterns with once +Symbol x,y,n,m; +CFunction f; +Local a = x^3; +id, once, x^n? = f(n); +Print; +.sort +Local b = x^2*y^-3; +id, once, x^n?*y^m? = f(n,m); +Print; +.end +assert succeeded? +assert result("b") =~ expr("f(2,-3)") +*--#] cov_wildsym : + +*--#[ cov_dotail_flags : +* Runs the coverage-instrumented binary as a child to exercise DoTail +* probe: clean +* Runs the coverage-instrumented binary as a child to exercise DoTail +* option cases: c l L f F h W M and d (with and without '=') +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf1.frm; $FORM -c $TESTTMPDIR/cvf1.frm; $FORM -l $TESTTMPDIR/cvf1.frm; $FORM -L -C $TESTTMPDIR/cvlog1.frm $TESTTMPDIR/cvf1.frm; $FORM -f -C $TESTTMPDIR/cvlog2.frm $TESTTMPDIR/cvf1.frm; $FORM -F -C $TESTTMPDIR/cvlog3.frm $TESTTMPDIR/cvf1.frm; $FORM -h -W -M $TESTTMPDIR/cvf1.frm; true +#system cd $TESTFILEDIR && $FORM -d foo=bar $TESTTMPDIR/cvf1.frm; $FORM -d bar $TESTTMPDIR/cvf1.frm; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_flags : + +*--#[ cov_typedwild : +* typed wildcards in function arguments: index wildcards match +* indices and (index-like) numbers +Indices i1,i2,i,j; +CFunction f,g,h; +Local t1 = f(i1,i2); +id f(i?,j?) = g(i,j); +Print; +.sort +Local t2 = f(i1,3); +id f(i?,j?) = h(i,j); +Print; +.end +assert succeeded? +assert result("t1") =~ expr("g(i1,i2)") +assert result("t2") =~ expr("h(i1,3)") +*--#] cov_typedwild : + +*--#[ cov_dotail_illegal : +* DoTail illegal options: -Z, bare -i, -Q, and '/'-prefix branch of line 303 +* probe: clean +* DoTail illegal options: -Z, bare -i, -Q, and '/'-prefix branch of line 303 +* expected child message fragment: Illegal option in call of FORM +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf6.frm; $FORM -Z $TESTTMPDIR/cvf6.frm; $FORM -i $TESTTMPDIR/cvf6.frm; $FORM -Q $TESTTMPDIR/cvf6.frm; $FORM /zz $TESTTMPDIR/cvf6.frm; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_illegal : + +*--#[ cov_08_genericarg : +* named wildcard plus generic ? argument filler on a cyclesymmetric +* tensor; hits the funnycount (ARGWILD) handling in MatchArgument. +* Named-argument wildcards are rejected at compile time inside +* (anti)symmetric functions or tensors, so the reachable variant is a +* cyclesymmetric tensor. +Index i1,i2; +Tensor t(cyclesymmetric), t2; +Local F = t(i1,i2); +id t(?a) = t2(?a); +Print; +.end +assert succeeded? +assert result("F") =~ expr("t2(i1,i2)") +*--#] cov_08_genericarg : + +*--#[ cov_dotail_pipe : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe : + +*--#[ cov_dotail_bare : +* DoTail with argc<1: goto printversion path (version banner, lines 297-300, 559-568) +* probe: clean +* DoTail with argc<1: goto printversion path (version banner, lines 297-300, 559-568) +#system cd $TESTFILEDIR && $FORM < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_bare : + +*--#[ cov_setnocomma : +* expected: should be followed by a comma +* probe: error +* expected: should be followed by a comma +CFunction f; +Transform,{f}; +.end +assert compile_error?('f}: A set') +*--#] cov_setnocomma : + +*--#[ cov_ifcomp : +* target: if.c NOT/subexpression fast path, OR short-circuit, nested parens +* runtime $-variables force sequential mode under threads +* probe: clean +* target: if.c NOT/subexpression fast path, OR short-circuit, nested parens +Symbol x,y,z; +$a = 1; +Local t = 3*x*y; +If ( ! Occurrence(z) ) Multiply 2; EndIf; +If ( $a > 0 || Coefficient(y) > 2 ) Multiply 3; EndIf; +If ( ( Count(x,1,0) || Count(y,1,0) ) && Occurrence(x) ) Multiply 5; EndIf; +Print; +.end +#pend_if threaded? +assert compile_error?('Definition out of') +*--#] cov_ifcomp : + +*--#[ cov_dol_big : +* farm probe 0066_dol_big_5 (+8 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12; +CFunction f; +Local test = x1*x2*x3*x4*x5*x6*x7*x8*x9*x10*x11*x12; +$x = x1*x2*x3*x4*x5*x6*x7*x8*x9*x10*x11*x12; +id $x = f(1,2,3,4,5,6,7,8,9); +Print; +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("test") =~ expr("f(1,2,3,4,5,6,7,8,9)") +*--#] cov_dol_big : + +*--#[ cov_takearg_index_2 : +* target: TakeArgContent INDEX branch, argument.c:2863-2903 +* probe: clean +* target: TakeArgContent INDEX branch, argument.c:2863-2903 +Symbol x,y; +Index i,j; +Function f; +Local test = f(x*i + y*i); +FactArg f; +Print +s; +.end +assert runtime_error? +*--#] cov_takearg_index_2 : + +*--#[ cov_replmism : +* Transform replace with an unequal number of replacement arguments: +* the missing argument is filled with a zero +CFunction f; +Set funcs: f; +Local test = f(1,2,3); +Transform,funcs,replace(1,2)=(2); +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(1,0,3)") +*--#] cov_replmism : + +*--#[ cov_do_oneexpr : +* #do over an existing expression name (ONEEXPRESSION loop type) +* probe: clean +* #do over an existing expression name (ONEEXPRESSION loop type) +Symbol x; +Local F = 3; +.sort +#do i = F +#message loop over expression done +#enddo +.end +assert succeeded? +*--#] cov_do_oneexpr : + +*--#[ cov_pipe_echo2 : +* channel output forming a full statement (output-consumption path) +* probe: clean +* channel output forming a full statement (output-consumption path) +#pipe "echo" "Local t = 1;" +Print; +.end +assert succeeded? +assert result("t") =~ expr("1") +*--#] cov_pipe_echo2 : + +*--#[ cov_mod_inverse : +* modular inverse via GetModInverses: 1/2 mod 7 +Modulus 7; +Local t = 1/2; +Print t; +.end +assert succeeded? +assert result("t") =~ expr("4") +*--#] cov_mod_inverse : + +*--#[ cov_mod_inversetable : +* modular inverse with a precomputed inverse table: 1/3 mod 7 +Modulus inversetable 7; +Local t = 1/3; +Print t; +.end +assert succeeded? +assert result("t") =~ expr("5") +*--#] cov_mod_inversetable : + +*--#[ cov_mod_noinversetable : +* modular inverse without an inverse table: 2/3 mod 7 +Modulus noinversetable 7; +Local t = 2/3; +Print t; +.end +assert succeeded? +assert result("t") =~ expr("3") +*--#] cov_mod_noinversetable : + +*--#[ cov_idall_sym_err : +* expected: id,all can only be used with (products of) functions and/or tensors +* probe: error +* expected: id,all can only be used with (products of) functions and/or tensors +Symbol x,y; +Local test = x; +id, all, x = y; +.end +#pend_if threaded? +assert runtime_error? +*--#] cov_idall_sym_err : + +*--#[ cov_mod_divz : +* expected: Division by zero in modulus arithmetic +* probe: error +* expected: Division by zero in modulus arithmetic +Modulus 7; +Local test = 1/7; +Print; +.end +assert runtime_error? +*--#] cov_mod_divz : + +*--#[ cov_do_dollar1_ok : +* dollar variable as the FIRST parameter of #do (success path) +* runtime $-variables force sequential mode under threads +* probe: clean +* dollar variable as the FIRST parameter of #do (success path) +Symbol x; +$a = 3; +.sort +#do i = $a, 5 +#message i = `i' +#enddo +.end +#pend_if threaded? +assert preprocess_error?('$a does not') +*--#] cov_do_dollar1_ok : + +*--#[ cov_to_inside : +* farm probe 0058_to_inside_7 (+6 lines) +* probe: clean +CFunction f; +Symbol q,qb; +Local topo = f(1,2,3,4); +ToDiagram topo: f(1,2,3,4): q,qb,q,qb; +NumberofDiagrams; +NextDiagram; +if ( InsideDiagram(f(1,2)) ) Print; +IdenticaltoDiagram topo; +Print; +.end +assert compile_error?('Unrecognized statement ToDia') +*--#] cov_to_inside : + +*--#[ cov_dotail_pipe_2 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_2 : + +*--#[ cov_rev_irrend : +* unterminated string in reversed include hits tools.c 926 -> 871-874 irrend +* probe: error +* unterminated string in reversed include hits tools.c 926 -> 871-874 irrend +* expected: Irregular end of reverse include file. +Symbol z; +Local keep = 1; +#create revg +Local y1 = 1; +Print "unterminated +Local y2 = 2; +#endcreate +#reverseinclude revg +Print; +.end +assert preprocess_error?('Proper syntax is:') +*--#] cov_rev_irrend : + +*--#[ cov_insideopen : +* Inside on a $-expression without EndInside +Symbol x; +$f = x^2; +Inside $f; +id x = 1; +.end +#pend_if threaded? +assert runtime_error?('endinside statement(s) missing') +*--#] cov_insideopen : + +*--#[ cov_ifopen2 : +* expected: endif statement(s) missing +* runtime $-variables force sequential mode under threads +* probe: error +* expected: endif statement(s) missing +$a = 1; +If ($a > 0); +.end +#pend_if threaded? +assert runtime_error? +*--#] cov_ifopen2 : + +*--#[ cov_rev_string : +* quoted string with ; and backslash inside reversed include: tools.c 919-926 +* probe: clean +* quoted string with ; and backslash inside reversed include: tools.c 919-926 +#create revf +Local x1 = 1; +Print "a;b\\c"; +Local x2 = 2; +#endcreate +#reverseinclude revf +Print; +.end +assert preprocess_error?('Proper syntax is:') +*--#] cov_rev_string : + +*--#[ cov_takearg_index_3 : +* target: TakeArgContent INDEX branch, argument.c:2863-2903 +* probe: clean +* target: TakeArgContent INDEX branch, argument.c:2863-2903 +Symbol x,y; +Index i,j; +Function f; +Local test = f(x*i + y*i); +FactArg f; +Print +s; +.end +assert runtime_error? +*--#] cov_takearg_index_3 : + +*--#[ cov_cyc_zero : +* farm probe 0045_cyc_zero_11 (+7 lines) +* probe: clean +Function h(cyclic); +Symbol s; +Local test = h; +id h = s; +Print; +.end +assert succeeded? +assert result("test") =~ expr("s") +*--#] cov_cyc_zero : + +*--#[ cov_dotail_pipe_3 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_3 : + +*--#[ cov_gamma2 : +* gamma with two arguments and momentum form, matched with wildcards +Vector p; +Symbol x; +Local F = gi_(1,2)*g5_(p)*x; +if ( match(gi_(1,2)) ) Print "m1"; +if ( match(g5_(p)) ) Print "m2"; +Print F; +.end +assert succeeded? +assert result("F") =~ expr("g_(p,5_)*g_(1,2)*x") +*--#] cov_gamma2 : + +*--#[ cov_anti_fun : +* farm probe 0038_anti_fun_32 (+8 lines) +* probe: clean +Functions f,g,h; +Symbol x,y; +Local F = f(x)*g(y)*h(x+y)*x; +AntiBracket f; +.sort +Print; +.end +assert succeeded? +assert result("F") =~ expr("f(x)*g(y)*h(y + x)*x") +*--#] cov_anti_fun : + +*--#[ cov_mod_frac : +* farm probe 0006_mod_frac_14 (+27 lines) +* probe: clean +Local test = mod_(1/1234567890123456789012345678901234567890,97); +Print; +.end +assert succeeded? +assert result("test") =~ expr("52") +*--#] cov_mod_frac : + +*--#[ cov_takearg_index_4 : +* target: TakeArgContent INDEX branch, argument.c:2863-2903 +* probe: clean +* target: TakeArgContent INDEX branch, argument.c:2863-2903 +Symbol x,y; +Index i,j; +Function f; +Local test = f(x*i + y*i); +FactArg f; +Print +s; +.end +assert runtime_error? +*--#] cov_takearg_index_4 : + +*--#[ cov_max_small_big : +* farm probe 0006_max_small_big_17 (+10 lines) +* probe: clean +Local test = max_(5,1234567890123456789012345678901234567890); +Print; +.end +assert succeeded? +assert result("test") =~ expr("1234567890123456789012345678901234567890") +*--#] cov_max_small_big : + +*--#[ cov_indexpat : +* vector-with-index pattern hits the INDEX branch of FindAll +Index i,j; +Vector p,q; +Local F = p(i)*q(j); +if ( match(p(i)) ) Print "matched"; +Print F; +.end +assert succeeded? +assert result("F") =~ expr("p(i)*q(j)") +*--#] cov_indexpat : + +*--#[ cov_anti_funset : +* farm probe 0038_anti_funset_33 (+11 lines) +* probe: clean +Functions f1,f2,g; +Symbol x; +Set fs: f1, f2; +Local F = f1(x)*g(x)*f2(x)*x; +AntiBracket fs; +.sort +Print; +.end +assert succeeded? +assert result("F") =~ expr("f1(x)*g(x)*f2(x)*x") +*--#] cov_anti_funset : + +*--#[ cov_flagok : +* valid flag(...) condition, big compile run 4510-4543 +* probe: clean +* valid flag(...) condition, big compile run 4510-4543 +CFunction f; +Local F = f(1); +if ( flag(1,2) ) Print; +.end +assert succeeded? +assert result("F") =~ expr("f(1)") +*--#] cov_flagok : + +*--#[ cov_brk_vecset : +* farm probe 0038_brk_vecset_37 (+18 lines) +* probe: clean +Vectors p1,p2,q1,q2; +Set vs: p1, p2; +Local F = p1.p2*q1.q2; +Bracket vs; +.sort +Print; +.end +assert succeeded? +assert result("F") =~ expr("p1.p2*q1.q2") +*--#] cov_brk_vecset : + +*--#[ cov_expok : +* valid expression(...) condition, compile run 4546-4591 +* probe: clean +* valid expression(...) condition, compile run 4546-4591 +Symbol x; +Local F = x; +if ( expression(F) == 0 ) Print; +.end +assert succeeded? +assert result("F") =~ expr("x") +*--#] cov_expok : + +*--#[ cov_isfactok : +* valid isfactorized(...) condition, compile run 4595-4639 +* probe: clean +* valid isfactorized(...) condition, compile run 4595-4639 +Symbol x; +Local F = x; +if ( isfactorized(F) ) Print; +.end +assert succeeded? +assert result("F") =~ expr("x") +*--#] cov_isfactok : + +*--#[ cov_1102_dfill_neg : +* d_ on RHS with wildcard-filled argument, negative power (DENOMINATOR path) +* probe: clean +* d_ on RHS with wildcard-filled argument, negative power (DENOMINATOR path) +Symbol x,y; +CFunction f,g; +Local test = f(g(x)); +id f(y?) = d_(-2,f(y)); +Print; +.end +assert compile_error?('Illegal object in') +*--#] cov_1102_dfill_neg : + +*--#[ cov_dotail_pipe_4 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_4 : + +*--#[ cov_brk_argwild : +* farm probe 0038_brk_argwild_35 (+7 lines) +* probe: clean +Symbol x,y; +Functions f,g; +Local F = f(x,y)*g(x)*y; +Bracket f(1?,...); +.sort +Print; +.end +assert compile_error?('Improper operators for') +*--#] cov_brk_argwild : + +*--#[ cov_pr_pctd : +* expected: !!!Wrong object in Print statement!!! +* probe: error +* expected: !!!Wrong object in Print statement!!! +* expression object paired with numeric specifier should set specialerror +Symbol x; +Local F = x; +Print "%d",F; +.end +assert compile_error?('Illegal object in') +*--#] cov_pr_pctd : + +*--#[ cov_brk_delta : +* farm probe 0038_brk_delta_36 (+5 lines) +* probe: clean +Symbol i,j; +Local F = d_(i,j)*x*d_(i,i); +Bracket d_; +.sort +Print; +.end +assert compile_error?('Undeclared variable x') +*--#] cov_brk_delta : + +*--#[ cov_fac150 : +* factorized expression with many brackets: ISFACTORIZED enlargement branch (index.c 409-410) +* probe: clean +* factorized expression with many brackets: ISFACTORIZED enlargement branch (index.c 409-410) +AutoDeclare Symbol s; +Local test = (s1+s2+s3+s4+s5+s6+s7+s8+s9+s10+s11+s12+s13+s14+s15+s16+s17+s18+s19+s20+s21+s22+s23+s24+s25+s26+s27+s28+s29+s30+s31+s32+s33+s34+s35+s36+s37+s38+s39+s40+s41+s42+s43+s44+s45+s46+s47+s48+s49+s50+s51+s52+s53+s54+s55+s56+s57+s58+s59+s60+s61+s62+s63+s64+s65+s66+s67+s68+s69+s70+s71+s72+s73+s74+s75+s76+s77+s78+s79+s80+s81+s82+s83+s84+s85+s86+s87+s88+s89+s90+s91+s92+s93+s94+s95+s96+s97+s98+s99+s100+s101+s102+s103+s104+s105+s106+s107+s108+s109+s110+s111+s112+s113+s114+s115+s116+s117+s118+s119+s120+s121+s122+s123+s124+s125+s126+s127+s128+s129+s130+s131+s132+s133+s134+s135+s136+s137+s138+s139+s140+s141+s142+s143+s144+s145+s146+s147+s148+s149+s150)^2; +Bracket; +Factorize test; +.sort +Print; +.end +assert succeeded? +assert result("test") =~ expr("( s150 + s149 + s148 + s147 + s146 + s145 + s144 + s143 + s142 + s141 ++ s140 + s139 + s138 + s137 + s136 + s135 + s134 + s133 + s132 + +s131 + s130 + s129 + s128 + s127 + s126 + s125 + s124 + s123 + s122 ++ s121 + s120 + s119 + s118 + s117 + s116 + s115 + s114 + s113 + +s112 + s111 + s110 + s109 + s108 + s107 + s106 + s105 + s104 + s103 ++ s102 + s101 + s100 + s99 + s98 + s97 + s96 + s95 + s94 + s93 + s92 ++ s91 + s90 + s89 + s88 + s87 + s86 + s85 + s84 + s83 + s82 + s81 + +s80 + s79 + s78 + s77 + s76 + s75 + s74 + s73 + s72 + s71 + s70 + s69 ++ s68 + s67 + s66 + s65 + s64 + s63 + s62 + s61 + s60 + s59 + s58 + +s57 + s56 + s55 + s54 + s53 + s52 + s51 + s50 + s49 + s48 + s47 + s46 ++ s45 + s44 + s43 + s42 + s41 + s40 + s39 + s38 + s37 + s36 + s35 + +s34 + s33 + s32 + s31 + s30 + s29 + s28 + s27 + s26 + s25 + s24 + s23 ++ s22 + s21 + s20 + s19 + s18 + s17 + s16 + s15 + s14 + s13 + s12 + +s11 + s10 + s9 + s8 + s7 + s6 + s5 + s4 + s3 + s2 + s1 ) +* ( s150 + s149 + s148 + s147 + s146 + s145 + s144 + s143 + s142 + s141 ++ s140 + s139 + s138 + s137 + s136 + s135 + s134 + s133 + s132 + +s131 + s130 + s129 + s128 + s127 + s126 + s125 + s124 + s123 + s122 ++ s121 + s120 + s119 + s118 + s117 + s116 + s115 + s114 + s113 + +s112 + s111 + s110 + s109 + s108 + s107 + s106 + s105 + s104 + s103 ++ s102 + s101 + s100 + s99 + s98 + s97 + s96 + s95 + s94 + s93 + s92 ++ s91 + s90 + s89 + s88 + s87 + s86 + s85 + s84 + s83 + s82 + s81 + +s80 + s79 + s78 + s77 + s76 + s75 + s74 + s73 + s72 + s71 + s70 + s69 ++ s68 + s67 + s66 + s65 + s64 + s63 + s62 + s61 + s60 + s59 + s58 + +s57 + s56 + s55 + s54 + s53 + s52 + s51 + s50 + s49 + s48 + s47 + s46 ++ s45 + s44 + s43 + s42 + s41 + s40 + s39 + s38 + s37 + s36 + s35 + +s34 + s33 + s32 + s31 + s30 + s29 + s28 + s27 + s26 + s25 + s24 + s23 ++ s22 + s21 + s20 + s19 + s18 + s17 + s16 + s15 + s14 + s13 + s12 + +s11 + s10 + s9 + s8 + s7 + s6 + s5 + s4 + s3 + s2 + s1 )") +*--#] cov_fac150 : + +*--#[ cov_factdol_negpow : +* Factorized dollar with negative power (power < 0 path) +* runtime $-variables force sequential mode under threads +* probe: clean +* Factorized dollar with negative power (power < 0 path) +Symbol x; +Local F = (x+1)*(x-1); +.sort +$dd = F; +.sort +FactDollar,$dd; +.sort +Local G = $dd^-1; +.sort +Print; +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("F") =~ expr("- 1 + x^2") +assert result("G") =~ expr("1/( - 1 + x^2)") +*--#] cov_factdol_negpow : + +*--#[ cov_bigtablefill : +* long fill expression may push table into tree/boomlijst storage +* probe: clean +* long fill expression may push table into tree/boomlijst storage +Symbol x; +Table t(1:4); +.sort +Fill t(1) = (x+1)^10; +.sort +Fill t(2) = (x+2)^12; +.sort +Local u = t(1)+t(2); +.sort +Print; +.clear +.sort +Local v = 2; +Print; +.end +assert succeeded? +assert result("v") =~ expr("2") +*--#] cov_bigtablefill : + +*--#[ cov_clearall : +* farm probe 0065_clearall_0 (+10 lines) +* probe: clean +Symbol x,y; +Vector v; +Index i; +CFunction f; +Set s: x,y; +Table tb(1:2,1:2); +.sort +Fill tb(1,1) = 5; +.sort +Local t = f(x)*v(i) + tb(1,1); +.sort +Print; +.clear +.sort +Local u = 1; +Print; +.end +assert succeeded? +assert result("u") =~ expr("1") +*--#] cov_clearall : + +*--#[ cov_mixtyp : +* wildcard bound as function arg, reused as power wildcard -> type clash +* probe: clean +* wildcard bound as function arg, reused as power wildcard -> type clash +* at CheckWild (lines 482-484) +Symbol x,n; +Functions f; +Local test = f(3)*x^-3; +id f(n?)*x^-n? = 1; +Print; +.end +assert succeeded? +assert result("test") =~ expr("1") +*--#] cov_mixtyp : + +*--#[ cov_vecmiss : +* vector present in one term only: scratch-vector path +* probe: clean +* vector present in one term only: scratch-vector path +Vector p,q,r; +Index i,j,k; +CFunction g; +Symbol x,y; +Local a = g(p(i),q(j))*x + g(q(j))*y; +.sort +Local b = factorin_(a); +Print b; +.sort +Print; +.end +assert succeeded? +assert result("a") =~ expr("g(p(i),q(j))*x + g(q(j))*y") +assert result("b") =~ expr("1") +*--#] cov_vecmiss : + +*--#[ cov_bigexp : +* large expansion inside Substitute; attempts workspace check path 654-658 +* probe: clean +* large expansion inside Substitute; attempts workspace check path 654-658 +Symbol x,y; +CFunction f; +Local test = f(x); +id f(x?) = (y+1)^50000; +.end +assert runtime_error? +*--#] cov_bigexp : + +*--#[ cov_wc_symwild_all : +* farm probe 0019_wc_symwild_all_37 (+14 lines) +* probe: clean +Symbol a,b,x; +CFunction f; +Local t = a^2*b^3; +id x? = f(x); +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(a)^2*b^3") +*--#] cov_wc_symwild_all : + +*--#[ cov_grepeat2 : +* farm probe 0039_grepeat2_61 (+36 lines) +* probe: clean +Index mu,nu; +Local test = g_(1,2)*g_(3,4); +repeat id g_(mu?,nu?)*g_(mu,nu) = 1; +Print test; +.end +assert succeeded? +assert result("test") =~ expr("g_(1,2)*g_(3,4)") +*--#] cov_grepeat2 : + +*--#[ cov_mkrat_basic : +* MakeRational_: fraction reconstruction of a residue modulo a prime +* (manual functions.tex example: 12345678 mod prime_(1) = 2147483587) +Local F = MakeRational_(12345678,2147483587); +Print F; +.end +assert succeeded? +assert result("F") =~ expr("9719/38790") +*--#] cov_mkrat_basic : + +*--#[ cov_autoclear : +* farm probe 0065_autoclear_2 (+18 lines) +* probe: clean +AutoDeclare Symbol s; +AutoDeclare Vector v; +AutoDeclare Index i; +AutoDeclare Function f; +.sort +Local t = f1(i1)*v(i1) + s2^2; +.sort +Print; +.clear +.sort +Local u = 1; +Print; +.end +assert succeeded? +assert result("u") =~ expr("1") +*--#] cov_autoclear : + +*--#[ cov_mkrat_pow2 : +* attempts MakeLongRational failure (1026-1034) via huge common power of two +* probe: clean +* attempts MakeLongRational failure (1026-1034) via huge common power of two +Local test = MakeRational_(3*2^320,5*2^320); +Print; +.end +assert warning?('fraction could not') +assert result("test") =~ expr("640796110776273024718506511850865634380811356706995830984112482346665917\\ +7341921650068886260809728") +*--#] cov_mkrat_pow2 : + +*--#[ cov_pfortran : +* farm probe 0079_pfortran_8 (+10 lines) +* probe: clean +Format PFortran; +Symbol x,y,z; +Local test = (x+y+z)^2*(x+2*y); +Bracket x; +Print test; +.end +assert succeeded? +*--#] cov_pfortran : + +*--#[ cov_gwild1 : +* farm probe 0039_gwild1_56 (+8 lines) +* probe: clean +Index mu; +Local test = g_(1); +id g_(mu?) = g_(mu,5); +Print test; +.end +assert succeeded? +assert result("test") =~ expr("g_(1,5)") +*--#] cov_gwild1 : + +*--#[ cov_c_bracket : +* farm probe 0079_c_bracket_2 (+6 lines) +* probe: clean +Format C; +Symbol x,y,z; +Local test = (x+y+z)^2*(x+2*y); +Bracket x; +Print test; +.end +assert succeeded? +assert result("test") =~ expr("+ x * ( pow(z,2) + 6*y*z + 5*pow(y,2) )") +*--#] cov_c_bracket : + +*--#[ cov_biggcd : +* kGCD > kLCM: long GCD numerator (10^30,10^12), short LCM denominator (15) +* probe: clean +* kGCD > kLCM: long GCD numerator (10^30,10^12), short LCM denominator (15) +Symbol x; +Local a = 1000000000000000000000000000000*x/3 + 1000000000000*x^2/5; +.sort +Local b = factorin_(a); +Print b; +.sort +Print; +.end +assert succeeded? +assert result("a") =~ expr("1000000000000000000000000000000/3*x + 200000000000*x^2") +assert result("b") =~ expr("200000000000/3*x") +*--#] cov_biggcd : + +*--#[ cov_dotswap : +* vector wildcard dot product matching swapped order (lines 749-757) +* probe: clean +* vector wildcard dot product matching swapped order (lines 749-757) +Vector p,q; +Local test = q.p + p.p; +id p?.q = 1; +Print; +.end +assert succeeded? +assert result("test") =~ expr("1 + p.p") +*--#] cov_dotswap : + +*--#[ cov_gslide : +* farm probe 0039_gslide_59 (+7 lines) +* probe: clean +Index mu; +Local test = g_(1,2,3); +id g_(mu?,1) = g_(mu,9); +Print test; +.end +assert succeeded? +assert result("test") =~ expr("g_(1,2,3)") +*--#] cov_gslide : + +*--#[ cov_mkrat_exprarg : +* attempts expression argument (non-SNUMBER, non-general) -> normal.c 1009-1013 +* probe: clean +* attempts expression argument (non-SNUMBER, non-general) -> normal.c 1009-1013 +Symbol x; +Local F = x; +.sort +Local test = MakeRational_(3,F); +Print; +.end +assert succeeded? +assert result("F") =~ expr("x") +assert result("test") =~ expr("makerational_(3,x)") +*--#] cov_mkrat_exprarg : + +*--#[ cov_biglcm : +* kLCM > kGCD: short GCD numerator, long LCM denominator +* probe: clean +* kLCM > kGCD: short GCD numerator, long LCM denominator +Symbol x; +Local a = x/3 + x^2/1000000000000000000000000000000; +.sort +Local b = factorin_(a); +Print b; +.sort +Print; +.end +assert succeeded? +assert result("a") =~ expr("1/3*x + 1/1000000000000000000000000000000*x^2") +assert result("b") =~ expr("1/3000000000000000000000000000000*x") +*--#] cov_biglcm : + +*--#[ cov_pgenidx : +* farm probe 0022_pgenidx_9 (+31 lines) +* probe: clean +Vectors p; +Indices i; +Symbol x; +Local t = p(i); +id p(i?) = x; +Print; +.end +assert succeeded? +assert result("t") =~ expr("x") +*--#] cov_pgenidx : + +*--#[ cov_min_zerobig : +* targets normal.c 1897-1899 (zero via loadnew2) and 1914-1916 (n_llnum[0]==0, big subexpr arg, loadnew1) +* probe: clean +* targets normal.c 1897-1899 (zero via loadnew2) and 1914-1916 (n_llnum[0]==0, big subexpr arg, loadnew1) +Symbol x; +Local test = min_(0,-(3^100)); +Print; +.end +assert succeeded? +assert result("test") =~ expr("- 515377520732011331036461129765621272702107522001") +*--#] cov_min_zerobig : + +*--#[ cov_gcd_expr : +* targets ratio.c 886-897 (CreateExpression path over expression terms) +* probe: clean +* targets ratio.c 886-897 (CreateExpression path over expression terms) +Symbol x; +Local e = 1+6; +Local test = gcd_(e,x); +Print; +.end +assert succeeded? +assert result("e") =~ expr("7") +assert result("test") =~ expr("1") +*--#] cov_gcd_expr : + +*--#[ cov_s6_absmix : +* farm probe 0005_s6_absmix_11 (+17 lines) +* probe: clean +Symbol x; +Local test = abs_(i_*x); +Print; +.end +assert succeeded? +assert result("test") =~ expr("abs_(i_*x)") +*--#] cov_s6_absmix : + +*--#[ cov_autofunctable : +* table declared on an auto-declared function name; may error if +* probe: clean +* table declared on an auto-declared function name; may error if +* FORM refuses Table on an existing auto function - either way useful +.global +Symbol g; +.sort +AutoDeclare Function f; +.sort +Local t = f1(1); +.sort +Table f1(1:2); +.sort +Fill f1(1) = 4; +.sort +Print; +.clear +.sort +Local u = g; +Print; +.end +assert runtime_error?('Table now decl') +*--#] cov_autofunctable : + +*--#[ cov_ab_vector_eps : +* farm probe 0040_ab_vector_eps_17 (+8 lines) +* probe: clean +Vector p,q,r; +Index i; +Local F = e_(p,q)*e_(r,q); +Bracket p; +.sort +AntiBracket, r; +.sort +Print; +.end +assert succeeded? +assert result("F") =~ expr("- e_(p,q)*e_(q,r)") +*--#] cov_ab_vector_eps : + +*--#[ cov_gcd_numneg : +* targets ratio.c GCDfunction 704-711 (both args negative, sign=-1) +* probe: clean +* targets ratio.c GCDfunction 704-711 (both args negative, sign=-1) +Local test = gcd_(-12,-18,-24); +Print; +.end +assert succeeded? +assert result("test") =~ expr("- 6") +*--#] cov_gcd_numneg : + +*--#[ cov_hideg_chain : +* exercises redefinition replace-chain over hidden global/local expressions +* probe: clean +* exercises redefinition replace-chain over hidden global/local expressions +Symbol x,y; +Global f = x; +Local g = y; +.sort +Hide f; +Hide g; +.sort +Global f = x+1; +Local g = y+1; +.sort +Print; +.end +assert succeeded? +assert result("f") =~ expr("1 + x") +assert result("g") =~ expr("1 + y") +*--#] cov_hideg_chain : + +*--#[ cov_binom_big : +* target: notation.c NormPolyTerm LNUMBER/Mully (166-171) via big-number poly arithmetic +* probe: clean +* target: notation.c NormPolyTerm LNUMBER/Mully (166-171) via big-number poly arithmetic +Local test = Binom_(300,150); +Print; +.end +assert succeeded? +assert result("test") =~ expr("937597027728274527931937544390640848792326557000813589204723527129751700\\ +21839591675861424") +*--#] cov_binom_big : + +*--#[ cov_fbracket_plain : +* FIRSTBRACKET variant: unbracketed single-term expression (1062-1064, 1078) +* probe: clean +* FIRSTBRACKET variant: unbracketed single-term expression (1062-1064, 1078) +Symbol x; +Local F = x; +.sort +Local test = firstbracket_(F); +Print; +.end +assert succeeded? +assert result("F") =~ expr("x") +assert result("test") =~ expr("1") +*--#] cov_fbracket_plain : + +*--#[ cov_gcd_minvec : +* targets ratio.c 693-694 (MINVECTOR promotion) and 765-767 output +* probe: clean +* targets ratio.c 693-694 (MINVECTOR promotion) and 765-767 output +Vector p; +Local test = gcd_(-p,p); +Print; +.end +assert succeeded? +assert result("test") =~ expr("p") +*--#] cov_gcd_minvec : + +*--#[ cov_norm_divzero : +* expected: Division by zero during normalization +* probe: error +* expected: Division by zero during normalization +* target: normal.c 4215-4219 NormInf +Symbol a; +Local test = 1/(a-a); +Print; +.end +assert runtime_error? +*--#] cov_norm_divzero : + +*--#[ cov_expr_args : +* expression definition with prototype arguments of all four types +* probe: clean +* expression definition with prototype arguments of all four types +Symbol x; +Index i; +Vector p; +Function g; +Local f(x,i,p,g)=x; +.sort +Print; +.end +assert succeeded? +assert result("f(x,i,p,g)") =~ expr("x") +*--#] cov_expr_args : + +*--#[ cov_goog_0000_funny_vector_self : +* farm probe goog_0000_funny_vector_self_8 (+6 lines) +* probe: clean +Vector v; +Local F = v(v); +Print; +.end +assert succeeded? +assert result("F") =~ expr("v.v") +*--#] cov_goog_0000_funny_vector_self : + +*--#[ cov_arg_powdiff : +* farm probe 0013_arg_powdiff_24 (+5 lines) +* probe: clean +Symbol x; +CFunction f; +Local s = f(x^5,x^2,3*x^3); +Argument f, x^2; + id x = x/2; +EndArgument; +Print; +.end +assert compile_error?('x is not') +*--#] cov_arg_powdiff : + +*--#[ cov_dolzero : +* farm probe 0099_dolzero_10 (+5 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol x,y; +CFunction f; +$a = x*y; +$b = 3; +$c = (x - x); +$d = 0; +.sort +Local t = $a + $b + $c + $d; +Print; +.end +#pend_if threaded? +assert runtime_error? +*--#] cov_dolzero : + +*--#[ cov_dolidx : +* farm probe 0099_dolidx_11 (+6 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Index i; +CFunction f,g; +$a = i; +.sort +Local t = f($a); +Print; +.end +#pend_if threaded? +assert runtime_error? +*--#] cov_dolidx : + +*--#[ cov_isfact_notexpr : +* expected: is not an expression +* probe: error +* expected: is not an expression +Symbol q,x; +Local t = x; +If ( isfactorized(q) ) Id x = 1; +.end +assert compile_error?('q is not') +*--#] cov_isfact_notexpr : + +*--#[ cov_fact_dollar : +* farm probe 0096_fact_dollar_6 (+10 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol x; +Local t = 1; +$a = factor_(x^2-1); +id t = t*$a; +Print t; +.end +#pend_if threaded? +assert compile_error?('Illegal use of') +*--#] cov_fact_dollar : + +*--#[ cov_copy_alt : +* farm probe 0066_copy_alt_10 (+6 lines) +* probe: clean +Set sortsize 200; +Set scratchsize 200; +Symbol a1,a2,a3,a4,a5; +Local F = (a1+a2+a3+a4+a5)^5; +Local G = 1; +.sort +.copy F,G; +.sort +Print G; +.end +assert preprocess_error?('Unrecognized module terminat') +*--#] cov_copy_alt : + +*--#[ cov_seteq_syntax : +* farm probe 0066_seteq_syntax_15 (+10 lines) +* probe: clean +Set sortsize = 200; +Set scratchsize = 200; +Symbol a1,a2,a3; +Local F = (a1+a2+a3)^5; +Local G = 1; +.sort +.copy F to G; +.sort +Print G; +.end +assert preprocess_error?('Unrecognized module term') +*--#] cov_seteq_syntax : + +*--#[ cov_divzero : +* expected: Division by zero +* probe: error +* expected: Division by zero +CFunction f; +Local F = f(1); +if ( 4/0 > 0 ) Print; +.end +assert compile_error?('Division by zero!') +*--#] cov_divzero : + +*--#[ cov_dol_numfac_bad : +* expected: Problems with argument of NumFactors_ +* runtime $-variables force sequential mode under threads +* probe: error +* expected: Problems with argument of NumFactors_ +Symbol x; +Local test = x; +$a = test; +Local t = NumFactors_($a,x); +Print; +.end +#pend_if threaded? +assert compile_error?('Definition out of') +*--#] cov_dol_numfac_bad : + +*--#[ cov_dotail_pipe_5 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_5 : + +*--#[ cov_divok : +* integer division inside if-conditions: 6/2 and 1/2 truncate +Symbol x; +Local t = x; +If ( count(x,1) == 6/2 ) Id x = 1; +Print; +.sort +Symbol x; +Local t = x; +If ( count(x,1) == 1/2 ) Id x = 1; +Print; +.sort +Symbol x; +Local t = x; +If ( 6/2 == 3 ) Id x = 1; +Print; +.end +assert succeeded? +assert result("t") =~ expr("1") +*--#] cov_divok : + +*--#[ cov_dot_set : +* expected: Illegally formed dotproduct +* probe: error +* expected: Illegally formed dotproduct +Vectors p,q; +Set v: q; +Local t = p.v; +Print; +.end +assert compile_error?('Set without argument') +*--#] cov_dot_set : + +*--#[ cov_goog_0000_dimension_out_of_range : +* two symbols with huge dimension weights multiplied into a term make +* the term dimension overflow: "Dimension_ out of range in term" +Symbol x{d=1073741824},y{d=1073741824}; +Local F = x*y*dimension_; +Print; +.end +assert runtime_error?('Dimension_ out of range in term') +*--#] cov_goog_0000_dimension_out_of_range : + +*--#[ cov_pipe_from_stream : +* target: alternative #fromexternal syntax (no filename); also hits do_run_cmd first +* probe: error +* target: alternative #fromexternal syntax (no filename); also hits do_run_cmd first +* expected: Cannot open +#pipe 1, /bin/echo "Local z = 9;" +#fromexternal 1 +#closeexternal 1 +.end +assert runtime_error? +*--#] cov_pipe_from_stream : + +*--#[ cov_factorize_sub : +* Factorize with subexpression option (best attempt at exact syntax) +* probe: clean +* Factorize with subexpression option (best attempt at exact syntax) +Symbol a,b,c; +Local test = (a+b)*(a+b+c); +Factorize test, sub; +.sort +Print; +.end +assert succeeded? +assert result("test") =~ expr("( c + b + a ) +* ( b + a )") +*--#] cov_factorize_sub : + +*--#[ cov_mod101_same_mod : +* farm probe 0191_mod101_same_mod_3 (+27 lines) +* probe: clean +Symbol x; +Modulus 101; +Local f = x^7+x^2+1; +Local g = x^6+x+1; +Factorize f; +Factorize g; +Print; +.end +assert succeeded? +assert result("f") =~ expr("( 1 + x + x^2 ) +* ( 1 + 100*x + x^2 + 100*x^4 + x^5 )") +assert result("g") =~ expr("( 54 + 65*x + 73*x^2 + 38*x^3 + x^4 ) +* ( 58 + 63*x + x^2 )") +*--#] cov_mod101_same_mod : + +*--#[ cov_clearall_2 : +* farm probe 0065_clearall_0 (+5 lines) +* probe: clean +Symbol x,y; +Vector v; +Index i; +CFunction f; +Set s: x,y; +Table tb(1:2,1:2); +.sort +Fill tb(1,1) = 5; +.sort +Local t = f(x)*v(i) + tb(1,1); +.sort +Print; +.clear +.sort +Local u = 1; +Print; +.end +assert succeeded? +assert result("u") =~ expr("1") +*--#] cov_clearall_2 : + +*--#[ cov_bigexp_2 : +* large expansion inside Substitute; attempts workspace check path 654-658 +* probe: clean +* large expansion inside Substitute; attempts workspace check path 654-658 +Symbol x,y; +CFunction f; +Local test = f(x); +id f(x?) = (y+1)^50000; +.end +assert runtime_error? +*--#] cov_bigexp_2 : + +*--#[ cov_sort1_properorder : +* guess: On properorder sets AC.properorderflag (sort.c:2765-2773 CompArg loop) +* probe: clean +* guess: On properorder sets AC.properorderflag (sort.c:2765-2773 CompArg loop) +CFunction f,g; +Symbol x,y; +On properorder; +Local t = f(x+y)*g(x) + f(x)*g(x+y) + f(y)*g(y^2); +.sort +Print; +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("t") =~ expr("f(y + x)*g(x) + f(x)*g(y + x) + f(y)*g(y^2)") +*--#] cov_sort1_properorder : + +*--#[ cov_mkrat_bignum : +* MakeRational_ with big arguments: residues and reconstruction mod 7 +Local test = MakeRational_(2^130,7); +Local test2 = MakeRational_(3^40,7); +Local test3 = MakeRational_(123456789012345678901234567891,5); +Print; +.end +assert succeeded? +assert result("test") =~ expr("2") +assert result("test2") =~ expr("1/2") +assert result("test3") =~ expr("1") +*--#] cov_mkrat_bignum : + +*--#[ cov_nsdollar : +* dollar variable assignment inside namespace (ConstructName '$' case) +* runtime $-variables force sequential mode under threads +* probe: clean +* dollar variable assignment inside namespace (ConstructName '$' case) +#namespace nsdollar +Symbol q; +Local F = q; +$dd = F + 1; +Print F; +#endnamespace +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("F") =~ expr("q") +*--#] cov_nsdollar : + +*--#[ cov_ddrep6 : +* farm probe 0118_ddrep6_5 (+13 lines) +* probe: clean +Vector p1,p2,p3; +Local test = dd_(p1,p1,p2,p2,p3,p3); +Print; +.end +assert succeeded? +assert result("test") =~ expr("p1.p1*p2.p2*p3.p3 + 2*p1.p1*p2.p3^2 + 8*p1.p2*p1.p3*p2.p3 + 2*p1.p2^2* +p3.p3 + 2*p1.p3^2*p2.p2") +*--#] cov_ddrep6 : + +*--#[ cov_rev_raw : +* farm probe 0160_rev_raw_9 (+33 lines) +* probe: clean +Symbol a,b,c; +Function f; +Local F = f(reverse_(a,b,c)); +Print; +.end +assert succeeded? +assert result("F") =~ expr("f(c,b,a)") +*--#] cov_rev_raw : + +*--#[ cov_sym_fixzero : +* note: should emit Warning "Restriction to zero arguments removed" +* probe: clean +* note: should emit Warning "Restriction to zero arguments removed" +Symbol x; +CFunction f; +Local test = f(1,2); +Symmetrize f:0; +Print; +.end +assert warning?('Restriction to ze') +assert result("test") =~ expr("f(1,2)") +*--#] cov_sym_fixzero : + +*--#[ cov_sym_groups : +* farm probe 0124_sym_groups_2 (+21 lines) +* probe: clean +Symbol x; +CFunction f; +Local test = f(1,2,3,4); +Symmetrize f(1,2),(3,4); +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(1,2,3,4)") +*--#] cov_sym_groups : + +*--#[ cov_dim_ok : +* target: names.c:1481-1502 dimension field {d=...} +* probe: clean +* target: names.c:1481-1502 dimension field {d=...} +Function f{d=4}; +Local test = f(1,2); +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(1,2)") +*--#] cov_dim_ok : + +*--#[ cov_rr_msg : +* expansion inside #message (output capture variant) +* probe: clean +* expansion inside #message (output capture variant) +#message `RANDOM_(lin,0.5,0.5)' +Symbol x; +Local t = 1; +Print; +.end +assert succeeded? +assert result("t") =~ expr("1") +*--#] cov_rr_msg : + +*--#[ cov_ddsort : +* farm probe 0118_ddsort_2 (+6 lines) +* probe: clean +Vector p1,p2,p3,p4; +Local test = dd_(p3,p1,p4,p2); +Print; +.end +assert succeeded? +assert result("test") =~ expr("p1.p2*p3.p4 + p1.p3*p2.p4 + p1.p4*p2.p3") +*--#] cov_ddsort : + +*--#[ cov_rat_small : +* target: reken.c GcdLong small-arg branch (lines 2457-2462, na==1 case line 2459) +* probe: clean +* target: reken.c GcdLong small-arg branch (lines 2457-2462, na==1 case line 2459) +Local r = MakeRational_(3,5); +Local s = MakeRational_(-8,6); +Local t = MakeRational_(7,7); +Local u = MakeRational_(1000003,1000003); +Print r,s,t,u; +.end +assert warning?('fraction could not') +assert result("r") =~ expr("- 2") +assert result("s") =~ expr("- 2") +assert result("t") =~ expr("7") +assert result("u") =~ expr("1000003") +*--#] cov_rat_small : + +*--#[ cov_sort1_powtype_c : +* alternative guess: On powerfirst; +* probe: clean +* alternative guess: On powerfirst; +Symbol x,y; +On powerfirst; +Local t = x + x*y + x^2*y + x*y^3 + y^2 + x^2; +.sort +Print; +.end +assert succeeded? +assert result("t") =~ expr("x*y^3 + x^2*y + x^2 + x*y + y^2 + x") +*--#] cov_sort1_powtype_c : + +*--#[ cov_revinc_ok : +* hits tools.c:354 (REVERSEFILESTREAM + ReverseStatements) +* probe: clean +* the include file is created in FORM's working directory, which is the +* per-test tempdir set up (and removed) by check.rb, so nothing is left +* behind in the checkout +#system printf "Local ra = 1;\nLocal rb = 2;\n" > rev.inc +#reverseinclude rev.inc +Print; +.end +assert succeeded? +assert result("rb") =~ expr("2") +assert result("ra") =~ expr("1") +*--#] cov_revinc_ok : + +*--#[ cov_rev_raw0 : +* farm probe 0160_rev_raw0_10 (+5 lines) +* probe: clean +Function f; +Local F = f(reverse_); +Print; +.end +assert succeeded? +assert result("F") =~ expr("f") +*--#] cov_rev_raw0 : + +*--#[ cov_unhide_global : +* farm probe 0173_unhide_global_6 (+7 lines) +* probe: clean +Symbol x; +Global f = x; +.sort +Hide f; +.sort +UnHide f; +.sort +Print f; +.end +assert succeeded? +assert result("f") =~ expr("x") +*--#] cov_unhide_global : + +*--#[ cov_set_ordered : +* farm probe 0193_set_ordered_4 (+20 lines) +* probe: clean +Symbol a,b; +Set v(ordered): a,b; +Local t = a*b; +Print; +.end +assert succeeded? +assert result("t") =~ expr("a*b") +*--#] cov_set_ordered : + +*--#[ cov_dimfield : +* dimension field {d=...} on a symbol declaration +* probe: clean +* dimension field {d=...} on a symbol declaration +Symbol x{d=4}; +Local t = x; +Print; +.end +assert succeeded? +assert result("t") =~ expr("x") +*--#] cov_dimfield : + +*--#[ cov_fmt_float : +* Format Float with no arg (OutNumberType=10) and too-small precision +* probe: clean +* Format Float with no arg (OutNumberType=10) and too-small precision +* (compcomm.c 329-344, warning ... float format value corrected to 3) +Symbol x; +Local t = x; +Format Float; +Format Float,1; +Print; +.end +assert compile_error?('... float format') +*--#] cov_fmt_float : + +*--#[ cov_ddempty : +* farm probe 0118_ddempty_7 (+11 lines) +* probe: clean +Local test = dd_(); +Print; +.end +assert succeeded? +assert result("test") =~ expr("1") +*--#] cov_ddempty : + +*--#[ cov_intohide_global : +* farm probe 0173_intohide_global_8 (+7 lines) +* probe: clean +Symbol x; +Global f = x; +.sort +IntoHide f; +.sort +.end +assert succeeded? +*--#] cov_intohide_global : + +*--#[ cov_pbtbl_sflag : +* farm probe 0195_pbtbl_sflag_2 (+14 lines) +* probe: clean +Table t(1:3,1:2); +Fill t(1,1)=1, t(3,2)=2; +PrintTable +s t; +Print; +.end +assert compile_error?('Illegal character at') +*--#] cov_pbtbl_sflag : + +*--#[ cov_expr_notexpr : +* expected: is not an expression +* probe: error +* expected: is not an expression +Symbol q,x; +Local t = x; +If ( expression(q) ) Id x = 1; +.end +assert compile_error?('q is not') +*--#] cov_expr_notexpr : + +*--#[ cov_pbtbl_sfcomma : +* farm probe 0195_pbtbl_sfcomma_3 (+7 lines) +* probe: clean +Table t(1:2); +Fill t(1,1)=1; +PrintTable +s,+f t; +Print; +.end +assert compile_error?('Incorrect number of') +*--#] cov_pbtbl_sfcomma : + +*--#[ cov_pbtbl_flagjunk : +* expected: Illegal + option in PrintTable statement +* probe: error +* expected: Illegal + option in PrintTable statement +Table t(1:2); +Fill t(1,1)=1; +PrintTable +fzz t; +.end +assert compile_error?('Incorrect number of') +*--#] cov_pbtbl_flagjunk : + +*--#[ cov_pbtbl_fileout : +* farm probe 0195_pbtbl_fileout_5 (+7 lines) +* probe: clean +Table t(1:2); +Fill t(1,1)=1; +PrintTable t > tbl_out.txt; +Print; +.end +assert compile_error?('Incorrect number of') +*--#] cov_pbtbl_fileout : + +*--#[ cov_modcoeff : +* farm probe 0186_modcoeff_3 (+10 lines) +* probe: clean +Symbol x; +Function f; +Modulus 7,coefficientsonly; +Local t = f(x+1)+x^9; +Print t; +Modulus; +.end +assert compile_error?('Declaration out of') +*--#] cov_modcoeff : + +*--#[ cov_star : +* star-table fill, syntax variant A: negative count in declaration +* probe: clean +* star-table fill, syntax variant A: negative count in declaration +Table t(-(3),1:10); +Fill t(1,5)=25; +Fill t(2,3,4)=12; +Fill t(3,1,2,3)=9; +Local z = 1; +Print z; +.end +assert compile_error?('Illegal character at') +*--#] cov_star : + +*--#[ cov_seteq_syntax_2 : +* farm probe 0066_seteq_syntax_15 (+10 lines) +* probe: clean +Set sortsize = 200; +Set scratchsize = 200; +Symbol a1,a2,a3; +Local F = (a1+a2+a3)^5; +Local G = 1; +.sort +.copy F to G; +.sort +Print G; +.end +assert preprocess_error?('Unrecognized module term') +*--#] cov_seteq_syntax_2 : + +*--#[ cov_topol_onlyfunc : +* farm probe 0167_topol_onlyfunc_1 (+27 lines) +* probe: clean +Symbol x; +CFunction f,g,h; +ToPolynomial onlyfunctions f,g; +Local t = f(x) + g(x) + h(x); +Print; +.end +assert compile_error?('Definition out of') +*--#] cov_topol_onlyfunc : + +*--#[ cov_dotail_pipe_6 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_6 : + +*--#[ cov_cnt_doterr : +* expected: Illegal use of . after +* probe: error +* expected: Illegal use of . after +* dot after a symbol in count: compcomm.c 4094-4105 +Symbol x,y; +Local test = x^2; +If ( count(x.y,1,1) ) Print "yes"; +Print; +.end +assert compile_error?('Illegal use of') +*--#] cov_cnt_doterr : + +*--#[ cov_set_dim : +* farm probe 0193_set_dim_7 (+16 lines) +* probe: clean +Symbol a,b; +Set v{d=3}: a,b; +Local t = a*b; +Print; +.end +assert compile_error?('Dimension check failed') +*--#] cov_set_dim : + +*--#[ cov_cnt_notvec : +* expected: Not a vector in dotproduct +* probe: error +* expected: Not a vector in dotproduct +* vector.symboldot in count: compcomm.c 4088-4091 +Vector p; +Symbol y; +Local test = p; +If ( count(p.y,1,1) ) Print "yes"; +Print; +.end +assert compile_error?('Not a vector') +*--#] cov_cnt_notvec : + +*--#[ cov_dol_factor_dynindex : +* farm probe 0172_dol_factor_dynindex_5 (+12 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol x; +$n = 1; +$x = 5*x; +Factorize $x; +$y = 0; +If ($x[$n] > 3) $y = 1; +Print $y; +.end +#pend_if threaded? +assert compile_error?('Illegal object in') +*--#] cov_dol_factor_dynindex : + +*--#[ cov_cnt_dot : +* hits dotproduct count path: compcomm.c 4080-4092, 4131-4135, Sgetnum +* probe: clean +* hits dotproduct count path: compcomm.c 4080-4092, 4131-4135, Sgetnum +Vector p,q; +Local test = p.q; +If ( count(p.q,1,1) ) Print "yes"; +Print; +.end +assert compile_error?('Illegal name: unt,p.q,1,1') +*--#] cov_cnt_dot : + +*--#[ cov_cnt_vecparen : +* expected: specifier for vector +* probe: error +* expected: specifier for vector +* vector followed by ) in count: compcomm.c 4194-4200 +Vector p; +Local test = p; +If ( count(p) ) Print "yes"; +Print; +.end +assert compile_error?('Illegal specifier for') +*--#] cov_cnt_vecparen : + +*--#[ cov_fmt_oopt : +* expected: Illegal optimization specification in format statement +* probe: error +* expected: Illegal optimization specification in format statement +* trailing option after O -> CoOptimizeOption (compcomm.c 227), +* then out-of-range level -> switch default (compcomm.c 222-225) +Symbol x; +Local t = x; +Format O2,compress; +Format O9; +Print; +.end +assert compile_error?('Correct use in') +*--#] cov_fmt_oopt : + +*--#[ cov_fmt_ls : +* linesize corrections and junk trailing field (compcomm.c 272-291) +* probe: clean +* linesize corrections and junk trailing field (compcomm.c 272-291) +* warnings expected: Too small value for linesize corrected to 39, +* Illegal value for linesize: 0, Illegal linesize field in format statement +Symbol x; +Local t = x; +Format 10; +Format 0; +Format 72abc; +Print; +.end +assert compile_error?('Illegal value for') +*--#] cov_fmt_ls : + +*--#[ cov_fmt_cmode : +* Format C -> CMODE/Cnumpows (compcomm.c 415-422), then bad +* probe: clean +* Format C -> CMODE/Cnumpows (compcomm.c 415-422), then bad +* suffix -> goto Unknown (compcomm.c 419, 424) +Symbol x; +Local t = x; +Format C3; +Format C3x; +Print; +.end +assert compile_error?('Unknown option: C3x') +*--#] cov_fmt_cmode : + +*--#[ cov_dol_def_bt_err : +* expected: Illegal factor number for dollar variable +* runtime $-variables force sequential mode under threads +* probe: error +* expected: Illegal factor number for dollar variable +* tools.c:403-404 via backtick substitution +Symbol x,y,z; +$n = 3; +#define m `$n[]' +.end +#pend_if threaded? +assert preprocess_error?('Illegal factor number') +*--#] cov_dol_def_bt_err : + +*--#[ cov_azur_0001_0003_dolnumber_simple : +* farm probe azur_0001_0003_dolnumber_simple_2 (+5 lines) +* probe: clean +Symbol a; +Local F = a*$1^2; +Print; +.end +assert runtime_error? +*--#] cov_azur_0001_0003_dolnumber_simple : + +*--#[ cov_rr_lin_big : +* hits %3f/%2f/%1f and big "%e" branches (reken.c:3995-3996,4005-4007) +* probe: clean +* hits %3f/%2f/%1f and big "%e" branches (reken.c:3995-3996,4005-4007) +#define v1`RANDOM_(lin,500,500)' +#define v2`RANDOM_(lin,5000,5000)' +#define v3`RANDOM_(lin,50000,50000)' +#define v4`RANDOM_(lin,2000000,2000000)' +Symbol x; +Local t = 1; +Print; +.end +assert preprocess_error?('Illegal string for') +*--#] cov_rr_lin_big : + +*--#[ cov_revinc_end : +* #reverseinclude of a small file; runs clean +* tries ReverseStatements failure -> tools.c:355-356 +* the include file is created in FORM's working directory, which is the +* per-test tempdir set up (and removed) by check.rb, so nothing is left +* behind in the checkout +#system printf ".end\n" > revend.inc +#reverseinclude revend.inc +Print; +.end +assert succeeded? +*--#] cov_revinc_end : + +*--#[ cov_enddo_missing : +* Do loop without EndDo +Symbol y; +$i = 0; +Do $i = 1,3; +id y = 1; +.end +#pend_if threaded? +assert runtime_error?('enddo statement(s) missing') +*--#] cov_enddo_missing : + +*--#[ cov_cplx_bad : +* expected: Illegal specification for complexity of f +* probe: error +* expected: Illegal specification for complexity of f +Function f#q; +.end +assert compile_error?('Illegal specification for') +*--#] cov_cplx_bad : + +*--#[ cov_nsuse : +* guess at #use directive to expose namespace names outside +* probe: clean +* guess at #use directive to expose namespace names outside +#namespace nsuse +#define w 4 +#endnamespace +#use nsuse +#message `w' +#end +.end +assert preprocess_error?('Illegal string for') +*--#] cov_nsuse : + +*--#[ cov_extchan_open : +* farm probe 0187_extchan_open_0 (+7 lines) +* probe: clean +#externalchannel "echo x = 17" +#fromexternal x +#show x +.end +assert preprocess_error?('Unrecognized preprocessor') +*--#] cov_extchan_open : + +*--#[ cov_err_nonpoly : +* Factorize skips the non-polynomial function factor f(1) and keeps it +* as an unfactored factor of the product +Symbol x,y; +CFunction f; +Local F = f(1)*(x+y+1)*(x+2*y+2); +Factorize F; +Print; +.end +assert succeeded? +assert result("F") =~ expr("( 1 + y + x ) +* ( 2 + 2*y + x ) +* ( f(1) )") +*--#] cov_err_nonpoly : + +*--#[ cov_mv_highdeg : +* high degrees in each variable -> ideal-adic Newton iteration loop +* probe: clean +* high degrees in each variable -> ideal-adic Newton iteration loop +Symbol x,y; +Local F = (x+y^2+1)*(x*y+x+y^3+2)*(2*x+y^2+y+3); +Factorize F; +Print; +.end +assert succeeded? +assert result("F") =~ expr("( 1 + y^2 + x ) +* ( 2 + y^3 + x + x*y ) +* ( 3 + y + y^2 + 2*x )") +*--#] cov_mv_highdeg : + +*--#[ cov_clearall_3 : +* farm probe 0065_clearall_0 (+5 lines) +* probe: clean +Symbol x,y; +Vector v; +Index i; +CFunction f; +Set s: x,y; +Table tb(1:2,1:2); +.sort +Fill tb(1,1) = 5; +.sort +Local t = f(x)*v(i) + tb(1,1); +.sort +Print; +.clear +.sort +Local u = 1; +Print; +.end +assert succeeded? +assert result("u") =~ expr("1") +*--#] cov_clearall_3 : + +*--#[ cov_bigexp_3 : +* large expansion inside Substitute; attempts workspace check path 654-658 +* probe: clean +* large expansion inside Substitute; attempts workspace check path 654-658 +Symbol x,y; +CFunction f; +Local test = f(x); +id f(x?) = (y+1)^50000; +.end +assert runtime_error? +*--#] cov_bigexp_3 : + +*--#[ cov_putinside_multi : +* farm probe 0216_putinside_multi_3 (+18 lines) +* probe: clean +Vector p; +Symbol x,y; +Function f; +Local t = f(x,y,p) + f(p.p); +PutInside f, x, y, p, p.p, d_; +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(p.p)*f(1) + f(x,y,p)*f(1)") +*--#] cov_putinside_multi : + +*--#[ cov_r02_rand_big : +* random_ with very large n (long-number paste path) +* random_ with very large n (long-number paste path) +#setrandom 89 +Local F = random_(1000000000000000000000000); +.sort +Print F; +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("F") =~ expr("864792395326970427174710") +*--#] cov_r02_rand_big : + +*--#[ cov_nsdollar_2 : +* dollar variable assignment inside namespace (ConstructName '$' case) +* runtime $-variables force sequential mode under threads +* probe: clean +* dollar variable assignment inside namespace (ConstructName '$' case) +#namespace nsdollar +Symbol q; +Local F = q; +$dd = F + 1; +Print F; +#endnamespace +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("F") =~ expr("q") +*--#] cov_nsdollar_2 : + +*--#[ cov_sum_dollarloop : +* farm probe 0209_sum_dollarloop_2 (+18 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +CFunction f; +Index i,j; +Local e = f(i,j); +$a = 1; +$b = 2; +Sum i,$a,$b; +Print; +.end +#pend_if threaded? || mpi? +assert runtime_error? +*--#] cov_sum_dollarloop : + +*--#[ cov_commute_tensor : +* tensor functions under CommuteInSet: raw-word compare branch +* probe: clean +* tensor functions under CommuteInSet: raw-word compare branch +Tensor t1,t2; +Vector p,q; +CommuteInSet {t1,t2},{t1,t2}; +Local test = t1(p,q)*t2(p); +id t1(p?) = t2(p); +Print; +.end +assert compile_error?('t1 is not') +*--#] cov_commute_tensor : + +*--#[ cov_deepnest : +* three levels of nested dollar factors +* runtime $-variables force sequential mode under threads +* probe: clean +* three levels of nested dollar factors +Symbol x; +$i = 5; +$j = 2; +$k = 3; +Local test = x; +if ( $i[$j[$k[2]]] > 0 ) id x = 1; +Print test; +.end +#pend_if threaded? +assert compile_error?('Definition out of') +*--#] cov_deepnest : + +*--#[ cov_r10_setmember : +* dollar set-membership test (dollar.c IsSetMember) +* runtime $-variables force sequential mode under threads +* dollar set-membership test (dollar.c IsSetMember) +Symbols a,b,x; +$r1 = a in {a,b}; +$r2 = x in {a,b}; +Local T1 = $r1; +Local T2 = $r2; +.sort +Print T1; +Print T2; +.end +#pend_if threaded? +assert compile_error?('Illegal position for') +*--#] cov_r10_setmember : + +*--#[ cov_seteq_syntax_3 : +* farm probe 0066_seteq_syntax_15 (+10 lines) +* probe: clean +Set sortsize = 200; +Set scratchsize = 200; +Symbol a1,a2,a3; +Local F = (a1+a2+a3)^5; +Local G = 1; +.sort +.copy F to G; +.sort +Print G; +.end +assert preprocess_error?('Unrecognized module term') +*--#] cov_seteq_syntax_3 : + +*--#[ cov_bigfactor : +* expected: Value in dollar factor too large +* runtime $-variables force sequential mode under threads +* probe: error +* expected: Value in dollar factor too large +Symbol x; +$i = 1; +Local test = x; +if ( $i[99999999999999999999] > 0 ) id x = 1; +Print test; +.end +#pend_if threaded? +assert compile_error?('Definition out of') +*--#] cov_bigfactor : + +*--#[ cov_dotail_pipe_7 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_7 : + +*--#[ cov_pre_incr : +* farm probe 0244_pre_incr_7 (+9 lines) +* probe: clean +#do idx = 1,3 + #message value `idx++' +#enddo +.end +assert succeeded? +*--#] cov_pre_incr : + +*--#[ cov_pre_showinput_ : +* farm probe 0244_pre_showinput__2 (+5 lines) +* probe: clean +#message showinput = `SHOWINPUT_' +.end +assert succeeded? +*--#] cov_pre_showinput_ : + +*--#[ cov_pre_time_ : +* farm probe 0244_pre_time__0 (+13 lines) +* probe: clean +#message running time = `time_' +.end +assert succeeded? +*--#] cov_pre_time_ : + +*--#[ cov_0902_remove_inside_module : +* farm probe 0232_0902_remove_inside_module_10 (+5 lines) +* probe: clean +Symbol x,y; +CFunction f; +#add dm:1,2,3; +Local t = f(x,y); +.sort +#remove dm; +Print t; +.end +assert preprocess_error?('there is no') +*--#] cov_0902_remove_inside_module : + +*--#[ cov_nsuse_2 : +* guess at #use directive to expose namespace names outside +* probe: clean +* guess at #use directive to expose namespace names outside +#namespace nsuse +#define w 4 +#endnamespace +#use nsuse +#message `w' +#end +.end +assert preprocess_error?('Illegal string for') +*--#] cov_nsuse_2 : + +*--#[ cov_fact_basic : +* farm probe 0079_fact_basic_12 (+12 lines) +* probe: clean +Symbol x,y; +Local e = (1+x)*(2+x*y); +Factorize e; +Print; +.end +assert succeeded? +assert result("e") =~ expr("( 1 + x ) +* ( 2 + x*y )") +*--#] cov_fact_basic : + +*--#[ cov_modulus_2 : +* farm probe 0133_modulus_10 (+66 lines) +* probe: clean +Function f; +Modulus 7; +Symbol a,b,x; +Local test = f(x*a + x*b); +FactArg f; +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(x,b + a)") +*--#] cov_modulus_2 : + +*--#[ cov_fact_pownegsym : +* farm probe 0079_fact_pownegsym_15 (+6 lines) +* probe: clean +Symbol x,y,n; +Local e = y^-n*x; +Factorize e; +Print; +.end +assert succeeded? +assert result("e") =~ expr("( (y)^( - n) ) +* ( x )") +*--#] cov_fact_pownegsym : + +*--#[ cov_factarg_frac : +* nontrivial denominator: den.is_one() false branch +* probe: clean +* nontrivial denominator: den.is_one() false branch +Symbol x,y; +CFunction f; +Local test = f((x^2-1)/3); +FactArg f; +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(1/3, - 1 + x,1 + x)") +*--#] cov_factarg_frac : + +*--#[ cov_fort_brk : +* farm probe 0089_fort_brk_23 (+8 lines) +* probe: clean +Symbol x,y,z; +Format Fortran; +Format O1; +Local F = (x+y+z)^6 + (x-y-z)^4; +Bracket x,y; +Print F; +.end +assert succeeded? +*--#] cov_fort_brk : + +*--#[ cov_powset : +* farm probe 0025_powset_15 (+6 lines) +* probe: clean +Symbol x,a,b,n; +Set s: a,b; +CFunction f,g; +Local t = f(x^a) + f(x^b) + f(x^3); +id f(x^n?s) = g(x^n); +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(x^3) + f((x)^(a)) + f((x)^(b))") +*--#] cov_powset : + +*--#[ cov_fun_multi : +* farm probe 0133_fun_multi_6 (+5 lines) +* probe: clean +Function f,g,h; +Symbol a,b,x,y; +Local test = f(g(x)*h(y)*a + g(x)*h(y)*b); +FactArg f; +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(b + a,g(x),h(y))") +*--#] cov_fun_multi : + +*--#[ cov_factorsym : +* speculative: FACTORSYMBOL/HAAKJE/fromindex branch (sort.c 2462-2465) via nested subexpressions +* probe: clean +* speculative: FACTORSYMBOL/HAAKJE/fromindex branch (sort.c 2462-2465) via nested subexpressions +Symbol x,y; +CFunction gcf; +PolyFun gcf; +Local test = (gcf(x+1)+x^2)*(gcf(x+1)-x^2); +Print; +.end +assert succeeded? +assert result("test") =~ expr("x^4*gcf(-1) + gcf(1 + 2*x + x^2)") +*--#] cov_factorsym : + +*--#[ cov_bigexp_4 : +* large expansion inside Substitute; attempts workspace check path 654-658 +* probe: clean +* large expansion inside Substitute; attempts workspace check path 654-658 +Symbol x,y; +CFunction f; +Local test = f(x); +id f(x?) = (y+1)^50000; +.end +assert runtime_error? +*--#] cov_bigexp_4 : + +*--#[ cov_trace_rep22 : +* repeated indices: factor/multiplicity branch (opera.c 1714-1733) +* probe: clean +* repeated indices: factor/multiplicity branch (opera.c 1714-1733) +Vector p1,p2; +Local F = g_(1,p1,p2,p1,p2); +trace4,1; +Print; +.end +assert succeeded? +assert result("F") =~ expr("- 4*p1.p1*p2.p2 + 8*p1.p2^2") +*--#] cov_trace_rep22 : + +*--#[ cov_gcd_exprvec : +* target: ratio.c lines 762-763 and 797-805 (vector/index firstshort at output) +* probe: clean +* target: ratio.c lines 762-763 and 797-805 (vector/index firstshort at output) +Vector p,q; +Symbol x; +Local e1 = p^2; +Local test = gcd_(e1,p); +Print; +.end +assert succeeded? +assert result("e1") =~ expr("p*p") +assert result("test") =~ expr("p") +*--#] cov_gcd_exprvec : + +*--#[ cov_rat_zero_one : +* farm probe 0156_rat_zero_one_22 (+5 lines) +* probe: clean +Symbol x,y; +Local t = MakeRational_(0, x^2*y); +Local u = MakeRational_(1, x*y^-1); +Print t; +Print u; +.end +assert succeeded? +assert result("t") =~ expr("0") +assert result("u") =~ expr("makerational_(1,x*y^-1)") +*--#] cov_rat_zero_one : + +*--#[ cov_dth_onearg : +* target: normal.c DoTheta 4359-4364, single general argument paths +* probe: clean +* target: normal.c DoTheta 4359-4364, single general argument paths +Symbol x,y; +Local t1 = theta_(x); +Local t2 = theta_(x+y); +Print; +.end +assert succeeded? +assert result("t1") =~ expr("theta_(x)") +assert result("t2") =~ expr("theta_(y + x)") +*--#] cov_dth_onearg : + +*--#[ cov_tr_pairs : +* farm probe 0180_tr_pairs_5 (+6 lines) +* probe: clean +Symbol x,y; +CFunction f,g; +Local test = x + f(1); +TryReplace x, y, f, g; +Print; +.end +assert succeeded? +assert result("test") =~ expr("y + f(1)") +*--#] cov_tr_pairs : + +*--#[ cov_nsdollar_3 : +* dollar variable assignment inside namespace (ConstructName '$' case) +* runtime $-variables force sequential mode under threads +* probe: clean +* dollar variable assignment inside namespace (ConstructName '$' case) +#namespace nsdollar +Symbol q; +Local F = q; +$dd = F + 1; +Print F; +#endnamespace +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("F") =~ expr("q") +*--#] cov_nsdollar_3 : + +*--#[ cov_dth_moreterms : +* target: normal.c DoTheta 4409-4410, first arg has more terms (tb >= stopb) +* probe: clean +* target: normal.c DoTheta 4409-4410, first arg has more terms (tb >= stopb) +Symbol x,y; +Local test = theta_(x+y,x); +Print; +.end +assert succeeded? +assert result("test") =~ expr("1") +*--#] cov_dth_moreterms : + +*--#[ cov_fun_miss : +* farm probe 0133_fun_miss_5 (+5 lines) +* probe: clean +Function f,g; +Symbol a,b,x,y; +Local test = f(g(x)*a + g(y)*b); +FactArg f; +Print; +.end +assert runtime_error? +*--#] cov_fun_miss : + +*--#[ cov_tr_index : +* farm probe 0180_tr_index_2 (+5 lines) +* probe: clean +Index i,j; +CFunction f; +Local test = f(i); +TryReplace i, j; +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(i)") +*--#] cov_tr_index : + +*--#[ cov_tr_minvec : +* farm probe 0180_tr_minvec_4 (+12 lines) +* probe: clean +Vector p,q; +CFunction f; +Local test = f(p); +TryReplace p, -q; +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(p)") +*--#] cov_tr_minvec : + +*--#[ cov_abs_negnum : +* farm probe 0004_abs_negnum_8 (+5 lines) +* probe: clean +Local test = abs_(-5); +Print; +.end +assert succeeded? +assert result("test") =~ expr("5") +*--#] cov_abs_negnum : + +*--#[ cov_4221_zz_paren : +* expected: 0^0 during normalization of term +* probe: error +* expected: 0^0 during normalization of term +Local test = (0)^(1-1); +Print; +.end +assert runtime_error? +*--#] cov_4221_zz_paren : + +*--#[ cov_popts : +* Print with +s, +ss and +sss option chains +* probe: clean +* Print with +s, +ss and +sss option chains +Symbol x,y; +Local t = x*y; +Print +s t; +Print +ss t; +Print +sss t; +.end +assert succeeded? +assert result("t") =~ expr("+ +x +*y") +*--#] cov_popts : + +*--#[ cov_missing_endwhile : +* While loop without EndWhile +$x = 3; +While ( $x > 0 ); +$x = $x - 1; +.end +#pend_if threaded? +assert runtime_error?('endwhile statement(s) missing') +*--#] cov_missing_endwhile : + +*--#[ cov_polyrat_with_polyfun_notexact : +* farm probe 0169_polyrat_with_polyfun_notexact_20 (+7 lines) +* probe: clean +Symbol a,b; +PolyFun f; +PolyRatFun rat; +Local test = f(a^2+1)/f(a); +Print; +.end +assert compile_error?('f should be') +*--#] cov_polyrat_with_polyfun_notexact : + +*--#[ cov_vecnotset2 : +* farm probe 0026_vecnotset2_34 (+6 lines) +* probe: clean +Vector p; +Function g; +Set s: 1,2,3; +Symbol x; +Local t = p(1)+p(2); +id p(x?{!s}) = g(x); +Print; +.end +assert compile_error?('Illegal object in') +*--#] cov_vecnotset2 : + +*--#[ cov_setflag_wild : +* farm probe 0019_setflag_wild_51 (+7 lines) +* probe: clean +AutoDeclare Symbol a; +CFunction f,g; +Local t = f(1,a); +id f(x?,{1,a}) = g(x); +Print; +.end +assert compile_error?('Undeclared variable x') +*--#] cov_setflag_wild : + +*--#[ cov_apply_deep : +* target: tables.c 2101-2110 nested recursion, stilltogo != maxtogo path +* probe: clean +* target: tables.c 2101-2110 nested recursion, stilltogo != maxtogo path +Symbol x,y; +CFunction g,h; +Local templ = g(x?); +Local target = g(h(1+x)+y); +Apply templ to target; +Print; +.end +assert compile_error?('Illegal character at') +*--#] cov_apply_deep : + +*--#[ cov_argtoarg_tensor_err : +* argument-field wildcard collected by id, substituted into a tensor: +* the collected arguments cannot become tensor arguments +Symbol x; +Vector p; +Tensor t; +CFunction f,g; +Local e = f(g(1)); +id f(?a) = t(?a); +Print; +.end +assert runtime_error?('Illegal substitution of argument field in tensor') +*--#] cov_argtoarg_tensor_err : + +*--#[ cov_tryreplace_stmt : +* farm probe 0199_tryreplace_stmt_23 (+10 lines) +* probe: clean +Symbols x,y; +CFunctions f,g; +Local test = f(x)*g(f(x)) + f(2); +TryReplace, f(x?) = g(x?); +Print; +.end +assert compile_error?('Illegal object in') +*--#] cov_tryreplace_stmt : + +*--#[ cov_fact_factdollar : +* farm probe 0079_fact_factdollar_19 (+9 lines) +* probe: clean +Symbol x,y; +Local e = (1+x)*(1+y); +Factorize e; +FactDollar $d,e; +Print; +.end +assert compile_error?('Statement out of') +*--#] cov_fact_factdollar : + +*--#[ cov_seteq_syntax_4 : +* farm probe 0066_seteq_syntax_15 (+10 lines) +* probe: clean +Set sortsize = 200; +Set scratchsize = 200; +Symbol a1,a2,a3; +Local F = (a1+a2+a3)^5; +Local G = 1; +.sort +.copy F to G; +.sort +Print G; +.end +assert preprocess_error?('Unrecognized module term') +*--#] cov_seteq_syntax_4 : + +*--#[ cov_dotail_pipe_8 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_8 : + +*--#[ cov_symm_tensor_TF : +* target: tensor function branch via TensorFunction declaration (syntax variant) +* probe: clean +* target: tensor function branch via TensorFunction declaration (syntax variant) +Index i,j,k; +TensorFunction t; +Symmetrize t,t; +Local test = t(j,i) + t(k,i,j) + t(j,j,i); +Print; +.end +assert compile_error?('Unrecognized statement') +*--#] cov_symm_tensor_TF : + +*--#[ cov_4221_zz_funarg : +* expected: 0^0 during normalization of term +* probe: error +* expected: 0^0 during normalization of term +Symbol x; +CFunction g; +Local test = g(x)*(0^0); +Print; +.end +assert compile_error?('Encountered 0^0 during') +*--#] cov_4221_zz_funarg : + +*--#[ cov_tr_set : +* expected: Illegal object type in TryReplace: v +* probe: error +* expected: Illegal object type in TryReplace: v +Symbol x; +Set v: x; +Local test = x; +TryReplace v, x; +Print; +.end +assert compile_error?('Illegal object type') +*--#] cov_tr_set : + +*--#[ cov_ext_doloop : +* guess: external channel used from inside a preprocessor loop +* probe: clean +* guess: external channel used from inside a preprocessor loop +#setexternal cat +#do i = 1,3 + #toexternal item `i' +#enddo +#removeexternal +Symbol x; +Local t = x; +Print; +.end +assert preprocess_error?('setexternal: number expect') +*--#] cov_ext_doloop : + +*--#[ cov_redef_esc : +* farm probe 0188_redef_esc_21 (+7 lines) +* probe: clean +#define x "1" +#redefine x "a\+b" +#write "value = `x'" +.end +assert succeeded? +*--#] cov_redef_esc : + +*--#[ cov_mdl_stmt_endmodel : +* EndModel without a preceding Model statement +EndModel; +.end +assert compile_error?('EndModel statement without matching Model statement') +*--#] cov_mdl_stmt_endmodel : + +*--#[ cov_on_innertest : +* On innertest with an extra argument is accepted without diagnostic +On innertest xyz; +On innertest; +.end +assert succeeded? +*--#] cov_on_innertest : + + +*--#[ cov_dedup_badrange : +* expected: error from ReadRange inside dedup (transform.c:487-488) +* probe: error +* expected: error from ReadRange inside dedup (transform.c:487-488) +CFunction f; +Transform f dedup(qq); +.end +assert compile_error?('Illegal keyword inside') +*--#] cov_dedup_badrange : + +*--#[ cov_nsuse_3 : +* guess at #use directive to expose namespace names outside +* probe: clean +* guess at #use directive to expose namespace names outside +#namespace nsuse +#define w 4 +#endnamespace +#use nsuse +#message `w' +#end +.end +assert preprocess_error?('Illegal string for') +*--#] cov_nsuse_3 : + +*--#[ cov_powset_2 : +* farm probe 0025_powset_15 (+5 lines) +* probe: clean +Symbol x,a,b,n; +Set s: a,b; +CFunction f,g; +Local t = f(x^a) + f(x^b) + f(x^3); +id f(x^n?s) = g(x^n); +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(x^3) + f((x)^(a)) + f((x)^(b))") +*--#] cov_powset_2 : + +*--#[ cov_factarg_dot_mixed : +* farm probe 0014_factarg_dot_mixed_48 (+5 lines) +* probe: clean +Vectors p,q; +Function f; +Local t = f((p.q)^2,(p.q)^-1); +FactArg f; +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(p.q,p.q,p.q^-1)") +*--#] cov_factarg_dot_mixed : + +*--#[ cov_argexpsym : +* farm probe 0017_argexpsym_52 (+13 lines) +* probe: clean +Symbol x,y,n; +CFunction f,g; +Local test = f(y); +id f(n?) = g(x^n); +Print; +.end +assert succeeded? +assert result("test") =~ expr("g((x)^(y))") +*--#] cov_argexpsym : + +*--#[ cov_div_arg : +* farm probe 0031_div_arg_51 (+5 lines) +* probe: clean +Symbol x; +CFunction f,g; +Local test = f(x); +id f(div_(x,2)) = g(1); +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(x)") +*--#] cov_div_arg : + +*--#[ cov_bigexp_5 : +* large expansion inside Substitute; attempts workspace check path 654-658 +* probe: clean +* large expansion inside Substitute; attempts workspace check path 654-658 +Symbol x,y; +CFunction f; +Local test = f(x); +id f(x?) = (y+1)^50000; +.end +assert runtime_error? +*--#] cov_bigexp_5 : + +*--#[ cov_gamma_wild : +* farm probe 0019_gamma_wild_60 (+5 lines) +* probe: clean +Index i,j,n; +Vector p,q,v; +Local test = g_(i,p); +id g_(n?,v?) = g_(j,v); +Print; +.end +assert succeeded? +assert result("test") =~ expr("g_(j,p)") +*--#] cov_gamma_wild : + +*--#[ cov_vecwild : +* farm probe 0019_vecwild_80 (+6 lines) +* probe: clean +Vector p,q,k; +Tensor g; +Local test = g(p,q,k); +id g(p?,q?,k?) = g(p,q,k); +Print; +.end +assert succeeded? +assert result("test") =~ expr("g(p,q,k)") +*--#] cov_vecwild : + +*--#[ cov_argtoarg_argw : +* farm probe 0019_argtoarg_argw_91 (+6 lines) +* probe: clean +Index i,j; +Vector p,q; +CFunction f; +Tensor g; +Local test = f(g(i,p),g(j,q)); +id f(?a) = g(?a); +Print; +.end +assert runtime_error? +*--#] cov_argtoarg_argw : + +*--#[ cov_sign_rat : +* farm probe 0003_sign_rat_29 (+12 lines) +* probe: clean +Local t = 1 + sign_(3/2) + sign_(-3/2); +Print t; +.end +assert succeeded? +assert result("t") =~ expr("1 + sign_( - 3/2) + sign_(3/2)") +*--#] cov_sign_rat : + +*--#[ cov_fx_filldup : +* farm probe 0057_fx_filldup_24 (+7 lines) +* probe: clean +Symbol a,x,y; +Table t(0:3); +Local e = a*x + a*y; +Bracket a; +.sort +FillExpression t = e(a); +Print; +.end +assert succeeded? +assert result("e") =~ expr("a*y + a*x") +*--#] cov_fx_filldup : + +*--#[ cov_numdummies : +* e_ contraction introduces dummy indices (numdummies bookkeeping) +Dimension 4; +Vectors p,q; +Index a,b,c,d; +Local test = e_(p,q,a,b)*e_(p,q,c,d); +contract; +.sort +Print; +.end +assert succeeded? +assert nterms("test") == 24 +*--#] cov_numdummies : + +*--#[ cov_dotproduct_multi_same_vector : +* Exercise DOTPRODUCT while loop 1397-1422 with multiple dotproducts +* probe: clean +* Exercise DOTPRODUCT while loop 1397-1422 with multiple dotproducts +Vectors p,q; +Index i,j; +CFunction f; +Local expr = f(p(i)*p(i)*q(j)*q(j)*d_(i,j)); +Print; +.end +assert succeeded? +assert result("expr") =~ expr("f(p(i)*q(j)*p.q)") +*--#] cov_dotproduct_multi_same_vector : + +*--#[ cov_nsdollar_4 : +* dollar variable assignment inside namespace (ConstructName '$' case) +* runtime $-variables force sequential mode under threads +* probe: clean +* dollar variable assignment inside namespace (ConstructName '$' case) +#namespace nsdollar +Symbol q; +Local F = q; +$dd = F + 1; +Print F; +#endnamespace +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("F") =~ expr("q") +*--#] cov_nsdollar_4 : + +*--#[ cov_root_rat_neg : +* farm probe 0006_root_rat_neg_38 (+28 lines) +* probe: clean +Symbol x; +Local F = root_(3,-27); +Print; +.end +assert succeeded? +assert result("F") =~ expr("- 3") +*--#] cov_root_rat_neg : + +*--#[ cov_fi_scrvec : +* farm probe 0074_fi_scrvec_19 (+7 lines) +* probe: clean +Vectors p,q,r; +Local e = p.q*p.r + p.q; +.sort +Local t = factorin_(e); +Print; +.end +assert succeeded? +assert result("e") =~ expr("p.q*p.r + p.q") +assert result("t") =~ expr("p.q") +*--#] cov_fi_scrvec : + +*--#[ cov_write_dollar_zero_pad : +* farm probe 0033_write_dollar_zero_pad_34 (+5 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +S x; +L F = x^100; +.sort +$d = F; +#write "%010$", $d +.end +#pend_if threaded? || mpi? +assert succeeded? +*--#] cov_write_dollar_zero_pad : + +*--#[ cov_empty : +* farm probe 0074_empty_24 (+5 lines) +* probe: clean +Symbol x; +Local g = 0; +.sort +Local F = x*factorin_(g); +Print F; +.end +assert succeeded? +assert result("F") =~ expr("x") +*--#] cov_empty : + +*--#[ cov_vector_dot_setnum : +* farm probe 0047_vector_dot_setnum_33 (+20 lines) +* probe: clean +Vector v,w; +Set s: v; +Local F = v.s[1]; +Print; +.end +assert succeeded? +assert result("F") =~ expr("v.v") +*--#] cov_vector_dot_setnum : + +*--#[ cov_filltable_func_arg_mismatch : +* farm probe 0057_filltable_func_arg_mismatch_33 (+5 lines) +* probe: clean +CFunction f; +Table T(3); +Symbol x; +Local F = f(2,x); +FillExpression T = F(f(1,x)); +Print; +.end +assert compile_error?('Declaration out of') +*--#] cov_filltable_func_arg_mismatch : + +*--#[ cov_coif_seqnum : +* expected: sequence +* probe: error +* expected: sequence +Symbol x; +Local test = x; +if ( 3/x > 1 ) id x = 1; +Print; +.end +assert compile_error?('Illegal sequence: if,(3/x') +*--#] cov_coif_seqnum : + +*--#[ cov_dollar_setbound : +* a $-variable past the end of a set in set substitution: +* array bound check with the offending value +Vector p1,p2; +Symbol x; +Set s: p1,p2; +CFunction f; +Local F = f(x); +$val = 5; +id f(x?) = s[$val]; +Print; +.end +#pend_if threaded? || mpi? +assert runtime_error?('Array bound check during set substitution') +*--#] cov_dollar_setbound : + +*--#[ cov_dollar_setbadtype : +* a non-number $-variable as a set index in set substitution +Vector p1,p2; +Symbol x; +Set s: p1,p2; +CFunction f; +Local F = f(x); +$val = -1; +id f(x?) = s[$val]; +Print; +.end +#pend_if threaded? || mpi? +assert runtime_error?('Unusable type of variable $val in set substitution') +*--#] cov_dollar_setbadtype : + +*--#[ cov_dq_le : +* farm probe 0111_dq_le_14 (+5 lines) +* probe: clean +#if ( $(1 <= 2) ) + #message le works +#endif +#if ( $(2 >= 1) ) + #message ge works +#endif +.end +assert succeeded? +*--#] cov_dq_le : + +*--#[ cov_dq_setname : +* farm probe 0111_dq_setname_3 (+13 lines) +* probe: clean +Symbol x,y; +Set myset: x,y; +#if ( $(set_ == myset) ) + #message set matches +#endif +#if ( $(set_ != myset) ) + #message no match +#endif +.end +assert preprocess_error?('Error translating first') +*--#] cov_dq_setname : + +*--#[ cov_select_cap : +* farm probe 0095_select_cap_4 (+6 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol x; +CFunction f,g; +Local t = f(x,x,x,x); +$a = 0; +id,select,1,2 f(x?$a) = g($a); +Print t; +.end +#pend_if threaded? +assert compile_error?('1 is not') +*--#] cov_select_cap : + +*--#[ cov_findloop_rational : +* farm probe 0055_findloop_rational_44 (+5 lines) +* probe: clean +Symbol x; +CFunction f; +Local F = f(1/2*x); +if ( findloop(f,1,x) > 0 ) Print; +.end +assert compile_error?('f should be') +*--#] cov_findloop_rational : + +*--#[ cov_compsmall2 : +* expected: CompressSize of +* probe: error +* expected: CompressSize of +Symbol x,y; +Compress 200; +Local ex = (x+y)^20000; +.sort +Print; +.end +assert compile_error?('Unknown option: 200,') +*--#] cov_compsmall2 : + +*--#[ cov_seteq_syntax_5 : +* farm probe 0066_seteq_syntax_15 (+10 lines) +* probe: clean +Set sortsize = 200; +Set scratchsize = 200; +Symbol a1,a2,a3; +Local F = (a1+a2+a3)^5; +Local G = 1; +.sort +.copy F to G; +.sort +Print G; +.end +assert preprocess_error?('Unrecognized module term') +*--#] cov_seteq_syntax_5 : + +*--#[ cov_d9_modopt_inpar : +* target: variant syntax: ModuleOption incombined with max dollar +* runtime $-variables force sequential mode under threads +* probe: clean +* target: variant syntax: ModuleOption incombined with max dollar +Symbol x; +ModuleOption inparallel, max, $a; +Local t = 1; +$a = 3; +$a = 0; +$a = -5; +.sort +Print t; +.end +#pend_if threaded? +assert compile_error?('Illegal object in') +*--#] cov_d9_modopt_inpar : + +*--#[ cov_dotail_pipe_9 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_9 : + +*--#[ cov_002_badsettype : +* expected: A set in a transform statement should be a set of functions +* probe: error +* expected: A set in a transform statement should be a set of functions +Symbol x; +Set myset: x; +Local F = x + x^2; +Transform F, myset replace x; +Print; +.end +assert compile_error?('F: A transform') +*--#] cov_002_badsettype : + +*--#[ cov_tensor_gamma : +* expected: 5_,6_,7_ can only be used inside g_ +* probe: error +* expected: 5_,6_,7_ can only be used inside g_ +Symbol x; +CFunction f; +Local test = f(5_); +Print; +.end +assert compile_error?('5_,6_,7_ can only') +*--#] cov_tensor_gamma : + +*--#[ cov_tsgamma_illegal : +* expected: Illegal use special gamma symbols 5_, 6_, 7_ +* probe: error +* expected: Illegal use special gamma symbols 5_, 6_, 7_ +Symbol x; +Local F = 5_(x); +Print; +.end +assert compile_error?('Illegal use special') +*--#] cov_tsgamma_illegal : + +*--#[ cov_enter_named : +* farm probe 0093_enter_named_33 (+5 lines) +* probe: clean +Symbol x; +Tablebase tbent; +Sparse ts(4); +Fill ts(1) = x^2; +Fill ts(2) = 5; +Local chk = ts(1); +B enter tbent, ts; +Print chk; +.end +assert compile_error?('Proper syntax: TableBase') +*--#] cov_enter_named : + +*--#[ cov_inset_negpower : +* farm probe 0047_inset_negpower_27 (+8 lines) +* probe: clean +Symbol x; +Set s: 1,2,3; +Local F = s[x]^-2; +Print; +.end +assert compile_error?('Set index in') +*--#] cov_inset_negpower : + +*--#[ cov_lus_errneg : +* ReplaceLoop on an antisymmetric tensor with vector arguments: the +* copy loop in DoReplaceLoop handles the non-index outfun arguments. +* (The "non-index-like argument" error path needs a tensor argument +* that the compiler already rejects, so the clean path is covered.) +Vectors p1,p2,p3; +Index i1,i2,i3; +Tensors g1(antisymmetric), ff(cyclesymmetric); +Local F = g1(p1,i1)*g1(i2,p2)*g1(p3,i3)*d_(i1,i2)*d_(i2,i3); +ReplaceLoop g1,arg=3,loop=3,out=ff; +Print; +.end +assert succeeded? +assert result("F") =~ expr("-g1(p1,i3)*g1(p2,i2)*g1(p3,i3)") +*--#] cov_lus_errneg : + +*--#[ cov_dq_illop : +* expected: Illegal operator in $( option of #if +* probe: error +#if ( $(1 ! 2) ) +#endif +* expected: Illegal operator in $( option of #if +.end +assert preprocess_error?('Illegal operator in') +*--#] cov_dq_illop : + +*--#[ cov_nsuse_4 : +* guess at #use directive to expose namespace names outside +* probe: clean +* guess at #use directive to expose namespace names outside +#namespace nsuse +#define w 4 +#endnamespace +#use nsuse +#message `w' +#end +.end +assert preprocess_error?('Illegal string for') +*--#] cov_nsuse_4 : + +*--#[ cov_fact_unlucky : +* farm probe 0216_fact_unlucky_30 (+8 lines) +* probe: clean +Symbol x,y,z; +Local t = (2*x+4*y)*(6*x+8*y+2*z)*(3*x*z+9*y)*(12*x^2+18*y^2); +Factorize t; +Print; +.end +assert succeeded? +assert result("t") =~ expr("( 72 ) +* ( z + 4*y + 3*x ) +* ( 2*y + x ) +* ( 3*y + x*z ) +* ( 3*y^2 + 2*x^2 )") +*--#] cov_fact_unlucky : + +*--#[ cov_powset_3 : +* farm probe 0025_powset_15 (+5 lines) +* probe: clean +Symbol x,a,b,n; +Set s: a,b; +CFunction f,g; +Local t = f(x^a) + f(x^b) + f(x^3); +id f(x^n?s) = g(x^n); +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(x^3) + f((x)^(a)) + f((x)^(b))") +*--#] cov_powset_3 : + +*--#[ cov_bigexp_6 : +* large expansion inside Substitute; attempts workspace check path 654-658 +* probe: clean +* large expansion inside Substitute; attempts workspace check path 654-658 +Symbol x,y; +CFunction f; +Local test = f(x); +id f(x?) = (y+1)^50000; +.end +assert runtime_error? +*--#] cov_bigexp_6 : + +*--#[ cov_ns_deepexpr : +* target: ConstructName with namespace names inside function args and powers +* probe: clean +* target: ConstructName with namespace names inside function args and powers +#namespace k1 +#namespace k2 +AutoDeclare Symbol s; +CFunction f; +Local t = f(s1^2,s2)*s3; +Print t; +#endnamespace +#endnamespace +.end +assert succeeded? +assert result("t") =~ expr("f(s1^2,s2)*s3") +*--#] cov_ns_deepexpr : + +*--#[ cov_ratio_dot8 : +* farm probe 0121_ratio_dot8_19 (+5 lines) +* probe: clean +Symbol a,b; +Vector p,q; +Local test = MakeRational_(p.q*p.p, p.q^-1*p.p^2); +Print; +.end +assert succeeded? +assert result("test") =~ expr("makerational_(p.p*p.q,p.p^2*p.q^-1)") +*--#] cov_ratio_dot8 : + +*--#[ cov_argexplode : +* farm probe 0145_argexplode_10 (+5 lines) +* probe: clean +Function f; +Symbol x,y,z; +Local test = f(x+y+z); +ArgExplode f; +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(z + y + x)") +*--#] cov_argexplode : + +*--#[ cov_save_load : +* farm probe 0145_save_load_11 (+5 lines) +* probe: clean +Symbol x,y; +Function f; +Local test = f(x+y)*3; +.sort +Save probesv.dat; +Drop test; +Load probesv.dat; +Print; +.end +assert compile_error?('Declaration out of') +*--#] cov_save_load : + +*--#[ cov_brk_dotproduct : +* farm probe 0204_brk_dotproduct_0 (+34 lines) +* probe: clean +Vector p,q; +Local e = p.q + p.p + 1; +Bracket p.q; +Print; +.end +assert succeeded? +assert result("e") =~ expr("+ p.q * ( 1 ) + 1 + p.p") +*--#] cov_brk_dotproduct : + +*--#[ cov_cdt_nofill : +* farm probe 0136_cdt_nofill_26 (+23 lines) +* probe: clean +Symbol x; +Table t(4,4); +Local e = x; +.sort +ClearTable t; +Print e; +.end +assert succeeded? +assert result("e") =~ expr("x") +*--#] cov_cdt_nofill : + +*--#[ cov_if_eq_expr : +* dollar equality between two expressions (possible IsMultipleOf caller) +* runtime $-variables force sequential mode under threads +* probe: clean +* dollar equality between two expressions (possible IsMultipleOf caller) +Symbol x,y; +Local e1 = (x+y)^2; +Local e2 = x^2+2*x*y+y^2; +$a = e1; +$b = e2; +if ( $a == $b ) Print; +Print; +.end +#pend_if threaded? || mpi? +assert runtime_error? +*--#] cov_if_eq_expr : + +*--#[ cov_sut_relpath : +* expected: Name space for temp files exhausted +* probe: clean (parent exits 0; child uses a relative nonexistent dir) +* expected: Name space for temp files exhausted +* Relative TempDir variant in case path handling differs; the child +* also does a real sort so scratch files are actually touched. +#system cd $TESTFILEDIR && echo "Symbol x,y; Local t = x*y; Bracket x; Print; .end" > $TESTTMPDIR/sutc9.frm +#system cd $TESTFILEDIR && FORMTMP=nonexistent_sut_rel "$(readlink /proc/$PPID/exe)" $TESTTMPDIR/sutc9.frm > $TESTTMPDIR/sutout.txt 2>&1; cat $TESTTMPDIR/sutout.txt || true +Symbol x,y; +Local t = x*y; +Bracket x; +Print; +.end +assert_includes @stdout, "Name space for temp files exhausted" +*--#] cov_sut_relpath : + +*--#[ cov_dotheta_vec : +* farm probe 0143_dotheta_vec_16 (+8 lines) +* probe: clean +Vector p,q; +Local t1 = theta_(p,q); +Local t2 = theta_(0,p); +Local t3 = theta_(p,0); +Print; +.end +assert succeeded? +assert result("t1") =~ expr("1") +assert result("t2") =~ expr("1") +assert result("t3") =~ expr("0") +*--#] cov_dotheta_vec : + +*--#[ cov_cdt_nontable : +* expected: should be a previously declared table +* probe: error +* expected: should be a previously declared table +CFunction f; +Symbol x; +Local e = f(x); +.sort +ClearTable f; +.end +assert compile_error?('f is not') +*--#] cov_cdt_nontable : + +*--#[ cov_comp8 : +* farm probe 0166_comp8_19 (+9 lines) +* probe: clean +Symbol x; +Local F = 1/(1-x)^1000000; +.end +assert runtime_error? +*--#] cov_comp8 : + +*--#[ cov_dodollar : +* #do loop over dollar-driven range with defines inside, then .clear +* runtime $-variables force sequential mode under threads +* probe: clean +* #do loop over dollar-driven range with defines inside, then .clear +Symbol y; +$z = 3; +#do i = 1,2 + #define w`i' `i' +#enddo +Local t = y; +Print; +.clear +.end +#pend_if threaded? +assert preprocess_error?('Illegal string for') +*--#] cov_dodollar : + +*--#[ cov_dolphin_wild2 : +* id f(?a) = $w replaces the whole function by the value of a +* $-variable (DOLWILDARGS); Print of the result expression prints 0 +* (Print of a bare $-variable is not allowed) +Symbol x,y; +CFunction f; +Local expr = f(x,y); +$w = 0; +id f(?a) = $w; +Print expr; +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("expr") =~ expr("0") +*--#] cov_dolphin_wild2 : + +*--#[ cov_dol_nested : +* farm probe 0117_dol_nested_23 (+8 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +$x = 3; +$x = 5; +$y = 1; +$y = 2; +.sort +Local F = $x[$y[2]]; +Print; +.end +#pend_if threaded? +assert runtime_error? +*--#] cov_dol_nested : + +*--#[ cov_tensor_function_to_tensor : +* farm probe 0112_tensor_function_to_tensor_22 (+6 lines) +* probe: clean +Symbol x; +CTensor t; +CFunction f; +Set s: p1,p2; +Local F = f(x); +id f(x?x_) = t(s[1]); +Print; +.end +assert compile_error?('p1 has not') +*--#] cov_tensor_function_to_tensor : + +*--#[ cov_seteq_syntax_6 : +* farm probe 0066_seteq_syntax_15 (+10 lines) +* probe: clean +Set sortsize = 200; +Set scratchsize = 200; +Symbol a1,a2,a3; +Local F = (a1+a2+a3)^5; +Local G = 1; +.sort +.copy F to G; +.sort +Print G; +.end +assert preprocess_error?('Unrecognized module term') +*--#] cov_seteq_syntax_6 : + +*--#[ cov_dotail_pipe_10 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_10 : + +*--#[ cov_setnum_out_of_range : +* expected: Illegal element +* probe: error +* expected: Illegal element +Symbol a,b; +Set s: a,b; +Local F = s[2] + s[3]; +Print; +.end +assert compile_error?('Illegal element 3') +*--#] cov_setnum_out_of_range : + + +*--#[ cov_polyundefsec : +* expected: ghost should be a regular commuting function +* probe: error +* expected: ghost should be a regular commuting function +CFunction rat; +PolyRatFun rat,ghost; +.end +assert compile_error?('ghost should be') +*--#] cov_polyundefsec : + +*--#[ cov_fewer_over : +* expected: FewerStatistics parameter greater than MaxPatches +* probe: error +* expected: FewerStatistics parameter greater than MaxPatches +* if the over-MaxPatches message is only a warning, the second statement +* gives: Unrecognized option in ON FewerStatistics statement +On FewerStatistics 99999999; +On FewerStatistics 3,4; +.end +assert compile_error?('Unrecognized option in') +*--#] cov_fewer_over : + +*--#[ cov_indent_all : +* covers IndentSpace over-40 warning, bare default, then bad parameter error +* probe: error +* covers IndentSpace over-40 warning, bare default, then bad parameter error +* expected: Unrecognized option in ON IndentSpace statement: abc +On IndentSpace 50; +On IndentSpace; +On IndentSpace abc; +.end +assert compile_error?('Unrecognized option in') +*--#] cov_indent_all : + +*--#[ cov_nsuse_5 : +* guess at #use directive to expose namespace names outside +* probe: clean +* guess at #use directive to expose namespace names outside +#namespace nsuse +#define w 4 +#endnamespace +#use nsuse +#message `w' +#end +.end +assert preprocess_error?('Illegal string for') +*--#] cov_nsuse_5 : + +*--#[ cov_powset_4 : +* farm probe 0025_powset_15 (+5 lines) +* probe: clean +Symbol x,a,b,n; +Set s: a,b; +CFunction f,g; +Local t = f(x^a) + f(x^b) + f(x^3); +id f(x^n?s) = g(x^n); +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(x^3) + f((x)^(a)) + f((x)^(b))") +*--#] cov_powset_4 : + +*--#[ cov_sortflush_compressbig : +* Compress variant with fat terms and an extra sort after Off compress +* probe: clean +* Compress variant with fat terms and an extra sort after Off compress +* so both compr>0 and compr==0 flushes are exercised. +Symbol x1,x2,x3,x4,x5,x6,x7,x8,x9; +On compress; +Local big = (x1+x2+x3+x4+x5+x6+x7+x8+x9)^9*3^400; +.sort; +.sort; +Off compress; +.sort; +Local n = nterms_(big); +Print n; +.end +assert runtime_error? +*--#] cov_sortflush_compressbig : + +*--#[ cov_bigexp_7 : +* large expansion inside Substitute; attempts workspace check path 654-658 +* probe: clean +* large expansion inside Substitute; attempts workspace check path 654-658 +Symbol x,y; +CFunction f; +Local test = f(x); +id f(x?) = (y+1)^50000; +.end +assert runtime_error? +*--#] cov_bigexp_7 : + +*--#[ cov_normalize_ratroot_huge : +* farm probe 0006_normalize_ratroot_huge_47 (+12 lines) +* probe: clean +Symbol x; +Local F = root_(3,123456789012345678901234567890); +Print; +.end +assert succeeded? +assert result("F") =~ expr("root_(3,123456789012345678901234567890)") +*--#] cov_normalize_ratroot_huge : + +*--#[ cov_tenvec_match_func_no_match : +* farm probe 0192_tenvec_match_func_no_match_23 (+9 lines) +* probe: clean +Symbol x,y; +CTensor T; +CFunction f; +Local expr = f(T(1),x); +id f(T(2),x) = x; +.end +assert succeeded? +*--#] cov_tenvec_match_func_no_match : + +*--#[ cov_sizeof_bad : +* SizeOf_ of an expression that is not a subexpression stays unevaluated +Symbol x; +Local F = SizeOf_(x+1); +Print; +.end +assert succeeded? +assert result("F") =~ expr("sizeof_(1 + x)") +*--#] cov_sizeof_bad : + +*--#[ cov_ns_deepexpr_2 : +* target: ConstructName with namespace names inside function args and powers +* probe: clean +* target: ConstructName with namespace names inside function args and powers +#namespace k1 +#namespace k2 +AutoDeclare Symbol s; +CFunction f; +Local t = f(s1^2,s2)*s3; +Print t; +#endnamespace +#endnamespace +.end +assert succeeded? +assert result("t") =~ expr("f(s1^2,s2)*s3") +*--#] cov_ns_deepexpr_2 : + +*--#[ cov_brkt_explist : +* farm probe 0072_brkt_explist_64 (+5 lines) +* probe: clean +AutoDeclare Symbol a; +Local test = +#do i = 1,60 +a`i' + +#enddo +0; +Bracket +#do i = 1,59 +a`i', +#enddo +a60; +.sort +Print; +.end +assert succeeded? +assert result("test") =~ expr("a60 + a59 + a58 + a57 + a56 + a55 + a54 + a53 + a52 + a51 + a50 + a49 + +a48 + a47 + a46 + a45 + a44 + a43 + a42 + a41 + a40 + a39 + a38 + a37 + +a36 + a35 + a34 + a33 + a32 + a31 + a30 + a29 + a28 + a27 + a26 + a25 + +a24 + a23 + a22 + a21 + a20 + a19 + a18 + a17 + a16 + a15 + a14 + a13 + +a12 + a11 + a10 + a9 + a8 + a7 + a6 + a5 + a4 + a3 + a2 + a1") +*--#] cov_brkt_explist : + +*--#[ cov_dodelta_mixed : +* targets normal.c DoDelta 4456-4466: symbol first arg, composite second arg +* probe: clean +* targets normal.c DoDelta 4456-4466: symbol first arg, composite second arg +Symbol x,y; +Local test = delta_(x,x*y); +Print; +.end +assert succeeded? +assert result("test") =~ expr("delta_(x,x*y)") +*--#] cov_dodelta_mixed : + +*--#[ cov_dodelta_neqfun : +* targets normal.c DoDelta 4469-4471: unequal composite args, isnum=0 +* probe: clean +* targets normal.c DoDelta 4469-4471: unequal composite args, isnum=0 +Symbol x,y; +CFunction f; +Local test = delta_(f(x),f(y)); +Print; +.end +assert succeeded? +assert result("test") =~ expr("delta_(f(x),f(y))") +*--#] cov_dodelta_neqfun : + +*--#[ cov_tab_ex3 : +* Tables with 0 indices, expansion +* probe: clean +* Tables with 0 indices, expansion +Symbol x; +Table t(0); +Fill t() = x; +Local F = t(); +Print; +.end +assert succeeded? +assert result("F") =~ expr("t") +*--#] cov_tab_ex3 : + +*--#[ cov_prexpand_clean : +* farm probe 0176_prexpand_clean_31 (+10 lines) +* probe: clean +Symbol x; +CFunction rat,den; +PolyRatFun rat,den(expand,x,3); +Local test = rat(x,1); +Print; +.end +assert succeeded? +assert result("test") =~ expr("rat(x)") +*--#] cov_prexpand_clean : + +*--#[ cov_prfinddiv_clean : +* farm probe 0176_prfinddiv_clean_27 (+21 lines) +* probe: clean +Symbol x; +CFunction rat,den; +PolyRatFun rat,den(finddivergence,x); +Local test = rat(x,1); +Print; +.end +assert succeeded? +assert result("test") =~ expr("rat(x,1)") +*--#] cov_prfinddiv_clean : + +*--#[ cov_leh_zero320 : +* Lehmer GCD with an extra reduction step: the numerator and denominator +* stay a single huge rational term +Local t = (2^321+5)/((2^64-1)*2^256+1); +Print; +.end +assert succeeded? +assert nterms("t") == 1 +*--#] cov_leh_zero320 : + +*--#[ cov_count_cond : +* farm probe 0055_count_cond_47 (+6 lines) +* probe: clean +Symbol x,y; +Local t = x*x; +If ( count(x,1) ) Print "a"; +If ( count(x,1) > 0 ) Print "b"; +If ( count(y,1) == 0 ) Print "c"; +Print; +.end +assert succeeded? +assert result("t") =~ expr("x^2") +*--#] cov_count_cond : + +*--#[ cov_setelement_number : +* farm probe 0150_setelement_number_27 (+9 lines) +* probe: clean +Set myset: 5,7; +Local F = myset[1]; +Print; +.end +assert succeeded? +assert result("F") =~ expr("5") +*--#] cov_setelement_number : + +*--#[ cov_raise_low_big : +* farm probe 0202_raise_low_big_26 (+11 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol x, y; +AutoDeclare Symbol z; +Local expr = x^1000000 + y^1000000; +#$a = expr; +$b = $a + 10^500000; +Print; +.end +#pend_if threaded? +assert runtime_error? +*--#] cov_raise_low_big : + +*--#[ cov_sort185 : +* a power with a 186-digit exponent: normalization keeps the term +Symbol x; +Local F = x^10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000; +.end +assert succeeded? +*--#] cov_sort185 : + +*--#[ cov_gcopy_idrep : +* target: editing a graph expression via id replaces edges +* probe: clean +* target: editing a graph expression via id replaces edges +CFunction e_,v_; +Symbol x; +Local t1 = v_(1,2,3)*e_(1,2)*e_(2,3)*e_(3,1); +.sort +id e_(1,2) = e_(2,1)*x; +Print t1; +.end +assert compile_error?('Illegally formed function') +*--#] cov_gcopy_idrep : + +*--#[ cov_11_multidim : +* farm probe 0136_11_multidim_44 (+8 lines) +* probe: clean +Symbol i,j; +Table sparse t(1:2,1:2); +#do i = 1,2 + #do j = 1,2 + Fill t(`i',`j') = `i' + `j'; + #enddo +#enddo +PreDeallocateTable t; +Fill t(1,1) = 5; +Local test = t(1,1); +Print test; +.end +assert compile_error?('First argument in') +*--#] cov_11_multidim : + +*--#[ cov_sort10 : +* expected: +* probe: error +* expected: +Symbol x; +Local F = x^1000000000000000; +.end +#pend_if threaded? || mpi? +assert runtime_error? +*--#] cov_sort10 : + +*--#[ cov_collect_commute_big : +* farm probe 0085_collect_commute_big_34 (+5 lines) +* probe: clean +Symbol x; +CFunction f; +Local F = (1+x)^30*(1+x^2)^10; +Bracket x; +Collect f,commute; +Print; +.end +assert compile_error?('Specification out') +*--#] cov_collect_commute_big : + +*--#[ cov_collect_commute_alt : +* farm probe 0085_collect_commute_alt_35 (+5 lines) +* probe: clean +Symbol x; +CFunction f; +Local F = (1+x)^6; +Bracket x; +Collect commute; +Print; +.end +assert compile_error?('Specification out') +*--#] cov_collect_commute_alt : + +*--#[ cov_dolerr_badtype : +* a Do loop bound $-variable whose value is not a number +* (the "Invalid $-variable in do loop" variant at dollar.c:2732 is not +* reachable: the compiler only accepts $-expression bounds) +Symbol x; +$m = x; +.sort +Local F = x; +Do $i = 1,$m; + id x = x + 1; +EndDo; +Print; +.end +#pend_if threaded? || mpi? +assert runtime_error?('$-variable is not a number in do loop') +*--#] cov_dolerr_badtype : + +*--#[ cov_dollar_index_dollar : +* farm probe 0124_dollar_index_dollar_29 (+6 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol x; +Local F = x^3; +$d = F; +$i = 1; +#write "%e\n", $d[$i]; +.end +#pend_if threaded? || mpi? +assert preprocess_error?('expression name e') +*--#] cov_dollar_index_dollar : + +*--#[ cov_seteq_syntax_7 : +* farm probe 0066_seteq_syntax_15 (+10 lines) +* probe: clean +Set sortsize = 200; +Set scratchsize = 200; +Symbol a1,a2,a3; +Local F = (a1+a2+a3)^5; +Local G = 1; +.sort +.copy F to G; +.sort +Print G; +.end +assert preprocess_error?('Unrecognized module term') +*--#] cov_seteq_syntax_7 : + +*--#[ cov_conflict_subdisorder : +* Test disorder with another option +* probe: clean +* Test disorder with another option +Symbol x,y; +Local F = x*y; +id disorder select s x,y = y,x; +Set s: x,y; +Print; +.end +assert compile_error?('s is not') +*--#] cov_conflict_subdisorder : + +*--#[ cov_dotail_pipe_11 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_11 : + +*--#[ cov_shuffle_merge : +* need actual merge/shuffle statements; use syntax guess +* probe: clean +Symbol x,y; +Local F = x*y; +* need actual merge/shuffle statements; use syntax guess +Merge x,y; +Print; +.end +assert compile_error?('x,y has not') +*--#] cov_shuffle_merge : + +*--#[ cov_stuffle_probe : +* need actual stuffle; use syntax guess +* probe: clean +Symbol x,y; +Local F = x*y; +* need actual stuffle; use syntax guess +Stuffle x,y; +Print; +.end +assert compile_error?('x has been') +*--#] cov_stuffle_probe : + +*--#[ cov_sqrt_big : +* farm probe 0119_sqrt_big_31 (+18 lines) +* probe: clean +#do i = 1, 10^/ + #message sqrt(10) = `i' +#enddo +.end +assert succeeded? +*--#] cov_sqrt_big : + +*--#[ cov_log2_postfix : +* farm probe 0119_log2_postfix_29 (+7 lines) +* probe: clean +#do i = 1, 8^% + #message log2(8) = `i' +#enddo +.end +assert succeeded? +*--#] cov_log2_postfix : + +*--#[ cov_fact5 : +* farm probe 0119_fact5_24 (+7 lines) +* probe: clean +#do i = 1, 5! + #message fact(5) = `i' +#enddo +.end +assert succeeded? +*--#] cov_fact5 : + + +*--#[ cov_nsuse_6 : +* guess at #use directive to expose namespace names outside +* probe: clean +* guess at #use directive to expose namespace names outside +#namespace nsuse +#define w 4 +#endnamespace +#use nsuse +#message `w' +#end +.end +assert preprocess_error?('Illegal string for') +*--#] cov_nsuse_6 : + + +*--#[ cov_ifmatch_badpattern : +* regression for 1594aba: If(Match(...)) with an uncompilable pattern +* (dotproduct in the pattern) crashed CoIf with a garbage lhs copy +* instead of reporting the compile error +Symbol x,p; +Function f; +Local test = f(1); +If ( Match(f(x.p)) ) Redo; +Print; +.end +assert compile_error?("Illegal second element in dotproduct") +*--#] cov_ifmatch_badpattern : + +*--#[ cov_transform_badset : +* regression for 1594aba: Transform with a spec that is neither a function +* nor a function set kept a garbage set number and crashed instead of +* reporting the error +Symbol x; +Local t = x; +Transform,x,dedup(1,last); +Print; +.end +assert compile_error?("starts with sets of functions") +*--#] cov_transform_badset : +*--#[ cov_0306_fac_content : +* nontrivial integer content with common variable powers +* probe: clean +* nontrivial integer content with common variable powers +Symbol x,y; +Local f = 12*x^2*y - 6*x*y^2 + 18*x*y; +Local g = 1; +Factorize f,g; +Print g; +.end +assert succeeded? +assert result("g") =~ expr("( 1 )") +*--#] cov_0306_fac_content : + +*--#[ cov_factor_bare : +* bare Factorize statement on simple polynomial +* probe: clean +* bare Factorize statement on simple polynomial +Symbol x; +Local test = x^2-1; +Factorize; +Print; +.end +assert succeeded? +assert result("test") =~ expr("( - 1 + x ) +* ( 1 + x )") +*--#] cov_factor_bare : + +*--#[ cov_powset_5 : +* farm probe 0025_powset_15 (+5 lines) +* probe: clean +Symbol x,a,b,n; +Set s: a,b; +CFunction f,g; +Local t = f(x^a) + f(x^b) + f(x^3); +id f(x^n?s) = g(x^n); +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(x^3) + f((x)^(a)) + f((x)^(b))") +*--#] cov_powset_5 : + +*--#[ cov_factdol_pow : +* Factorized dollar raised to a power > 1 (GenerateFactors path) +* runtime $-variables force sequential mode under threads +* probe: clean +* Factorized dollar raised to a power > 1 (GenerateFactors path) +Symbol x; +Local F = (x+1)*(x-1); +.sort +$dd = F; +.sort +FactDollar,$dd; +.sort +Local G = $dd^2; +.sort +Print; +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("F") =~ expr("- 1 + x^2") +assert result("G") =~ expr("1 - 2*x^2 + x^4") +*--#] cov_factdol_pow : + +*--#[ cov_kb_match : +* farm probe 0119_kb_match_7 (+11 lines) +* probe: clean +Symbols x,y; +Local ex = (1+x+y)^30; +.sort +Bracket x; +.sort +Keep Brackets; +If ( Match(x^2*y) ) id x^2 = 2*x; +.sort +Print; +.end +assert succeeded? +assert result("ex") =~ expr("1 + 30*y + 435*y^2 + 4060*y^3 + 27405*y^4 + 142506*y^5 + 593775*y^6 + +2035800*y^7 + 5852925*y^8 + 14307150*y^9 + 30045015*y^10 + 54627300*y^11 ++ 86493225*y^12 + 119759850*y^13 + 145422675*y^14 + 155117520*y^15 + +145422675*y^16 + 119759850*y^17 + 86493225*y^18 + 54627300*y^19 + +30045015*y^20 + 14307150*y^21 + 5852925*y^22 + 2035800*y^23 + 593775* +y^24 + 142506*y^25 + 27405*y^26 + 4060*y^27 + 435*y^28 + 30*y^29 + y^30 ++ 30*x + 870*x*y + 12180*x*y^2 + 109620*x*y^3 + 712530*x*y^4 + 3562650* +x*y^5 + 14250600*x*y^6 + 46823400*x*y^7 + 128764350*x*y^8 + 300450150*x* +y^9 + 600900300*x*y^10 + 1037918700*x*y^11 + 1556878050*x*y^12 + +2035917450*x*y^13 + 2326762800*x*y^14 + 2326762800*x*y^15 + 2035917450*x +*y^16 + 1556878050*x*y^17 + 1037918700*x*y^18 + 600900300*x*y^19 + +300450150*x*y^20 + 128764350*x*y^21 + 46823400*x*y^22 + 14250600*x*y^23 ++ 3562650*x*y^24 + 712530*x*y^25 + 109620*x*y^26 + 12180*x*y^27 + 870*x +*y^28 + 30*x*y^29 + 435*x^2 + 12180*x^2*y + 164430*x^2*y^2 + 1425060*x^2 +*y^3 + 8906625*x^2*y^4 + 42751800*x^2*y^5 + 163881900*x^2*y^6 + +515057400*x^2*y^7 + 1352025675*x^2*y^8 + 3004501500*x^2*y^9 + 5708552850 +*x^2*y^10 + 9341268300*x^2*y^11 + 13233463425*x^2*y^12 + 16287339600*x^2 +*y^13 + 17450721000*x^2*y^14 + 16287339600*x^2*y^15 + 13233463425*x^2* +y^16 + 9341268300*x^2*y^17 + 5708552850*x^2*y^18 + 3004501500*x^2*y^19 ++ 1352025675*x^2*y^20 + 515057400*x^2*y^21 + 163881900*x^2*y^22 + +42751800*x^2*y^23 + 8906625*x^2*y^24 + 1425060*x^2*y^25 + 164430*x^2* +y^26 + 12180*x^2*y^27 + 435*x^2*y^28 + 4060*x^3 + 109620*x^3*y + 1425060 +*x^3*y^2 + 11875500*x^3*y^3 + 71253000*x^3*y^4 + 327763800*x^3*y^5 + +1201800600*x^3*y^6 + 3605401800*x^3*y^7 + 9013504500*x^3*y^8 + +19028509500*x^3*y^9 + 34251317100*x^3*y^10 + 52933853700*x^3*y^11 + +70578471600*x^3*y^12 + 81436698000*x^3*y^13 + 81436698000*x^3*y^14 + +70578471600*x^3*y^15 + 52933853700*x^3*y^16 + 34251317100*x^3*y^17 + +19028509500*x^3*y^18 + 9013504500*x^3*y^19 + 3605401800*x^3*y^20 + +1201800600*x^3*y^21 + 327763800*x^3*y^22 + 71253000*x^3*y^23 + 11875500* +x^3*y^24 + 1425060*x^3*y^25 + 109620*x^3*y^26 + 4060*x^3*y^27 + 27405* +x^4 + 712530*x^4*y + 8906625*x^4*y^2 + 71253000*x^4*y^3 + 409704750*x^4* +y^4 + 1802700900*x^4*y^5 + 6309453150*x^4*y^6 + 18027009000*x^4*y^7 + +42814146375*x^4*y^8 + 85628292750*x^4*y^9 + 145568097675*x^4*y^10 + +211735414800*x^4*y^11 + 264669268500*x^4*y^12 + 285028443000*x^4*y^13 + +264669268500*x^4*y^14 + 211735414800*x^4*y^15 + 145568097675*x^4*y^16 + +85628292750*x^4*y^17 + 42814146375*x^4*y^18 + 18027009000*x^4*y^19 + +6309453150*x^4*y^20 + 1802700900*x^4*y^21 + 409704750*x^4*y^22 + +71253000*x^4*y^23 + 8906625*x^4*y^24 + 712530*x^4*y^25 + 27405*x^4*y^26 ++ 142506*x^5 + 3562650*x^5*y + 42751800*x^5*y^2 + 327763800*x^5*y^3 + +1802700900*x^5*y^4 + 7571343780*x^5*y^5 + 25237812600*x^5*y^6 + +68502634200*x^5*y^7 + 154130926950*x^5*y^8 + 291136195350*x^5*y^9 + +465817912560*x^5*y^10 + 635206244400*x^5*y^11 + 741073951800*x^5*y^12 + +741073951800*x^5*y^13 + 635206244400*x^5*y^14 + 465817912560*x^5*y^15 + +291136195350*x^5*y^16 + 154130926950*x^5*y^17 + 68502634200*x^5*y^18 + +25237812600*x^5*y^19 + 7571343780*x^5*y^20 + 1802700900*x^5*y^21 + +327763800*x^5*y^22 + 42751800*x^5*y^23 + 3562650*x^5*y^24 + 142506*x^5* +y^25 + 593775*x^6 + 14250600*x^6*y + 163881900*x^6*y^2 + 1201800600*x^6* +y^3 + 6309453150*x^6*y^4 + 25237812600*x^6*y^5 + 79919739900*x^6*y^6 + +205507902600*x^6*y^7 + 436704293025*x^6*y^8 + 776363187600*x^6*y^9 + +1164544781400*x^6*y^10 + 1482147903600*x^6*y^11 + 1605660228900*x^6*y^12 ++ 1482147903600*x^6*y^13 + 1164544781400*x^6*y^14 + 776363187600*x^6* +y^15 + 436704293025*x^6*y^16 + 205507902600*x^6*y^17 + 79919739900*x^6* +y^18 + 25237812600*x^6*y^19 + 6309453150*x^6*y^20 + 1201800600*x^6*y^21 ++ 163881900*x^6*y^22 + 14250600*x^6*y^23 + 593775*x^6*y^24 + 2035800* +x^7 + 46823400*x^7*y + 515057400*x^7*y^2 + 3605401800*x^7*y^3 + +18027009000*x^7*y^4 + 68502634200*x^7*y^5 + 205507902600*x^7*y^6 + +499090620600*x^7*y^7 + 998181241200*x^7*y^8 + 1663635402000*x^7*y^9 + +2329089562800*x^7*y^10 + 2752560392400*x^7*y^11 + 2752560392400*x^7*y^12 ++ 2329089562800*x^7*y^13 + 1663635402000*x^7*y^14 + 998181241200*x^7* +y^15 + 499090620600*x^7*y^16 + 205507902600*x^7*y^17 + 68502634200*x^7* +y^18 + 18027009000*x^7*y^19 + 3605401800*x^7*y^20 + 515057400*x^7*y^21 ++ 46823400*x^7*y^22 + 2035800*x^7*y^23 + 5852925*x^8 + 128764350*x^8*y ++ 1352025675*x^8*y^2 + 9013504500*x^8*y^3 + 42814146375*x^8*y^4 + +154130926950*x^8*y^5 + 436704293025*x^8*y^6 + 998181241200*x^8*y^7 + +1871589827250*x^8*y^8 + 2911361953500*x^8*y^9 + 3784770539550*x^8*y^10 ++ 4128840588600*x^8*y^11 + 3784770539550*x^8*y^12 + 2911361953500*x^8* +y^13 + 1871589827250*x^8*y^14 + 998181241200*x^8*y^15 + 436704293025*x^8 +*y^16 + 154130926950*x^8*y^17 + 42814146375*x^8*y^18 + 9013504500*x^8* +y^19 + 1352025675*x^8*y^20 + 128764350*x^8*y^21 + 5852925*x^8*y^22 + +14307150*x^9 + 300450150*x^9*y + 3004501500*x^9*y^2 + 19028509500*x^9* +y^3 + 85628292750*x^9*y^4 + 291136195350*x^9*y^5 + 776363187600*x^9*y^6 ++ 1663635402000*x^9*y^7 + 2911361953500*x^9*y^8 + 4205300599500*x^9*y^9 ++ 5046360719400*x^9*y^10 + 5046360719400*x^9*y^11 + 4205300599500*x^9* +y^12 + 2911361953500*x^9*y^13 + 1663635402000*x^9*y^14 + 776363187600* +x^9*y^15 + 291136195350*x^9*y^16 + 85628292750*x^9*y^17 + 19028509500* +x^9*y^18 + 3004501500*x^9*y^19 + 300450150*x^9*y^20 + 14307150*x^9*y^21 ++ 30045015*x^10 + 600900300*x^10*y + 5708552850*x^10*y^2 + 34251317100* +x^10*y^3 + 145568097675*x^10*y^4 + 465817912560*x^10*y^5 + 1164544781400 +*x^10*y^6 + 2329089562800*x^10*y^7 + 3784770539550*x^10*y^8 + +5046360719400*x^10*y^9 + 5550996791340*x^10*y^10 + 5046360719400*x^10* +y^11 + 3784770539550*x^10*y^12 + 2329089562800*x^10*y^13 + 1164544781400 +*x^10*y^14 + 465817912560*x^10*y^15 + 145568097675*x^10*y^16 + +34251317100*x^10*y^17 + 5708552850*x^10*y^18 + 600900300*x^10*y^19 + +30045015*x^10*y^20 + 54627300*x^11 + 1037918700*x^11*y + 9341268300*x^11 +*y^2 + 52933853700*x^11*y^3 + 211735414800*x^11*y^4 + 635206244400*x^11* +y^5 + 1482147903600*x^11*y^6 + 2752560392400*x^11*y^7 + 4128840588600* +x^11*y^8 + 5046360719400*x^11*y^9 + 5046360719400*x^11*y^10 + +4128840588600*x^11*y^11 + 2752560392400*x^11*y^12 + 1482147903600*x^11* +y^13 + 635206244400*x^11*y^14 + 211735414800*x^11*y^15 + 52933853700* +x^11*y^16 + 9341268300*x^11*y^17 + 1037918700*x^11*y^18 + 54627300*x^11* +y^19 + 86493225*x^12 + 1556878050*x^12*y + 13233463425*x^12*y^2 + +70578471600*x^12*y^3 + 264669268500*x^12*y^4 + 741073951800*x^12*y^5 + +1605660228900*x^12*y^6 + 2752560392400*x^12*y^7 + 3784770539550*x^12*y^8 ++ 4205300599500*x^12*y^9 + 3784770539550*x^12*y^10 + 2752560392400*x^12 +*y^11 + 1605660228900*x^12*y^12 + 741073951800*x^12*y^13 + 264669268500* +x^12*y^14 + 70578471600*x^12*y^15 + 13233463425*x^12*y^16 + 1556878050* +x^12*y^17 + 86493225*x^12*y^18 + 119759850*x^13 + 2035917450*x^13*y + +16287339600*x^13*y^2 + 81436698000*x^13*y^3 + 285028443000*x^13*y^4 + +741073951800*x^13*y^5 + 1482147903600*x^13*y^6 + 2329089562800*x^13*y^7 ++ 2911361953500*x^13*y^8 + 2911361953500*x^13*y^9 + 2329089562800*x^13* +y^10 + 1482147903600*x^13*y^11 + 741073951800*x^13*y^12 + 285028443000* +x^13*y^13 + 81436698000*x^13*y^14 + 16287339600*x^13*y^15 + 2035917450* +x^13*y^16 + 119759850*x^13*y^17 + 145422675*x^14 + 2326762800*x^14*y + +17450721000*x^14*y^2 + 81436698000*x^14*y^3 + 264669268500*x^14*y^4 + +635206244400*x^14*y^5 + 1164544781400*x^14*y^6 + 1663635402000*x^14*y^7 ++ 1871589827250*x^14*y^8 + 1663635402000*x^14*y^9 + 1164544781400*x^14* +y^10 + 635206244400*x^14*y^11 + 264669268500*x^14*y^12 + 81436698000* +x^14*y^13 + 17450721000*x^14*y^14 + 2326762800*x^14*y^15 + 145422675* +x^14*y^16 + 155117520*x^15 + 2326762800*x^15*y + 16287339600*x^15*y^2 + +70578471600*x^15*y^3 + 211735414800*x^15*y^4 + 465817912560*x^15*y^5 + +776363187600*x^15*y^6 + 998181241200*x^15*y^7 + 998181241200*x^15*y^8 + +776363187600*x^15*y^9 + 465817912560*x^15*y^10 + 211735414800*x^15*y^11 ++ 70578471600*x^15*y^12 + 16287339600*x^15*y^13 + 2326762800*x^15*y^14 ++ 155117520*x^15*y^15 + 145422675*x^16 + 2035917450*x^16*y + +13233463425*x^16*y^2 + 52933853700*x^16*y^3 + 145568097675*x^16*y^4 + +291136195350*x^16*y^5 + 436704293025*x^16*y^6 + 499090620600*x^16*y^7 + +436704293025*x^16*y^8 + 291136195350*x^16*y^9 + 145568097675*x^16*y^10 ++ 52933853700*x^16*y^11 + 13233463425*x^16*y^12 + 2035917450*x^16*y^13 ++ 145422675*x^16*y^14 + 119759850*x^17 + 1556878050*x^17*y + 9341268300 +*x^17*y^2 + 34251317100*x^17*y^3 + 85628292750*x^17*y^4 + 154130926950* +x^17*y^5 + 205507902600*x^17*y^6 + 205507902600*x^17*y^7 + 154130926950* +x^17*y^8 + 85628292750*x^17*y^9 + 34251317100*x^17*y^10 + 9341268300* +x^17*y^11 + 1556878050*x^17*y^12 + 119759850*x^17*y^13 + 86493225*x^18 ++ 1037918700*x^18*y + 5708552850*x^18*y^2 + 19028509500*x^18*y^3 + +42814146375*x^18*y^4 + 68502634200*x^18*y^5 + 79919739900*x^18*y^6 + +68502634200*x^18*y^7 + 42814146375*x^18*y^8 + 19028509500*x^18*y^9 + +5708552850*x^18*y^10 + 1037918700*x^18*y^11 + 86493225*x^18*y^12 + +54627300*x^19 + 600900300*x^19*y + 3004501500*x^19*y^2 + 9013504500*x^19 +*y^3 + 18027009000*x^19*y^4 + 25237812600*x^19*y^5 + 25237812600*x^19* +y^6 + 18027009000*x^19*y^7 + 9013504500*x^19*y^8 + 3004501500*x^19*y^9 ++ 600900300*x^19*y^10 + 54627300*x^19*y^11 + 30045015*x^20 + 300450150* +x^20*y + 1352025675*x^20*y^2 + 3605401800*x^20*y^3 + 6309453150*x^20*y^4 ++ 7571343780*x^20*y^5 + 6309453150*x^20*y^6 + 3605401800*x^20*y^7 + +1352025675*x^20*y^8 + 300450150*x^20*y^9 + 30045015*x^20*y^10 + 14307150 +*x^21 + 128764350*x^21*y + 515057400*x^21*y^2 + 1201800600*x^21*y^3 + +1802700900*x^21*y^4 + 1802700900*x^21*y^5 + 1201800600*x^21*y^6 + +515057400*x^21*y^7 + 128764350*x^21*y^8 + 14307150*x^21*y^9 + 5852925* +x^22 + 46823400*x^22*y + 163881900*x^22*y^2 + 327763800*x^22*y^3 + +409704750*x^22*y^4 + 327763800*x^22*y^5 + 163881900*x^22*y^6 + 46823400* +x^22*y^7 + 5852925*x^22*y^8 + 2035800*x^23 + 14250600*x^23*y + 42751800* +x^23*y^2 + 71253000*x^23*y^3 + 71253000*x^23*y^4 + 42751800*x^23*y^5 + +14250600*x^23*y^6 + 2035800*x^23*y^7 + 593775*x^24 + 3562650*x^24*y + +8906625*x^24*y^2 + 11875500*x^24*y^3 + 8906625*x^24*y^4 + 3562650*x^24* +y^5 + 593775*x^24*y^6 + 142506*x^25 + 712530*x^25*y + 1425060*x^25*y^2 ++ 1425060*x^25*y^3 + 712530*x^25*y^4 + 142506*x^25*y^5 + 27405*x^26 + +109620*x^26*y + 164430*x^26*y^2 + 109620*x^26*y^3 + 27405*x^26*y^4 + +4060*x^27 + 12180*x^27*y + 12180*x^27*y^2 + 4060*x^27*y^3 + 435*x^28 + +870*x^28*y + 435*x^28*y^2 + 30*x^29 + 30*x^29*y + x^30") +*--#] cov_kb_match : + +*--#[ cov_sort1_polyfun : +* guess: PolyFun statement sets PolyFunType (sort.c:2631+ PolyFunType==2 branch) +* probe: clean +* guess: PolyFun statement sets PolyFunType (sort.c:2631+ PolyFunType==2 branch) +Symbol x,y; +CFunction pf; +PolyFun pf; +Local t = pf(x+1,x-1) + pf(x^2+1,x) + pf(x+y,y^2); +.sort +Print; +.end +assert succeeded? +assert result("t") =~ expr("pf(1 + x, - 1 + x) + pf(1 + x^2,x) + pf(y + x,y^2)") +*--#] cov_sort1_polyfun : + +*--#[ cov_bigexp_8 : +* large expansion inside Substitute; attempts workspace check path 654-658 +* probe: clean +* large expansion inside Substitute; attempts workspace check path 654-658 +Symbol x,y; +CFunction f; +Local test = f(x); +id f(x?) = (y+1)^50000; +.end +assert runtime_error? +*--#] cov_bigexp_8 : + +*--#[ cov_delta_nomatch : +* farm probe 0059_delta_nomatch_67 (+16 lines) +* probe: clean +Index i,j,k; +CFunction f; +Local test = f(d_(i,j)); +id f(d_(i,k)) = f(i,k); +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(d_(i,j))") +*--#] cov_delta_nomatch : + +*--#[ cov_argtoextrasymbol : +* farm probe 0154_argtoextrasymbol_15 (+10 lines) +* probe: clean +Symbol x,y; +Function f,g; +Local t = f(x+y,g(x),g(2*x+y)); +ArgToExtraSymbol f; +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(Z1_,Z2_,Z3_)") +*--#] cov_argtoextrasymbol : + +*--#[ cov_0017_ns_fn : +* farm probe 0127_0017_ns_fn_42 (+39 lines) +* probe: clean +#namespace wrk +Symbol x,y; +CFunction f,g; +Local test = f(x,y); +id f(x?,y?) = g(y,x); +Print; +#endnamespace +.end +assert succeeded? +assert result("test") =~ expr("g(y,x)") +*--#] cov_0017_ns_fn : + +*--#[ cov_putinside_multi_2 : +* farm probe 0216_putinside_multi_3 (+9 lines) +* probe: clean +Vector p; +Symbol x,y; +Function f; +Local t = f(x,y,p) + f(p.p); +PutInside f, x, y, p, p.p, d_; +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(p.p)*f(1) + f(x,y,p)*f(1)") +*--#] cov_putinside_multi_2 : + +*--#[ cov_hidden : +* farm probe 0074_hidden_51 (+5 lines) +* probe: clean +Symbol x; +Local ex = (x+1)*(x+2); +.sort; +Hide ex; +.sort; +Local test = factorin_(ex); +Print test; +.end +assert succeeded? +assert result("test") =~ expr("1") +*--#] cov_hidden : + +*--#[ cov_thr_bucket : +* farm probe 0048_thr_bucket_15 (+5 lines) +* probe: clean +On parallel; +ThreadBucketSize 3; +Symbol x; +Local test = (x+1)^50; +.sort +Print test; +.end +assert succeeded? +assert result("test") =~ expr("1 + 50*x + 1225*x^2 + 19600*x^3 + 230300*x^4 + 2118760*x^5 + 15890700* +x^6 + 99884400*x^7 + 536878650*x^8 + 2505433700*x^9 + 10272278170*x^10 ++ 37353738800*x^11 + 121399651100*x^12 + 354860518600*x^13 + +937845656300*x^14 + 2250829575120*x^15 + 4923689695575*x^16 + +9847379391150*x^17 + 18053528883775*x^18 + 30405943383200*x^19 + +47129212243960*x^20 + 67327446062800*x^21 + 88749815264600*x^22 + +108043253365600*x^23 + 121548660036300*x^24 + 126410606437752*x^25 + +121548660036300*x^26 + 108043253365600*x^27 + 88749815264600*x^28 + +67327446062800*x^29 + 47129212243960*x^30 + 30405943383200*x^31 + +18053528883775*x^32 + 9847379391150*x^33 + 4923689695575*x^34 + +2250829575120*x^35 + 937845656300*x^36 + 354860518600*x^37 + +121399651100*x^38 + 37353738800*x^39 + 10272278170*x^40 + 2505433700* +x^41 + 536878650*x^42 + 99884400*x^43 + 15890700*x^44 + 2118760*x^45 + +230300*x^46 + 19600*x^47 + 1225*x^48 + 50*x^49 + x^50") +*--#] cov_thr_bucket : + +*--#[ cov_coif_condclean : +* farm probe 0061_coif_condclean_23 (+6 lines) +* probe: clean +Symbol x; +Local test = x; +if ( expression(test) ) id x = 1; +Print; +.end +assert succeeded? +assert result("test") =~ expr("1") +*--#] cov_coif_condclean : + +*--#[ cov_dot_valid : +* farm probe 0061_dot_valid_63 (+6 lines) +* probe: clean +Vector p,q; +Symbol s; +Local f = p.q; +if ( occurs(p.q) ) id s = 1; +Print; +.end +assert succeeded? +assert result("f") =~ expr("p.q") +*--#] cov_dot_valid : + +*--#[ cov_argexplode2 : +* farm probe 0212_argexplode2_28 (+11 lines) +* probe: clean +Symbol a,b,c,x,d; +CFunction f,g,h; +Local test = f(g(h(a,b,c),d),x); +ArgExplode f; +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(g(h(a,b,c),d),x)") +*--#] cov_argexplode2 : + +*--#[ cov_fixed_index : +* farm probe 0032_fixed_index_72 (+6 lines) +* probe: clean +Vector p; +Index i; +Local expr = p(i); +id p(i?fixed_) = 1; +Print; +.end +assert succeeded? +assert result("expr") =~ expr("p(i)") +*--#] cov_fixed_index : + +*--#[ cov_gcd_argfun : +* farm probe 0147_gcd_argfun_15 (+7 lines) +* probe: clean +Symbol x,y,z; +Function f,g,h; +PolyRatFun gcd_; +Local F = gcd_(f(x)*g(y)*(x+1), f(x)*h(z)*(x+2)); +Print; +.end +assert runtime_error? +*--#] cov_gcd_argfun : + +*--#[ cov_pre_isfact_dollar : +* farm probe 0046_pre_isfact_dollar_51 (+6 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol x; +Local e = x; +.sort +$a = e; +#if ( isfactorized($a) == 1 ) + #message factorized +#endif +Print; +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("e") =~ expr("x") +*--#] cov_pre_isfact_dollar : + +*--#[ cov_vecset : +* standalone vectors with set-of-vectors bracket +* probe: clean +* standalone vectors with set-of-vectors bracket +* targets execute.c 1476-1518 +Symbol x; +Vector p,q,r; +Set vs: p,q; +Local test = p + q + r + x; +Bracket vs; +Print; +.end +assert succeeded? +assert result("test") =~ expr("+ p * ( 1 ) + q * ( 1 ) + x + r") +*--#] cov_vecset : + +*--#[ cov_prexpand_clean_2 : +* farm probe 0176_prexpand_clean_31 (+8 lines) +* probe: clean +Symbol x; +CFunction rat,den; +PolyRatFun rat,den(expand,x,3); +Local test = rat(x,1); +Print; +.end +assert succeeded? +assert result("test") =~ expr("rat(x)") +*--#] cov_prexpand_clean_2 : + +*--#[ cov_cdt_nofill_2 : +* farm probe 0136_cdt_nofill_26 (+5 lines) +* probe: clean +Symbol x; +Table t(4,4); +Local e = x; +.sort +ClearTable t; +Print e; +.end +assert succeeded? +assert result("e") =~ expr("x") +*--#] cov_cdt_nofill_2 : + +*--#[ cov_1008_chainout : +* ChainOut: writing an expression to a file through the store layer. +* probe: clean +* ChainOut: writing an expression to a file through the store layer. +CFunction f; +Symbol i; +Local test = sum_(i,1,5000,f(i)); +.sort +ChainOut test; +.sort +Print; +.end +assert compile_error?('test has not') +*--#] cov_1008_chainout : + +*--#[ cov_vecdirect : +* bracket a vector directly, term has vector and dotproduct +* probe: clean +* bracket a vector directly, term has vector and dotproduct +* targets execute.c 1477-1518, 1520-1545 +Symbol x; +Vector p,q; +Local test = p*q + p + x; +Bracket p; +Print; +.end +assert succeeded? +assert result("test") =~ expr("+ p * ( 1 + q ) + x") +*--#] cov_vecdirect : + +*--#[ cov_nterms_reuse : +* farm probe 0103_nterms_reuse_49 (+10 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol x; +Keep Brackets; +Local F = (1+x)*(1+x^2); +.sort + #$n = nterms(F); +$sum = 0; +#do i = 1,`nterms(F)' + $sum = $sum + x^`i'; +#enddo +.sort +Print; +Print $sum; +.end +#pend_if threaded? +assert preprocess_error?('Undefined preprocessor v') +*--#] cov_nterms_reuse : + +*--#[ cov_prfinddiv_clean_2 : +* farm probe 0176_prfinddiv_clean_27 (+25 lines) +* probe: clean +Symbol x; +CFunction rat,den; +PolyRatFun rat,den(finddivergence,x); +Local test = rat(x,1); +Print; +.end +assert succeeded? +assert result("test") =~ expr("rat(x,1)") +*--#] cov_prfinddiv_clean_2 : + +*--#[ cov_pre_isnum_dollar : +* farm probe 0046_pre_isnum_dollar_46 (+11 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol x; +Local e = x; +.sort +$a = 7; +#if ( isnumerical($a) == 1 ) + #message numeric dollar +#endif +Print; +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("e") =~ expr("x") +*--#] cov_pre_isnum_dollar : + +*--#[ cov_nterms_sorted : +* farm probe 0103_nterms_sorted_47 (+7 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol x; +Keep Brackets; +Local F = (1+x)*(1+x^2)*(1+x^3); +.sort +Sort F; +.sort +$n = nterms(F); +Print $n; +Print; +.end +#pend_if threaded? +assert compile_error?('Illegal syntax for') +*--#] cov_nterms_sorted : + +*--#[ cov_count_cond_2 : +* farm probe 0055_count_cond_47 (+5 lines) +* probe: clean +Symbol x,y; +Local t = x*x; +If ( count(x,1) ) Print "a"; +If ( count(x,1) > 0 ) Print "b"; +If ( count(y,1) == 0 ) Print "c"; +Print; +.end +assert succeeded? +assert result("t") =~ expr("x^2") +*--#] cov_count_cond_2 : + +*--#[ cov_flagok_2 : +* valid flag(...) condition, big compile run 4510-4543 +* probe: clean +* valid flag(...) condition, big compile run 4510-4543 +CFunction f; +Local F = f(1); +if ( flag(1,2) ) Print; +.end +assert succeeded? +assert result("F") =~ expr("f(1)") +*--#] cov_flagok_2 : + +*--#[ cov_prop_on_ident : +* fully identical functions: CompArg loop exhausts, return 0 +* probe: clean +* fully identical functions: CompArg loop exhausts, return 0 +On properorder; +Symbol a; +CFunction f; +Local test = f(a)*f(a); +.sort +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(a)^2") +*--#] cov_prop_on_ident : + +*--#[ cov_maxpower : +* farm probe 0005_maxpower_48 (+6 lines) +* probe: clean +Symbol x,y; +Local F = maxpowerof_(x); +Print; +.end +assert succeeded? +assert result("F") =~ expr("500000000") +*--#] cov_maxpower : + +*--#[ cov_isfactorized_improper_name : +* isfactorized with an unknown expression name returns false +* without a diagnostic +Symbol x; +Local F = x; +if ( isfactorized (F, badname) ) discard; +Print; +.end +assert succeeded? +assert result("F") =~ expr("x") +*--#] cov_isfactorized_improper_name : + +*--#[ cov_norm01_dimvec : +* target: normal.c 374-397 DIMENSIONSYMBOL branch of Normalize +* probe: clean +* target: normal.c 374-397 DIMENSIONSYMBOL branch of Normalize +Vector p,q; +Symbol x; +Local test = dimension_*p.p + x; +Print; +.end +assert succeeded? +assert result("test") =~ expr("x") +*--#] cov_norm01_dimvec : + +*--#[ cov_rl_err : +* ReplaceLoop on an ordinary (non-symmetric) function: DoFindLoop +* rejects it, and the leftover positional argument is reported as an +* unrecognized option +Symbol x; +Index a,b,c,d; +Function h1; +Tensor t2; +Local test = h1(x,a,b,c); +.sort +ReplaceLoop h1,t2; +Print; +.end +assert compile_error?('should be a (anti)symmetric function or tensor') +*--#] cov_rl_err : + +*--#[ cov_norm04_specials : +* target: normal.c 323-372 COEFFSYMBOL/NUMERATORSYMBOL/DENOMINATORSYMBOL +* probe: clean +* target: normal.c 323-372 COEFFSYMBOL/NUMERATORSYMBOL/DENOMINATORSYMBOL +* branches of Normalize, via the special reserved symbols +Symbol x; +Local test = num_*den_*coeff_*x; +Print; +.end +assert succeeded? +assert result("test") =~ expr("x") +*--#] cov_norm04_specials : + +*--#[ cov_while_dollar : +* While loop with dollar condition and dollar arithmetic +* runtime $-variables force sequential mode under threads +* probe: clean +* While loop with dollar condition and dollar arithmetic +Symbol a; +CFunction f; +Local out = a; +$n = 0; +While ( $n < 3 ) $n = $n + 1; Endwhile; +If ( $n == 3 ) id a = f(1); Endif; +Print out; +.end +#pend_if threaded? +assert compile_error?('EndWhile statement witho') +*--#] cov_while_dollar : + +*--#[ cov_missing_combo : +* Do/Inside/Argument blocks without their end statements +Symbol x; +CFunction f; +$t = f(x); +Do $i = 1,2; +Inside $t; +Argument f; + id x = x + 1; +.end +#pend_if threaded? +assert runtime_error?('endinside statement(s) missing') +*--#] cov_missing_combo : + +*--#[ cov_deepnest_2 : +* three levels of nested dollar factors +* runtime $-variables force sequential mode under threads +* probe: clean +* three levels of nested dollar factors +Symbol x; +$i = 5; +$j = 2; +$k = 3; +Local test = x; +if ( $i[$j[$k[2]]] > 0 ) id x = 1; +Print test; +.end +#pend_if threaded? +assert compile_error?('Definition out of') +*--#] cov_deepnest_2 : + +*--#[ cov_no_endterm : +* expected: endterm statement(s) missing +* probe: error +* expected: endterm statement(s) missing +Symbol x; +CFunction f; +Local F = f(x)*x; +Term; +id x = 2; +.end +assert runtime_error? +*--#] cov_no_endterm : + +*--#[ cov_asc_fill : +* ascending fills of a 1-index sparse table: right-insertion walk, +* probe: clean +* ascending fills of a 1-index sparse table: right-insertion walk, +* balance propagation with right child (q->blnce++), right rotations +Symbol x,i; +Table t(1,0); +Do i = 1, 40; + Fill t(i) = x^i; +EndDo; +Local test = t(37) + t(12); +Print; +.end +assert compile_error?('do loop parameter') +*--#] cov_asc_fill : + +*--#[ cov_topol_bracket : +* farm probe 0167_topol_bracket_10 (+6 lines) +* probe: clean +Symbol x,y; +CFunction f; +ToPolynomial; +Local t = f(x+1) + f(y); +Bracket x; +Print +s; +.sort +Print; +.end +assert compile_error?('Definition out of') +*--#] cov_topol_bracket : + +*--#[ cov_ifcomp_2 : +* target: if.c NOT/subexpression fast path, OR short-circuit, nested parens +* runtime $-variables force sequential mode under threads +* probe: clean +* target: if.c NOT/subexpression fast path, OR short-circuit, nested parens +Symbol x,y,z; +$a = 1; +Local t = 3*x*y; +If ( ! Occurrence(z) ) Multiply 2; EndIf; +If ( $a > 0 || Coefficient(y) > 2 ) Multiply 3; EndIf; +If ( ( Count(x,1,0) || Count(y,1,0) ) && Occurrence(x) ) Multiply 5; EndIf; +Print; +.end +#pend_if threaded? +assert compile_error?('Definition out of') +*--#] cov_ifcomp_2 : + +*--#[ cov_r07_findloop : +* findloop if-condition (if.c Lus via TYPEFINDLOOP) +* findloop if-condition (if.c Lus via TYPEFINDLOOP) +Functions f(symmetric), g(symmetric); +Symbols x,y,z; +Local F = f(x,y,z,x); +If ( findloop(f, arguments=3, loopsize=2) ) id F = g(x,y,z); +Print F; +.end +assert compile_error?('Expression not allowed') +*--#] cov_r07_findloop : + +*--#[ cov_doloop2 : +* clean runtime Do loop over a $-variable with a $-expression in the body +Symbol y; +CFunction f; +Local q = 1; +Do $i = 1,3; + $a = $i*y; + multiply f($a); +EndDo; +Print q; +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("q") =~ expr("f(y)*f(2*y)*f(3*y)") +*--#] cov_doloop2 : + +*--#[ cov_fac_unfac : +* ToPolynomial then print - exercises factorized print machinery from +* probe: clean +* ToPolynomial then print - exercises factorized print machinery from +* the other side of the conversion +Symbol x; +Factorize test; +Local test = (x-1)^2*(x+1)^2; +ToPolynomial test; +Print; +.end +assert compile_error?('Definition out of') +*--#] cov_fac_unfac : + +*--#[ cov_multibracket_b : +* alternative MultiBracket syntax attempt +* probe: clean +* alternative MultiBracket syntax attempt +Symbols x,y; +CFunction f; +Local t = f(x,y); +MultiBracket; +Bracket x,y; +Print; +.sort +.end +assert compile_error?('Illegal Multiple Brack') +*--#] cov_multibracket_b : + +*--#[ cov_seteq_syntax_8 : +* farm probe 0066_seteq_syntax_15 (+10 lines) +* probe: clean +Set sortsize = 200; +Set scratchsize = 200; +Symbol a1,a2,a3; +Local F = (a1+a2+a3)^5; +Local G = 1; +.sort +.copy F to G; +.sort +Print G; +.end +assert preprocess_error?('Unrecognized module term') +*--#] cov_seteq_syntax_8 : + +*--#[ cov_id_all_illopt : +* expected: Illegal ALL option in id-statement +* probe: error +* expected: Illegal ALL option in id-statement +Symbol x,y; +Local e = x*y; +id,all(foo),x*y = 1; +.end +assert compile_error?('Illegal ALL option') +*--#] cov_id_all_illopt : + +*--#[ cov_topol_onlyfunc_2 : +* farm probe 0167_topol_onlyfunc_1 (+6 lines) +* probe: clean +Symbol x; +CFunction f,g,h; +ToPolynomial onlyfunctions f,g; +Local t = f(x) + g(x) + h(x); +Print; +.end +assert compile_error?('Definition out of') +*--#] cov_topol_onlyfunc_2 : + +*--#[ cov_dotail_pipe_12 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_12 : + +*--#[ cov_if_elseif : +* if/elseif/else chain; each of the three branches fires in one module +Symbol x,y,z; +Local u = x; +if ( count(x,1) ); + multiply 2; +elseif ( count(y,1) ); + multiply 3; +else; + multiply 5; +endif; +Print u; +.sort +Local v = y; +if ( count(x,1) ); + multiply 2; +elseif ( count(y,1) ); + multiply 3; +else; + multiply 5; +endif; +Print v; +.sort +Local w = z; +if ( count(x,1) ); + multiply 2; +elseif ( count(y,1) ); + multiply 3; +else; + multiply 5; +endif; +Print w; +.end +assert succeeded? +assert result("w") =~ expr("5*z") +*--#] cov_if_elseif : + +*--#[ cov_merge_shuffle : +* farm probe 0052_merge_shuffle_45 (+5 lines) +* probe: clean +Symbol x, y, z; +CFunction f; +Local F = f(x,y,z); +Merge f (1,2); +Print; +.end +assert compile_error?('f(1,2) has not') +*--#] cov_merge_shuffle : + +*--#[ cov_dollarsetnoparen : +* expected: @Improper use of special keyword in $( ) option +* probe: error +* expected: @Improper use of special keyword in $( ) option +Symbol x; +Local F = x; +#if $(x set_ {a,b} x) + id x = 1; +#endif +Print; +.end +assert preprocess_error?('Improper bracketting') +*--#] cov_dollarsetnoparen : + +*--#[ cov_setindex_invalidtoken3 : +* a set index on the RHS outside a wildcard context +Set s: 1,2; +Symbol x; +Local e = s[x]; +Print; +.end +assert compile_error?('Set index in RHS is not a wildcard symbol') +*--#] cov_setindex_invalidtoken3 : + +*--#[ cov_permute_undefdol : +* expected: Undefined variable $ +* probe: error +* expected: Undefined variable $ +CFunction f; +Transform f permute($qq,1,2); +.end +assert compile_error?('Undefined variable $') +*--#] cov_permute_undefdol : + +*--#[ cov_set_badval : +* expected: Illegal value for set element +* probe: error +* expected: Illegal value for set element +Set s: 999999999; +.end +assert compile_error?('Illegal value for') +*--#] cov_set_badval : + +*--#[ cov_nsuse_7 : +* guess at #use directive to expose namespace names outside +* probe: clean +* guess at #use directive to expose namespace names outside +#namespace nsuse +#define w 4 +#endnamespace +#use nsuse +#message `w' +#end +.end +assert preprocess_error?('Illegal string for') +*--#] cov_nsuse_7 : + +*--#[ cov_powset_6 : +* farm probe 0025_powset_15 (+5 lines) +* probe: clean +Symbol x,a,b,n; +Set s: a,b; +CFunction f,g; +Local t = f(x^a) + f(x^b) + f(x^3); +id f(x^n?s) = g(x^n); +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(x^3) + f((x)^(a)) + f((x)^(b))") +*--#] cov_powset_6 : + +*--#[ cov_bigexp_9 : +* large expansion inside Substitute; attempts workspace check path 654-658 +* probe: clean +* large expansion inside Substitute; attempts workspace check path 654-658 +Symbol x,y; +CFunction f; +Local test = f(x); +id f(x?) = (y+1)^50000; +.end +assert runtime_error? +*--#] cov_bigexp_9 : + +*--#[ cov_0017_ns_fn_2 : +* farm probe 0127_0017_ns_fn_42 (+39 lines) +* probe: clean +#namespace wrk +Symbol x,y; +CFunction f,g; +Local test = f(x,y); +id f(x?,y?) = g(y,x); +Print; +#endnamespace +.end +assert succeeded? +assert result("test") =~ expr("g(y,x)") +*--#] cov_0017_ns_fn_2 : + +*--#[ cov_trace_n_g6g7 : +* farm probe 0157_trace_n_g6g7_53 (+18 lines) +* probe: clean +Vector p1,p2,p3,p4; +Local F = g_(1,6,p1,p2,p3,p4)*g_(1,7,p1,p2,p3,p4); +tracen,1; +Print; +.end +assert succeeded? +assert result("F") =~ expr("- 8*p1(6)*p1(7)*p2.p2*p3.p3*p4.p4 + 16*p1(6)*p1(7)*p2.p2*p3.p4^2 - 32* p1(6)*p1(7)*p2.p3*p2.p4*p3.p4 + 16*p1(6)*p1(7)*p2.p3^2*p4.p4 + 16*p1(6)* p1(7)*p2.p4^2*p3.p3 + 8*p1(6)*p2(7)*p1.p2*p3.p3*p4.p4 - 16*p1(6)*p2(7)* p1.p2*p3.p4^2 - 16*p1(6)*p2(7)*p1.p3*p2.p3*p4.p4 + 16*p1(6)*p2(7)*p1.p3* p2.p4*p3.p4 + 16*p1(6)*p2(7)*p1.p4*p2.p3*p3.p4 - 16*p1(6)*p2(7)*p1.p4* p2.p4*p3.p3 + 16*p1(6)*p3(7)*p1.p2*p2.p4*p3.p4 + 8*p1(6)*p3(7)*p1.p3* p2.p2*p4.p4 - 16*p1(6)*p3(7)*p1.p3*p2.p4^2 - 16*p1(6)*p3(7)*p1.p4*p2.p2* p3.p4 + 16*p1(6)*p3(7)*p1.p4*p2.p3*p2.p4 - 16*p1(6)*p4(7)*p1.p2*p2.p3* p3.p4 + 16*p1(6)*p4(7)*p1.p3*p2.p3*p2.p4 + 8*p1(6)*p4(7)*p1.p4*p2.p2* p3.p3 - 16*p1(6)*p4(7)*p1.p4*p2.p3^2 + 8*p1(7)*p2(6)*p1.p2*p3.p3*p4.p4 - 16*p1(7)*p2(6)*p1.p2*p3.p4^2 - 16*p1(7)*p2(6)*p1.p3*p2.p3*p4.p4 + 16* p1(7)*p2(6)*p1.p3*p2.p4*p3.p4 + 16*p1(7)*p2(6)*p1.p4*p2.p3*p3.p4 - 16* p1(7)*p2(6)*p1.p4*p2.p4*p3.p3 + 16*p1(7)*p3(6)*p1.p2*p2.p4*p3.p4 + 8* p1(7)*p3(6)*p1.p3*p2.p2*p4.p4 - 16*p1(7)*p3(6)*p1.p3*p2.p4^2 - 16*p1(7)* p3(6)*p1.p4*p2.p2*p3.p4 + 16*p1(7)*p3(6)*p1.p4*p2.p3*p2.p4 - 16*p1(7)* p4(6)*p1.p2*p2.p3*p3.p4 + 16*p1(7)*p4(6)*p1.p3*p2.p3*p2.p4 + 8*p1(7)* p4(6)*p1.p4*p2.p2*p3.p3 - 16*p1(7)*p4(6)*p1.p4*p2.p3^2 - 8*p2(6)*p2(7)* p1.p1*p3.p3*p4.p4 + 16*p2(6)*p2(7)*p1.p1*p3.p4^2 - 32*p2(6)*p2(7)*p1.p3* p1.p4*p3.p4 + 16*p2(6)*p2(7)*p1.p3^2*p4.p4 + 16*p2(6)*p2(7)*p1.p4^2* p3.p3 + 8*p2(6)*p3(7)*p1.p1*p2.p3*p4.p4 - 16*p2(6)*p3(7)*p1.p1*p2.p4* p3.p4 - 16*p2(6)*p3(7)*p1.p2*p1.p3*p4.p4 + 16*p2(6)*p3(7)*p1.p2*p1.p4* p3.p4 + 16*p2(6)*p3(7)*p1.p3*p1.p4*p2.p4 - 16*p2(6)*p3(7)*p1.p4^2*p2.p3 + 8*p2(6)*p4(7)*p1.p1*p2.p4*p3.p3 + 16*p2(6)*p4(7)*p1.p2*p1.p3*p3.p4 - 16*p2(6)*p4(7)*p1.p2*p1.p4*p3.p3 + 16*p2(6)*p4(7)*p1.p3*p1.p4*p2.p3 - 16 *p2(6)*p4(7)*p1.p3^2*p2.p4 + 8*p2(7)*p3(6)*p1.p1*p2.p3*p4.p4 - 16*p2(7)* p3(6)*p1.p1*p2.p4*p3.p4 - 16*p2(7)*p3(6)*p1.p2*p1.p3*p4.p4 + 16*p2(7)* p3(6)*p1.p2*p1.p4*p3.p4 + 16*p2(7)*p3(6)*p1.p3*p1.p4*p2.p4 - 16*p2(7)* p3(6)*p1.p4^2*p2.p3 + 8*p2(7)*p4(6)*p1.p1*p2.p4*p3.p3 + 16*p2(7)*p4(6)* p1.p2*p1.p3*p3.p4 - 16*p2(7)*p4(6)*p1.p2*p1.p4*p3.p3 + 16*p2(7)*p4(6)* p1.p3*p1.p4*p2.p3 - 16*p2(7)*p4(6)*p1.p3^2*p2.p4 - 8*p3(6)*p3(7)*p1.p1* p2.p2*p4.p4 + 16*p3(6)*p3(7)*p1.p1*p2.p4^2 - 32*p3(6)*p3(7)*p1.p2*p1.p4* p2.p4 + 16*p3(6)*p3(7)*p1.p2^2*p4.p4 + 16*p3(6)*p3(7)*p1.p4^2*p2.p2 + 8* p3(6)*p4(7)*p1.p1*p2.p2*p3.p4 - 16*p3(6)*p4(7)*p1.p1*p2.p3*p2.p4 + 16* p3(6)*p4(7)*p1.p2*p1.p3*p2.p4 + 16*p3(6)*p4(7)*p1.p2*p1.p4*p2.p3 - 16* p3(6)*p4(7)*p1.p2^2*p3.p4 - 16*p3(6)*p4(7)*p1.p3*p1.p4*p2.p2 + 8*p3(7)* p4(6)*p1.p1*p2.p2*p3.p4 - 16*p3(7)*p4(6)*p1.p1*p2.p3*p2.p4 + 16*p3(7)* p4(6)*p1.p2*p1.p3*p2.p4 + 16*p3(7)*p4(6)*p1.p2*p1.p4*p2.p3 - 16*p3(7)* p4(6)*p1.p2^2*p3.p4 - 16*p3(7)*p4(6)*p1.p3*p1.p4*p2.p2 - 8*p4(6)*p4(7)* p1.p1*p2.p2*p3.p3 + 16*p4(6)*p4(7)*p1.p1*p2.p3^2 - 32*p4(6)*p4(7)*p1.p2* p1.p3*p2.p3 + 16*p4(6)*p4(7)*p1.p2^2*p3.p3 + 16*p4(6)*p4(7)*p1.p3^2* p2.p2") +*--#] cov_trace_n_g6g7 : + +*--#[ cov_tib_keep : +* Keep Brackets keeps the bracket contents; termsinbracket_ counts +* the kept brackets +Symbol x; +Local F = (1+x)^2; +Bracket x; +.sort +Keep Brackets; +Local G = termsinbracket_; +Print G; +.end +assert succeeded? +assert result("G") =~ expr("1") +*--#] cov_tib_keep : + +*--#[ cov_arg_vector : +* farm probe 0226_arg_vector_42 (+6 lines) +* probe: clean +Vector p,q; +Function f; +Local test = f(p); +Argument f; + id p = p + q; +EndArgument; +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(p + q)") +*--#] cov_arg_vector : + +*--#[ cov_dfortcont : +* target: sch.c overflow refill in doublefortran mode +* probe: clean +* target: sch.c overflow refill in doublefortran mode +Symbol a,b,c,d,e; +Format Doublefortran; +Local t = (a+b+c+d+e)^20; +Print; +.end +assert succeeded? +*--#] cov_dfortcont : + +*--#[ cov_prfinddiv_clean_3 : +* farm probe 0176_prfinddiv_clean_27 (+21 lines) +* probe: clean +Symbol x; +CFunction rat,den; +PolyRatFun rat,den(finddivergence,x); +Local test = rat(x,1); +Print; +.end +assert succeeded? +assert result("test") =~ expr("rat(x,1)") +*--#] cov_prfinddiv_clean_3 : + +*--#[ cov_bigidx_do : +* expected: $-variable is not a short number in do loop +* runtime $-variables force sequential mode under threads +* probe: error +* expected: $-variable is not a short number in do loop +Symbol x; +Local test = x; +$b = 12345678901234567890; +.sort +#do i = $b,10 +id x = 1; +#enddo +Print test; +.end +#pend_if threaded? +assert preprocess_error?('$b does not') +*--#] cov_bigidx_do : + +*--#[ cov_conv_g2l_skipdrop : +* farm probe 0087_conv_g2l_skipdrop_45 (+9 lines) +* probe: clean +Symbol x; +Global a = x; +Global b = x; +.sort +Skip a; +Drop b; +.sort +Local a,b,c = 3*x; +Print; +.sort +.end +assert compile_error?('Illegal LHS for') +*--#] cov_conv_g2l_skipdrop : + +*--#[ cov_ifc_wildargs : +* farm probe 0055_ifc_wildargs_81 (+5 lines) +* probe: clean +Symbol x,y,z; +CFunction f; +Local test = f(x,y); +If ( Match(f(?a)) ) $b = ?a; +If ( $b == f(x,y) ) Multiply 2; +If ( $b == f(x,y,z) ) Multiply 3; +If ( $b == f(x,x) ) Multiply 5; +If ( $b == 0 ) Multiply 7; +Print; +.end +assert compile_error?('Illegal character at') +*--#] cov_ifc_wildargs : + +*--#[ cov_gamma6_7_contraction : +* Contract gamma6/gamma7 with odd nnum, hitting sign flip path +* probe: clean +* Contract gamma6/gamma7 with odd nnum, hitting sign flip path +Symbol x,y; +AutoDeclare Vector v; +Index mu; +Local F = g6_(mu)*g7_(mu); +Contract; +Print; +.end +assert succeeded? +assert result("F") =~ expr("0") +*--#] cov_gamma6_7_contraction : + +*--#[ cov_pat_eps_w : +* farm probe 0199_pat_eps_w_65 (+5 lines) +* probe: clean +Symbols n; +Vectors p1,p2,p3; +Local test = e_(n,p1,p2,p3)*e_(p2,n,p1,p3); +id e_(?a)*e_(?a) = 1; +Print; +.end +assert compile_error?('Illegal object in') +*--#] cov_pat_eps_w : + +*--#[ cov_modrat_invnoexist : +* expected: Denominator and modulus are not relative prime +* probe: error +* expected: Denominator and modulus are not relative prime +Symbol x; +Modulus 8589934582; +Local test = x/2; +Print; +.end +assert runtime_error? +*--#] cov_modrat_invnoexist : + +*--#[ cov_invalid_set_arg : +* expected: @Improper use of special keyword in $( ) option +* probe: error +* expected: @Improper use of special keyword in $( ) option +Symbol x; +#if $(x = set_({x} junk)) +Local F = 1; +#endif +.end +assert preprocess_error?('Argument of set_') +*--#] cov_invalid_set_arg : + +*--#[ cov_multibracket_b_2 : +* alternative MultiBracket syntax attempt +* probe: clean +* alternative MultiBracket syntax attempt +Symbols x,y; +CFunction f; +Local t = f(x,y); +MultiBracket; +Bracket x,y; +Print; +.sort +.end +assert compile_error?('Illegal Multiple Brack') +*--#] cov_multibracket_b_2 : + +*--#[ cov_seteq_syntax_9 : +* farm probe 0066_seteq_syntax_15 (+10 lines) +* probe: clean +Set sortsize = 200; +Set scratchsize = 200; +Symbol a1,a2,a3; +Local F = (a1+a2+a3)^5; +Local G = 1; +.sort +.copy F to G; +.sort +Print G; +.end +assert preprocess_error?('Unrecognized module term') +*--#] cov_seteq_syntax_9 : + +*--#[ cov_dotail_pipe_13 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_13 : + +*--#[ cov_012_name_string_particle : +* farm probe 0170_012_name_string_particle_71 (+6 lines) +* probe: clean +Particle e1 = "e", -2, 1; +Particle eb1 = "eb", 2, 1; +Particle v1 = "v", 3, 0; +Couple c1 = {e1,eb1,v1}, order = 1; +Vertex vt1 = {e1,eb1,v1}, {c1}; +Model mtest, byname; +Local test = 1; +Print; +.end +assert compile_error?('No open mode') +*--#] cov_012_name_string_particle : + +*--#[ cov_trace_n_nocontract : +* farm probe 0157_trace_n_nocontract_52 (+6 lines) +* probe: clean +Vector p1,p2,p3,p4,p5,p6; +Local F = g_(1,p1,p2,p3,p4,p5,p6); +tracen,nocontract,j; +Print; +.end +assert compile_error?('nocontract,j has n') +*--#] cov_trace_n_nocontract : + +*--#[ cov_improper_special : +* expected: @Improper operator for special keyword in $( ) option +* probe: error +* expected: @Improper operator for special keyword in $( ) option +Symbol x; +Set v: x; +#if $(x > set_(v)) +Local F = 1; +#endif +.end +assert preprocess_error?('Improper operator fo') +*--#] cov_improper_special : + +*--#[ cov_nsuse_8 : +* guess at #use directive to expose namespace names outside +* probe: clean +* guess at #use directive to expose namespace names outside +#namespace nsuse +#define w 4 +#endnamespace +#use nsuse +#message `w' +#end +.end +assert preprocess_error?('Illegal string for') +*--#] cov_nsuse_8 : + +*--#[ cov_powset_7 : +* farm probe 0025_powset_15 (+5 lines) +* probe: clean +Symbol x,a,b,n; +Set s: a,b; +CFunction f,g; +Local t = f(x^a) + f(x^b) + f(x^3); +id f(x^n?s) = g(x^n); +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(x^3) + f((x)^(a)) + f((x)^(b))") +*--#] cov_powset_7 : + +*--#[ cov_epstrace : +* farm probe 0006_epstrace_81 (+15 lines) +* probe: clean +AutoDeclare Vector p; +Local test = e_(p1,p2,p3,p4)*g_(1,p1,p2,p3,p4)*g_(1,p1,p2,p3,p4); +trace4,1; +Print; +.end +assert succeeded? +assert result("test") =~ expr("4*e_(p1,p2,p3,p4)*p1.p1*p2.p2*p3.p3*p4.p4 - 8*e_(p1,p2,p3,p4)*p1.p1* p2.p2*p3.p4^2 + 16*e_(p1,p2,p3,p4)*p1.p1*p2.p3*p2.p4*p3.p4 - 8*e_(p1,p2, p3,p4)*p1.p1*p2.p3^2*p4.p4 - 8*e_(p1,p2,p3,p4)*p1.p1*p2.p4^2*p3.p3 + 16* e_(p1,p2,p3,p4)*p1.p2*p1.p3*p2.p3*p4.p4 - 32*e_(p1,p2,p3,p4)*p1.p2*p1.p3 *p2.p4*p3.p4 + 16*e_(p1,p2,p3,p4)*p1.p2*p1.p4*p2.p4*p3.p3 - 8*e_(p1,p2, p3,p4)*p1.p2^2*p3.p3*p4.p4 + 16*e_(p1,p2,p3,p4)*p1.p2^2*p3.p4^2 + 16*e_( p1,p2,p3,p4)*p1.p3*p1.p4*p2.p2*p3.p4 - 32*e_(p1,p2,p3,p4)*p1.p3*p1.p4* p2.p3*p2.p4 - 8*e_(p1,p2,p3,p4)*p1.p3^2*p2.p2*p4.p4 + 16*e_(p1,p2,p3,p4) *p1.p3^2*p2.p4^2 - 8*e_(p1,p2,p3,p4)*p1.p4^2*p2.p2*p3.p3 + 16*e_(p1,p2, p3,p4)*p1.p4^2*p2.p3^2") +*--#] cov_epstrace : + +*--#[ cov_bigtrace : +* farm probe 0006_bigtrace_82 (+17 lines) +* probe: clean +AutoDeclare Vector p; +Local test = g_(1,p1,p2,p1,p2,p3,p4,p3,p4,p1,p2); +trace4,1; +Print; +.end +assert succeeded? +assert result("test") =~ expr("12*p1.p1*p1.p2*p2.p2*p3.p3*p4.p4 - 24*p1.p1*p1.p2*p2.p2*p3.p4^2 + 8* p1.p1*p1.p3*p2.p2*p2.p4*p3.p4 - 8*p1.p1*p1.p4*p2.p2*p2.p3*p3.p4 - 32* p1.p2^2*p1.p3*p2.p4*p3.p4 + 32*p1.p2^2*p1.p4*p2.p3*p3.p4 - 16*p1.p2^3* p3.p3*p4.p4 + 32*p1.p2^3*p3.p4^2") +*--#] cov_bigtrace : + +*--#[ cov_mkint_big : +* farm probe 0008_mkint_big_63 (+5 lines) +* probe: clean +CFunction f,g; +Local test = f(1/1000000000000000000000)*g(1/999999999999999999997); +MakeInteger f,g; +Print; +.end +assert succeeded? +assert result("test") =~ expr("1/999999999999999999997000000000000000000000*f(1)*g(1)") +*--#] cov_mkint_big : + +*--#[ cov_bigexp_10 : +* large expansion inside Substitute; attempts workspace check path 654-658 +* probe: clean +* large expansion inside Substitute; attempts workspace check path 654-658 +Symbol x,y; +CFunction f; +Local test = f(x); +id f(x?) = (y+1)^50000; +.end +assert runtime_error? +*--#] cov_bigexp_10 : + +*--#[ cov_g5g7 : +* farm probe 0006_g5g7_71 (+7 lines) +* probe: clean +AutoDeclare Vector p; +Local test = g5_(1,p1,p2)*g7_(1,p3,p4); +trace4,1; +Print; +.end +assert succeeded? +assert result("test") =~ expr("- 4*p1.p2*p3.p4 + 4*p1.p3*p2.p4 - 4*p1.p4*p2.p3 + 4*e_(p1,p2,p3,p4)") +*--#] cov_g5g7 : + +*--#[ cov_g6g6 : +* farm probe 0006_g6g6_72 (+8 lines) +* probe: clean +AutoDeclare Vector p; +Local test = g6_(1,p1,p2)*g6_(1,p3,p4); +trace4,1; +Print; +.end +assert succeeded? +assert result("test") =~ expr("8*p1.p2*p3.p4 - 8*p1.p3*p2.p4 + 8*p1.p4*p2.p3 + 8*e_(p1,p2,p3,p4)") +*--#] cov_g6g6 : + +*--#[ cov_0017_ns_fn_3 : +* farm probe 0127_0017_ns_fn_42 (+39 lines) +* probe: clean +#namespace wrk +Symbol x,y; +CFunction f,g; +Local test = f(x,y); +id f(x?,y?) = g(y,x); +Print; +#endnamespace +.end +assert succeeded? +assert result("test") =~ expr("g(y,x)") +*--#] cov_0017_ns_fn_3 : + +*--#[ cov_brmixed : +* farm probe 0053_brmixed_94 (+12 lines) +* probe: clean +Symbol x,y,z; +Vector p,q,r; +Index i1,i2; +CFunction f,g; +Set v: p,q; +Set s: x,y; +Set F: f; +Local t = f(x)*p.q*r(i1)*g(z)*x; +Bracket s,v,F; +Print; +.end +assert succeeded? +assert result("t") =~ expr("+ f(x)*p.q*x * ( g(z)*r(i1) )") +*--#] cov_brmixed : + +*--#[ cov_dolfact_count : +* farm probe 0052_dolfact_count_66 (+8 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol x; +CFunction f; +Local test = f(1,2,3); +$x = f(1,2,3); +Print; +.sort +If ( $x[0] == 1 ) Print "nf"; +Print; +.end +#pend_if threaded? +assert runtime_error? +*--#] cov_dolfact_count : + +*--#[ cov_sub_loopcounter_index : +* farm probe 0023_sub_loopcounter_index_81 (+9 lines) +* probe: clean +Symbol x; +Index i; +Local F = sum_(i,1,10,x^i); +Print; +.end +assert succeeded? +assert result("F") =~ expr("x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^10") +*--#] cov_sub_loopcounter_index : + +*--#[ cov_abs_num : +* farm probe 0003_abs_num_88 (+8 lines) +* probe: clean +Local test = abs_(-2/3); +Print; +.end +assert succeeded? +assert result("test") =~ expr("2/3") +*--#] cov_abs_num : + +*--#[ cov_select_tempset : +* farm probe 0054_select_tempset_60 (+8 lines) +* probe: clean +Symbol x,y; +Local t = x; +id, select, {x,y}, x = y; +Print; +.end +assert succeeded? +assert result("t") =~ expr("y") +*--#] cov_select_tempset : + +*--#[ cov_brfuncnc : +* farm probe 0053_brfuncnc_87 (+8 lines) +* probe: clean +Symbol x,y,z; +Function f,g,h; +Set F: f,g; +Local t = f(x)*g(y)*h(z); +Bracket F; +Print; +.end +assert succeeded? +assert result("t") =~ expr("+ f(x)*g(y) * ( h(z) )") +*--#] cov_brfuncnc : + +*--#[ cov_20b4_tablerange : +* an out-of-range table element read stays unevaluated (no diagnostic) +Symbol i; +Table t(1:3); +Local test = t(7); +Print; +.end +assert succeeded? +assert result("test") =~ expr("t(7)") +*--#] cov_20b4_tablerange : + +*--#[ cov_prfinddiv_clean_4 : +* farm probe 0176_prfinddiv_clean_27 (+21 lines) +* probe: clean +Symbol x; +CFunction rat,den; +PolyRatFun rat,den(finddivergence,x); +Local test = rat(x,1); +Print; +.end +assert succeeded? +assert result("test") =~ expr("rat(x,1)") +*--#] cov_prfinddiv_clean_4 : + +*--#[ cov_hide_copy : +* copy from a hidden (file based) expression into a memory expression +* probe: clean +* copy from a hidden (file based) expression into a memory expression +#:scratchsize 1000 +Symbol x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24; +Local a = (x1+x2)^2*(x3+x4)^2*(x5+x6)^2*(x7+x8)^2*(x9+x10)^2*(x11+x12)^2*(x13+x14)^2*(x15+x16)^2*(x17+x18)^2*(x19+x20)^2*(x21+x22)^2*(x23+x24)^2; +Local b = 0; +.sort +.hide a; +.copy a b; +.sort +Print; +.end +assert preprocess_error?('Unrecognized module termina') +*--#] cov_hide_copy : + +*--#[ cov_setup_basic : +* trigger WriteSetup via the 'setup' on/off setup parameter +* probe: clean +* trigger WriteSetup via the 'setup' on/off setup parameter +On setup; +Symbol x; +Local test = x^2+1; +Print test; +.end +assert succeeded? +assert result("test") =~ expr("1 + x^2") +*--#] cov_setup_basic : + +*--#[ cov_illegal_param_type : +* an expression used with arguments on the RHS is replaced by its +* (parameterless) value; the arguments are ignored +Symbol x,y; +Local F = x; +Local G = F(1); +Print; +.end +assert succeeded? +assert result("F") =~ expr("x") +assert result("G") =~ expr("x") +*--#] cov_illegal_param_type : + +*--#[ cov_09ad0cf7_ns_use : +* alternative syntax guess for the usename mechanism +* probe: clean +* alternative syntax guess for the usename mechanism +#namespace ns +#use x +Symbol x; +Local test = x; +Print; +#endnamespace +.end +assert succeeded? +assert result("test") =~ expr("x") +*--#] cov_09ad0cf7_ns_use : + +*--#[ cov_all_norm : +* farm probe 0054_all_norm_65 (+6 lines) +* probe: clean +Symbol x,y; +Local t = x*y; +id, all(normalize), x = y; +Print; +.end +#pend_if threaded? +assert runtime_error? +*--#] cov_all_norm : + +*--#[ cov_dealloc_sparse_1neg : +* alternative sparse syntax hedge: Table s(1,-5) +* probe: clean +* alternative sparse syntax hedge: Table s(1,-5) +Symbol x; +Table s(1,-5); +Fill s(3) = x; +Local F = s(3); +Print F; +DeallocateTable s; +Print F; +.end +assert compile_error?('s( should be') +*--#] cov_dealloc_sparse_1neg : + +*--#[ cov_rat_gambit_ratiostmt : +* farm probe 0128_rat_gambit_ratiostmt_85 (+7 lines) +* probe: clean +Symbol x,y; +Local t1 = (x+1)/(x^2+1); +Ratio t1; +Print t1; +.end +assert compile_error?('t1 is not') +*--#] cov_rat_gambit_ratiostmt : + +*--#[ cov_redefine_args : +* farm probe 0182_redefine_args_59 (+15 lines) +* probe: clean +#define ff(a,b) "a+b" +Symbol x; +Local g = ff(2,3)*x; +Redefine ff(a , b ) = "a-b"; +Local h = ff(2,3)*x; +Print; +.end +assert compile_error?('Undeclared variable ff') +*--#] cov_redefine_args : + +*--#[ cov_multibracket_b_3 : +* alternative MultiBracket syntax attempt +* probe: clean +* alternative MultiBracket syntax attempt +Symbols x,y; +CFunction f; +Local t = f(x,y); +MultiBracket; +Bracket x,y; +Print; +.sort +.end +assert compile_error?('Illegal Multiple Brack') +*--#] cov_multibracket_b_3 : + +*--#[ cov_seteq_syntax_10 : +* farm probe 0066_seteq_syntax_15 (+10 lines) +* probe: clean +Set sortsize = 200; +Set scratchsize = 200; +Symbol a1,a2,a3; +Local F = (a1+a2+a3)^5; +Local G = 1; +.sort +.copy F to G; +.sort +Print G; +.end +assert preprocess_error?('Unrecognized module term') +*--#] cov_seteq_syntax_10 : + +*--#[ cov_dotail_pipe_14 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_14 : + +*--#[ cov_setidx_cvector_type : +* farm probe 0081_setidx_cvector_type_59 (+12 lines) +* probe: clean +Symbol n; +Vector v; +CFunction f; +Set s: v; +Local F = f(s[n]); +Print; +.end +assert compile_error?('Set index in') +*--#] cov_setidx_cvector_type : + +*--#[ cov_setidx_paren_scan : +* farm probe 0081_setidx_paren_scan_56 (+7 lines) +* probe: clean +Symbol x,n; +CFunction f; +Set v: x; +Local F = f(v[n]+v[n]); +Print; +.end +assert compile_error?('Set index in') +*--#] cov_setidx_paren_scan : + +*--#[ cov_setidx_rbrace_scan : +* farm probe 0081_setidx_rbrace_scan_55 (+5 lines) +* probe: clean +Symbol x,n; +CFunction f; +Set v: x; +Local F = f(v[n],v[n]); +Print; +.end +assert compile_error?('Set index in') +*--#] cov_setidx_rbrace_scan : + +*--#[ cov_clear_dict : +* farm probe 0175_clear_dict_63 (+25 lines) +* probe: clean +#OpenDictionary dc +#define y 5 +#CloseDictionary +Local test = y; +Print; +.clear +.end +assert preprocess_error?('Illegal string for') +*--#] cov_clear_dict : + +*--#[ cov_setup_incdir_comma : +* set incdir via #appendpath so the incdir branch of WriteSetup is hit +* probe: clean +* set incdir via #appendpath so the incdir branch of WriteSetup is hit +#appendpath "incdir",/tmp; +On setup; +Symbol x; +Local test = x; +Print; +.end +assert preprocess_error?('Improper syntax fo') +*--#] cov_setup_incdir_comma : + +*--#[ cov_powset_8 : +* farm probe 0025_powset_15 (+5 lines) +* probe: clean +Symbol x,a,b,n; +Set s: a,b; +CFunction f,g; +Local t = f(x^a) + f(x^b) + f(x^3); +id f(x^n?s) = g(x^n); +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(x^3) + f((x)^(a)) + f((x)^(b))") +*--#] cov_powset_8 : + +*--#[ cov_neg_minvector : +* farm probe 0015_neg_minvector_92 (+7 lines) +* probe: clean +Symbol x; +Vector v; +CFunction f; +Local expr = f(v(1), v(2)); +id f(v?(1), v?(2)) = v(1) + v(2); +Print; +.end +assert succeeded? +assert result("expr") =~ expr("v(1) + v(2)") +*--#] cov_neg_minvector : + +*--#[ cov_factdollar_comma : +* farm probe 0128_factdollar_comma_92 (+6 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol a,b,x; +Local e = x; +$x = a*b; +FactDollar,$x; +If ( $x[0] > 0 ) id x = 1; +Print; +.end +#pend_if threaded? || mpi? +assert succeeded? +assert result("e") =~ expr("1") +*--#] cov_factdollar_comma : + +*--#[ cov_failargs : +* farm probe 0080_failargs_72 (+16 lines) +* probe: clean +Symbol x,y; +Function f; +Local test = f(x^2,x+y,12345678901234*x,x/2); +Transform f implode(1,last); +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(x^2,y + x,12345678901234*x,1/2*x)") +*--#] cov_failargs : + +*--#[ cov_makerat_sub : +* farm probe 0175_makerat_sub_75 (+7 lines) +* probe: clean +Symbol x,y; +Local test = MakeRational_((x+y)*(x-y), x+y) + MakeRational_(x^2-1, x-1); +Print; +.end +assert succeeded? +assert result("test") =~ expr("0/0 + makerational_( - y^2 + x^2,y + x)") +*--#] cov_makerat_sub : + +*--#[ cov_0017_ns_fn_4 : +* farm probe 0127_0017_ns_fn_42 (+39 lines) +* probe: clean +#namespace wrk +Symbol x,y; +CFunction f,g; +Local test = f(x,y); +id f(x?,y?) = g(y,x); +Print; +#endnamespace +.end +assert succeeded? +assert result("test") =~ expr("g(y,x)") +*--#] cov_0017_ns_fn_4 : + +*--#[ cov_range2 : +* farm probe 0080_range2_70 (+14 lines) +* probe: clean +Symbol x,y; +Function f; +Local test = f(x,y,2,3*x,-4*y); +Transform f implode(2,last); +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(x,y,2,3*x, - 4*y)") +*--#] cov_range2 : + +*--#[ cov_zeroargs : +* farm probe 0080_zeroargs_69 (+8 lines) +* probe: clean +Symbol x; +Function f; +Local test = f(0,x,0,0,3*x,1); +Transform f implode(1,last); +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(2*x,5*x,1)") +*--#] cov_zeroargs : + +*--#[ cov_dot_swappow : +* farm probe 0040_dot_swappow_109 (+7 lines) +* probe: clean +Vector p,q; +Symbol n; +Local t = p.q^3; +id q.p?^n? = 1; +Print; +.end +assert succeeded? +assert result("t") =~ expr("1") +*--#] cov_dot_swappow : + +*--#[ cov_trace4_dim2_repeat2 : +* trace4, 2-dim, repeated indices at specific distance +* probe: clean +* trace4, 2-dim, repeated indices at specific distance +Symbol a1,a2,a3; +Vectors p1,p2; +Dimension 2; +Index i1,i2; +CFunction g; +Local F = g_(1,i1,i2,i1,i2); +trace4,1; +Print; +.end +assert succeeded? +assert result("F") =~ expr("0") +*--#] cov_trace4_dim2_repeat2 : + +*--#[ cov_factdollar_numfactor : +* farm probe 0128_factdollar_numfactor_94 (+5 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol a,x; +Local e = x; +$x = 3*a; +FactDollar $x; +If ( $x[1] == 3 ) id x = 1; +Print; +.end +#pend_if threaded? || mpi? +assert runtime_error? +*--#] cov_factdollar_numfactor : + +*--#[ cov_prfinddiv_clean_5 : +* farm probe 0176_prfinddiv_clean_27 (+21 lines) +* probe: clean +Symbol x; +CFunction rat,den; +PolyRatFun rat,den(finddivergence,x); +Local test = rat(x,1); +Print; +.end +assert succeeded? +assert result("test") =~ expr("rat(x,1)") +*--#] cov_prfinddiv_clean_5 : + +*--#[ cov_09ad0cf7_ns_use_2 : +* alternative syntax guess for the usename mechanism +* probe: clean +* alternative syntax guess for the usename mechanism +#namespace ns +#use x +Symbol x; +Local test = x; +Print; +#endnamespace +.end +assert succeeded? +assert result("test") =~ expr("x") +*--#] cov_09ad0cf7_ns_use_2 : + +*--#[ cov_sym_dline : +* farm probe 0090_sym_dline_104 (+6 lines) +* probe: clean +Symbol n; +Index i1,i2; +Local test = d_(1,1)*d_(2,2); +id d_(i1?,i1?) = n; +Print; +.end +assert compile_error?('Coefficient in LHS') +*--#] cov_sym_dline : + +*--#[ cov_multibracket_b_4 : +* alternative MultiBracket syntax attempt +* probe: clean +* alternative MultiBracket syntax attempt +Symbols x,y; +CFunction f; +Local t = f(x,y); +MultiBracket; +Bracket x,y; +Print; +.sort +.end +assert compile_error?('Illegal Multiple Brack') +*--#] cov_multibracket_b_4 : + +*--#[ cov_seteq_syntax_11 : +* farm probe 0066_seteq_syntax_15 (+10 lines) +* probe: clean +Set sortsize = 200; +Set scratchsize = 200; +Symbol a1,a2,a3; +Local F = (a1+a2+a3)^5; +Local G = 1; +.sort +.copy F to G; +.sort +Print G; +.end +assert preprocess_error?('Unrecognized module term') +*--#] cov_seteq_syntax_11 : + +*--#[ cov_dotail_pipe_15 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_15 : + +*--#[ cov_powset_9 : +* farm probe 0025_powset_15 (+5 lines) +* probe: clean +Symbol x,a,b,n; +Set s: a,b; +CFunction f,g; +Local t = f(x^a) + f(x^b) + f(x^3); +id f(x^n?s) = g(x^n); +Print; +.end +assert succeeded? +assert result("t") =~ expr("f(x^3) + f((x)^(a)) + f((x)^(b))") +*--#] cov_powset_9 : + +*--#[ cov_gcd_fun_pow : +* farm probe 0175_gcd_fun_pow_82 (+5 lines) +* probe: clean +CFunction f; +Symbol x,y; +Local test = gcd_(f(x)^2*y,f(x)*y); +Print; +.end +assert succeeded? +assert result("test") =~ expr("f(x)*y") +*--#] cov_gcd_fun_pow : + +*--#[ cov_makerat_sub_2 : +* farm probe 0175_makerat_sub_75 (+7 lines) +* probe: clean +Symbol x,y; +Local test = MakeRational_((x+y)*(x-y), x+y) + MakeRational_(x^2-1, x-1); +Print; +.end +assert succeeded? +assert result("test") =~ expr("0/0 + makerational_( - y^2 + x^2,y + x)") +*--#] cov_makerat_sub_2 : + +*--#[ cov_0017_ns_fn_5 : +* farm probe 0127_0017_ns_fn_42 (+39 lines) +* probe: clean +#namespace wrk +Symbol x,y; +CFunction f,g; +Local test = f(x,y); +id f(x?,y?) = g(y,x); +Print; +#endnamespace +.end +assert succeeded? +assert result("test") =~ expr("g(y,x)") +*--#] cov_0017_ns_fn_5 : + +*--#[ cov_function_wildcard : +* farm probe 0027_function_wildcard_93 (+5 lines) +* probe: clean +CFunction f,g; +Local F = f(g); +id f(g?) = 1; +Print; +.end +assert succeeded? +assert result("F") =~ expr("1") +*--#] cov_function_wildcard : + +*--#[ cov_longsub2 : +* farm probe 0024_longsub2_87 (+6 lines) +* probe: clean +Symbol x; +CFunction f; +Local a = (1+x)^1500; +.sort +Local test = f((a)); +Print; +.end +assert runtime_error? +*--#] cov_longsub2 : + +*--#[ cov_idall_nomatch : +* id,all where pattern never matches +* probe: clean +* id,all where pattern never matches +Symbol x; +CFunction f,g; +Local t = g(1)*g(2); +id, all f(x?) = g(x); +Print; +.end +assert succeeded? +assert result("t") =~ expr("g(1)*g(2)") +*--#] cov_idall_nomatch : + +*--#[ cov_trace4a : +* farm probe 0056_trace4a_85 (+5 lines) +* probe: clean +Index i,j,k,l; +Local t = g_(1,i,j)*g_(2,j,k)*g_(3,k,l)*g_(4,l,i); +Trace4,1; +Print; +.end +assert succeeded? +assert result("t") =~ expr("4*g_(2,j,k)*g_(3,k,l)*g_(4,l,j)") +*--#] cov_trace4a : + +*--#[ cov_w_after : +* farm probe 26_w_after_8 (+18 lines) +* probe: clean +Symbol x,y; +#:Optimize +#:sort +Local test = (x+y)^2; +#:endOptimize +#write "done: %e",test; +Print test; +.end +assert preprocess_error?('#:Optimize') +*--#] cov_w_after : + +*--#[ cov_wmulti_a : +* expected: Trying to convert a $ with an argument field into an expression +* probe: error +* expected: Trying to convert a $ with an argument field into an expression +Symbol x,y; +CFunction ff; +Local e = ff(x,y); +id ff(?a$w) = $w; +Print; +.end +#pend_if mpi? +assert runtime_error? +*--#] cov_wmulti_a : + +*--#[ cov_prfinddiv_clean_6 : +* farm probe 0176_prfinddiv_clean_27 (+21 lines) +* probe: clean +Symbol x; +CFunction rat,den; +PolyRatFun rat,den(finddivergence,x); +Local test = rat(x,1); +Print; +.end +assert succeeded? +assert result("test") =~ expr("rat(x,1)") +*--#] cov_prfinddiv_clean_6 : + +*--#[ cov_vec_set1 : +* target: execute.c PutBracket VECTOR branch with vector set (bset), 1501-1516 +* probe: clean +* target: execute.c PutBracket VECTOR branch with vector set (bset), 1501-1516 +Symbol i; +Vector p,q,r; +Set vs: q,r; +Local test = p(1)*q(2)*r(3); +Bracket p,vs; +.sort +Print; +.end +assert succeeded? +assert result("test") =~ expr("p(1)*q(2)*r(3)") +*--#] cov_vec_set1 : + +*--#[ cov_dot_set1 : +* target: execute.c PutBracket DOTPRODUCT with bset walk, 1582-1592 +* probe: clean +* target: execute.c PutBracket DOTPRODUCT with bset walk, 1582-1592 +Vector p,q,r; +Set vs: r; +Local test = p.q*p.r; +Bracket q,vs; +.sort +Print; +.end +assert succeeded? +assert result("test") =~ expr("p.q*p.r") +*--#] cov_dot_set1 : + +*--#[ cov_rngdollar : +* expected: Illegal $ value in range while executing transform statement +* runtime $-variables force sequential mode under threads +* probe: error +* expected: Illegal $ value in range while executing transform statement +Symbol x; +CFunction f; +Local test = f(x,x,x); +$n = x; +Transform f,addargs(1,$n); +Print; +.end +#pend_if threaded? || mpi? +assert runtime_error? +*--#] cov_rngdollar : + +*--#[ cov_dodonum3 : +* expected: does not evaluate into a valid loop parameter +* runtime $-variables force sequential mode under threads +* probe: error +* expected: does not evaluate into a valid loop parameter +Symbol x; +Local tmp = x; +$d = x; +.sort +#do i = 1,2,$d +#enddo +Print tmp; +.end +#pend_if threaded? +assert preprocess_error?('$d does not') +*--#] cov_dodonum3 : + +*--#[ cov_permute_dollar : +* expected: Illegal type of $-variable in RunPermute +* runtime $-variables force sequential mode under threads +* probe: error +* expected: Illegal type of $-variable in RunPermute +Symbol x,y; +Function f; +Local test = f(1,2,3); +$a = x+y; +Transform f,permute($a); +Print; +.end +#pend_if threaded? || mpi? +assert runtime_error? +*--#] cov_permute_dollar : + +*--#[ cov_09ad0cf7_ns_use_3 : +* alternative syntax guess for the usename mechanism +* probe: clean +* alternative syntax guess for the usename mechanism +#namespace ns +#use x +Symbol x; +Local test = x; +Print; +#endnamespace +.end +assert succeeded? +assert result("test") =~ expr("x") +*--#] cov_09ad0cf7_ns_use_3 : + +*--#[ cov_endsort_verbose : +* farm probe 0061_endsort_verbose_108 (+10 lines) +* probe: clean +On sortverbose; +Symbol x; +Local F = x^1000; +.sort +.end +assert succeeded? +*--#] cov_endsort_verbose : + +*--#[ cov_range_last_dollar : +* farm probe 0109_range_last_dollar_92 (+11 lines) +* runtime $-variables force sequential mode under threads +* probe: clean +Symbol x; +CFunction f; +$n = 3; +Local expr = f(1,1,1); +Transform f dedup(last-$n,last); +Print; +.end +#pend_if threaded? +assert compile_error?('Definition out of') +*--#] cov_range_last_dollar : + +*--#[ cov_if_occ_set : +* expected: Illegal variable s in occurs condition in if statement +* probe: error +* expected: Illegal variable s in occurs condition in if statement +Symbol x; +Set s: x; +Local t = x; +if ( occurs(s) ) id t = 1; endif; +.end +assert compile_error?('Illegal variable s)') +*--#] cov_if_occ_set : + +*--#[ cov_seteq_syntax_12 : +* farm probe 0066_seteq_syntax_15 (+10 lines) +* probe: clean +Set sortsize = 200; +Set scratchsize = 200; +Symbol a1,a2,a3; +Local F = (a1+a2+a3)^5; +Local G = 1; +.sort +.copy F to G; +.sort +Print G; +.end +assert preprocess_error?('Unrecognized module term') +*--#] cov_seteq_syntax_12 : + +*--#[ cov_range_last_fixed_big : +* expected: Fixed range indicator bigger than +* probe: error +* expected: Fixed range indicator bigger than +Symbol x; +CFunction f; +Local expr = f(1,1,1); +Transform f dedup(last-999999999999,last); +Print; +.end +assert compile_error?('Fixed range indi') +*--#] cov_range_last_fixed_big : + +*--#[ cov_wrfac_big : +* #write %$ on an unfactorized dollar variable; error at preprocessor stage +* runtime $-variables force sequential mode under threads +* probe: error +* expected: $a has not been factorized +Symbol x; +Local e = x^2; +$a = e; +#write "%$" $a[999999999] +.end +#pend_if threaded? || mpi? +assert preprocess_error?('$a has not been factorized') +*--#] cov_wrfac_big : + +*--#[ cov_dotail_pipe_16 : +* DoTail -pipe option; child hits initPresetExternalChannels error path +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system cd $TESTFILEDIR && echo .end > $TESTTMPDIR/cvf4.frm; $FORM -pipe $TESTTMPDIR/cvf4.frm < /dev/null; true +Symbol ok; +Local ok = 1; +Print; +.end +assert compile_error?('name of expression') +*--#] cov_dotail_pipe_16 : + +*--#[ cov_tovec_symfirst : +* expected: ToVector statement needs a vector and a tensor +* probe: error +* expected: ToVector statement needs a vector and a tensor +Symbol x; +CFunction f; +Local test = f(x); +ToVector, x, f; +Print; +.end +assert compile_error?('x is not') +*--#] cov_tovec_symfirst : + +*--#[ cov_idold_all : +* expected: Requested ALL option not allowed in idold/also statement +* probe: error +* expected: Requested ALL option not allowed in idold/also statement +Symbol x,y; +Local a = x + y; +idold,all:2,x = y; +Print a; +.end +assert compile_error?('Requested ALL option') +*--#] cov_idold_all : + +*--#[ cov_flag_badexpr : +* expected: should be the name of an expression +* probe: error +* expected: should be the name of an expression +Symbol x; +Local expr = 1; +#if ( flag(1,x) ) +#endif +.end +assert preprocess_error?('x should be') +*--#] cov_flag_badexpr : + +*--#[ cov_inex_comma : +* expected: Illegal object in InExpression statement +* probe: error +* expected: Illegal object in InExpression statement +Symbol x; +Local e1 = x; +InExpression e1,5: +id x = 1; +EndInExpression; +Print; +.end +assert compile_error?('Illegal object in') +*--#] cov_inex_comma : + +*--#[ cov_compress_gzip : +* expected: Unknown gzip option +* probe: error +* expected: Unknown gzip option +Symbol x; +Local t = x; +Compress gzip,x; +.end +assert compile_error?('Declaration out of') +*--#] cov_compress_gzip : + +*--#[ cov_argclose : +* expected: Illegal use of arguments for expression +* probe: error +* expected: Illegal use of arguments for expression +Symbol x; +Local b = x; +Local e(b+1) = x; +.end +assert compile_error?('Illegal expression paramete') +*--#] cov_argclose : + +*--#[ cov_denom_sym : +* expected: Denominators statement needs one regular function for its argument +* probe: error +* expected: Denominators statement needs one regular function for its argument +Symbol x; +Local t = x; +Denominators x; +.end +assert compile_error?('Denominators statement nee') +*--#] cov_denom_sym : + +*--#[ cov_spect_clean : +* farm probe 0109_spect_clean_112 (+6 lines) +* probe: clean +CreateSpectator spc,"spc.tmp"; +EmptySpectator spc; +RemoveSpectator spc; +Print; +.end +assert succeeded? +*--#] cov_spect_clean : + +*--#[ cov_ext_eof : +* target: cc == EOF branch, tools.c:214-215 (ENDOFSTREAM from external channel) +* probe: error +* target: cc == EOF branch, tools.c:214-215 (ENDOFSTREAM from external channel) +* command exits immediately: channel is at EOF when we read +#external true +#fromexternal +Print; +.end +assert succeeded? +*--#] cov_ext_eof : + +*--#[ cov_mixedelem : +* expected: is not a function or tensor +* probe: error +* expected: is not a function or tensor +Symbol x; +CFunction g; +Set A1: x,g; +CommuteInSet{A1},{A1}; +Print; +.end +assert compile_error?('g has not') +*--#] cov_mixedelem : + +*--#[ cov_off_checkpoint : +* farm probe 0044_off_checkpoint_138 (+5 lines) +* probe: clean +* Off checkpoint; a 'We are considering' deprecation warning is printed +* only when FORM_IGNORE_DEPRECATION is unset, so only success is asserted +Off checkpoint; +.end +assert succeeded? || warning?('We are considering') +*--#] cov_off_checkpoint : + +*--#[ cov_totensor_notvec : +* expected: is not a vector or a tensor +* probe: error +* expected: is not a vector or a tensor +Symbol x; +CFunction f; +ToTensor f,x; +.end +assert compile_error?('f is not') +*--#] cov_totensor_notvec : + +*--#[ cov_chisholm_lastarg : +* Chisholm with a non-index last argument +Function f; +Chisholm 5x; +.end +assert compile_error?('Last argument of Chisholm should be an index') +*--#] cov_chisholm_lastarg : + +*--#[ cov_onflag_badnum : +* expected: Proper syntax is: On/Off Flag,number[s]; +* probe: error +* expected: Proper syntax is: On/Off Flag,number[s]; +Symbol x; +On Flag,x; +Print; +.end +assert compile_error?('Proper syntax is:') +*--#] cov_onflag_badnum : + +*--#[ cov_on_chk_opt2 : +* expected: Unrecognized option in ON Checkpoint statement +* probe: error +* expected: Unrecognized option in ON Checkpoint statement +On Checkpoint 5m, zzz; +.end +assert compile_error?('Unrecognized option in') +*--#] cov_on_chk_opt2 : + +*--#[ cov_breakdo_levels : +* expected: Too many loop levels +* probe: error +* expected: Too many loop levels +#do i = 1,1 +#breakdo 3 +#enddo +.end +assert preprocess_error?('Too many loop') +*--#] cov_breakdo_levels : + +*--#[ cov_ns_long : +* three namespaces with long names: fullname grows past buffer size +* probe: clean +* three namespaces with long names: fullname grows past buffer size +#namespace aaLongName0000000000000000000000000000000000000000 +#define dummy1 1 +#namespace bbLongName0000000000000000000000000000000000000000 +#define dummy2 1 +#namespace ccLongName0000000000000000000000000000000000000000 +#define vv 1 +#namespace +#use ccLongName0000000000000000000000000000000000000000 +Local t = vv; +Print; +.end +assert preprocess_error?('Illegal string for') +*--#] cov_ns_long : + +*--#[ cov_procext_badquoted : +* expected: should be a string starting with an alphabetic character +* probe: error +* expected: should be a string starting with an alphabetic character +#procedureextension "9abc" +.end +assert preprocess_error?('Procedure extensio') +*--#] cov_procext_badquoted : + +*--#[ cov_endswitch_case_outside : +* expected: #endswitch +* probe: error +* expected: #endswitch +#case 1 +#endswitch +.end +assert preprocess_error?('Case without corr') +*--#] cov_endswitch_case_outside : + +*--#[ cov_procext_many : +* expected: Too many parameters in ProcedureExtension instruction +* probe: error +* expected: Too many parameters in ProcedureExtension instruction +#procedureextension abc def +.end +assert preprocess_error?('Too many parameters') +*--#] cov_procext_many : + +*--#[ cov_multibracket_b_5 : +* alternative MultiBracket syntax attempt +* probe: clean +* alternative MultiBracket syntax attempt +Symbols x,y; +CFunction f; +Local t = f(x,y); +MultiBracket; +Bracket x,y; +Print; +.sort +.end +assert compile_error?('Illegal Multiple Brack') +*--#] cov_multibracket_b_5 : + +*---[ Census round S5: folds from scored probes (census deck + covfix batch) ]--- + +*--#[ cov_bernpair : +* bernoulli_: large one-argument form, two-argument signed form, symbol argument +Symbol x; +Local a = bernoulli_(10); +Local b = bernoulli_(1,-1); +Local c = bernoulli_(2,1); +Local d = bernoulli_(x); +Print; +.end +assert succeeded? +assert result("a") =~ expr("1/47900160") +assert result("b") =~ expr("-1/2") +assert result("c") =~ expr("1/12") +assert result("d") =~ expr("bernoulli_(x)") +*--#] cov_bernpair : + +*--#[ cov_gammapatsubset : +* gamma_ pattern matching only a subset of the arguments +Vector p,q,r; +Function h; +Local test = g_(1,p,q,r); +id g_(1,p?) = h(p); +Print; +.end +assert succeeded? +assert result("test") =~ expr("h(p)*h(q)*h(r)") +*--#] cov_gammapatsubset : + +*--#[ cov_tabledealloc : +* sparse table filled via FillExpression, then freed by DeallocateTable +Symbol x,y; +Table sparse t(2); +Local e = (x*y)*(1+x+y); +Bracket x,y; +.sort +FillExpression t = e(x,y); +Local f = t(1,1)+t(1,2)+t(2,1); +Print f; +.sort +DeallocateTable t; +.end +assert succeeded? +assert result("f") =~ expr("3") +*--#] cov_tabledealloc : + +*--#[ cov_factoroptchar : +* illegal option character in a Factorize statement +Symbol x; +Local test = x^2; +Factorize(zero+); +.end +assert compile_error?('Illegal character in option') +*--#] cov_factoroptchar : + +*--#[ cov_ncfunterm : +* commuting and noncommuting functions mixed in one term +Symbol x,y,z; +CFunction f; +NFunction g; +Local expr = f(x,y) + g(z,x) + f(y,x); +id f(x,y) = f(x,z); +id g(z,x) = g(x,y); +Print; +.end +assert succeeded? +assert result("expr") =~ expr("f(x,z) + f(y,x) + g(x,y)") +*--#] cov_ncfunterm : + +*--#[ cov_isdefined : +* isdefined() in #if with a defined and an undefined preprocessor variable +#define pv 7 +#if isdefined(pv) == 1 +#message pv is defined +#endif +#if isdefined(zzqnovar) == 0 +#message zzqnovar is not defined +#endif +.end +assert preprocess_error?('Illegal string for') +*--#] cov_isdefined : + +*--#[ cov_isfactorizedillegal : +* illegal object in isfactorized() runtime condition +Symbol x; +Local F = x; +if ( isfactorized(123) ) F = 1; +.end +assert compile_error?('Illegal object in IsFactorized') +*--#] cov_isfactorizedillegal : + +*--#[ cov_longstr : +* very long string constant in a #write instruction +#write "abcdefghijklmnopqrstuvwxyz0123456789ABCDabcdefghijklmnopqrstuvwxyz0123456789ABCDabcdefghijklmnopqrstuvwxyz0123456789ABCDabcdefghijklmnopqrstuvwxyz0123456789ABCDabcdefghijklmnopqrstuvwxyz0123456789ABCDabcdefghijklmnopqrstuvwxyz0123456789ABCDabcdefghijklmnopqrstuvwxyz0123456789ABCDabcdefghijklmnopqrstuvwxyz0123456789ABCDabcdefghijklmnopqrstuvwxyz0123456789ABCDabcdefghijklmnopqrstuvwxyz0123456789ABCD" +.end +assert succeeded? +*--#] cov_longstr : + +*--#[ cov_modalsofun : +* Modulus alsofunctions: modulus applied to function arguments +CFunction f; +Modulus alsofunctions,5; +Local test = f(8)+2; +Print; +.end +assert succeeded? +assert result("test") =~ expr("2 + f(3)") +*--#] cov_modalsofun : + +*--#[ cov_modminus : +* illegal (non-positive) value in a Modulus statement +Modulus -x; +.end +assert compile_error?('Invalid value for modulus') +*--#] cov_modminus : + +*--#[ cov_nslongname : +* namespace and preprocessor variable names long enough to overflow the fullname buffer +#namespace aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +#define vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 1 +#endnamespace +Local t = 1; +Print; +.end +assert preprocess_error?('Illegal string for') +*--#] cov_nslongname : + +*--#[ cov_repfunantisym : +* replacing antisymmetric functions with reversed argument patterns +Functions f(antisymmetric), g; +Symbol x,y,z,w; +Local test = f(2,1)*f(4,3); +id f?(x?,y?)*f?(z?,w?) = g(x,y,z,w); +Print; +.end +assert succeeded? +assert result("test") =~ expr("g(2,1,4,3)") +*--#] cov_repfunantisym : + +*--#[ cov_tfseterr : +* set of non-function objects in a Transform statement +Set myset: x,y; +Symbol x,y; +Local F = f(1,2); +Transform myset f; +Print; +.end +assert compile_error?('should be a set of functions') +*--#] cov_tfseterr : + +*--#[ cov_setskipagain : +* set declaration plus an id pattern whose second template starts at a fixed argument +Symbol a,b,c; +CFunction f; +Set s1: a,b; +Local expr = f(a,c,a); +id f(a?, c, a?) = 1; +Print; +.end +assert succeeded? +assert result("expr") =~ expr("1") +*--#] cov_setskipagain : + +*--#[ cov_unfactorall : +* bare UnFactorize statement without arguments: loops over all expressions +Symbol x,y; +Local test = x^2*y + y^3; +UnFactorize; +Print; +.end +assert succeeded? +assert result("test") =~ expr("y^3 + x^2*y") +*--#] cov_unfactorall : + +*--#[ cov_wmissquote : +* unterminated string in a #write instruction at end of program +#write "%s" "abc +.end +#pend_if mpi? +assert warning?('end instruction generated') +*--#] cov_wmissquote : + +*--#[ cov_factargdeltavec : +* FactArg on terms with a delta and a vector index in every argument +Symbol x,y; +Vector v; +Index i,j,k; +CFunction f; +Local F = f(d_(i,j)*v(k)*x + d_(i,j)*v(k)*y); +FactArg f; +Print; +.end +assert succeeded? +assert result("F") =~ expr("f(y + x,v(k),d_(i,j))") +*--#] cov_factargdeltavec : + +*--#[ cov_setmemberidx : +* IsSetMember via preprocessor $( ): index fixed sets +Vector v; +Index i,j; +#if $( i == set_(index_) ) +Local A = 1; +#endif +#if $( i == set_(fixed_) ) +Local B = 1; +#endif +#if $( i == set_(dummyindices_) ) +Local C = 1; +#endif +#if $( v(i) == set_(vector_) ) +Local D = 1; +#endif +Print; +.end +assert succeeded? +assert result("A") =~ expr("1") +*--#] cov_setmemberidx : + +*--#[ cov_setmembernum : +* IsSetMember via preprocessor $( ): integer fixed sets +#if $( 5 == set_(pos_) ) +Local A = 1; +#endif +#if $( -5 == set_(neg_) ) +Local B = 1; +#endif +#if $( 0 == set_(pos0_) ) +Local C = 1; +#endif +#if $( -2 == set_(neg0_) ) +Local D = 1; +#endif +#if $( 4 == set_(even_) ) +Local E = 1; +#endif +#if $( 3 == set_(odd_) ) +Local F = 1; +#endif +#if $( 7 == set_(int_) ) +Local G = 1; +#endif +#if $( 3/2 == set_(number_) ) +Local H = 1; +#endif +Print; +.end +assert succeeded? +assert result("A") =~ expr("1") +assert result("H") =~ expr("1") +*--#] cov_setmembernum : + +*--#[ cov_symbolssetwild : +* symbol wildcard replacement with a declared symbol set present +Symbol x,y,z; +Set S: x; +Local F = x*y + z*y; +id y? = 1; +Print; +.end +assert succeeded? +assert result("F") =~ expr("z + y") +*--#] cov_symbolssetwild : + +*---[ L0 rescore round: folds from discarded kit/census probe corpora, rescoring vs 78.6% baseline (NEWMIN=2) ]--- + +*--#[ cov_pg_modeldecl_5 : +* farm probe 0143_pg_modeldecl_5 (+4 lines, L0 rescore census) +* probe: error +* attempt: grcc-style Model/Particle/Vertex block before ProcessGraph +Model qed; +Particle e; +Vertex e,e,e; +EndModel; +ProcessGraph dag = $d; +Print $d; +.end +#pend_if threaded? +assert runtime_error?('A vertex statement') +*--#] cov_pg_modeldecl_5 : + +*--#[ cov_pf_factarg_denbig_4 : +* farm probe 0166_pf_factarg_denbig_4 (+4 lines, L0 rescore census) +* probe: clean +Symbol x; +CFunction f; +Local F = f(x/(10^100+1)); +FactArg f; +Print; +.end +assert succeeded? +*--#] cov_pf_factarg_denbig_4 : + +*--#[ cov_e893_cfun_6 : +* farm probe 0070_e893_cfun_6 (+3 lines, L0 rescore census) +* probe: clean +* C output with nested functions and brackets +Format C; +Symbol x,y,z; +CFunction f,g; +Local test = g(f(x+y+z)^2,(x-y)^3)*(z+1)^4; +.sort +Print; +.end +assert succeeded? +*--#] cov_e893_cfun_6 : + +*--#[ cov_multi_funw_gamma_12 : +* farm probe 0156_multi_funw_gamma_12 (+3 lines, L0 rescore census) +* probe: clean +Vector p; +Symbol n,m; +Function h; +Local test = g_(1)*g_(2)*g_(1,p); +Multi f?(n?) = h(n); +Print; +.end +assert runtime_error?('Undeclared va') +*--#] cov_multi_funw_gamma_12 : + +*--#[ cov_tensor_tsetcode_gamma2_37 : +* farm probe 0022_tensor_tsetcode_gamma2_37 (+2 lines, L0 rescore census) +* probe: clean +Symbol x,y,z; +Vector v; +Index i; +CFunction g_; +Set s: i; +Local expr = g_(s(5_,5_),s(5_,5_)); +Print; +.end +assert runtime_error?('Illegally formed function/tensor name') +*--#] cov_tensor_tsetcode_gamma2_37 : + +*--#[ cov_wnodollar_5 : +* a #write %5x instruction without a following $-variable is accepted +#write "%5x" +.end +assert succeeded? +*--#] cov_wnodollar_5 : + +*--#[ cov_autoindex_dubious_7 : +* farm probe 0065_autoindex_dubious_7 (+2 lines, L0 rescore census) +* probe: clean +AutoDeclare Index i; +Index j; +Local expr = i + j; +id i = j; +Print; +.end +assert succeeded? +*--#] cov_autoindex_dubious_7 : + +*--#[ cov_err_sep_13 : +* farm probe 0076_err_sep_13 (+2 lines, L0 rescore census) +* probe: error +* expected: Illegal separator in FillExpression statement +Symbol a; +Table t(1); +Local x = a; +.sort +FillExpression t = x(a+a); +.end +assert runtime_error?('Illegal separator in F') +*--#] cov_err_sep_13 : + +*--#[ cov_parfact_multivar_16 : +* farm probe 0172_parfact_multivar_16 (+2 lines, L0 rescore census) +* probe: clean +* target: tostring multi-factor loop with several symbols, parallel send path +On parallel; +Symbol x,y,z; +Local f = (2*x-y+3*z)*(x^2-y^2)*(x+y)^2; +Factorize f; +Print; +.sort +Local g = (2*x-y+3*z)*(x^2-y^2)*(x+y)^2*(z+1)*(z-1); +Factorize g; +Print; +.end +assert succeeded? +*--#] cov_parfact_multivar_16 : + +*--#[ cov_badchar1_3 : +* farm probe 0176_badchar1_3 (+2 lines, L0 rescore census) +* probe: error +* expected: Illegal character in range specification +Symbol a; +CFunction f; +Local test = f(1,2,3); +Print; +Transform f dedup(@,2); +.end +assert runtime_error?('Illegal character in r') +*--#] cov_badchar1_3 : + +*--#[ cov_badchar2_8 : +* farm probe 0176_badchar2_8 (+2 lines, L0 rescore census) +* probe: error +* expected: Illegal character in range specification +Symbol a; +CFunction f; +Local test = f(1,2,3); +Print; +Transform f dedup(1,%); +.end +assert runtime_error?('Illegal character in r') +*--#] cov_badchar2_8 : + +*--#[ cov_first2_0 : +* farm probe 0176_first2_0 (+2 lines, L0 rescore census) +* probe: clean +Symbol a,b; +CFunction f,g; +Local test = f(1,2,3,f(4,5)); +Transform f dedup(1,first); +Print; +.end +assert succeeded? +*--#] cov_first2_0 : + +*--#[ cov_modppogen_6 : +* farm probe 0199_modppogen_6 (+2 lines, L0 rescore census) +* probe: error +* expected: Bad syntax in argument of PrintPowersOf(number) in Modulus statement +Modulus printpowersof(x) 5; +.end +assert runtime_error?('Bad syntax in argumen') +*--#] cov_modppogen_6 : + +*--#[ cov_badspecname2_3 : +* farm probe 0209_badspecname2_3 (+2 lines, L0 rescore census) +* probe: error +* expected: Illegal name for spectator expression +* variant: name ending in underscore (q[-1]=='_' at line 490) +CopySpectator,newexp = sp_; +.end +assert runtime_error?('Illegal name for s') +*--#] cov_badspecname2_3 : + +*--#[ cov_09ad0cf7_ns_use_82 : +* farm probe 0102_09ad0cf7_ns_use_82 (+55 lines, L0 rescore kit) +* probe: clean +* alternative syntax guess for the usename mechanism +#namespace ns +#use x +Symbol x; +Local test = x; +Print; +#endnamespace +.end +assert succeeded? +*--#] cov_09ad0cf7_ns_use_82 : + +*--#[ cov_div_ok_39 : +* farm probe 0176_div_ok_39 (+19 lines, L0 rescore kit) +* probe: clean +* divergence option accepted: compcomm.c 5493-5517 +Symbol x,z; +CFunction f; +PolyRatFun f(divergence,z); +Local test = f(x,1); +Print; +.end +assert succeeded? +*--#] cov_div_ok_39 : + +*--#[ cov_dotail_pipe_3_2 : +* farm probe 0029_dotail_pipe_3 (+16 lines, L0 rescore kit) +* probe: clean +* DoTail -pipe option; child hits initPresetExternalChannels error path +* expected child message fragment: Error initializing preset external channels +#system V=$(readlink /proc/$PPID/exe 2>/dev/null); case "$V" in *form*) ;; *) V=vorm;; esac; T=$TESTTMPDIR/cvf4.frm; echo .end > $T; $V -pipe $T < /dev/null; rm -f $T; true +Symbol ok; +Local ok = 1; +Print; +.end +#pend_if threaded? +assert runtime_error?('name of expression is also') +*--#] cov_dotail_pipe_3_2 : + +*--#[ cov_conflict_select_63 : +* farm probe 0054_conflict_select_63 (+9 lines, L0 rescore kit) +* probe: error +* expected: Conflicting options in id-statement +Set ss: x; +Symbol x,y; +Local t = x; +id, all(1), select, ss, x = y; +.end +assert runtime_error?('x has not been declar') +*--#] cov_conflict_select_63 : + +*--#[ cov_takearg_index_2_2 : +* farm probe 0015_takearg_index_2 (+7 lines, L0 rescore kit) +* probe: clean +* target: TakeArgContent INDEX branch, argument.c:2863-2903 +Symbol x,y; +Index i,j; +Function f; +Local test = f(x*i + y*i); +FactArg f; +Print +s; +.end +assert runtime_error? +*--#] cov_takearg_index_2_2 : + +*--#[ cov_multibracket_b_64 : +* farm probe 0102_multibracket_b_64 (+7 lines, L0 rescore kit) +* probe: clean +* alternative MultiBracket syntax attempt +Symbols x,y; +CFunction f; +Local t = f(x,y); +MultiBracket; +Bracket x,y; +Print; +.sort +.end +assert runtime_error?('Illegal Multiple Brack') +*--#] cov_multibracket_b_64 : + +*--#[ cov_if_funcbare_112 : +* farm probe 0006_if_funcbare_112 (+6 lines, L0 rescore kit) +* probe: error +* expected: f is not a properly declared variable +CFunction f; +Symbol x; +Local t = f(x); +if ( f ) id t = 1; endif; +.end +assert runtime_error?('Unrecognized word: f') +*--#] cov_if_funcbare_112 : + +*--#[ cov_0042_abs_symbol_73 : +* farm probe 0004_0042_abs_symbol_73 (+4 lines, L0 rescore kit) +* probe: clean +* abs_ of plain symbol: not root of unity -> absnogood (normal.c 1398-1402, 1434) +Symbol x; +Local test = abs_(x); +Print; +.end +assert succeeded? +*--#] cov_0042_abs_symbol_73 : + +*--#[ cov_max_zeroafter_neg_29 : +* farm probe 0006_max_zeroafter_neg_29 (+4 lines, L0 rescore kit) +* probe: clean +* targets normal.c 1903 (loadnew2 negative) and 1937-1938 (simple zero replaces negative max) +Symbol x; +Local test = max_(-5,0); +Print; +.end +assert succeeded? +*--#] cov_max_zeroafter_neg_29 : + +*--#[ cov_sum_undecl_145 : +* farm probe 0011_sum_undecl_145 (+4 lines, L0 rescore kit) +* probe: error +* expected: is not a legal fixed index +Symbol i; +CFunction f; +Local t = f(i); +Sum q; +Print; +.end +assert runtime_error?('q should have been declar') +*--#] cov_sum_undecl_145 : + +*--#[ cov_argwildmulti_130 : +* farm probe 0012_argwildmulti_130 (+4 lines, L0 rescore kit) +* probe: error +* expected: Wildcarding not allowed in this type of statement +Function f,g; +Symbol x; +Local test = f(g(x),g(x)); +id f:argument(g(x?x_)); +id x = 1; +endargument; +Print; +.end +assert runtime_error?('id-statement without =') +*--#] cov_argwildmulti_130 : + +*--#[ cov_dodonum2_109 : +* farm probe 0023_dodonum2_109 (+4 lines, L0 rescore kit) +* probe: error +* expected: does not evaluate into a valid loop parameter +Symbol x; +Local tmp = x; +$d = x; +.sort +#do i = 1,$d +#enddo +Print tmp; +.end +#pend_if threaded? +assert preprocess_error?('$d does not evaluate into a') +*--#] cov_dodonum2_109 : + +*--#[ cov_exprargs_6 : +* farm probe 0023_exprargs_6 (+4 lines, L0 rescore kit) +* probe: clean +Symbol x,y; +Vector v; +Index i; +Function f; +Local ee(x,y,v,f,i,3) = x*y*f(v(i)); +Print; +.end +assert runtime_error?('Illegal name: \'3)=x*y*f(v(i))\'') +*--#] cov_exprargs_6 : + +*--#[ cov_match_idx_sub_75 : +* farm probe 0029_match_idx_sub_75 (+4 lines, L0 rescore kit) +* probe: clean +* Test: index wildcard substitution +Index i,j; +Local expr = i*j; +id i? = j; +Print; +.end +assert succeeded? +*--#] cov_match_idx_sub_75 : + +*--#[ cov_write_plus_minus_sign_33 : +* farm probe 0033_write_plus_minus_sign_33 (+4 lines, L0 rescore kit) +* probe: clean +#write "%+d", 5 +.end +assert succeeded? +*--#] cov_write_plus_minus_sign_33 : + +*--#[ cov_repcond_neg_141 : +* farm probe 0039_repcond_neg_141 (+4 lines, L0 rescore kit) +* probe: clean +Symbol x,y,n,z; +Local test = x^-4*y^-9; +id x^-n?{<5}*y^-n?{<3} = z; +Print; +.end +assert runtime_error? +*--#] cov_repcond_neg_141 : + +*--#[ cov_tenarg_60 : +* farm probe 0043_tenarg_60 (+4 lines, L0 rescore kit) +* probe: clean +Vector pv,qv,rv; +Local test = d_(pv,qv); +id d_(pv,qv,rv) = 1; +Print; +.end +assert runtime_error?('d_ needs exactly two arguments') +*--#] cov_tenarg_60 : + +*--#[ cov_bigexp_11 : +* farm probe 0046_bigexp_11 (+4 lines, L0 rescore kit) +* probe: clean +* large expansion inside Substitute; attempts workspace check path 654-658 +Symbol x,y; +CFunction f; +Local test = f(x); +id f(x?) = (y+1)^50000; +.end +assert runtime_error? +*--#] cov_bigexp_11 : + +*--#[ cov_argimplode_bad_char_122 : +* farm probe 0048_argimplode_bad_char_122 (+4 lines, L0 rescore kit) +* probe: error +* expected: Illegal character in ArgImplode/ArgExplode statement +Symbol x; +CFunction f; +Local F = f(x); +ArgImplode F from 1; +.end +assert runtime_error?('F has not been d') +*--#] cov_argimplode_bad_char_122 : + +*--#[ cov_putinside_vec_105 : +* farm probe 0050_putinside_vec_105 (+4 lines, L0 rescore kit) +* probe: error +* expected: Not a vector in dotproduct +Symbol x,y; +CFunction f; +Local t = x; +PutInside f,x.y; +Print t; +.end +assert runtime_error?('Illegal use of . after') +*--#] cov_putinside_vec_105 : + +*--#[ cov_open_nest_108 : +* farm probe 0057_open_nest_108 (+4 lines, L0 rescore kit) +* probe: error +* expected: you cannot nest #opendictionary instructions +#opendictionary aa +#opendictionary bb +.end +assert preprocess_error?('you cannot nest') +*--#] cov_open_nest_108 : + +*--#[ cov_expression_badobj_67 : +* farm probe 0061_expression_badobj_67 (+4 lines, L0 rescore kit) +* probe: error +* expected: Illegal object in Expression in if-statement +Symbol x; +if ( expression(3) ) id x = 1; +.end +assert runtime_error?('Illegal object in E') +*--#] cov_expression_badobj_67 : + +*--#[ cov_chainin_num_358 : +* farm probe 0068_chainin_num_358 (+4 lines, L0 rescore kit) +* probe: error +* expected: Dollar variable does not evaluate to function in ChainIn statement +$f = 5; +ChainIn $f,3; +.end +#pend_if threaded? +assert runtime_error?('$f,3 is undefined') +*--#] cov_chainin_num_358 : + +*--#[ cov_vertex_toomany2_122 : +* farm probe 0074_vertex_toomany2_122 (+4 lines, L0 rescore kit) +* probe: error +* expected: MAXCOUPLINGS +Model qcd; +Particle a: spin=1; +Particle b: spin=1; +Vertex a,b: c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,c24,c25; +.end +assert runtime_error?('More than 20 couplin') +*--#] cov_vertex_toomany2_122 : + +*--#[ cov_tbenter_enter3_84 : +* farm probe 0077_tbenter_enter3_84 (+4 lines, L0 rescore kit) +* probe: clean +S x; +TableBase T; +TableBaseIn T, myfile; +CFunction mytable; +Table mytable, sparse; +Local F = mytable(x); +id mytable(x) = x; +Enter T, mytable(x) = x; +Print; +.end +assert runtime_error?('Proper syntax: TableBa') +*--#] cov_tbenter_enter3_84 : + +*--#[ cov_setidx_bad_rhs_52 : +* farm probe 0081_setidx_bad_rhs_52 (+4 lines, L0 rescore kit) +* probe: error +* expected: Improper set argument in RHS +Symbol x,n; +CFunction f; +Set v: x; +Local F = f(v[n+]); +Print; +.end +assert runtime_error?('Improper set argument') +*--#] cov_setidx_bad_rhs_52 : + +*--#[ cov_dictopen_93 : +* farm probe 0085_dictopen_93 (+4 lines, L0 rescore kit) +* probe: error +* expected: Dictionary mydict has not been closed. +#opendictionary mydict +Symbol x; +Local t = x; +.sort +Print t; +.end +assert runtime_error? +*--#] cov_dictopen_93 : + +*--#[ cov_exch_notexpr_92 : +* farm probe 0091_exch_notexpr_92 (+4 lines, L0 rescore kit) +* probe: error +* expected: is not an expression +Symbol x,y; +Local ex1 = x; +#exchange x,y +.end +assert preprocess_error?('x is not an expression') +*--#] cov_exch_notexpr_92 : + +*--#[ cov_encode_big_number_78 : +* farm probe 0093_encode_big_number_78 (+4 lines, L0 rescore kit) +* probe: clean +Symbol x; +CFunction f; +Local expr = f(12345678901234567890,x); +Transform f encode(1,2); +Print; +.end +assert runtime_error?('A range in this typ') +*--#] cov_encode_big_number_78 : + +*--#[ cov_mod_notcoprime_109 : +* modular arithmetic with a modulus coprime to the denominator: +* 1/7 mod 109 is computed via GetModInverses (7*78 = 546 = 1 mod 109) +Modulus 109; +Local t = 1/7; +Print t; +.end +assert succeeded? +assert result("t") =~ expr("78") +*--#] cov_mod_notcoprime_109 : + +*--#[ cov_ns_proc_95 : +* farm probe 0101_ns_proc_95 (+4 lines, L0 rescore kit) +* probe: clean +* speculative: procedure call with arguments under an active namespace +#namespace nsp +#define gv 5 +#namespace +#use nsp +#procedure psub +#message `1' +#endprocedure +#call psub(3) +.end +assert preprocess_error?('Illegal string for preprocess') +*--#] cov_ns_proc_95 : + +*--#[ cov_spect_usedname_103 : +* farm probe 0109_spect_usedname_103 (+4 lines, L0 rescore kit) +* probe: error +* expected: The name e has been used already. +Local e = 1; +CreateSpectator e,"spc.tmp"; +Print; +.end +assert runtime_error?('Declaration out of or') +*--#] cov_spect_usedname_103 : + +*--#[ cov_dq_rbra_9 : +* farm probe 0111_dq_rbra_9 (+4 lines, L0 rescore kit) +* probe: error +#if ( $(1 = 2]) ) +#endif +* expected: Improper brackets in #if +.end +#pend_if threaded? +assert preprocess_error?('Improper brackets in') +*--#] cov_dq_rbra_9 : + +*--#[ cov_dol_index_big_20 : +* farm probe 0117_dol_index_big_20 (+4 lines, L0 rescore kit) +* probe: error +* expected: Attempt to use an nonexisting factor of a $-variable +$x = 3; +$x = 5; +$i = 123456789012345678901234567890; +.sort +Local F = $x[$i]; +Print; +.end +#pend_if threaded? +assert runtime_error? +*--#] cov_dol_index_big_20 : + +*--#[ cov_illegal_factor_type_branch_40 : +* farm probe 0117_illegal_factor_type_branch_40 (+4 lines, L0 rescore kit) +* probe: error +* expected: Illegal type of factor number of a $-variable +Symbol x,y; +CFunction f; +Local F = f(x,y); +$mydollar = F; +id f(x,y) = $mydollar[2*x]; +Print; +.end +#pend_if threaded? +assert runtime_error?('Improper u') +*--#] cov_illegal_factor_type_branch_40 : + +*--#[ cov_rngzero_98 : +* farm probe 0122_rngzero_98 (+4 lines, L0 rescore kit) +* actual message reports the offending range as (2) rather than (0) +* (same error family, value slip in the message; bare runtime_error? +* still passes) +Symbol x; +CFunction f; +Local test = f(x,x,x); +$n = 0; +Transform f,addargs(1,$n); +Print; +.end +#pend_if threaded? || mpi? +assert runtime_error? +*--#] cov_rngzero_98 : + +*--#[ cov_implode_hi_93 : +* farm probe 0123_implode_hi_93 (+4 lines, L0 rescore kit) +* probe: error +* expected: Illegal range encountered in RunImplode +Symbol x; +Function f; +Local test = f(1,2,3); +Transform f,implode(1,2,9); +Print; +.end +assert runtime_error?('A range is two indicators,') +*--#] cov_implode_hi_93 : + +*--#[ cov_ns_deepexpr_21 : +* farm probe 0127_ns_deepexpr_21 (+4 lines, L0 rescore kit) +* probe: clean +* target: ConstructName with namespace names inside function args and powers +#namespace k1 +#namespace k2 +AutoDeclare Symbol s; +CFunction f; +Local t = f(s1^2,s2)*s3; +Print t; +#endnamespace +#endnamespace +.end +assert succeeded? +*--#] cov_ns_deepexpr_21 : + +*--#[ cov_ext_echo_66 : +* farm probe 0141_ext_echo_66 (+4 lines, L0 rescore kit) +* probe: clean +* target: tools.c ReadFromStream EXTERNALCHANNELSTREAM branch (209-227) +* external command output is read back via the external channel stream +#external echo Symbol x; +#fromexternal +Local t = x; +Print; +.end +assert runtime_error?('Illegal name: \'=x\'') +*--#] cov_ext_echo_66 : + +*--#[ cov_fmt_float2_5 : +* farm probe 0147_fmt_float2_5 (+4 lines, L0 rescore kit) +* probe: clean +* Format Float with too-large precision (compcomm.c 345-348) +* and non-numeric specifier after comma (compcomm.c 336-339) +Symbol x; +Local t = x; +Format Float,200; +Format Float,q; +Print; +.end +assert runtime_error?('... float format value cor') +*--#] cov_fmt_float2_5 : + +*--#[ cov_setelement_symbol_neg_23 : +* farm probe 0150_setelement_symbol_neg_23 (+4 lines, L0 rescore kit) +* probe: clean +Symbol a,b; +Set myset: a,b; +Local F = myset[-1]; +Print; +.end +assert runtime_error?('Set index in RH') +*--#] cov_setelement_symbol_neg_23 : + +*--#[ cov_setnum_index_13 : +* farm probe 0150_setnum_index_13 (+4 lines, L0 rescore kit) +* probe: clean +Index i1,...,i20; +Set s: i1,...,i20; +Local F = s[5]; +Print; +.end +assert succeeded? +*--#] cov_setnum_index_13 : + +*--#[ cov_comp_thread_pound_79 : +* farm probe 0164_comp_thread_pound_79 (+4 lines, L0 rescore kit) +* probe: clean +#:threadsortfilecompress yes +#:threadsortfilesynch yes +On parallel; +Symbol x,y,z,n,t; +Local F = sum(n,1,700,(x+y+z)^n); +.sort +Local tiny = x; +Print tiny; +.end +#pend_if threaded? +assert runtime_error? +*--#] cov_comp_thread_pound_79 : + +*--#[ cov_illdim_6 : +* farm probe 0164_illdim_6 (+4 lines, L0 rescore kit) +* probe: error +* expected: Illegal dimension field for variable +Symbol x{w=4}; +.end +assert runtime_error?('Error: Illegal dimension field') +*--#] cov_illdim_6 : + +*--#[ cov_dc21_impname_67 : +* farm probe 0165_dc21_impname_67 (+4 lines, L0 rescore kit) +* probe: error +* expected: Improper name in (n)print statement +Symbol x; +Local test = x; +Print [test; +.end +assert runtime_error?('Illegal name: \'[test\'') +*--#] cov_dc21_impname_67 : + +*--#[ cov_promptread_43 : +* farm probe 0171_promptread_43 (+4 lines, L0 rescore kit) +* #prompt reads a value from stdin; without terminal input the run +* still completes (EOF/empty input accepted silently) +Symbol x; +Local t = x; +Print t; +#prompt "give" pv +.end +assert succeeded? +*--#] cov_promptread_43 : + +*--#[ cov_err_unhide_intohide_10 : +* farm probe 0173_err_unhide_intohide_10 (+4 lines, L0 rescore kit) +* probe: error +* expected: Cannot unhide/drop and put intohide expression in the same module +Symbol x; +Local f = x; +.sort +Hide f; +.sort +UnHide f; +IntoHide f; +.end +assert runtime_error?('Cannot unhide/dro') +*--#] cov_err_unhide_intohide_10 : + +*--#[ cov_dim_badword_6 : +* farm probe 0184_dim_badword_6 (+4 lines, L0 rescore kit) +* probe: error +* expected: Illegal dimension field for variable f +Function f{x=3}; +.end +assert runtime_error?('Error: Illegal dimension f') +*--#] cov_dim_badword_6 : + +*--#[ cov_mod2word_fact_7 : +* farm probe 0191_mod2word_fact_7 (+4 lines, L0 rescore kit) +* probe: clean +Symbol x; +Modulus 4294967311; +Local f = x^3+x+1; +Factorize f; +Print; +.end +assert runtime_error? +*--#] cov_mod2word_fact_7 : + +*--#[ cov_reset_paren_2 : +* farm probe 0198_reset_paren_2 (+4 lines, L0 rescore kit) +* probe: clean +* variant syntax attempt for bare #reset +#reset() +Symbol x; +Local test = x; +Print; +.end +assert preprocess_error?('proper syntax is') +*--#] cov_reset_paren_2 : + +*--#[ cov_brk_dubdot_42 : +* farm probe 0204_brk_dubdot_42 (+4 lines, L0 rescore kit) +* probe: clean +* target: compcomm.c DoBrackets 3821-3833: CDUBIOUS auto names in dotproduct bracket +Bracket x.y; +Local test = 1; +.sort +Print; +.end +assert runtime_error?('Illegal use of . after x i') +*--#] cov_brk_dubdot_42 : + +*--#[ cov_sum_loopundecl_11 : +* farm probe 0209_sum_loopundecl_11 (+4 lines, L0 rescore kit) +* probe: error +* expected: should have been declared as an index +Index i; +Sum i,zz; +.end +assert runtime_error?('zz should have been de') +*--#] cov_sum_loopundecl_11 : + +*--#[ cov_dots_types_30 : +* farm probe 0212_dots_types_30 (+4 lines, L0 rescore kit) +* probe: clean +Vectors p,q; +Index i; +Symbol a,x,y,z; +CFunction f,g,h; +Local test = f(1,i,x,p,g(x,y),x^2,h(3)); +id f(a?,...?) = g(a,...,q); +Print; +.end +assert runtime_error?('Improper operators for ...') +*--#] cov_dots_types_30 : + +*--#[ cov_gdiag_topo_blocks_edges : +* diagrams_ option battery: TopologiesOnly_+WithEdges_+WithBlocks_+WithOnePISets_ on QCD glu-glu 2 loops: ProcessTopology block_/onepi_ emission loops +Model QCD; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle glu, +3; + Vertex QUA,qua,glu: g; + Vertex GHO,gho,glu: g; + Vertex glu,glu,glu: g; + Vertex glu,glu,glu,glu: g^2; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(QCD,{glu},{glu},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12},2, `TopologiesOnly_'+`WithEdges_'+`WithBlocks_'+`WithOnePISets_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 29 +*--#] cov_gdiag_topo_blocks_edges : + +*--#[ cov_gdiag_symmif_onshell : +* diagrams_ option battery: WithSymmetrizeI_+WithSymmetrizeF_+OnShell_ with 4 externals (g^4, 1 loop): cmind Max(...,3) lines in symm blocks +Model QCD; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle glu, +3; + Vertex QUA,qua,glu: g; + Vertex GHO,gho,glu: g; + Vertex glu,glu,glu: g; + Vertex glu,glu,glu,glu: g^2; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12,q13,q14,q15,q16,q17,q18,q19,q20,q21,q22,q23,q24; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24; + +Local t = diagrams_(QCD,{glu,glu},{glu,glu},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12,q13,q14,q15,q16,q17,q18,q19,q20,q21,q22,q23,q24},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24},g^4, `WithSymmetrizeI_'+`WithSymmetrizeF_'+`OnShell_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 52 +*--#] cov_gdiag_symmif_onshell : + +*--#[ cov_gdiag_dupcontent_nondet : +* diagrams_ option battery: MIX3 with both couplings g^1*gw^1: identical-content vertices become multi-candidate -> assignVertex multi-candidate / ECand paths +Model MIX3; + Particle phi, +1; + Vertex phi,phi,phi: g; + Vertex phi,phi,phi: gw; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(MIX3,{phi},{phi},{q1,q2,q3,q4},{p1,p2,p3,p4},g*gw, 0); +Print t; +.end +assert succeeded? +assert nterms("t") == 4 +*--#] cov_gdiag_dupcontent_nondet : + +*--#[ cov_gdiag_sigma_sigma_2ext : +* diagrams_ option battery: Sigma_ (dual) keeps the sigma graph: NOSIGMA<0 nExtern==2 return-False-suppression path +Model PHI3; + Particle phi, +1; + Vertex phi,phi,phi: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(PHI3,{phi},{phi},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12},1, `Sigma_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 0 +*--#] cov_gdiag_sigma_sigma_2ext : + +*--#[ cov_gdiag_ferm_majorana_split : +* diagrams_ option battery: Majorana pair non-adjacent in vertex -> error +Model ERRF; + Particle maj, -2; + Particle glu, +3; + Vertex maj,glu,maj: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = 1; +Print t; +.end +assert runtime_error?('illegal Dirac/Majorana/Ghost interaction') +*--#] cov_gdiag_ferm_majorana_split : + +*--#[ cov_gdiag_ferm_dirac_split : +* diagrams_ option battery: Dirac pair appearing non-adjacent in vertex (qua,glu,QUA) -> error +Model ERRF; + Particle qua,QUA, -2; + Particle glu, +3; + Vertex qua,glu,QUA: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = 1; +Print t; +.end +assert runtime_error?('illegal Dirac/Majorana/Ghost interaction') +*--#] cov_gdiag_ferm_dirac_split : + +*--#[ cov_gdiag_combo_all : +* diagrams_ option battery: Combined qgraf-style filters OnShell_+NoTadpole_+NoSnail_+NoSigma_+OnePI_ on QCD glu-glu 2 loops +Model QCD; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle glu, +3; + Vertex QUA,qua,glu: g; + Vertex GHO,gho,glu: g; + Vertex glu,glu,glu: g; + Vertex glu,glu,glu,glu: g^2; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(QCD,{glu},{glu},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12},2, `OnShell_'+`NoTadpole_'+`NoSnail_'+`NoSigma_'+`OnePI_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 11 +*--#] cov_gdiag_combo_all : + +*--#[ cov_gdiag_err_vac_odd : +* diagrams_ option battery: Vacuum with odd coupling order ({} -> {}, g^1): lp2 odd -> cannot generate / Process: illegal input +Model QCD; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle glu, +3; + Vertex QUA,qua,glu: g; + Vertex GHO,gho,glu: g; + Vertex glu,glu,glu: g; + Vertex glu,glu,glu,glu: g^2; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +On GrccVerbose; +Local t = diagrams_(QCD,{},{},{q1,q2},{p1,p2},g,0); +Print t; +.end +assert runtime_error?('Process: illegal input') +*--#] cov_gdiag_err_vac_odd : + +*--#[ cov_gdiag_cyclr : +* diagrams_ option battery: CyclR_ dual on QCD glu-glu 2 loops (CYCLR branch) +Model QCD; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle glu, +3; + Vertex QUA,qua,glu: g; + Vertex GHO,gho,glu: g; + Vertex glu,glu,glu: g; + Vertex glu,glu,glu,glu: g^2; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(QCD,{glu},{glu},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12},2, `CyclR_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 101 +*--#] cov_gdiag_cyclr : + +*--#[ cov_gdiag_snail_2ext : +* diagrams_ option battery: Snail_ dual with nExtern==2 (phi3 2 loops): SNAIL<0 requires snails, rejecting snail-free graphs +Model PHI3; + Particle phi, +1; + Vertex phi,phi,phi: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(PHI3,{phi},{phi},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12},2, `Snail_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 7 +*--#] cov_gdiag_snail_2ext : + +*--#[ cov_gdiag_onshell_offshell_1ext : +* diagrams_ option battery: OnShell_/OffShell_ with nExtern==1 (phi3 phi->nothing 1 loop): ONSHELL/OFFSHELL single-external branches +Model PHI3; + Particle phi, +1; + Vertex phi,phi,phi: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local a = diagrams_(PHI3,{phi},{},{q1},{p1},1,`OnShell_'); +Local b = diagrams_(PHI3,{phi},{},{q1},{p1},1,`OffShell_'); +Local c = diagrams_(PHI3,{phi},{},{q1},{p1},1,0); +Print a; Print b; Print c; +.end +assert succeeded? +*--#] cov_gdiag_onshell_offshell_1ext : + +*--#[ cov_gdiag_cycli : +* diagrams_ option battery: CyclI_ on QCD glu-glu 2 loops: keep only internally cyclic graphs (CYCLI branches) +Model QCD; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle glu, +3; + Vertex QUA,qua,glu: g; + Vertex GHO,gho,glu: g; + Vertex glu,glu,glu: g; + Vertex glu,glu,glu,glu: g^2; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(QCD,{glu},{glu},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12},2, `CyclI_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 26 +*--#] cov_gdiag_cycli : + +*--#[ cov_gdiag_q_noargs : +* diagrams_ option battery: diagrams_ called with 6 arguments (no options argument) +Model PHI3; + Particle phi, +1; + Vertex phi,phi,phi: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(PHI3,{phi},{phi},{q1,q2},{p1,p2},1); +Print t; +.end +assert succeeded? +assert nterms("t") == 2 +*--#] cov_gdiag_q_noargs : + +*--#[ cov_gdiag_spin2_maj : +* diagrams_ option battery: Particle with spin +2 type 0 (Majorana): LoadModel spin-2 case, 2 loops +Model SP2; + Particle maj, +2; + Particle gam, +3; + Vertex maj,maj,gam: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12,q13,q14,q15,q16,q17,q18,q19,q20,q21,q22,q23,q24; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24; + +Local t = diagrams_(SP2,{maj},{maj},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12,q13,q14,q15,q16,q17,q18,q19,q20,q21,q22,q23,q24},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24},2, 0); +Print t; +.end +assert succeeded? +assert nterms("t") == 10 +*--#] cov_gdiag_spin2_maj : + +*--#[ cov_gdiag_tadpole_1ext : +* diagrams_ option battery: Tadpole_ dual with nExtern==1: nopic==1 graph rejected (NOTADPOLE<0 single-external return False) +Model PHI3; + Particle phi, +1; + Vertex phi,phi,phi: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(PHI3,{phi},{},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12},1, `Tadpole_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 0 +*--#] cov_gdiag_tadpole_1ext : + +*--#[ cov_gdiag_ferm_fourf : +* diagrams_ option battery: Vertex with 4 fermions (Dirac pair + ghost pair, order 2): more-than-2-fermions warning path (once), generation still succeeds +Model FF; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle glu, +3; + Vertex qua,QUA,gho,GHO: g^2; + Vertex QUA,qua,glu: g; + Vertex GHO,gho,glu: g; + Vertex glu,glu,glu: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(FF,{glu},{glu},{q1,q2,q3,q4,q5,q6},{p1,p2,p3,p4,p5,p6},2, 0); +Print t; +.end +assert succeeded? +assert nterms("t") == 93 +*--#] cov_gdiag_ferm_fourf : + +*--#[ cov_gdiag_offshell_2ext : +* diagrams_ option battery: OffShell_ with nExtern>1 on QCD glu-glu 2 loops: OFFSHELL nExtern!=1 ne0bridges<=0 rejection path +Model QCD; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle glu, +3; + Vertex QUA,qua,glu: g; + Vertex GHO,gho,glu: g; + Vertex glu,glu,glu: g; + Vertex glu,glu,glu,glu: g^2; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(QCD,{glu},{glu},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12},2, `OffShell_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 49 +*--#] cov_gdiag_offshell_2ext : + +*--#[ cov_gdiag_tadpole_2ext : +* diagrams_ option battery: Tadpole_ dual with nExtern==2 (phi3 2 loops): keep only graphs with tadpoles (dual tadpole branch) +Model PHI3; + Particle phi, +1; + Vertex phi,phi,phi: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(PHI3,{phi},{phi},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12},2, `Tadpole_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 7 +*--#] cov_gdiag_tadpole_2ext : + +*--#[ cov_gdiag_simple_phi4 : +* diagrams_ option battery: Simple_ on phi4 2-vertex 1-loop (2 parallel internal lines, multi-edge): SIMPLE>0 rejects multi-edge graph +Model PHI4; + Particle phi, +1; + Vertex phi,phi,phi,phi: g^2; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(PHI4,{phi},{phi},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12},2, `Simple_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 0 +*--#] cov_gdiag_simple_phi4 : + +*--#[ cov_gdiag_notsimple_phi4 : +* diagrams_ option battery: NotSimple_ keeps the multi-edge phi4 graph, rejects simple ones (SIMPLE<0 branch) +Model PHI4; + Particle phi, +1; + Vertex phi,phi,phi,phi: g^2; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(PHI4,{phi},{phi},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12},2, `NotSimple_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 3 +*--#] cov_gdiag_notsimple_phi4 : + +*--#[ cov_gdiag_q_conflict : +* diagrams_ option battery: Conflicting dual filters OnePI_+OnePR_: 'Conflicting diagram filters' error +Model PHI3; + Particle phi, +1; + Vertex phi,phi,phi: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(PHI3,{phi},{phi},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12},1, `OnePI_'+`OnePR_'); +Print t; +.end +assert runtime_error?('Conflicting diagram filters') +*--#] cov_gdiag_q_conflict : + +*--#[ cov_gdiag_err_many_couplings : +* diagrams_ option battery: Model with 16 coupling symbols in one vertex (> GRCC_MAXNCPLG=15): too many coupling constants +Model MC; + Particle phi, +1; + Vertex phi,phi,phi: c1*c2*c3*c4*c5*c6*c7*c8*c9*c10*c11*c12*c13*c14*c15*c16; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(MC,{phi},{phi},{q1,q2},{p1,p2},1,0); +Print t; +.end +assert runtime_error?('Too many coupling constants in model') +*--#] cov_gdiag_err_many_couplings : + +*--#[ cov_gdiag_onepr : +* diagrams_ option battery: OnePR_ on QCD glu-glu 2 loops: only non-1PI graphs kept (ONEPI<0 M-level + EGraph nopic<2 no-return path) +Model QCD; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle glu, +3; + Vertex QUA,qua,glu: g; + Vertex GHO,gho,glu: g; + Vertex glu,glu,glu: g; + Vertex glu,glu,glu,glu: g^2; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(QCD,{glu},{glu},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12},2, `OnePR_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 104 +*--#] cov_gdiag_onepr : + +*--#[ cov_gdiag_onshell_4ext : +* diagrams_ option battery: OnShell_ alone with 4 externals (g^4): else-branch cmind Max(...,3) in mkSProcess +Model QCD; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle glu, +3; + Vertex QUA,qua,glu: g; + Vertex GHO,gho,glu: g; + Vertex glu,glu,glu: g; + Vertex glu,glu,glu,glu: g^2; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12,q13,q14,q15,q16,q17,q18,q19,q20,q21,q22,q23,q24; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24; + +Local t = diagrams_(QCD,{glu,glu},{glu,glu},{q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12,q13,q14,q15,q16,q17,q18,q19,q20,q21,q22,q23,q24},{p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24},g^4, `OnShell_'); +Print t; +.end +assert succeeded? +assert nterms("t") == 111 +*--#] cov_gdiag_onshell_4ext : + +*--#[ cov_gdiag_err_novertex : +* diagrams_ option battery: Model with no Vertex, diagrams_ with numeric loop count: ncplgcp<1 -> erEnd in Process/mkSProcess +Model NOV; + Particle phi, +1; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(NOV,{phi},{phi},{q1,q2},{p1,p2},1,0); +Print t; +.end +assert runtime_error?('Process: coupling constant = 0') +*--#] cov_gdiag_err_novertex : + +*--#[ cov_gdiag_err_ext_momenta : +* diagrams_ option battery: External particle defined via ,external flag used in in-set: extonly/extern handling +Model QEDE; + Particle e,AE, -2; + Particle gam, +3; + Particle ee,AEE, -2, external; + Vertex e,AE,gam: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; + +Local t = diagrams_(QEDE,{e,ee},{AE,gam},{q1,q2,q3,q4},{p1,p2,p3,p4},1,0); +Print t; +.end +assert succeeded? +assert nterms("t") == 0 +*--#] cov_gdiag_err_ext_momenta : + +*--#[ cov_gdiag_err_particle_overflow : +* diagrams_ option battery: Model with 52 particles (> GRCC_MAXMPARTICLES=50): particle table overflow +Model OV; + Particle p1, +1; + Particle p2, +1; + Particle p3, +1; + Particle p4, +1; + Particle p5, +1; + Particle p6, +1; + Particle p7, +1; + Particle p8, +1; + Particle p9, +1; + Particle p10, +1; + Particle p11, +1; + Particle p12, +1; + Particle p13, +1; + Particle p14, +1; + Particle p15, +1; + Particle p16, +1; + Particle p17, +1; + Particle p18, +1; + Particle p19, +1; + Particle p20, +1; + Particle p21, +1; + Particle p22, +1; + Particle p23, +1; + Particle p24, +1; + Particle p25, +1; + Particle p26, +1; + Particle p27, +1; + Particle p28, +1; + Particle p29, +1; + Particle p30, +1; + Particle p31, +1; + Particle p32, +1; + Particle p33, +1; + Particle p34, +1; + Particle p35, +1; + Particle p36, +1; + Particle p37, +1; + Particle p38, +1; + Particle p39, +1; + Particle p40, +1; + Particle p41, +1; + Particle p42, +1; + Particle p43, +1; + Particle p44, +1; + Particle p45, +1; + Particle p46, +1; + Particle p47, +1; + Particle p48, +1; + Particle p49, +1; + Particle p50, +1; + Particle p51, +1; + Particle p52, +1; +EndModel; +Print t; +.end +assert runtime_error?('particle table overflow') +*--#] cov_gdiag_err_particle_overflow : + +*--#[ cov_gdiag_ferm_majorana_odd : +* diagrams_ option battery: Vertex with an odd number of Majorana fermions (maj,glu,glu) -> error +Model ERRF; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle maj, -2; + Particle glu, +3; + Vertex maj,glu,glu: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12,q13,q14,q15,q16,q17,q18,q19,q20,q21,q22,q23,q24; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24; + +Local t = 1; +Print t; +.end +assert runtime_error?('illegal Dirac/Majorana/Ghost interaction') +*--#] cov_gdiag_ferm_majorana_odd : + +*--#[ cov_gdiag_ferm_dirac_open : +* diagrams_ option battery: Vertex with a lone Dirac fermion (qua,glu,glu): Dirac number not conserved -> error +Model ERRF; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle maj, -2; + Particle glu, +3; + Vertex qua,glu,glu: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12,q13,q14,q15,q16,q17,q18,q19,q20,q21,q22,q23,q24; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24; + +Local t = 1; +Print t; +.end +assert runtime_error?('illegal Dirac/Majorana/Ghost interaction') +*--#] cov_gdiag_ferm_dirac_open : + +*--#[ cov_gdiag_ferm_ghost_open : +* diagrams_ option battery: Vertex with a lone ghost (gho,glu,glu): ghost number not conserved -> error +Model ERRF; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle maj, -2; + Particle glu, +3; + Vertex gho,glu,glu: g; +EndModel; +Vector q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12,q13,q14,q15,q16,q17,q18,q19,q20,q21,q22,q23,q24; +Vector p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24; + +Local t = 1; +Print t; +.end +assert runtime_error?('illegal Dirac/Majorana/Ghost interaction') +*--#] cov_gdiag_ferm_ghost_open : + +*---[ Kit2-tail composite batch: farm probes (clean composites + individually-asserted error probes) ]--- +*--#[ cov_k2tail_a1 : +* kit2-tail composite: clean probes, 8 programs +* farm probe 0005_minpowerof_67 (+3 lines, kit2 tail) +* probe: clean +Symbol x; +Local F = minpowerof_(x,x); +Print; +.end +* farm probe 0006_normalize_ratroot_nested_46 (+3 lines, kit2 tail) +* probe: clean +Symbol x; +CFunction f; +Local F = f(root_(3,27),x); +Print; +.end +* farm probe 0010_delta_contraction_97 (+3 lines, kit2 tail) +* probe: clean +* DELTA contraction path (r7 = *t == DELTA) +Vector v; +Index i,j; +CFunction f; +Local expr = f(v(i)) * d_(i,j) * v(j); +Print; +.end +* farm probe 0014_fa_dp_miss_95 (+3 lines, kit2 tail) +* probe: clean +* FactArg dotproduct absent in one term -> pow=0 (argument.c:1369,1378-1382) +Vector p,q; +Symbol x; +Function f; +Local test = f((p.q)^2 + x); +FactArg f; +Print; +.end +* farm probe 0037_bad_expr_param_109 (+3 lines, kit2 tail) +* an expression used with arguments on the RHS is replaced by its +* (parameterless) value; the arguments are ignored, so G prints x +Symbol x; +Local F = x; +Local G = F(x, x); +Print; +.end +* farm probe 0041_vec_sub_62 (+3 lines, kit2 tail) +* probe: clean +* target: symmetr.c MatchArgument VECTOSUB (vector wildcard vs subexpression argument) +Vectors p; +CFunction f,g; +Local F = f(g(1)); +id f(p?) = g(p); +Print; +.end +* farm probe 0073_hide_g2l_103 (+3 lines, kit2 tail) +* probe: clean +Symbol x; +Global g = x; +.sort +Hide g; +.sort +Local g; +.sort +Print; +.end +* farm probe 0073_hide_l2g_106 (+3 lines, kit2 tail) +* probe: clean +Symbol x; +Local g = x; +.sort +Hide g; +.sort +Global g; +.sort +Print; +.end +assert succeeded? +*--#] cov_k2tail_a1 : + +*--#[ cov_k2tail_a2 : +* kit2-tail composite: clean probes, 8 programs +* farm probe 0091_0004_vecidx_reuse_3 (+3 lines, kit2 tail) +* probe: clean +* same vector wildcard in dot product and as plain argument +Vectors p,q,r; +CFunction f,g; +Local test = f(p.q, p); +id f(p?.q, p?) = g(p); +Print; +.end +* farm probe 0119_sqrt_small_32 (+3 lines, kit2 tail) +* probe: clean +#do i = 1, 5^/ + #message sqrt5 = `i' +#enddo +#do j = 1, 3^/ + #message sqrt3 = `j' +#enddo +.end +* farm probe 0122_idall_43 (+3 lines, kit2 tail) +* probe: clean +Symbol x,y; +CFunction f,g; +Local test = f(x)*f(y)*f(x)*f(y); +id, all f(x?) = g(x); +Print; +.end +* farm probe 0143_dotheta_num_12 (+3 lines, kit2 tail) +* probe: clean +Local t1 = theta_(2,1); +Local t2 = theta_(1,2); +Local t3 = theta_(1,1); +Local t4 = theta_(-1,-2); +Local t5 = theta_(-2,-1); +Local t6 = theta_(-1,1); +Print; +.end +* farm probe 0143_dotheta_sub_17 (+3 lines, kit2 tail) +* probe: clean +Symbol x,y; +Local t1 = theta_(x+y,x); +Local t2 = theta_(x+1,x+y); +Local t3 = theta_(x^2,x); +Local t4 = theta_(x+y,x+y); +Print; +.end +* farm probe 0147_fmt_bare_0 (+3 lines, kit2 tail) +* probe: clean +* bare Format statement -> CoFormat empty-argument path (compcomm.c 163-166) +Symbol x; +Local t = x; +Format; +Print; +.end +* farm probe 0208_c_num_15 (+3 lines, kit2 tail) +* probe: clean +Tensor t; +Index i1,i2,i3,i4; +Local F = t(i1,i2)*t(i2,i3)*t(i3,i4)*t(i4,i1); +Contract 2; +Print; +.end +* farm probe 0221_argcmp_gt_22 (+3 lines, kit2 tail) +* probe: clean +Symbol a,b; +CFunction f; +On properorder; +Local test = f(2,2) - f(2,1); +Print; +.end +assert succeeded? +*--#] cov_k2tail_a2 : + +*--#[ cov_k2tail_a3 : +* kit2-tail composite: clean probes, 8 programs +* farm probe 0002_rational_big2_57 (+2 lines, kit2 tail) +* probe: clean +Symbol x,y; +Local F = MakeRational_(99999999999999999999*x, 2); +Print; +.end +* farm probe 0003_sig_single_31 (+2 lines, kit2 tail) +* probe: clean +Symbol x,y; +Local t = 2 + sig_(x) + sig_(-x*y); +Print t; +.end +* farm probe 0003_signbig_78 (+2 lines, kit2 tail) +* probe: clean +* sign_ with big rational full arguments: odd big, even big, odd/2 fraction +Local test = sign_((12345678901234567890123456789012345)) + + sign_((123456789012345678901234567890123456)) + + sign_((12345678901234567890123456789012345/2)); +Print; +.end +* farm probe 0004_commutepow_128 (+2 lines, kit2 tail) +* probe: clean +Function f,g; +Local test = f(g^3); +Print; +.end +* farm probe 0005_maxpowerof_66 (+2 lines, kit2 tail) +* probe: clean +Symbol x; +Local F = maxpowerof_(x,x); +Print; +.end +* farm probe 0006_putfirst_func_57 (+2 lines, kit2 tail) +* probe: clean +* Trigger PUTFIRST case with function and number +Symbol x; +CFunction f,g; +Local expr = putfirst_(f(x),2); +Print; +.end +* farm probe 0006_ranperm_empty_41 (+2 lines, kit2 tail) +* probe: clean +Symbol x; +Local F = ranperm_(0); +Print; +.end +* farm probe 0008_arg_minvec_162 (+2 lines, kit2 tail) +* probe: clean +Symbol x; +Vector p,q; +CFunction f; +Local test = f(-p,2*q,p); +Argument f; + id, q = 3*q; +EndArgument; +Print; +.end +assert succeeded? +*--#] cov_k2tail_a3 : + +*--#[ cov_k2tail_a4 : +* kit2-tail composite: clean probes, 8 programs +* farm probe 0010_delta_unequal_78 (+2 lines, kit2 tail) +* probe: clean +Symbol a,b,c,d,i,j; +Local F = delta_(a,b) + delta_(b,c); +id delta_(a,b) = 1; +Print; +.end +* farm probe 0014_gcd_dotproduct_mult_pow_83 (+2 lines, kit2 tail) +* probe: clean +Vector p,q; +Local F = gcd_(p.q^2 + p.q, p.q + 1); +Print; +.end +* farm probe 0017_factarg_symcoef_pow_16 (+2 lines, kit2 tail) +* probe: clean +* FactArg with symbolic term factor and powered function +Symbol x,y; +Function f; +Local test = x^2*f(2*x+4*y)**2; +FactArg f; +Print; +.end +* farm probe 0018_setindex_126 (+2 lines, kit2 tail) +* probe: clean +Symbol x; +Set A: 3, 5; +Set B: 1, 2; +CFunction f; +Local expr = f(A, 3); +* SETTONUM with SETTONUM branch - sets the proto index +id f(A, 3) = f(B, 0); +Print; +.end +* farm probe 0021_numfactors_bad_43 (+2 lines, kit2 tail) +* NumFactors_ of a non-subexpression argument evaluates to 1 +Symbol x; +Local F = NumFactors_(x+1); +Print; +.end +* farm probe 0024_tablefun_83 (+2 lines, kit2 tail) +* probe: clean +Symbol x; +CFunction g; +Table tab(1:1); +Fill tab(1) = g(x); +Local test = table_(tab,g(x)); +Print test; +.end +* farm probe 0031_pct_amp_34 (+2 lines, kit2 tail) +* probe: clean +* tries MesPrint '%&' branch (message.c:769-771) +Symbol x; +Local e = x; +Print "a%&b"; +Print; +.end +* farm probe 0038_chisholm_sep_213 (+2 lines, kit2 tail) +* Chisholm i,j; separates two (i,j) channels and is accepted +Index i,j; +Chisholm i,j; +.end +assert succeeded? +*--#] cov_k2tail_a4 : + +*--#[ cov_k2tail_a5 : +* kit2-tail composite: clean probes, 8 programs +* farm probe 0039_powcond_mix_140 (+2 lines, kit2 tail) +* probe: clean +Symbol x,y,n,z; +Local test = x^-4*y^2; +id x^-n?*y^n?{>2} = z; +Print; +.end +* farm probe 0044_in_set_member_index_108 (+2 lines, kit2 tail) +* probe: clean +I i; +L F = i; +if ( match(i) ) id i = 1; +Print; +.end +* farm probe 0047_delta_mix_92 (+2 lines, kit2 tail) +* probe: clean +* target: sch.c 1700-1726 DELTA branches: FindIndex second arg, numeric args +Indices i,j; +Local t = d_(i,j) + d_(1,i) + d_(i,1); +Print; +.end +* farm probe 0057_fx_fillsym_21 (+2 lines, kit2 tail) +* probe: clean +Symbol a,b,x; +Table t(0:2,0:2); +Local e = (1+a*x)*(1+b); +Bracket a,b; +.sort +FillExpression t = e(a,b); +Print; +.end +* farm probe 0074_cache_28 (+2 lines, kit2 tail) +* probe: clean +Symbol x,y; +Local g = (x+y)*(x+2); +.sort +Local F = x*factorin_(g)*factorin_(g); +Print F; +.end +* farm probe 0074_negpow2_57 (+2 lines, kit2 tail) +* probe: clean +Symbol a,b,x; +Local ex = a*x^-2 + b*x^-1; +.sort; +Local test = factorin_(ex); +Print test; +.end +* farm probe 0105_gamma1_87 (+2 lines, kit2 tail) +* probe: clean +Vector p; +Symbol a,b,x,y; +CFunction f,h; +Local test = g_(1,p)*f(a)*f(b); +id f(x?,y?)*g_(1,p) = h(x,y); +Print; +.end +* farm probe 0114_dim_conflict_145 (+2 lines, kit2 tail) +* probe: clean +Index i = 4; +Index i = 5; +Local test = d_(i,i); +Print; +.end +assert succeeded? +*--#] cov_k2tail_a5 : + +*--#[ cov_k2tail_a6 : +* kit2-tail composite: clean probes, 8 programs +* farm probe 0124_sym_fix_4 (+2 lines, kit2 tail) +* probe: clean +Symbol x; +CFunction f; +Local test = f(1,2); +Symmetrize f:2; +Print; +.end +* farm probe 0126_rat_pow_85 (+2 lines, kit2 tail) +* probe: clean +* targets ratio.c MergeSymbolLists: rational raised to positive and negative powers +Symbol x,y; +Local test = MakeRational_(x,y)^3; +Local test2 = MakeRational_(x^2,y)^-2; +Print; +.end +* farm probe 0134_ren_trace_53 (+2 lines, kit2 tail) +* probe: clean +* trace4 with sum over index j generates dummy indices, then Renumber +Symbol x; +Vector p,q; +Index i1,i2,j; +Local test = g_(i1,p,i2,q,i1,q,i2,p)*x; +trace4,j; +.sort +Renumber; +Print; +.end +* farm probe 0143_theta_bignum_single_35 (+2 lines, kit2 tail) +* probe: clean +Local t = theta_(12345678901234567890); +Local u = theta_(-98765432109876543210); +Print; +.end +* farm probe 0147_fmt_f90bad_7 (+2 lines, kit2 tail) +* Format Fortran90,dx; is accepted: 'd' starts the double precision +* kind; the trailing 'x' selects kind-x output (no diagnostic) +Symbol x; +Local t = x; +Format Fortran90,dx; +Format Fortran90,x; +Print; +.end +* farm probe 0147_fmt_o_1 (+2 lines, kit2 tail) +* probe: clean +* Format O optimization-level parsing, digit and '=' forms (compcomm.c 171-176) +* O0/O1/O2/O3 walk the switch cases including the saMaxT/saMinT case (217-221) +Symbol x; +Local t = x; +Format O1; +Format O2; +Format O3; +Format O0; +Format O=3; +Print; +.end +* farm probe 0150_setnum_function_15 (+2 lines, kit2 tail) +* probe: clean +CFunction f1,...,f20; +Set s: f1,...,f20; +Local F = s[2]; +Print; +.end +* farm probe 0165_dc21_expcont_66 (+2 lines, kit2 tail) +* probe: clean +* Print expr[] sets printflag PRINTCONTENTS +Symbol x; +Local test = x^2; +Print test[]; +.end +assert succeeded? +*--#] cov_k2tail_a6 : + +*--#[ cov_k2tail_a7 : +* kit2-tail composite: clean probes, 5 programs +* farm probe 0184_sym_rev_9 (+2 lines, kit2 tail) +* probe: clean +* target: names.c:1505-1511 reverse order symmetry (-cyclic) +Function f(-cyclic); +Local test = f(1,2,3); +Print; +.end +* farm probe 0204_br_delta_18 (+2 lines, kit2 tail) +* probe: clean +Index i,j; +Local F = d_(i,j); +Bracket d_; +Print; +.sort +Print; +.end +* farm probe 0204_br_zero2_14 (+2 lines, kit2 tail) +* probe: clean +Symbol x,y; +Local F = x*y; +Bracket x,0,y,00; +Print; +.sort +Print; +.end +* farm probe 0206_delta_sums_40 (+2 lines, kit2 tail) +* probe: clean +Symbol x,y,z; +Local test = delta_(x+y,x+y) + delta_(x+y,x+z); +Print; +.end +* farm probe 0210_proc_do_27 (+2 lines, kit2 tail) +* probe: clean +Symbol x; +#procedure q(n) + #do k = 1,`n' + Local s`k' = x^`k'; + #enddo + Print; +#endprocedure +#call q(3) +.sort +.clear +Symbol y; +Local w = y; +Print w; +.end +assert succeeded? +*--#] cov_k2tail_a7 : + +*--#[ cov_opt_minus_48_0187_opt_minus_48 : +* farm probe 0187_opt_minus_48 (+2 lines, kit2 tail) +* probe: error +* expected: Illegal option in (n)print statement +* empirically: program 3 (Print -q) prints a compile error and exits 0; +* programs 1-2 are clean +Symbol x; +Local test = x; +Print -sss test; +.end +Symbol x; +Local test = x; +Print -ss test; +.end +Symbol x; +Local test = x; +Print -q test; +.end +assert compile_error? +*--#] cov_opt_minus_48_0187_opt_minus_48 : + +*--#[ cov_k2tail_dollar : +* kit2-tail composite: clean $-variable probes (tvorm skips: sequential-mode warnings) +#pend_if threaded? || mpi? +* farm probe 0163_dollar_huge_70 (+3 lines, kit2 tail) +* probe: clean +Symbol x; +Local F = x; +$z = 10^50 + 1; +.sort +#if ( $z > 0 ) +#message ok +#endif +Print F; +.end +* farm probe 0202_dol_mkrat_42 (+2 lines, kit2 tail) +* probe: clean +Symbol x; +Local t = x; +$n = MakeRational_(1,3); +.sort +$n = $n + 2; +.sort +$n = $n - 7/3; +.sort +Print; +.end +assert succeeded? +*--#] cov_k2tail_dollar : + +*--#[ cov_if_occ_call_116_0006_if_occ_call_116 : +* farm probe 0006_if_occ_call_116 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal object f in occurs condition in if statement +Symbol x; +CFunction f; +Local t = f(x); +if ( occurs(f(x)) ) id t = 1; endif; +.end +assert compile_error? +*--#] cov_if_occ_call_116_0006_if_occ_call_116 : + +*--#[ cov_gcd_factor_zero_139_0011_gcd_factor_zero_139 : +* farm probe 0011_gcd_factor_zero_139 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +Local F = 0*x*y; +id 0*x? * y? = 1; +Print; +.end +assert compile_error? +*--#] cov_gcd_factor_zero_139_0011_gcd_factor_zero_139 : + +*--#[ cov_sum_dollar_undef_141_0011_sum_dollar_undef_141 : +* farm probe 0011_sum_dollar_undef_141 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Undefined variable $zz +Symbol i; +CFunction f; +Local t = f(i); +Sum $zz; +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_sum_dollar_undef_141_0011_sum_dollar_undef_141 : + +*--#[ cov_arg_sub_prod_25_0014_arg_sub_prod_25 : +* farm probe 0014_arg_sub_prod_25 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +Local test = f(2*x*y,3,2*x,x*y*z); +Argument f,2*x; + id x = 1; +EndArgument; +Print; +.end +assert compile_error? +*--#] cov_arg_sub_prod_25_0014_arg_sub_prod_25 : + +*--#[ cov_setfindall_notflag_40_0027_setfindall_notflag_40 : +* farm probe 0027_setfindall_notflag_40 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* FindAll set with negated set wildcard (notflag1=1) +Symbol x,y,n; +Vector v1,v2; +Set S: v1(1), v1(2), v1(3); +CFunction f; +Local expr = f(v1(1?), v1(2?), v1(3?)); +id f(?a) = 0; +id f(v1(1?), v1(2?), v1(3?)) = 1; +Print; +.end +assert compile_error? +*--#] cov_setfindall_notflag_40_0027_setfindall_notflag_40 : + +*--#[ cov_topo_err_44_0031_topo_err_44 : +* farm probe 0031_topo_err_44 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: The topologies_ function was removed in FORM 5.0 +Symbol x; +CFunction f,g; +Local test = f(topologies_(1)); +id f(x?) = g(1); +Print; +.end +assert compile_error? +*--#] cov_topo_err_44_0031_topo_err_44 : + +*--#[ cov_dollar_undef_239_0034_dollar_undef_239 : +* farm probe 0034_dollar_undef_239 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Undefined variable $q in range +Symbol x; +CFunction f; +Local test = f(1,2,3); +Transform f dedup($q,2); +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_dollar_undef_239_0034_dollar_undef_239 : + +*--#[ cov_endrepeat_noc_134_0040_endrepeat_noc_134 : +* farm probe 0040_endrepeat_noc_134 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: EndRepeat without Repeat +EndRepeat; +.end +assert compile_error? +*--#] cov_endrepeat_noc_134_0040_endrepeat_noc_134 : + +*--#[ cov_ts_power_wildcard_88_0040_ts_power_wildcard_88 : +* farm probe 0040_ts_power_wildcard_88 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Dubious notation with power of power +Symbol x; +CFunction f; +Local expr = f(x^2^3); +Print; +.end +assert compile_error? +*--#] cov_ts_power_wildcard_88_0040_ts_power_wildcard_88 : + +*--#[ cov_fixindex_range_128_0041_fixindex_range_128 : +* farm probe 0041_fixindex_range_128 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Fixed index out of allowed range +Symbol x; +FixIndex 1000:1; +Local t = x; +Print; +.end +assert compile_error? +*--#] cov_fixindex_range_128_0041_fixindex_range_128 : + +*--#[ cov_nofindloop_6_0041_nofindloop_6 : +* farm probe 0041_nofindloop_6 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: no ( after findloop +CFunction f; +Local F = f(1); +if ( findloop ) Print; +.end +assert compile_error? +*--#] cov_nofindloop_6_0041_nofindloop_6 : + +*--#[ cov_nooccurs_14_0041_nooccurs_14 : +* farm probe 0041_nooccurs_14 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: no ( after occurs +CFunction f; +Local F = f(1); +if ( occurs ) Print; +.end +assert compile_error? +*--#] cov_nooccurs_14_0041_nooccurs_14 : + +*--#[ cov_onflag_range_109_0042_onflag_range_109 : +* farm probe 0042_onflag_range_109 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: The number of a flag in On/Off Flag should be in the range +On Flag,100; +Print; +.end +assert compile_error? +*--#] cov_onflag_range_109_0042_onflag_range_109 : + +*--#[ cov_badchar_3_0044_badchar_3 : +* farm probe 0044_badchar_3 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal character in Transform statement +CFunction f; +Set funcs: f; +Local test = f(1,2,3); +Transform,funcs,[x]; +Print; +.end +assert compile_error? +*--#] cov_badchar_3_0044_badchar_3 : + +*--#[ cov_redef_args_121_0045_redef_args_121 : +* farm probe 0045_redef_args_121 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegally formed arguments +Redefine x(a b) "5"; +.end +assert compile_error? +*--#] cov_redef_args_121_0045_redef_args_121 : + +*--#[ cov_totensor_badopt_103_0046_totensor_badopt_103 : +* farm probe 0046_totensor_badopt_103 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Unrecognized option in ToTensor statement +CFunction f; +Vector v; +ToTensor f,v,badopt; +.end +assert compile_error? +*--#] cov_totensor_badopt_103_0046_totensor_badopt_103 : + +*--#[ cov_tr4_dollarundef_121_0047_tr4_dollarundef_121 : +* farm probe 0047_tr4_dollarundef_121 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: is undefined +Trace4, $x; +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_tr4_dollarundef_121_0047_tr4_dollarundef_121 : + +*--#[ cov_unittrace_value_113_0048_unittrace_value_113 : +* farm probe 0048_unittrace_value_113 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Value of UnitTrace should be a (positive) number or a symbol +Symbol x; +UnitTrace y; +.end +assert compile_error? +*--#] cov_unittrace_value_113_0048_unittrace_value_113 : + +*--#[ cov_expression_no_paren_95_0049_expression_no_paren_95 : +* farm probe 0049_expression_no_paren_95 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: no ( after expression +Symbol x; +Local F = x; +if ( expression x ) discard; +Print; +.end +assert compile_error? +*--#] cov_expression_no_paren_95_0049_expression_no_paren_95 : + +*--#[ cov_flag_no_paren_92_0049_flag_no_paren_92 : +* farm probe 0049_flag_no_paren_92 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: no ( after flag +Symbol x; +Local F = x; +if ( flag x ) discard; +Print; +.end +assert compile_error? +*--#] cov_flag_no_paren_92_0049_flag_no_paren_92 : + +*--#[ cov_putinside_sym_103_0050_putinside_sym_103 : +* farm probe 0050_putinside_sym_103 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: PutInside/AntiPutInside expects a regular function +Symbol x; +Vector p,q; +Local t = p.q; +PutInside x,p.q; +Print t; +.end +assert compile_error? +*--#] cov_putinside_sym_103_0050_putinside_sym_103 : + +*--#[ cov_anti_rep_44_0053_anti_rep_44 : +* farm probe 0053_anti_rep_44 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +CFunction a1(antisymmetric); +CFunction gg; +Local test = a1(1,2) + a1(2,1); +id a1(n?,m?) = gg(n,m); +id a1(n?,n?) = gg(0); +Print; +.end +assert compile_error? +*--#] cov_anti_rep_44_0053_anti_rep_44 : + +*--#[ cov_perm0_97_0060_perm0_97 : +* farm probe 0060_perm0_97 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: value 0 in permute transformation not allowed +Symbol x,y; +CFunction f,g; +Local t = f(1,2,3); +Transform f,permute(0); +.end +assert compile_error? +*--#] cov_perm0_97_0060_perm0_97 : + +*--#[ cov_permbig_98_0060_permbig_98 : +* farm probe 0060_permbig_98 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: value in permute transformation too large +Symbol x,y; +CFunction f,g; +Local t = f(1,2,3); +Transform f,permute(12345678901234567890); +.end +assert compile_error? +*--#] cov_permbig_98_0060_permbig_98 : + +*--#[ cov_count_no_parenthesis_42_0061_count_no_parenthesis_42 : +* farm probe 0061_count_no_parenthesis_42 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: &no ( after count +Symbol x; +Local F = x; +if ( count x ) discard; +Print; +.end +assert compile_error? +*--#] cov_count_no_parenthesis_42_0061_count_no_parenthesis_42 : + +*--#[ cov_store_bigterm_59_0067_store_bigterm_59 : +* farm probe 0067_store_bigterm_59 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +AutoDeclare Function f; +Local big = f(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) + f(31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) + f(61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90); +.store big +Local test = big*big; +Print; +.end +assert compile_error? +*--#] cov_store_bigterm_59_0067_store_bigterm_59 : + +*--#[ cov_perm_end_43_0073_perm_end_43 : +* farm probe 0073_perm_end_43 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal ending in permute transformation +CFunction f; +Transform f permute(1,2)x; +.end +assert compile_error? +*--#] cov_perm_end_43_0073_perm_end_43 : + +*--#[ cov_particle_after_vertex_114_0074_particle_after_vertex_114 : +* farm probe 0074_particle_after_vertex_114 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Particle statements should be before Vertex statements +Model qcd; +Particle a: spin=2; +Vertex a,a: g; +Particle b: spin=1; +.end +assert compile_error? +*--#] cov_particle_after_vertex_114_0074_particle_after_vertex_114 : + +*--#[ cov_numspec3_39_0077_numspec3_39 : +* farm probe 0077_numspec3_39 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* test intermediate non-tensor spec=0 +AutoDeclare Symbol x; +AutoDeclare Vector v; +CFunction f; +Local expr = f(0,0,v(1,v(1),v(1)),0,0); +id f(x1?,x2?,v?,x3?,x4?) = g_(v1,v2,v3); +.end +assert compile_error? +*--#] cov_numspec3_39_0077_numspec3_39 : + +*--#[ cov_collect_2br_3_0092_collect_2br_3 : +* farm probe 0092_collect_2br_3 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y,z1,z2,z3,z4,z5,z6,z7,z8; +CFunction g; +Local F = (x+y)*g(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) + *(z1+z2+z3+z4+z5+z6+z7+z8)^5; +Bracket x,y; +.sort +Collect; +Print; +.sort +Print; +.end +assert compile_error? +*--#] cov_collect_2br_3_0092_collect_2br_3 : + +*--#[ cov_par_spectator_36_0102_par_spectator_36 : +* farm probe 0102_par_spectator_36 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +On parallel; +Spectator s; +Symbol x; +Local t = x; +ToSpectator s,x; +Print t; +.end +assert compile_error? +*--#] cov_par_spectator_36_0102_par_spectator_36 : + +*--#[ cov_spectator_b_60_0102_spectator_b_60 : +* farm probe 0102_spectator_b_60 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: (syntax probe for CopySpectator path) +Symbols x; +Local t = x^2; +Spectator $s; +$s = 0; +CopySpectator $s,t; +Print t; +.sort +.end +#pend_if threaded? +assert compile_error? +*--#] cov_spectator_b_60_0102_spectator_b_60 : + +*--#[ cov_emptyreset_47_0131_emptyreset_47 : +* farm probe 0131_emptyreset_47 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +Set s: x; +Set s:; +Set s: y; +Local test = 1; +Print; +.end +assert compile_error? +*--#] cov_emptyreset_47_0131_emptyreset_47 : + +*--#[ cov_comm_nobrace_37_0152_comm_nobrace_37 : +* farm probe 0152_comm_nobrace_37 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +Function f1,f2; +Set A1: f1; +CommuteInSet A1,f2; +Local t = f1(1)*f2(2); +.sort +Print t; +.store +Local u = 1; +.sort +Print u; +.end +assert compile_error? +*--#] cov_comm_nobrace_37_0152_comm_nobrace_37 : + +*--#[ cov_argmatch_26_0154_argmatch_26 : +* farm probe 0154_argmatch_26 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +AutoDeclare Symbol x; +CFunction f,g; +Local test = f(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15); +If ( Match f(x1?,x2?,?a) ); + id f(?a) = g(x1,x2,?a); +EndIf; +Print test; +.end +assert compile_error? +*--#] cov_argmatch_26_0154_argmatch_26 : + +*--#[ cov_mixnum_86_0155_mixnum_86 : +* farm probe 0155_mixnum_86 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal mixture of element types in set +Vector p1; +Set s: p1,3; +Print; +.end +assert compile_error? +*--#] cov_mixnum_86_0155_mixnum_86 : + +*--#[ cov_err_already_hidden_9_0173_err_already_hidden_9 : +* farm probe 0173_err_already_hidden_9 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Expression is already hidden +Symbol x; +Local f = x; +.sort +Hide f; +.sort +IntoHide f; +.end +assert compile_error? +*--#] cov_err_already_hidden_9_0173_err_already_hidden_9 : + +*--#[ cov_redefine_illarg_num_66_0182_redefine_illarg_num_66 : +* farm probe 0182_redefine_illarg_num_66 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegally formed name in argument of redefine statement +#define ff(a) "a" +Redefine ff(1) = "2"; +.end +assert compile_error? +*--#] cov_redefine_illarg_num_66_0182_redefine_illarg_num_66 : + +*--#[ cov_set_illegaldim_9_0193_set_illegaldim_9 : +* farm probe 0193_set_illegaldim_9 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal dimension field for set +Symbol a; +Set v{x}: a; +.end +assert compile_error? +*--#] cov_set_illegaldim_9_0193_set_illegaldim_9 : + +*--#[ cov_set_twooptions_6_0193_set_twooptions_6 : +* farm probe 0193_set_twooptions_6 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: only one option allowed +Symbol a; +Set v(ordered,foo): a; +.end +assert compile_error? +*--#] cov_set_twooptions_6_0193_set_twooptions_6 : + +*--#[ cov_pbtbl_fileadd_6_0195_pbtbl_fileadd_6 : +* farm probe 0195_pbtbl_fileadd_6 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Table t(1:2); +Fill t(1,1)=1; +PrintTable t >> tbl_add.txt; +PrintTable t >> tbl_add.txt; +.end +assert compile_error? +*--#] cov_pbtbl_fileadd_6_0195_pbtbl_fileadd_6 : + +*--#[ cov_totensor_dim_10_0196_totensor_dim_10 : +* farm probe 0196_totensor_dim_10 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Vector p1,p2; +Function DimEx,f; +Local F = DimEx(p1.p2); +ToTensor f,p1,{p1,4}; +Print; +.end +assert compile_error? +*--#] cov_totensor_dim_10_0196_totensor_dim_10 : + +*--#[ cov_err_default_index_12_0216_err_default_index_12 : +* farm probe 0216_err_default_index_12 (+3 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal variable request +Index i; +Function f; +PutInside f, i; +.end +assert compile_error? +*--#] cov_err_default_index_12_0216_err_default_index_12 : + +*--#[ cov_denormal_dim_positive_51_0000_denormal_dim_positive_51 : +* farm probe 0000_denormal_dim_positive_51 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,p1; +Dimension p1 = 3; +Local F = x^2*p1; +id p1 = p1^2; +Print; +.end +assert compile_error? +*--#] cov_denormal_dim_positive_51_0000_denormal_dim_positive_51 : + +*--#[ cov_ifmatch_if_121_0002_ifmatch_if_121 : +* farm probe 0002_ifmatch_if_121 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: The if[no]match->label option is not allowed in an if statement +Symbol x,y; +Label lab; +Local a = x; +If (Match(x)) id,ifmatch(lab),x = y; Endif; +Print a; +.end +assert compile_error? +*--#] cov_ifmatch_if_121_0002_ifmatch_if_121 : + +*--#[ cov_cg_vecnum_err_4_0003_cg_vecnum_err_4 : +* farm probe 0003_cg_vecnum_err_4 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Fixed index in vector greater than +Index i1; +Vector p; +Local test = p(999); +.end +assert compile_error? +*--#] cov_cg_vecnum_err_4_0003_cg_vecnum_err_4 : + +*--#[ cov_fixtrace_74_0006_fixtrace_74 : +* farm probe 0006_fixtrace_74 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Vector p1,p2,p3,p4; +Index i,j; +Fix,i,j; +Local test = g_(1,p1,i,p2)*g_(1,p2,j,p3)*g_(1,p3,i,p4)*g_(1,p4,j,p1); +trace4,1; +Print; +.end +assert compile_error? +*--#] cov_fixtrace_74_0006_fixtrace_74 : + +*--#[ cov_on_zstd_bad_116_0007_on_zstd_bad_116 : +* farm probe 0007_on_zstd_bad_116 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Unrecognized option in ON compress gzip/zstd statement +On compress zstd zzzz; +.end +assert compile_error? +*--#] cov_on_zstd_bad_116_0007_on_zstd_bad_116 : + +*--#[ cov_sum_sep_143_0011_sum_sep_143 : +* farm probe 0011_sum_sep_143 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal separator between objects in sum statement +Symbol i,j; +CFunction f; +Local t = f(i,j); +Sum i + j; +Print; +.end +assert compile_error? +*--#] cov_sum_sep_143_0011_sum_sep_143 : + +*--#[ cov_fun2tensor_146_0018_fun2tensor_146 : +* farm probe 0018_fun2tensor_146 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* expected: Function f changed to tensor +Symbol x; +Function f; +Tensor f; +Local test = f(1,2); +Print; +.end +assert compile_error? +*--#] cov_fun2tensor_146_0018_fun2tensor_146 : + +*--#[ cov_table2func_145_0018_table2func_145 : +* farm probe 0018_table2func_145 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal attempt to change table into function +Symbol x; +Table t(1); +Function t; +Local test = t(1); +Print; +.end +assert compile_error? +*--#] cov_table2func_145_0018_table2func_145 : + +*--#[ cov_tensor2fun_147_0018_tensor2fun_147 : +* farm probe 0018_tensor2fun_147 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* expected: Tensor f changed to function +Symbol x; +Tensor f; +Function f; +Local test = f(x); +Print; +.end +assert compile_error? +*--#] cov_tensor2fun_147_0018_tensor2fun_147 : + +*--#[ cov_pr_fac_84_0020_pr_fac_84 : +* farm probe 0020_pr_fac_84 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* Print variant of factor dollar access +Symbol a,b; +CFunction f; +Local t = f(a)*f(b); +$x = f(a)*f(b); +Print "f1 = %$",$x(1); +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_pr_fac_84_0020_pr_fac_84 : + +*--#[ cov_pr_wildargs_83_0020_pr_wildargs_83 : +* farm probe 0020_pr_wildargs_83 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* Print variant of DOLWILDARGS printing +Symbol a,b,c; +CFunction f,g; +Local t = f(a,b,c); +id f(?x) = g(?x); +Print "wildargs = %$",$x; +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_pr_wildargs_83_0020_pr_wildargs_83 : + +*--#[ cov_delta_bare_98_0022_delta_bare_98 : +* farm probe 0022_delta_bare_98 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: d_ needs two arguments +Symbol x; +Local test = x*d_; +Print test; +.end +assert compile_error? +*--#] cov_delta_bare_98_0022_delta_bare_98 : + +*--#[ cov_gamma_bigidx_104_0022_gamma_bigidx_104 : +* farm probe 0022_gamma_bigidx_104 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Value of constant index in tensor too large +Local test = g_(10000,1); +Print test; +.end +assert compile_error? +*--#] cov_gamma_bigidx_104_0022_gamma_bigidx_104 : + +*--#[ cov_tensor_dargs_23_0022_tensor_dargs_23 : +* farm probe 0022_tensor_dargs_23 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: &d_ needs exactly two arguments +Symbol x,y; +CFunction d_,f; +Local test = f(x,y); +Drop f; +Print; +.end +assert compile_error? +*--#] cov_tensor_dargs_23_0022_tensor_dargs_23 : + +*--#[ cov_negative_power_zero_compile_74_0023_negative_power_zero_ : +* farm probe 0023_negative_power_zero_compile_74 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Division by zero during compilation (0 to the power negative number) +Symbol x; +Local expr = 0^-1; +Print; +.end +assert compile_error? +*--#] cov_negative_power_zero_compile_74_0023_negative_power_zero_ : + +*--#[ cov_only_pow_6_0027_only_pow_6 : +* farm probe 0027_only_pow_6 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* target: findpat.c FindOnce via id,once,only with wildcard powers +Symbol x,y; +CFunction f; +Local a = x^3*y^3; +id, once, only, x^n?*y^n? = f(n?); +Print; +.end +assert compile_error? +*--#] cov_only_pow_6_0027_only_pow_6 : + +*--#[ cov_dotail_threads_2_0029_dotail_threads_2 : +* farm probe 0029_dotail_threads_2 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* DoTail m/w option parsing: legal thread counts then illegal values +* expected child stderr fragment: Illegal value for option m or w +#system V=$(readlink /proc/$PPID/exe 2>/dev/null); case "$V" in *form*) ;; *) V=vorm;; esac; T=$TESTTMPDIR/cvf3.frm; echo .end > $T; $V -m2 $T; $V -w3 $T; true +#system V=$(readlink /proc/$PPID/exe 2>/dev/null); case "$V" in *form*) ;; *) V=vorm;; esac; T=$TESTTMPDIR/cvf3.frm; $V -m2x $T; $V -w4x $T; rm -f $T; true +Symbol ok; +Local ok = 1; +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_dotail_threads_2_0029_dotail_threads_2 : + +*--#[ cov_set_crange_symtonum_oob_56_0029_set_crange_symtonum_oob_ : +* farm probe 0029_set_crange_symtonum_oob_56 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +Set s: {1,3}; +Local F = x; +id x = y / 0; +.end +assert compile_error? +*--#] cov_set_crange_symtonum_oob_56_0029_set_crange_symtonum_oob_ : + +*--#[ cov_cs_existvar_747_0031_cs_existvar_747 : +* farm probe 0031_cs_existvar_747 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: is the name of an existing variable. +Symbol test; +Local foo = 1; +CopySpectator,test=sp; +Print; +.end +assert compile_error? +*--#] cov_cs_existvar_747_0031_cs_existvar_747 : + +*--#[ cov_cs_illegalexpr2_752_0031_cs_illegalexpr2_752 : +* farm probe 0031_cs_illegalexpr2_752 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal name for expression +Local foo = 1; +CopySpectator,1foo=sp; +Print; +.end +assert compile_error? +*--#] cov_cs_illegalexpr2_752_0031_cs_illegalexpr2_752 : + +*--#[ cov_badkeyword_240_0034_badkeyword_240 : +* farm probe 0034_badkeyword_240 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal keyword inside range specification +Symbol x,foo; +CFunction f; +Local test = f(1,2,3); +Transform f dedup(1,foo); +Print; +.end +assert compile_error? +*--#] cov_badkeyword_240_0034_badkeyword_240 : + +*--#[ cov_bigfix_from_230_0034_bigfix_from_230 : +* farm probe 0034_bigfix_from_230 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Fixed range indicator bigger than +Symbol x; +CFunction f; +Local test = f(1,2,3); +Transform f dedup(99999999999999999999,2); +Print; +.end +assert compile_error? +*--#] cov_bigfix_from_230_0034_bigfix_from_230 : + +*--#[ cov_bigfix_to_231_0034_bigfix_to_231 : +* farm probe 0034_bigfix_to_231 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Fixed range indicator bigger than +Symbol x; +CFunction f; +Local test = f(1,2,3); +Transform f dedup(2,99999999999999999999); +Print; +.end +assert compile_error? +*--#] cov_bigfix_to_231_0034_bigfix_to_231 : + +*--#[ cov_eos_num_238_0034_eos_num_238 : +* farm probe 0034_eos_num_238 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: should be followed by a comma or end-of-statement +Symbol x; +CFunction f; +Local test = f(1,2,3); +Transform f dedup(1,2) 3; +Print; +.end +assert compile_error? +*--#] cov_eos_num_238_0034_eos_num_238 : + +*--#[ cov_mult_opt_146_0036_mult_opt_146 : +* farm probe 0036_mult_opt_146 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal option in multiply statement +Symbol x; +Local q = 1; +Multiply x,3; +.end +assert compile_error? +*--#] cov_mult_opt_146_0036_mult_opt_146 : + +*--#[ cov_argext_factarg2_208_0038_argext_factarg2_208 : +* farm probe 0038_argext_factarg2_208 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: ArgToExtraSymbol statement and FactArg statement are not allowed in the same module +Symbol x; +Function f; +ArgToExtraSymbol 1; +FactArg f; +Local test = f(x); +.end +assert compile_error? +*--#] cov_argext_factarg2_208_0038_argext_factarg2_208 : + +*--#[ cov_argext_factarg_207_0038_argext_factarg_207 : +* farm probe 0038_argext_factarg_207 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: ArgToExtraSymbol statement and FactArg statement are not allowed in the same module +Symbol x; +Function f; +FactArg f; +ArgToExtraSymbol,1; +Local test = f(x); +.end +assert compile_error? +*--#] cov_argext_factarg_207_0038_argext_factarg_207 : + +*--#[ cov_chisholm_fixedidx_212_0038_chisholm_fixedidx_212 : +* farm probe 0038_chisholm_fixedidx_212 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: fixed index >= +Chisholm 9999; +.end +assert compile_error? +*--#] cov_chisholm_fixedidx_212_0038_chisholm_fixedidx_212 : + +*--#[ cov_chisholm_noargs_209_0038_chisholm_noargs_209 : +* farm probe 0038_chisholm_noargs_209 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Proper syntax for Chisholm is +Chisholm; +.end +assert compile_error? +*--#] cov_chisholm_noargs_209_0038_chisholm_noargs_209 : + +*--#[ cov_cleartable_noarg_203_0038_cleartable_noarg_203 : +* farm probe 0038_cleartable_noarg_203 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: The ClearTable statement needs at least one (table) argument. +ClearTable; +.end +assert compile_error? +*--#] cov_cleartable_noarg_203_0038_cleartable_noarg_203 : + +*--#[ cov_dolaarg_15_0039_dolaarg_15 : +* farm probe 0039_dolaarg_15 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +CFunction f; +Local t = f(1,2,3); +$a = 2; +Transform,f,replace(1)=($a,0,0,0); +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_dolaarg_15_0039_dolaarg_15 : + +*--#[ cov_discard_num_137_0040_discard_num_137 : +* farm probe 0040_discard_num_137 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal argument in discard statement +Symbol x; +Local t = x; +Discard 5; +.end +assert compile_error? +*--#] cov_discard_num_137_0040_discard_num_137 : + +*--#[ cov_dropcoeff_num_139_0040_dropcoeff_num_139 : +* farm probe 0040_dropcoeff_num_139 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal argument in DropCoefficient statement +Symbol x; +Local t = x; +DropCoefficient 5; +.end +assert compile_error? +*--#] cov_dropcoeff_num_139_0040_dropcoeff_num_139 : + +*--#[ cov_dropsym_num_140_0040_dropsym_num_140 : +* farm probe 0040_dropsym_num_140 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal argument in DropSymbols statement +Symbol x; +Local t = x; +DropSymbols 5; +.end +assert compile_error? +*--#] cov_dropsym_num_140_0040_dropsym_num_140 : + +*--#[ cov_endarg_syn_127_0040_endarg_syn_127 : +* farm probe 0040_endarg_syn_127 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal syntax for EndArgument statement +Symbol x; +Local t = x; +EndArgument x; +.end +assert compile_error? +*--#] cov_endarg_syn_127_0040_endarg_syn_127 : + +*--#[ cov_enddo_syn_131_0040_enddo_syn_131 : +* farm probe 0040_enddo_syn_131 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal syntax for EndDo statement +Symbol x; +Local t = x; +EndDo x; +.end +assert compile_error? +*--#] cov_enddo_syn_131_0040_enddo_syn_131 : + +*--#[ cov_endinexp_syn_133_0040_endinexp_syn_133 : +* farm probe 0040_endinexp_syn_133 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal syntax for EndInExpression statement +Symbol x; +Local t = x; +EndInExpression x; +.end +assert compile_error? +*--#] cov_endinexp_syn_133_0040_endinexp_syn_133 : + +*--#[ cov_endinside_noc_128_0040_endinside_noc_128 : +* farm probe 0040_endinside_noc_128 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: EndInside without corresponding Inside statement +EndInside; +.end +assert compile_error? +*--#] cov_endinside_noc_128_0040_endinside_noc_128 : + +*--#[ cov_endinside_syn_129_0040_endinside_syn_129 : +* farm probe 0040_endinside_syn_129 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal syntax for EndInside statement +Symbol x; +Local t = x; +EndInside x; +.end +assert compile_error? +*--#] cov_endinside_syn_129_0040_endinside_syn_129 : + +*--#[ cov_ts_vector_dot_set_92_0040_ts_vector_dot_set_92 : +* farm probe 0040_ts_vector_dot_set_92 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +Vector v; +Set s: x; +CFunction f; +Local expr = f(v.s); +Print; +.end +assert compile_error? +*--#] cov_ts_vector_dot_set_92_0040_ts_vector_dot_set_92 : + +*--#[ cov_endterm_extra_117_0041_endterm_extra_117 : +* farm probe 0041_endterm_extra_117 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal syntax for EndTerm statement +Symbol x; +Local t = x; +EndTerm x; +Print; +.end +assert compile_error? +*--#] cov_endterm_extra_117_0041_endterm_extra_117 : + +*--#[ cov_exsym_index_124_0041_exsym_index_124 : +* farm probe 0041_exsym_index_124 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: creates conflicts with summed indices +Symbol x; +Index i; +CFunction f,g; +Local t = f(i)*g(i); +.sort +ExtraSymbols array,i; +Local u = x; +.sort +Print; +.end +assert compile_error? +*--#] cov_exsym_index_124_0041_exsym_index_124 : + +*--#[ cov_exsym_noarg_121_0041_exsym_noarg_121 : +* farm probe 0041_exsym_noarg_121 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal argument in ExtraSymbols statement +Symbol x; +ExtraSymbols array; +Local t = x; +Print; +.end +assert compile_error? +*--#] cov_exsym_noarg_121_0041_exsym_noarg_121 : + +*--#[ cov_exsym_trail_122_0041_exsym_trail_122 : +* farm probe 0041_exsym_trail_122 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal end of ExtraSymbols statement +Symbol x; +ExtraSymbols array,x,y; +Local t = x; +Print; +.end +assert compile_error? +*--#] cov_exsym_trail_122_0041_exsym_trail_122 : + +*--#[ cov_nomulof_4_0041_nomulof_4 : +* farm probe 0041_nomulof_4 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: no ( after multipleof +CFunction f; +Local F = f(1); +if ( multipleof ) Print; +.end +assert compile_error? +*--#] cov_nomulof_4_0041_nomulof_4 : + +*--#[ cov_setbraces_multiline_105_0041_setbraces_multiline_105 : +* farm probe 0041_setbraces_multiline_105 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: This type of usage of sets is not allowed +Symbol x; +Set myset(A{1}); +Local F = a_{myset}{b,c}; +Print; +.end +assert compile_error? +*--#] cov_setbraces_multiline_105_0041_setbraces_multiline_105 : + +*--#[ cov_fmt_floatprec_114_0042_fmt_floatprec_114 : +* farm probe 0042_fmt_floatprec_114 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal option in Format FloatPrecision +Format FloatPrecision,abc; +Print; +.end +assert compile_error? +*--#] cov_fmt_floatprec_114_0042_fmt_floatprec_114 : + +*--#[ cov_frompoly_active : +* FromPolynomial while optimization results of #Optimize are still active +Symbol x; +Format O=1; +Local f = x^2+x; +.sort +#Optimize f +FromPolynomial; +Print; +.end +assert compile_error?('Using FromPolynomial statement when there are still') +*--#] cov_frompoly_active : + +*--#[ cov_funpow_opt_118_0042_funpow_opt_118 : +* farm probe 0042_funpow_opt_118 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal option in FunPowers statement +FunPowers,blah; +Print; +.end +assert compile_error? +*--#] cov_funpow_opt_118_0042_funpow_opt_118 : + +*--#[ cov_onflag_noargs_107_0042_onflag_noargs_107 : +* farm probe 0042_onflag_noargs_107 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Proper syntax is: On/Off Flag,number[s]; +On Flag; +Print; +.end +assert compile_error? +*--#] cov_onflag_noargs_107_0042_onflag_noargs_107 : + +*--#[ cov_goto_bad_130_0043_goto_bad_130 : +* farm probe 0043_goto_bad_130 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Label should be an alpha-numeric string +Symbol x; +Local e1 = x; +Goto +; +Print; +.end +assert compile_error? +*--#] cov_goto_bad_130_0043_goto_bad_130 : + +*--#[ cov_inex_nest_131_0043_inex_nest_131 : +* farm probe 0043_inex_nest_131 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Nesting of inexpression statements more than +Symbol x; +Local e1 = x; +InExpression e1: +InExpression e1: +InExpression e1: +InExpression e1: +id x = 1; +EndInExpression; +EndInExpression; +EndInExpression; +EndInExpression; +Print; +.end +assert compile_error? +*--#] cov_inex_nest_131_0043_inex_nest_131 : + +*--#[ cov_spectator_probe_116_0043_spectator_probe_116 : +* farm probe 0043_spectator_probe_116 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +CFunction f; +Local expr = f(x,y); +ToSpectator x; +Print; +.end +assert compile_error? +*--#] cov_spectator_probe_116_0043_spectator_probe_116 : + +*--#[ cov_stuffle_probe_106_0043_stuffle_probe_106 : +* farm probe 0043_stuffle_probe_106 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +CFunction f; +Local expr = f(x,y) + f(y,x); +Stuffle f; +Print; +.end +assert compile_error? +*--#] cov_stuffle_probe_106_0043_stuffle_probe_106 : + +*--#[ cov_switch_probe_108_0043_switch_probe_108 : +* farm probe 0043_switch_probe_108 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +Local expr = x + y; +Switch; +Print; +.end +assert compile_error? +*--#] cov_switch_probe_108_0043_switch_probe_108 : + +*--#[ cov_nwrite_noarg_135_0044_nwrite_noarg_135 : +* farm probe 0044_nwrite_noarg_135 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Proper use of nwrite statement is: nwrite option +nwrite; +.end +assert compile_error? +*--#] cov_nwrite_noarg_135_0044_nwrite_noarg_135 : + +*--#[ cov_off_illegalchar_136_0044_off_illegalchar_136 : +* farm probe 0044_off_illegalchar_136 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal character or option encountered in OFF statement +Off 1; +.end +assert compile_error? +*--#] cov_off_illegalchar_136_0044_off_illegalchar_136 : + +*--#[ cov_pushpop_args_141_0044_pushpop_args_141 : +* farm probe 0044_pushpop_args_141 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: PopHide statement should have no arguments +Symbol x; +PushHide; +PopHide x; +.end +assert compile_error? +*--#] cov_pushpop_args_141_0044_pushpop_args_141 : + +*--#[ cov_renumber2_123_0045_renumber2_123 : +* farm probe 0045_renumber2_123 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal argument in Renumber statement +Renumber qqq; +.end +assert compile_error? +*--#] cov_renumber2_123_0045_renumber2_123 : + +*--#[ cov_set_fixed_single_expr_97_0045_set_fixed_single_expr_97 : +* farm probe 0045_set_fixed_single_expr_97 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +Set S:C : {0}; +Local F = x+y; +if ( match(x+y) ) discard; +Print; +.end +assert compile_error? +*--#] cov_set_fixed_single_expr_97_0045_set_fixed_single_expr_97 : + +*--#[ cov_setexitflag2_126_0045_setexitflag2_126 : +* farm probe 0045_setexitflag2_126 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal syntax for the SetExitFlag statement +SetExitFlag 1 2; +.end +assert compile_error? +*--#] cov_setexitflag2_126_0045_setexitflag2_126 : + +*--#[ cov_threadbucket_nonnum_95_0046_threadbucket_nonnum_95 : +* farm probe 0046_threadbucket_nonnum_95 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Numerical value expected for ThreadBucketSize +Symbol x; +ThreadBucketSize x; +.end +assert compile_error? +*--#] cov_threadbucket_nonnum_95_0046_threadbucket_nonnum_95 : + +*--#[ cov_tovec_onearg_114_0047_tovec_onearg_114 : +* farm probe 0047_tovec_onearg_114 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: ToVector statement needs a vector and a tensor +Vector p; +ToVector, p; +Print; +.end +assert compile_error? +*--#] cov_tovec_onearg_114_0047_tovec_onearg_114 : + +*--#[ cov_tr4_bigfixed_117_0047_tr4_bigfixed_117 : +* farm probe 0047_tr4_bigfixed_117 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Change value of OffsetIndex +Trace4, 999999; +Print; +.end +assert compile_error? +*--#] cov_tr4_bigfixed_117_0047_tr4_bigfixed_117 : + +*--#[ cov_trn_notindex_124_0047_trn_notindex_124 : +* farm probe 0047_trn_notindex_124 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: is not an index +Symbol x; +TraceN, 4, x; +Print; +.end +assert compile_error? +*--#] cov_trn_notindex_124_0047_trn_notindex_124 : + +*--#[ cov_285_countbig_83_0048_285_countbig_83 : +* farm probe 0048_285_countbig_83 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* best-effort: count with many-digit number, hits zero-padding branch 4361-4365 +Symbol x; +Local ff = x; +.sort +if ( count(x,123456789012345678) ) Print; +endif +Print ff; +.end +assert compile_error? +*--#] cov_285_countbig_83_0048_285_countbig_83 : + +*--#[ cov_occurs_dot_vec_108_0049_occurs_dot_vec_108 : +* farm probe 0049_occurs_dot_vec_108 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Not a vector in dotproduct in if statement +Vector v; +Symbol b; +Local F = v(1); +If (occurs(v.b)) Print; +.end +assert compile_error? +*--#] cov_occurs_dot_vec_108_0049_occurs_dot_vec_108 : + +*--#[ cov_antiputinside_104_0050_antiputinside_104 : +* farm probe 0050_antiputinside_104 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: AntiPutInside needs inside information +CFunction f; +Vector p,q; +Local t = f(p.q); +AntiPutInside f; +Print t; +.end +assert compile_error? +*--#] cov_antiputinside_104_0050_antiputinside_104 : + +*--#[ cov_bad_expr_name_120_0051_bad_expr_name_120 : +* farm probe 0051_bad_expr_name_120 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Improper name for an expression +CFunction f; +Local x = f(1); +UnHide 3x; +Print; +.end +assert compile_error? +*--#] cov_bad_expr_name_120_0051_bad_expr_name_120 : + +*--#[ cov_sym_num2_52_0051_sym_num2_52 : +* farm probe 0051_sym_num2_52 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol a,b,x,y; +CFunction f,g,h; +Local F = f(h(g(b,a))); +Symmetrize 2, f, g(x?,y?), g(y?,x?); +Print; +.end +assert compile_error? +*--#] cov_sym_num2_52_0051_sym_num2_52 : + +*--#[ cov_inside_exec_98_0052_inside_exec_98 : +* farm probe 0052_inside_exec_98 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Only executable and print statements are allowed in an %#inside/%#endinside construction +Symbol x; +Local F = x; +#inside +Bracket x; +#endinside +Print; +.end +assert compile_error? +*--#] cov_inside_exec_98_0052_inside_exec_98 : + +*--#[ cov_ext2pair_87_0059_ext2pair_87 : +* farm probe 0059_ext2pair_87 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbols a1,a2; +CFunction phi,v3; +Model v3; +Local test = phi(1)+phi(2); +Generate diagrams, test, "dg2p", all; +Print; +.end +assert compile_error? +*--#] cov_ext2pair_87_0059_ext2pair_87 : + +*--#[ cov_coif_flgrange_22_0061_coif_flgrange_22 : +* farm probe 0061_coif_flgrange_22 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Flag number +Symbol x; +Local test = x; +if ( flag(0) ) id x = 1; +Print; +.end +assert compile_error? +*--#] cov_coif_flgrange_22_0061_coif_flgrange_22 : + +*--#[ cov_if_flannoarg_81_0061_if_flannoarg_81 : +* farm probe 0061_if_flannoarg_81 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: userflag condition in the if statement needs arguments +Symbol x; +Local t = x; +If ( flag() ) id x = 1; +.end +assert compile_error? +*--#] cov_if_flannoarg_81_0061_if_flannoarg_81 : + +*--#[ cov_negset_member_50_0063_negset_member_50 : +* farm probe 0063_negset_member_50 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +Set S: -x; +Local F = -x; +if ( member(S, -x) ) Print; +.end +assert compile_error? +*--#] cov_negset_member_50_0063_negset_member_50 : + +*--#[ cov_all_illegal_idold_80_0070_all_illegal_idold_80 : +* farm probe 0070_all_illegal_idold_80 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Requested ALL option not allowed in idold/also statement. +Symbol x; +Local F = x; +id,all x = x; +idold x = y; +Print; +.end +assert compile_error? +*--#] cov_all_illegal_idold_80_0070_all_illegal_idold_80 : + +*--#[ cov_missing_equal_after_set_114_0070_missing_equal_after_set : +* farm probe 0070_missing_equal_after_set_114 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: id-statement without = sign +Symbol x,y; +Set s; +Local F = x; +id x, select s; +Print; +.end +assert compile_error? +*--#] cov_missing_equal_after_set_114_0070_missing_equal_after_set : + +*--#[ cov_tr_revread_73_0073_tr_revread_73 : +* farm probe 0073_tr_revread_73 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +CFunction f; +Transform f reverse(x); +.end +assert compile_error? +*--#] cov_tr_revread_73_0073_tr_revread_73 : + +*--#[ cov_endmodel_orphan_107_0074_endmodel_orphan_107 : +* farm probe 0074_endmodel_orphan_107 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: EndModel statement without matching Model statement +EndModel; +.end +assert compile_error? +*--#] cov_endmodel_orphan_107_0074_endmodel_orphan_107 : + +*--#[ cov_bucket_nonnum_125_0076_bucket_nonnum_125 : +* farm probe 0076_bucket_nonnum_125 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Numerical value expected for ProcessBucketSize +Symbol x; +ProcessBucketSize abc; +Local test = x; +Print; +.end +assert compile_error? +*--#] cov_bucket_nonnum_125_0076_bucket_nonnum_125 : + +*--#[ cov_numspec13_49_0077_numspec13_49 : +* farm probe 0077_numspec13_49 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* test 3-element run with first two equal, third different, vector filter +AutoDeclare Symbol x; +AutoDeclare Vector v; +CFunction f; +Local expr = f(0,0,v(v1,v1,v2),0,0); +id f(x1?,x2?,v?,x3?,x4?) = g_(v1,v2,v3); +.end +assert compile_error? +*--#] cov_numspec13_49_0077_numspec13_49 : + +*--#[ cov_dollarfac_185_0079_dollarfac_185 : +* farm probe 0079_dollarfac_185 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol a,b; +Local f = (a+b)*(a-b); +Factorize f; +.sort +$x = f; +Factorize $x; +.sort +Local g = $x^2; +Factorize g; +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_dollarfac_185_0079_dollarfac_185 : + +*--#[ cov_endjunk_720_0079_endjunk_720 : +* farm probe 0079_endjunk_720 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal end of FillExpression statement +Symbol x,y; +Table tab(1:3); +Local e = 1; +.sort +FillExpression tab = e(x)y; +.end +assert compile_error? +*--#] cov_endjunk_720_0079_endjunk_720 : + +*--#[ cov_exprpower_182_0079_exprpower_182 : +* farm probe 0079_exprpower_182 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol a,b; +Local f = (a+b)*(a-b); +Factorize f; +.sort +Local g = f^3 + f^(-1); +Factorize g; +Print; +.end +assert compile_error? +*--#] cov_exprpower_182_0079_exprpower_182 : + +*--#[ cov_inmem_redef_207_0079_inmem_redef_207 : +* farm probe 0079_inmem_redef_207 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: cannot be used in a FillExpression statement +Symbol x; +Table tab(1); +Local e1 = x; +.sort +Local e1 = x^2; +FillExpression tab = e1(x); +.end +assert compile_error? +*--#] cov_inmem_redef_207_0079_inmem_redef_207 : + +*--#[ cov_no_paren_206_0079_no_paren_206 : +* farm probe 0079_no_paren_206 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: should be an active expression with arguments +Symbol x; +Table tab(1); +Local e1 = x; +.sort +FillExpression tab = e1; +.end +assert compile_error? +*--#] cov_no_paren_206_0079_no_paren_206 : + +*--#[ cov_print_contents_11_0079_print_contents_11 : +* farm probe 0079_print_contents_11 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +Local test = (x+y)^2*(y+3*x); +Bracket x; +Print +c test; +.end +assert compile_error? +*--#] cov_print_contents_11_0079_print_contents_11 : + +*--#[ cov_undecl_arg_208_0079_undecl_arg_208 : +* farm probe 0079_undecl_arg_208 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: should be a previously declared symbol or function +Symbol x; +Table tab(1); +Local e1 = x; +.sort +FillExpression tab = e1(y); +.end +assert compile_error? +*--#] cov_undecl_arg_208_0079_undecl_arg_208 : + +*--#[ cov_vect_arg_209_0079_vect_arg_209 : +* farm probe 0079_vect_arg_209 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: should be a previously declared symbol or function +Symbol x; +Vector v; +Table tab(1); +Local e1 = x; +.sort +FillExpression tab = e1(v); +.end +assert compile_error? +*--#] cov_vect_arg_209_0079_vect_arg_209 : + +*--#[ cov_term_overflow_39_0082_term_overflow_39 : +* farm probe 0082_term_overflow_39 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: NormPolyTerm +Symbol x; +PolyRatFun rat; +Term 40; +Local F = rat(2^5000*x + 1); +Print; +.end +assert compile_error? +*--#] cov_term_overflow_39_0082_term_overflow_39 : + +*--#[ cov_autotable_illegal : +* AutoDeclare does not accept tables +AutoDeclare Table t(5); +.end +assert compile_error?('Illegal type of auto-declaration') +*--#] cov_autotable_illegal : + +*--#[ cov_table_crossmod : +* Fill in a later module reuses the table buffers of the first module +Symbol x; +Table t(1:5); +Fill t(1) = x; +.sort +Fill t(2) = x^2; +Local test = t(1) + t(2); +Print test; +.end +assert succeeded? +assert result("test") =~ expr("x + x^2") +*--#] cov_table_crossmod : + +*--#[ cov_bigtable_spare : +* 60 table fills force multiple table buffers; refilling an already +* defined element warns and the new definition will be used +* (comexpr.c), buffers freed at .end +Symbol x; +Table f(1:60); +#do i = 1,60 + Fill f(`i') = (x+1)^`i'; +#enddo +Local F = f(5) + f(50); +Print F; +.sort +Fill f(1) = x; +Fill f(2) = x; +Print F; +.end +assert warning?('Table element was already defined') +assert nterms("F") == 51 +*--#] cov_bigtable_spare : + +*--#[ cov_fillexpr_75_0084_fillexpr_75 : +* farm probe 0084_fillexpr_75 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +Table t(5); +Local e = x^2 + t(3); +FillExpression t,e; +Print e; +.sort +Print; +.end +assert compile_error? +*--#] cov_fillexpr_75_0084_fillexpr_75 : + + +*--#[ cov_table_extend_15_0084_table_extend_15 : +* farm probe 0084_table_extend_15 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* Fill beyond declared table size: table must grow +Symbol x; +Table f(1:2); +Fill f(1) = x; +Fill f(5) = x^2; +Fill f(10) = x^3; +Local F = f(10) + f(5); +Print F; +.end +assert compile_error? +*--#] cov_table_extend_15_0084_table_extend_15 : + +*--#[ cov_tbl_trailcomma_2_0084_tbl_trailcomma_2 : +* farm probe 0084_tbl_trailcomma_2 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal name or option in table declaration +Table strict,; +Print; +.end +assert compile_error? +*--#] cov_tbl_trailcomma_2_0084_tbl_trailcomma_2 : + +*--#[ cov_spectator_97_0085_spectator_97 : +* farm probe 0085_spectator_97 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +Spectator s; +On parallel; +Local t = x^2; +.sort +CopySpectator s = t; +Print t; +.end +assert compile_error? +*--#] cov_spectator_97_0085_spectator_97 : + +*--#[ cov_polyfun_70_0086_polyfun_70 : +* farm probe 0086_polyfun_70 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +Function p; +PolyFun p,2; +Local test = p(x+1)^2; +Print; +.end +assert compile_error? +*--#] cov_polyfun_70_0086_polyfun_70 : + +*--#[ cov_sparsevar_28_0093_sparsevar_28 : +* farm probe 0093_sparsevar_28 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +Table q(1:1,1:1); +Tablebase tbt10; + Table q(1:1,1:1); + Fill q(1,1) = 8; +EndTablebase; +Benter tbt10,q; +Local tst = q(1,1); +Print tst; +.end +assert compile_error? +*--#] cov_sparsevar_28_0093_sparsevar_28 : + +*--#[ cov_dollar_assign_expr_54_0096_dollar_assign_expr_54 : +* farm probe 0096_dollar_assign_expr_54 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +Local F = x + y; +.sort +$d = F; +$e = $d + 1; +#$max $e = $d; +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_dollar_assign_expr_54_0096_dollar_assign_expr_54 : + +*--#[ cov_proc_rat_38_0099_proc_rat_38 : +* farm probe 0099_proc_rat_38 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* Dictionary element type DICT_RATIONALNUMBER via dollar-valued prevar +Symbol x; +#system echo "Print; .end" > sub.frm +$r = 3/4; +Local F = `$r'*x; +ToProcess F; +Process "sub.frm"; +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_proc_rat_38_0099_proc_rat_38 : + +*--#[ cov_dealloc_cfunc_76_0109_dealloc_cfunc_76 : +* farm probe 0109_dealloc_cfunc_76 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: should be a previously declared table +* name is a declared CFunction but functions[funnum].tabl == 0 +CFunction f; +Local F = f(1); +Print F; +DeallocateTable f; +.end +assert compile_error? +*--#] cov_dealloc_cfunc_76_0109_dealloc_cfunc_76 : + +*--#[ cov_em_notfound_110_0109_em_notfound_110 : +* farm probe 0109_em_notfound_110 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Spectator nospec not found. +EmptySpectator nospec; +Print; +.end +assert compile_error? +*--#] cov_em_notfound_110_0109_em_notfound_110 : + +*--#[ cov_em_notsp_111_0109_em_notsp_111 : +* farm probe 0109_em_notsp_111 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: is not a spectator +Local e = 1; +EmptySpectator e; +Print; +.end +assert compile_error? +*--#] cov_em_notsp_111_0109_em_notsp_111 : + +*--#[ cov_em_syntax_109_0109_em_syntax_109 : +* farm probe 0109_em_syntax_109 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Proper syntax is: EmptySpectator,exprname; +EmptySpectator; +Print; +.end +assert compile_error? +*--#] cov_em_syntax_109_0109_em_syntax_109 : + +*--#[ cov_rm_notexpr_108_0109_rm_notexpr_108 : +* farm probe 0109_rm_notexpr_108 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: is not a valid expression +Symbol q; +RemoveSpectator q; +Print; +.end +assert compile_error? +*--#] cov_rm_notexpr_108_0109_rm_notexpr_108 : + +*--#[ cov_rm_syntax_106_0109_rm_syntax_106 : +* farm probe 0109_rm_syntax_106 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Proper syntax is: RemoveSpectator,exprname; +RemoveSpectator; +Print; +.end +assert compile_error? +*--#] cov_rm_syntax_106_0109_rm_syntax_106 : + +*--#[ cov_spect_illname2_105_0109_spect_illname2_105 : +* farm probe 0109_spect_illname2_105 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal name for expression +CreateSpectator "abc","spc.tmp"; +Print; +.end +assert compile_error? +*--#] cov_spect_illname2_105_0109_spect_illname2_105 : + +*--#[ cov_spect_to1arg_90_0110_spect_to1arg_90 : +* farm probe 0110_spect_to1arg_90 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Proper syntax is: ToSpectator +Symbol x; +Spectator s; +Local e1 = x; +ToSpectator e1; +.end +assert compile_error? +*--#] cov_spect_to1arg_90_0110_spect_to1arg_90 : + +*--#[ cov_unusable_dollar_set_31_0112_unusable_dollar_set_31 : +* farm probe 0112_unusable_dollar_set_31 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Unusable type of variable $v in set substitution +Symbol x; +CFunction f; +Set myseq: x; +$v = x^2; +Local F = f(x); +id f(s1?) = $v^s1?; +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_unusable_dollar_set_31_0112_unusable_dollar_set_31 : + +*--#[ cov_bad_symmetry_27_0114_bad_symmetry_27 : +* farm probe 0114_bad_symmetry_27 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Functions with nontrivial symmetrization properties cannot become tables +Symbol x; +CFunction f(symmetric); +Table f(2); +.end +assert compile_error? +*--#] cov_bad_symmetry_27_0114_bad_symmetry_27 : + +*--#[ cov_bad_tensor_29_0114_bad_tensor_29 : +* farm probe 0114_bad_tensor_29 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Tensors cannot become tables +Symbol x; +Tensor f; +Table f(2); +.end +assert compile_error? +*--#] cov_bad_tensor_29_0114_bad_tensor_29 : + +*--#[ cov_star2_3_0114_star2_3 : +* farm probe 0114_star2_3 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* star-table fill, syntax variant B: trailing star +Table t(1:10)*; +Fill t(1,5)=25; +Fill t(2,3,4)=12; +Local z = 1; +Print z; +.end +assert compile_error? +*--#] cov_star2_3_0114_star2_3 : + +*--#[ cov_tbl_funconflict_95_0114_tbl_funconflict_95 : +* farm probe 0114_tbl_funconflict_95 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: error: name f already exists as a symbol (EntVar failure path) +Symbol f; +Table f(2,3); +Print; +.end +assert compile_error? +*--#] cov_tbl_funconflict_95_0114_tbl_funconflict_95 : + +*--#[ cov_desc5_1_0115_desc5_1 : +* farm probe 0115_desc5_1 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* sparse table, descending fills: right-side insert branch (tables.c 141-154), walk-up else branch (186), single rotation right +Symbol n; +Table t(1:n); +Fill t(5) = 50; +Fill t(4) = 40; +Fill t(3) = 30; +Fill t(2) = 20; +Fill t(1) = 10; +Local test = t(4); +Print; +.end +assert compile_error? +*--#] cov_desc5_1_0115_desc5_1 : + +*--#[ cov_sy_match2_83_0115_sy_match2_83 : +* farm probe 0115_sy_match2_83 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: no argument field wildcards yet +CFunction f,g; +Symbol x,y; +Symmetrize f(1,2), f(2,1); +Local test = f(1,2); +id f(x?,y?) = g(x,y); +.end +assert compile_error? +*--#] cov_sy_match2_83_0115_sy_match2_83 : + +*--#[ cov_redecl_size : +* redeclaring a table with a different size +Symbol x; +Table t1(1:10); +Fill t1(1) = x; +Local test = t1(1); +Print test; +.sort +Table t1(1:5); +Local test2 = t1(1); +Print; +.end +assert compile_error?('Redefinition of an existing table is not allowed') +*--#] cov_redecl_size : + +*--#[ cov_table_undefread : +* reading an unfilled table element in an RHS +Table t1(1:10); +Local test = t1(1); +Print; +.end +assert runtime_error?('Element in table is undefined') +*--#] cov_table_undefread : + +*--#[ cov_fact_parenid_75_0119_fact_parenid_75 : +* farm probe 0119_fact_parenid_75 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* target: subexpression argument created in an id RHS (negative cache branch) +Symbol x; +CFunction f; +Local temp = f(1); +id f(1) = f((x^2-1)); +Factorize,f; +Print; +.end +assert compile_error? +*--#] cov_fact_parenid_75_0119_fact_parenid_75 : + +*--#[ cov_model_power_illegal_94_0119_model_power_illegal_94 : +* farm probe 0119_model_power_illegal_94 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: A model to a power or in denominator is illegal +Model m; +Local F = m^(-1); +Print; +.end +assert compile_error? +*--#] cov_model_power_illegal_94_0119_model_power_illegal_94 : + +*--#[ cov_cycexpr_100_0122_cycexpr_100 : +* farm probe 0122_cycexpr_100 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Error in Dollar variable in transform,cycle +Symbol x,y; +CFunction f; +Local test = f(x,x,x); +$n = x + y; +Transform f,cycle($n); +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_cycexpr_100_0122_cycexpr_100 : + +*--#[ cov_sym_badcolon_9_0124_sym_badcolon_9 : +* farm probe 0124_sym_badcolon_9 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal character after : +CFunction f; +Symmetrize f:x; +.end +assert compile_error? +*--#] cov_sym_badcolon_9_0124_sym_badcolon_9 : + +*--#[ cov_on_chkpt_run_58_0125_on_chkpt_run_58 : +* farm probe 0125_on_chkpt_run_58 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +Local test = x; +On checkpoint run=echo probe2,100m; +Print; +.end +assert compile_error? +*--#] cov_on_chkpt_run_58_0125_on_chkpt_run_58 : + +*--#[ cov_on_compress_twoargs_54_0125_on_compress_twoargs_54 : +* farm probe 0125_on_compress_twoargs_54 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Unrecognized option in ON compress gzip/zstd statement +Symbol x; +Local test = x; +On compress gzip 3,7; +Print; +.end +assert compile_error? +*--#] cov_on_compress_twoargs_54_0125_on_compress_twoargs_54 : + +*--#[ cov_modinverse_denom_noposneg_38_0129_modinverse_denom_nopos : +* farm probe 0129_modinverse_denom_noposneg_38 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +Local F = 2*x^3; +Modulus 7; +Off POSNEG; +Print; +.end +assert compile_error? +*--#] cov_modinverse_denom_noposneg_38_0129_modinverse_denom_nopos : + +*--#[ cov_n1_illegal_generated_index_1_0134_n1_illegal_generated_i : +* farm probe 0134_n1_illegal_generated_index_1 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Generated indices should be of the type Nnumber_? +Symbol x; +CFunction N1_?; +Local F = N1_(x); +Print; +.end +assert compile_error? +*--#] cov_n1_illegal_generated_index_1_0134_n1_illegal_generated_i : + +*--#[ cov_neg_index_renumber_64_0134_neg_index_renumber_64 : +* farm probe 0134_neg_index_renumber_64 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol i1,i2; +Index j1,j2; +Local F = 1/j1(i1); +id j1(i1?) = j2(i1); +Print; +.end +assert compile_error? +*--#] cov_neg_index_renumber_64_0134_neg_index_renumber_64 : + +*--#[ cov_xs_wild3k : +* 'wildcard' is not a valid ExtraSymbols keyword +ExtraSymbols,wildcard; +Local test = 1; +Print; +.end +assert compile_error?('Illegal keyword in ExtraSymbols statement') +*--#] cov_xs_wild3k : + +*--#[ cov_settype_pow_denom_67_0143_settype_pow_denom_67 : +* farm probe 0143_settype_pow_denom_67 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: A set without type to a power or in denominator is illegal +Set s; +Symbol x; +Local F = s^2; +Print; +.end +assert compile_error? +*--#] cov_settype_pow_denom_67_0143_settype_pow_denom_67 : + +*--#[ cov_fill_overwrite_keep_57_0148_fill_overwrite_keep_57 : +* farm probe 0148_fill_overwrite_keep_57 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Table element was already defined. New definition will be used +Table t(2:3); +Fill t(2) = 1; +Keep; +Fill t(2) = 2; +Print; +.end +assert compile_error? +*--#] cov_fill_overwrite_keep_57_0148_fill_overwrite_keep_57 : + +*--#[ cov_float_as_arg_fun_11_0148_float_as_arg_fun_11 : +* farm probe 0148_float_as_arg_fun_11 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal use of argument environment and float_ +Symbol x; +Argument float_; +.end +assert compile_error? +*--#] cov_float_as_arg_fun_11_0148_float_as_arg_fun_11 : + +*--#[ cov_illegal_paren_arg_1_0148_illegal_paren_arg_1 : +* farm probe 0148_illegal_paren_arg_1 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal () entry in argument statement +Symbol x; +Argument (x); +.end +assert compile_error? +*--#] cov_illegal_paren_arg_1_0148_illegal_paren_arg_1 : + +*--#[ cov_illegal_paren_splitfirst_2_0148_illegal_paren_splitfirst : +* farm probe 0148_illegal_paren_splitfirst_2 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal () entry in splitfirstarg statement +Symbol x,y; +SplitFirstArg (x,y); +.end +assert compile_error? +*--#] cov_illegal_paren_splitfirst_2_0148_illegal_paren_splitfirst : + +*--#[ cov_illegal_paren_splitlast_3_0148_illegal_paren_splitlast_3 : +* farm probe 0148_illegal_paren_splitlast_3 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal () entry in splitlastarg statement +Symbol x,y; +SplitLastArg (x,y); +.end +assert compile_error? +*--#] cov_illegal_paren_splitlast_3_0148_illegal_paren_splitlast_3 : + +*--#[ cov_split_with_paren_expr_4_0148_split_with_paren_expr_4 : +* farm probe 0148_split_with_paren_expr_4 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +SplitArg (x+y); +Print; +.end +assert compile_error? +*--#] cov_split_with_paren_expr_4_0148_split_with_paren_expr_4 : + +*--#[ cov_model_fcolon_80_0150_model_fcolon_80 : +* farm probe 0150_model_fcolon_80 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Graph gr; +CFunction q,qbar,g,G; +Model m; +q: Fermion qbar; +g: Vector; +Vertex G: q qbar g; +Process q qbar -> g g; +Draw; +.end +assert compile_error? +*--#] cov_model_fcolon_80_0150_model_fcolon_80 : + +*--#[ cov_hide_bigfill_41_0166_hide_bigfill_41 : +* farm probe 0166_hide_bigfill_41 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +Local big = (x+y)^12; +.sort +Hide big; +Local acc = 1; +.sort +FillExpression acc,big; +Print acc; +.end +assert compile_error? +*--#] cov_hide_bigfill_41_0166_hide_bigfill_41 : + +*--#[ cov_topol_autoerr_9_0167_topol_autoerr_9 : +* farm probe 0167_topol_autoerr_9 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: is not a function in ToPolynomial statement +Symbol x; +CFunction f; +ToPolynomial onlyfunctions f,zz; +.end +assert compile_error? +*--#] cov_topol_autoerr_9_0167_topol_autoerr_9 : + +*--#[ cov_topol_factarg_2_0167_topol_factarg_2 : +* farm probe 0167_topol_factarg_2 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: ToPolynomial statement and FactArg statement are not allowed in the same module +Symbol x; +CFunction f; +FactArg f; +ToPolynomial; +Local t = f(x); +Print; +.end +assert compile_error? +*--#] cov_topol_factarg_2_0167_topol_factarg_2 : + +*--#[ cov_ifeq_71_0173_ifeq_71 : +* farm probe 0173_ifeq_71 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* attempt to reach FROMPOINTINSTRUCTION branch (466-474) via runtime if +CFunction rat; +Symbol x; +Local t = x; +if ( Match(x) ) PolyRatFun=rat; endif; +.sort +Print; +.end +assert compile_error? +*--#] cov_ifeq_71_0173_ifeq_71 : + +*--#[ cov_div_nocomma_40_0176_div_nocomma_40 : +* farm probe 0176_div_nocomma_40 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal option field in PolyRatFun statement +* divergence option without a following comma: compcomm.c 5493-5496 +CFunction f; +PolyRatFun f(divergence); +.end +assert compile_error? +*--#] cov_div_nocomma_40_0176_div_nocomma_40 : + +*--#[ cov_polyexpnocomma_17_0176_polyexpnocomma_17 : +* farm probe 0176_polyexpnocomma_17 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal option field in PolyRatFun statement +CFunction f; +PolyRatFun f(expand); +.end +assert compile_error? +*--#] cov_polyexpnocomma_17_0176_polyexpnocomma_17 : + +*--#[ cov_prdiv_badterm_29_0176_prdiv_badterm_29 : +* farm probe 0176_prdiv_badterm_29 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal termination of option in PolyRatFun statement +Symbol x,y; +CFunction rat,den; +PolyRatFun rat,den(divergence,x,y); +.end +assert compile_error? +*--#] cov_prdiv_badterm_29_0176_prdiv_badterm_29 : + +*--#[ cov_prexpand_nodigit_32_0176_prexpand_nodigit_32 : +* farm probe 0176_prexpand_nodigit_32 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal option field in PolyRatFun statement +Symbol x,n; +CFunction rat,den; +PolyRatFun rat,den(expand,x,n); +.end +assert compile_error? +*--#] cov_prexpand_nodigit_32_0176_prexpand_nodigit_32 : + +*--#[ cov_prf_expandabs_61_0176_prf_expandabs_61 : +* farm probe 0176_prf_expandabs_61 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +CFunction f; +PolyRatFun f(expand,x,3,absolute); +Local test = 1; +Print test; +.end +assert compile_error? +*--#] cov_prf_expandabs_61_0176_prf_expandabs_61 : + +*--#[ cov_prf_expsym_63_0176_prf_expsym_63 : +* farm probe 0176_prf_expsym_63 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal symbol q in option field in PolyRatFun statement +CFunction f,q; +PolyRatFun f(expand,q,2); +.end +assert compile_error? +*--#] cov_prf_expsym_63_0176_prf_expsym_63 : + +*--#[ cov_prparerr_34_0176_prparerr_34 : +* farm probe 0176_prparerr_34 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal option x in PolyRatFun statement +Symbol x; +CFunction rat,den; +PolyRatFun rat,den(x); +.end +assert compile_error? +*--#] cov_prparerr_34_0176_prparerr_34 : + +*--#[ cov_prskipfail_35_0176_prskipfail_35 : +* farm probe 0176_prskipfail_35 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: PolyRatFun statement needs one or two commuting function(s) +CFunction rat,den; +PolyRatFun rat,den(divergence,,x); +.end +assert compile_error? +*--#] cov_prskipfail_35_0176_prskipfail_35 : + +*--#[ cov_intohide_twice_19_0179_intohide_twice_19 : +* farm probe 0179_intohide_twice_19 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Expression is already hidden +Symbol x; +Global g1 = x; +IntoHide g1; +IntoHide g1; +.end +assert compile_error? +*--#] cov_intohide_twice_19_0179_intohide_twice_19 : + +*--#[ cov_tr_negsym_7_0180_tr_negsym_7 : +* farm probe 0180_tr_negsym_7 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Currently a - sign can be used only with a vector in TryReplace +Vector p; +Symbol x; +CFunction f; +Local test = f(p); +TryReplace p, -x; +Print; +.end +assert compile_error? +*--#] cov_tr_negsym_7_0180_tr_negsym_7 : + +*--#[ cov_try_indexwild_17_0180_try_indexwild_17 : +* farm probe 0180_try_indexwild_17 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Index i?,j; +CFunction f; +Local test = f(i); +TryReplace i?,j; +Print; +.end +assert compile_error? +*--#] cov_try_indexwild_17_0180_try_indexwild_17 : + +*--#[ cov_redefine_badname_61_0182_redefine_badname_61 : +* farm probe 0182_redefine_badname_61 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal name for preprocessor variable in redefine statement +Redefine x_ = "1"; +.end +assert compile_error? +*--#] cov_redefine_badname_61_0182_redefine_badname_61 : + +*--#[ cov_checkpoint_missing_equals_88_0185_checkpoint_missing_equ : +* farm probe 0185_checkpoint_missing_equals_88 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Unrecognized option in ON Checkpoint statement +On checkpoint, runbefore foo; +Print; +.end +assert compile_error? +*--#] cov_checkpoint_missing_equals_88_0185_checkpoint_missing_equ : + +*--#[ cov_compunknown_76_0185_compunknown_76 : +* farm probe 0185_compunknown_76 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Unrecognized option in ON compress statement +Symbol x; +Local t = x; +Print t; +On compress zzz; +.end +assert compile_error? +*--#] cov_compunknown_76_0185_compunknown_76 : + +*--#[ cov_onbadchar_75_0185_onbadchar_75 : +* farm probe 0185_onbadchar_75 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal character or option encountered in ON statement +Symbol x; +Local t = x; +Print t; +On @; +.end +assert compile_error? +*--#] cov_onbadchar_75_0185_onbadchar_75 : + +*--#[ cov_2739_write_bigscratch_26_0191_2739_write_bigscratch_26 : +* farm probe 0191_2739_write_bigscratch_26 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +AutoDeclare Symbol x; +Local test = (x1+x2+x3+x4+x5+x6+x7+x8+x9+x10)^5; +.sort +Write test; +.end +assert compile_error? +*--#] cov_2739_write_bigscratch_26_0191_2739_write_bigscratch_26 : + +*--#[ cov_2740_write_all_27_0191_2740_write_all_27 : +* farm probe 0191_2740_write_all_27 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +Local a = x; +Local b = x^2; +.sort +Write; +.end +assert compile_error? +*--#] cov_2740_write_all_27_0191_2740_write_all_27 : + +*--#[ cov_pbtbl_badfile_7_0195_pbtbl_badfile_7 : +* farm probe 0195_pbtbl_badfile_7 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Cannot open file +Table t(1:2); +PrintTable t > /nosuchdir9/x.txt; +.end +#pend_if mpi? +assert compile_error? +*--#] cov_pbtbl_badfile_7_0195_pbtbl_badfile_7 : + +*--#[ cov_pbtbl_badopt_9_0195_pbtbl_badopt_9 : +* farm probe 0195_pbtbl_badopt_9 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal + option in PrintTable statement +Table t(1:2); +Fill t(1,1)=1; +PrintTable +q t; +.end +assert compile_error? +*--#] cov_pbtbl_badopt_9_0195_pbtbl_badopt_9 : + +*--#[ cov_pbtbl_nottable_8_0195_pbtbl_nottable_8 : +* farm probe 0195_pbtbl_nottable_8 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: should be a previously declared table +Symbol x; +Local e = x; +PrintTable e; +.end +#pend_if mpi? +assert compile_error? +*--#] cov_pbtbl_nottable_8_0195_pbtbl_nottable_8 : + +*--#[ cov_all_vecgam_51_0199_all_vecgam_51 : +* farm probe 0199_all_vecgam_51 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* target: SubsInAll with vector replacement inside gamma/e_/dot +Vector p,q; +Symbol j,k; +Local test = g_(p,j,q,j) + e_(p,q) + p.q; +id, all, p = q; +Print; +.end +assert compile_error? +*--#] cov_all_vecgam_51_0199_all_vecgam_51 : + +*--#[ cov_multipleof_rat_30_0201_multipleof_rat_30 : +* farm probe 0201_multipleof_rat_30 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +Local F = 3/2*x + 6*y; +Local G = 1/2*x + 2*y; +if ( multipleof(F, G) ) print +s; +.end +assert compile_error? +*--#] cov_multipleof_rat_30_0201_multipleof_rat_30 : + +*--#[ cov_brk_dotnotvec_1_0204_brk_dotnotvec_1 : +* farm probe 0204_brk_dotnotvec_1 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Not a vector in dotproduct in bracket statement: s +Vector p; +Symbol s; +Local e = p.p; +Bracket p.s; +Print; +.end +assert compile_error? +*--#] cov_brk_dotnotvec_1_0204_brk_dotnotvec_1 : + +*--#[ cov_sum_fixbad_8_0209_sum_fixbad_8 : +* farm probe 0209_sum_fixbad_8 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: is not a legal fixed index +Index i; +Sum i,5x; +.end +assert compile_error? +*--#] cov_sum_fixbad_8_0209_sum_fixbad_8 : + +*--#[ cov_sum_fixbig_9_0209_sum_fixbig_9 : +* farm probe 0209_sum_fixbig_9 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: is too large to be a fixed index +Index i; +Sum i,99999; +.end +assert compile_error? +*--#] cov_sum_fixbig_9_0209_sum_fixbig_9 : + +*--#[ cov_sum_illobj_10_0209_sum_illobj_10 : +* farm probe 0209_sum_illobj_10 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal object in sum statement +Index i,j; +Sum i,-j; +.end +assert compile_error? +*--#] cov_sum_illobj_10_0209_sum_illobj_10 : + +*--#[ cov_sum_sep2_7_0209_sum_sep2_7 : +* farm probe 0209_sum_sep2_7 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal separator between objects in sum statement. +Index i,j,k; +Sum i,j+k; +.end +assert compile_error? +*--#] cov_sum_sep2_7_0209_sum_sep2_7 : + +*--#[ cov_pre_pctdollarvar_30_0215_pre_pctdollarvar_30 : +* farm probe 0215_pre_pctdollarvar_30 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +Local t = x; +%#do $i = 1,3 +id x = x; +#enddo +.sort +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_pre_pctdollarvar_30_0215_pre_pctdollarvar_30 : + +*--#[ cov_err_dot_second_10_0216_err_dot_second_10 : +* farm probe 0216_err_dot_second_10 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Not a vector in dotproduct in PutInside +Vector p; +Symbol a; +Function f; +PutInside f, p.a; +.end +assert compile_error? +*--#] cov_err_dot_second_10_0216_err_dot_second_10 : + +*--#[ cov_moddollar_loop_36_0219_moddollar_loop_36 : +* farm probe 0219_moddollar_loop_36 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: clean +* preprocessor loop generating several modular dollar assignments +Symbol x; +Modulus cmod=17; +#do i = 1,3 + Local t`i' = x^`i' + `i'; + $a`i' = t`i'; +#enddo +Print; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_moddollar_loop_36_0219_moddollar_loop_36 : + +*--#[ cov_symfactor_2_0234_symfactor_2 : +* farm probe 0234_symfactor_2 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: Factor indicator for $-variable should be a number or a $-variable. +Symbol y,x; +$i = 1; +Local test = x; +if ( $i[y] > 0 ) id x = 1; +Print test; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_symfactor_2_0234_symfactor_2 : + +*--#[ cov_undefdollar_4_0234_undefdollar_4 : +* farm probe 0234_undefdollar_4 (+2 lines, kit2 tail) +* empirically compile error in vorm and tvorm (standalone validated) +* probe: error +* expected: dollar in if statement should have been defined previously +Symbol x; +$i = 5; +Local test = x; +if ( $i[$q] > 0 ) id x = 1; +Print test; +.end +#pend_if threaded? +assert compile_error? +*--#] cov_undefdollar_4_0234_undefdollar_4 : + +*--#[ cov_termsin_undef_dol_2_0023_termsin_undef_dol_2 : +* farm probe 0023_termsin_undef_dol_2 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: has not (yet) been defined +#if ( termsin($nosuchdol) > 0 ) + #message yes +#endif +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_termsin_undef_dol_2_0023_termsin_undef_dol_2 : + +*--#[ cov_termsin_undef_expr_3_0023_termsin_undef_expr_3 : +* farm probe 0023_termsin_undef_expr_3 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: has not (yet) been defined +#if ( termsin(nosuchexpr) > 0 ) + #message yes +#endif +.end +assert preprocess_error? +*--#] cov_termsin_undef_expr_3_0023_termsin_undef_expr_3 : + +*--#[ cov_maxpow_notsym_103_0024_maxpow_notsym_103 : +* farm probe 0024_maxpow_notsym_103 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: f should be a symbol +Function f; +#if maxpowerof(f) > 0 +#endif +.end +assert preprocess_error? +*--#] cov_maxpow_notsym_103_0024_maxpow_notsym_103 : + +*--#[ cov_minpow_notsym_105_0024_minpow_notsym_105 : +* farm probe 0024_minpow_notsym_105 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: g should be a symbol +Function g; +#if minpowerof(g) > 0 +#endif +.end +assert preprocess_error? +*--#] cov_minpow_notsym_105_0024_minpow_notsym_105 : + +*--#[ cov_maxpowerof_undef_80_0037_maxpowerof_undef_80 : +* farm probe 0037_maxpowerof_undef_80 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: @x has not (yet) been defined +#if maxpowerof(undefined_sym) +.end +assert preprocess_error? +*--#] cov_maxpowerof_undef_80_0037_maxpowerof_undef_80 : + +*--#[ cov_minpowerof_notsym_188_0038_minpowerof_notsym_188 : +* farm probe 0038_minpowerof_notsym_188 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: @ should be a symbol +#If minpowerof(x + y) > 0 +.end +assert preprocess_error? +*--#] cov_minpowerof_notsym_188_0038_minpowerof_notsym_188 : + +*--#[ cov_switch_nest_pp_186_0039_switch_nest_pp_186 : +* farm probe 0039_switch_nest_pp_186 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal nesting of switch +#do i = 1,1 +#switch `i' +#case 1 +#enddo +.end +assert preprocess_error? +*--#] cov_switch_nest_pp_186_0039_switch_nest_pp_186 : + +*--#[ cov_pre_terms_improper_42_0046_pre_terms_improper_42 : +* farm probe 0046_pre_terms_improper_42 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Improper use of terms($var) or terms(expr) +Symbol x; +Local e = x; +.sort +#if ( terms(e x) > 0 ) +#endif +Print; +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_pre_terms_improper_42_0046_pre_terms_improper_42 : + +*--#[ cov_breakdo_syntax_76_0087_breakdo_syntax_76 : +* farm probe 0087_breakdo_syntax_76 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Improper syntax of +#do i = 1,1 +#breakdo q +#enddo +.end +assert preprocess_error? +*--#] cov_breakdo_syntax_76_0087_breakdo_syntax_76 : + +*--#[ cov_debug_bad_83_0087_debug_bad_83 : +* farm probe 0087_debug_bad_83 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal argument for debug +#debug blah +.end +assert preprocess_error? +*--#] cov_debug_bad_83_0087_debug_bad_83 : + +*--#[ cov_endfloat_bad_87_0087_endfloat_bad_87 : +* farm probe 0087_endfloat_bad_87 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal parameter in +#endfloat xyz +.end +assert preprocess_error? +*--#] cov_endfloat_bad_87_0087_endfloat_bad_87 : + +*--#[ cov_factdollar_name_108_0088_factdollar_name_108 : +* farm probe 0088_factdollar_name_108 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: #FactDollar should have a single $variable for its argument +#factdollar x +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_factdollar_name_108_0088_factdollar_name_108 : + +*--#[ cov_inside_undef_131_0089_inside_undef_131 : +* farm probe 0089_inside_undef_131 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: has not (yet) been defined +Symbol x; +Local f = x; +.sort +#inside $qq +#message nope +#endinside +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_inside_undef_131_0089_inside_undef_131 : + +*--#[ cov_break_in_do_122_0090_break_in_do_122 : +* farm probe 0090_break_in_do_122 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Break without corresponding Switch +#do i = 1,1 +#break +#enddo +.end +assert preprocess_error? +*--#] cov_break_in_do_122_0090_break_in_do_122 : + +*--#[ cov_default_no_switch_120_0090_default_no_switch_120 : +* farm probe 0090_default_no_switch_120 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Default without corresponding Switch +#default +.end +assert preprocess_error? +*--#] cov_default_no_switch_120_0090_default_no_switch_120 : + +*--#[ cov_exch_syntax_93_0091_exch_syntax_93 : +* farm probe 0091_exch_syntax_93 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: exchange expr1,expr2 +Symbol x; +Local ex1 = x; +#exchange ex1 +.end +assert preprocess_error? +*--#] cov_exch_syntax_93_0091_exch_syntax_93 : + +*--#[ cov_undefine_syntax_121_0092_undefine_syntax_121 : +* farm probe 0092_undefine_syntax_121 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Undefine should just have a variable name +#define v 1 +#undefine v+1 +.end +assert preprocess_error? +*--#] cov_undefine_syntax_121_0092_undefine_syntax_121 : + +*--#[ cov_proc_default_43_0099_proc_default_43 : +* farm probe 0099_proc_default_43 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: clean +* Dictionary default element type: prevar holding a parenthesized expression +Symbol x,y; +#system echo "Print; .end" > sub.frm +#define ex (x+y) +Local F = x+y; +ToProcess F; +Process "sub.frm"; +Print; +.end +assert preprocess_error? +*--#] cov_proc_default_43_0099_proc_default_43 : + +*--#[ cov_illop_single_21_0111_illop_single_21 : +* farm probe 0111_illop_single_21 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: @Illegal operator in $( option of #if +#if $x = 1 <> 2 ) +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_illop_single_21_0111_illop_single_21 : + +*--#[ cov_brkjunk_1_0123_brkjunk_1 : +* farm probe 0123_brkjunk_1 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegally formed name +Local ok = 1; +#define [a b]x 3 +.end +assert preprocess_error? +*--#] cov_brkjunk_1_0123_brkjunk_1 : + +*--#[ cov_rr_err_mode_9_0137_rr_err_mode_9 : +* farm probe 0137_rr_err_mode_9 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal mode argument in macro RANDOM_ +Symbol x; +Local t = 1; +Print; +#define v`RANDOM_(foo,0,1)' +.end +assert preprocess_error? +*--#] cov_rr_err_mode_9_0137_rr_err_mode_9 : + +*--#[ cov_save_manyapp_80_0159_save_manyapp_80 : +* farm probe 0159_save_manyapp_80 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: clean +* variant of save_many using #append to build the expression list +Symbol x; +#define lst "" +#do i = 1,300 +Local e`i' = x; +.sort; +.store e`i'; +#append lst,e`i', +#enddo +.save `lst'saveapp.dat; +.end +assert preprocess_error? +*--#] cov_save_manyapp_80_0159_save_manyapp_80 : + +*--#[ cov_ext_attrs_clean_48_0168_ext_attrs_clean_48 : +* farm probe 0168_ext_attrs_clean_48 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +#external c1 "cat" shell=sh; +#external c2 "cat" daemon=false; +#external c3 "cat" killall=true; +#external c4 "cat" kill=15; +#external c5 "cat" stderr=terminal; +#external c6 "cat" stderr=a.log; +#external c7 "cat" stderr=b.log; +#external c8 "cat" shell=sh,kill=9,stderr=c.log; +#rmexternal c1; +#rmexternal c2; +#rmexternal c3; +#rmexternal c4; +#rmexternal c5; +#rmexternal c6; +#rmexternal c7; +#rmexternal c8; +Local test = x; +Print; +.end +assert preprocess_error? +*--#] cov_ext_attrs_clean_48_0168_ext_attrs_clean_48 : + +*--#[ cov_red_illarg_62_0188_red_illarg_62 : +* farm probe 0188_red_illarg_62 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegally formed name in argument of redefine statement +#define f 1 +#redefine f(1a) "x" +Local test = 1; +Print; +.end +assert preprocess_error? +*--#] cov_red_illarg_62_0188_red_illarg_62 : + +*--#[ cov_do_dollarlist_8_0239_do_dollarlist_8 : +* farm probe 0239_do_dollarlist_8 (+3 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: does not evaluate into a valid loop parameter +Symbol x; +Local t = x; +$list = x; +.sort +#do $d = $list +#enddo +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_do_dollarlist_8_0239_do_dollarlist_8 : + +*--#[ cov_dodound3_108_0023_dodound3_108 : +* farm probe 0023_dodound3_108 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: is undefined in third parameter in %#do instruction +Symbol x; +#do i = 1,2,$undef +#enddo +Print x; +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_dodound3_108_0023_dodound3_108 : + +*--#[ cov_isnum_undexpr_100_0024_isnum_undexpr_100 : +* farm probe 0024_isnum_undexpr_100 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: expression in isnumerical(nosuchexpr) does not exist +#if isnumerical(nosuchexpr) +#endif +.end +assert preprocess_error? +*--#] cov_isnum_undexpr_100_0024_isnum_undexpr_100 : + +*--#[ cov_fact_symbol_100_0025_fact_symbol_100 : +* farm probe 0025_fact_symbol_100 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Improper use of isfactorized +Symbol x; +#if ( isfactorized(x) ) +#endif +.end +assert preprocess_error? +*--#] cov_fact_symbol_100_0025_fact_symbol_100 : + +*--#[ cov_flag_badnum_103_0025_flag_badnum_103 : +* farm probe 0025_flag_badnum_103 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: for flag in flag condition +Local expr = 1; +#if ( flag(99,expr) ) +#endif +.end +assert preprocess_error? +*--#] cov_flag_badnum_103_0025_flag_badnum_103 : + +*--#[ cov_illend_cond_71_0037_illend_cond_71 : +* farm probe 0037_illend_cond_71 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: @illegal end of condition +#do i = 1,2 +#else +#enddo +.end +assert preprocess_error? +*--#] cov_illend_cond_71_0037_illend_cond_71 : + +*--#[ cov_exists_file_16_0046_exists_file_16 : +* farm probe 0046_exists_file_16 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: clean +#if exists("/dev/null") == 1 +#message devnull +#endif +#system "echo x > tmp_cov_file.txt" +#if exists("tmp_cov_file.txt") == 1 +#message file exists +#endif +Print; +.end +assert preprocess_error? +*--#] cov_exists_file_16_0046_exists_file_16 : + +*--#[ cov_pre_exists_improper_44_0046_pre_exists_improper_44 : +* farm probe 0046_pre_exists_improper_44 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Improper use of exists($var) or exists(expr) +Symbol x; +Local e = x; +.sort +#if ( exists(e x) == 1 ) +#endif +Print; +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_pre_exists_improper_44_0046_pre_exists_improper_44 : + +*--#[ cov_pre_isnum_undef_48_0046_pre_isnum_undef_48 : +* farm probe 0046_pre_isnum_undef_48 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: $ variable in isnumerical +Symbol x; +#if ( isnumerical($nosuchdol) == 1 ) +#endif +Print; +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_pre_isnum_undef_48_0046_pre_isnum_undef_48 : + +*--#[ cov_add_brack_106_0057_add_brack_106 : +* farm probe 0057_add_brack_106 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: unmatched brackets in #add instruction +#opendictionary mydict +#add foo(bar:"x" +.end +assert preprocess_error? +*--#] cov_add_brack_106_0057_add_brack_106 : + +*--#[ cov_close_unknown_113_0057_close_unknown_113 : +* farm probe 0057_close_unknown_113 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Dictionary not found in RemoveDictionary +#closedictionary nosuchdict +.end +assert preprocess_error? +*--#] cov_close_unknown_113_0057_close_unknown_113 : + +*--#[ cov_use_unknown_112_0057_use_unknown_112 : +* farm probe 0057_use_unknown_112 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: There is no dictionary with the name +#usedictionary nosuchdict +.end +assert preprocess_error? +*--#] cov_use_unknown_112_0057_use_unknown_112 : + +*--#[ cov_sys_redirect_80_0076_sys_redirect_80 : +* farm probe 0076_sys_redirect_80 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: clean +#system echo formprobe_data > formprobe_tmp.txt +#remove formprobe_tmp.txt +.end +assert preprocess_error? +*--#] cov_sys_redirect_80_0076_sys_redirect_80 : + +*--#[ cov_breakdo_nodo_75_0087_breakdo_nodo_75 : +* farm probe 0087_breakdo_nodo_75 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: breakdo without do +#breakdo +.end +assert preprocess_error? +*--#] cov_breakdo_nodo_75_0087_breakdo_nodo_75 : + +*--#[ cov_commentchar_multi_82_0087_commentchar_multi_82 : +* farm probe 0087_commentchar_multi_82 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Comment character should be a single +#commentchar xy +.end +assert preprocess_error? +*--#] cov_commentchar_multi_82_0087_commentchar_multi_82 : + +*--#[ cov_commentchar_none_81_0087_commentchar_none_81 : +* farm probe 0087_commentchar_none_81 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: No valid comment character +#commentchar +.end +assert preprocess_error? +*--#] cov_commentchar_none_81_0087_commentchar_none_81 : + +*--#[ cov_elseif_naked_85_0087_elseif_naked_85 : +* farm probe 0087_elseif_naked_85 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: elseif without corresponding +#elseif 1 > 2 +.end +assert preprocess_error? +*--#] cov_elseif_naked_85_0087_elseif_naked_85 : + +*--#[ cov_endinside_unterm_89_0087_endinside_unterm_89 : +* farm probe 0087_endinside_unterm_89 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: not terminated +#inside +Local f = x +#endinside +.end +assert preprocess_error? +*--#] cov_endinside_unterm_89_0087_endinside_unterm_89 : + +*--#[ cov_endif_alone_102_0088_endif_alone_102 : +* farm probe 0088_endif_alone_102 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: #endif without corresponding #if +#endif +.end +assert preprocess_error? +*--#] cov_endif_alone_102_0088_endif_alone_102 : + +*--#[ cov_factdollar_undef_109_0088_factdollar_undef_109 : +* farm probe 0088_factdollar_undef_109 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: is undefined +#factdollar $q +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_factdollar_undef_109_0088_factdollar_undef_109 : + +*--#[ cov_inside_nest_130_0089_inside_nest_130 : +* farm probe 0089_inside_nest_130 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal nesting of %#inside/%#endinside +Symbol x; +Local f = x; +.sort +$x = 1; +$y = 2; +#inside $x +#inside $y +#message nested +#endinside +#endinside +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_inside_nest_130_0089_inside_nest_130 : + +*--#[ cov_opt_inactive_134_0089_opt_inactive_134 : +* farm probe 0089_opt_inactive_134 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: is not an active unhidden +Symbol x; +Local f = x; +.sort +#Optimize nosuch +.end +assert preprocess_error? +*--#] cov_opt_inactive_134_0089_opt_inactive_134 : + +*--#[ cov_procext_none_135_0089_procext_none_135 : +* farm probe 0089_procext_none_135 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: No valid procedure extension specified +#procedureextension +.end +assert preprocess_error? +*--#] cov_procext_none_135_0089_procext_none_135 : + +*--#[ cov_dollar_undef_127_0090_dollar_undef_127 : +* farm probe 0090_dollar_undef_127 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: has not been defined (yet) +#assign x = $q + 1 +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_dollar_undef_127_0090_dollar_undef_127 : + +*--#[ cov_preout_opt_94_0091_preout_opt_94 : +* farm probe 0091_preout_opt_94 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal option in PreOut +#preout xyz +.end +assert preprocess_error? +*--#] cov_preout_opt_94_0091_preout_opt_94 : + +*--#[ cov_proc_badname_98_0091_proc_badname_98 : +* farm probe 0091_proc_badname_98 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal name for procedure +#procedure 9lives +#endprocedure +.end +assert preprocess_error? +*--#] cov_proc_badname_98_0091_proc_badname_98 : + +*--#[ cov_setrandom_114_0092_setrandom_114 : +* farm probe 0092_setrandom_114 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: proper syntax is #SetRandom number +#SetRandom abc +.end +assert preprocess_error? +*--#] cov_setrandom_114_0092_setrandom_114 : + +*--#[ cov_timeoutafter_bad_120_0092_timeoutafter_bad_120 : +* farm probe 0092_timeoutafter_bad_120 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: proper syntax is #TimeoutAfter number +#TimeoutAfter abc +.end +assert preprocess_error? +*--#] cov_timeoutafter_bad_120_0092_timeoutafter_bad_120 : + +*--#[ cov_w_openfile2_110_0096_w_openfile2_110 : +* farm probe 0096_w_openfile2_110 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: could not open file +Symbol x; +Local t = x; +#write < "/dev/null/nope.txt" "hello" +Print; +.end +#pend_if mpi? +assert preprocess_error? +*--#] cov_w_openfile2_110_0096_w_openfile2_110 : + +*--#[ cov_pipe_from_5_0098_pipe_from_5 : +* farm probe 0098_pipe_from_5 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: clean +* target: do_run_cmd + #fromexternal into generated include file +#pipe 1, /bin/echo "Symbol s; Local q = 7; Print;" +#fromexternal 1, extgen.inc +#include extgen.inc +#closeexternal 1 +.end +assert preprocess_error? +*--#] cov_pipe_from_5_0098_pipe_from_5 : + +*--#[ cov_deftermsif_9_0103_deftermsif_9 : +* farm probe 0103_deftermsif_9 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: clean +Symbols x,y; +Local F = (x-y)^3; +Bracket x; +.sort; +Keep Brackets; +id y = 2; +.sort; +#if ( terms_(F) >= 2 ) +Print; +#else +Print "tiny"; +#endif +.end +assert preprocess_error? +*--#] cov_deftermsif_9_0103_deftermsif_9 : + +*--#[ cov_div_zero_38_0119_div_zero_38 : +* farm probe 0119_div_zero_38 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Division by zero in preprocessor calculator +#do i = 1, 7/0 + #message never = `i' +#enddo +.end +assert preprocess_error? +*--#] cov_div_zero_38_0119_div_zero_38 : + +*--#[ cov_fact_neg_27_0119_fact_neg_27 : +* farm probe 0119_fact_neg_27 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Negative value in preprocessor factorial +#do i = 1, (2-5)! + #message never = `i' +#enddo +.end +assert preprocess_error? +*--#] cov_fact_neg_27_0119_fact_neg_27 : + +*--#[ cov_sqrt_err_33_0119_sqrt_err_33 : +* farm probe 0119_sqrt_err_33 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal value in preprocessor square root +#do i = 1, 0^/ + #message never = `i' +#enddo +.end +assert preprocess_error? +*--#] cov_sqrt_err_33_0119_sqrt_err_33 : + +*--#[ cov_bad_namespace_builtin_32_0123_bad_namespace_builtin_32 : +* farm probe 0123_bad_namespace_builtin_32 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Built in objects cannot be part of namespaces +Symbol x; +#namespace abc_ +Local F = x^2; +.end +assert preprocess_error? +*--#] cov_bad_namespace_builtin_32_0123_bad_namespace_builtin_32 : + +*--#[ cov_external_channel_set_86_0129_external_channel_set_86 : +* farm probe 0129_external_channel_set_86 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: clean +* Set an external channel first then use it, covering 503-510 +#external 1 +Local F = 1; +#external +Print; +.end +assert preprocess_error? +*--#] cov_external_channel_set_86_0129_external_channel_set_86 : + +*--#[ cov_rr_err_args_10_0137_rr_err_args_10 : +* farm probe 0137_rr_err_args_10 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal arguments in macro RANDOM_ +Symbol x; +Local t = 1; +Print; +#define v`RANDOM_(lin,0,1,2)' +.end +assert preprocess_error? +*--#] cov_rr_err_args_10_0137_rr_err_args_10 : + +*--#[ cov_ext_combo_68_0138_ext_combo_68 : +* farm probe 0138_ext_combo_68 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +#external mychan, "true", kill = 9, stderr = myerr.txt, shell = /bin/sh +Local test = x; +Print; +#close mychan +.end +assert preprocess_error? +*--#] cov_ext_combo_68_0138_ext_combo_68 : + +*--#[ cov_nsuse_7_0138_nsuse_7 : +* farm probe 0138_nsuse_7 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: clean +* guess at #use directive to expose namespace names outside +#namespace nsuse +#define w 4 +#endnamespace +#use nsuse +#message `w' +#end +.end +assert preprocess_error? +*--#] cov_nsuse_7_0138_nsuse_7 : + +*--#[ cov_dfac_missing_16_0159_dfac_missing_16 : +* farm probe 0159_dfac_missing_16 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal factor number for $ variable +Symbol x; +$x = x^2+3*x+7; +.sort +Local u = `$x[2'; +Print u; +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_dfac_missing_16_0159_dfac_missing_16 : + +*--#[ cov_badfac_do_41_0163_badfac_do_41 : +* farm probe 0163_badfac_do_41 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Not a valid factor number for $-variable in do loop +Symbol x; +Local test = x; +$a = 1+2; +.sort +#do i = $a[7],10 +id x = 1; +#enddo +Print test; +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_badfac_do_41_0163_badfac_do_41 : + +*--#[ cov_dol_fact0_do_17_0163_dol_fact0_do_17 : +* farm probe 0163_dol_fact0_do_17 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: clean +* factor index 0 should give the number of factors (num == 0 path) +Symbol x,y; +$a = x*y; +#do i = 1,$a0 + #message cnt +#enddo +.end +#pend_if threaded? +assert preprocess_error? +*--#] cov_dol_fact0_do_17_0163_dol_fact0_do_17 : + +*--#[ cov_inc_loop_51_0171_inc_loop_51 : +* farm probe 0171_inc_loop_51 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: clean +* same small file included repeatedly in a #do loop; stream reopen paths +Symbol x; +Local test = 7; +#write {"#message hi"} +#do i = 1,5 +#include incG.txt +#enddo +Print test; +.end +#pend_if mpi? +assert preprocess_error? +*--#] cov_inc_loop_51_0171_inc_loop_51 : + +*--#[ cov_toexternal_guess_55_0171_toexternal_guess_55 : +* farm probe 0171_toexternal_guess_55 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: Unknown preprocessor statement +* speculative attempt to reach EXTERNALCHANNELSTREAM code in ReadFromStream +Symbol x; +Local test = 11; +Print test; +#toexternal "hello" +.end +assert preprocess_error? +*--#] cov_toexternal_guess_55_0171_toexternal_guess_55 : + +*--#[ cov_preset_quoted_90_0178_preset_quoted_90 : +* farm probe 0178_preset_quoted_90 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: external +* Syntax hedge: same numeric list but quoted, in case #external wants +* a string argument form. +#external "999,999" +.end +assert preprocess_error? +*--#] cov_preset_quoted_90_0178_preset_quoted_90 : + +*--#[ cov_reset_bare_0_0198_reset_bare_0 : +* farm probe 0198_reset_bare_0 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: clean +* trigger: WriteSetup via bare #reset (prints all setup parameters) +#reset +Symbol x; +Local test = x^2+1; +Print; +.end +assert preprocess_error? +*--#] cov_reset_bare_0_0198_reset_bare_0 : + +*--#[ cov_opt_predebug_45_0200_opt_predebug_45 : +* farm probe 0200_opt_predebug_45 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* speculative: debug argument to #optimize +* expected: syntax error near "debug" +Symbol x,y; +Local F = (x+y)^2; +.sort +#optimize F, debug +#ifdef OPTIMIZED +Local G = `OPTIMIZED'; +#endif +.sort +Print; +.end +assert preprocess_error? +*--#] cov_opt_predebug_45_0200_opt_predebug_45 : + +*--#[ cov_endnamespace_digit_6_27_endnamespace_digit_6 : +* farm probe 27_endnamespace_digit_6 (+2 lines, kit2 tail) +* empirically preprocess error in vorm and tvorm (standalone validated) +* probe: error +* expected: namespace +#endnamespace 1 +.end +assert preprocess_error? +*--#] cov_endnamespace_digit_6_27_endnamespace_digit_6 : + +*--#[ cov_sorttype_118_0105_sorttype_118 : +* farm probe 0105_sorttype_118 (+3 lines, kit2 tail) +* empirically terminate in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal SortType specification +#: sorttype = bogus +Symbol x; +Local t = x; +Print t; +.end +assert runtime_error? +*--#] cov_sorttype_118_0105_sorttype_118 : + +*--#[ cov_endinside_missing_68_0102_endinside_missing_68 : +* farm probe 0102_endinside_missing_68 (+2 lines, kit2 tail) +* empirically terminate in vorm and tvorm (standalone validated) +* probe: error +* expected: 1 endinside statement(s) missing +inside ; +.end +assert runtime_error? +*--#] cov_endinside_missing_68_0102_endinside_missing_68 : + +*--#[ cov_inexpr_open_29_0102_inexpr_open_29 : +* farm probe 0102_inexpr_open_29 (+2 lines, kit2 tail) +* empirically terminate in vorm and tvorm (standalone validated) +* probe: error +* expected: endinexpression statement(s) missing +Symbol x; +Local t = x^2; +InExpression t; +id x = 3; +Print t; +.end +assert runtime_error? +*--#] cov_inexpr_open_29_0102_inexpr_open_29 : + +*--#[ cov_missing_endargument_16_0102_missing_endargument_16 : +* farm probe 0102_missing_endargument_16 (+2 lines, kit2 tail) +* empirically terminate in vorm and tvorm (standalone validated) +* probe: error +* expected: endargument statement(s) missing +CFunction f; +Symbol x; +Local t = f(x); +Argument f; + id x = x + 1; +.end +assert runtime_error? +*--#] cov_missing_endargument_16_0102_missing_endargument_16 : + +*--#[ cov_no_label_44_0102_no_label_44 : +* farm probe 0102_no_label_44 (+2 lines, kit2 tail) +* empirically terminate in vorm and tvorm (standalone validated) +* probe: error +* expected: Label skip missing +Symbol x,y; +CFunction f,g; +Local F = f(x); +If ( Match(g(y)) ) Goto skip; +Print; +.end +assert runtime_error? +*--#] cov_no_label_44_0102_no_label_44 : + +*--#[ cov_numval_eq_111_0105_numval_eq_111 : +* farm probe 0105_numval_eq_111 (+2 lines, kit2 tail) +* empirically terminate in vorm and tvorm (standalone validated) +* probe: error +* expected: Numerical value expected for parameter +#: maxtermsize = abc +Symbol x; +Local t = x; +Print t; +.end +assert runtime_error? +*--#] cov_numval_eq_111_0105_numval_eq_111 : + +*--#[ cov_procext_dot_117_0105_procext_dot_117 : +* farm probe 0105_procext_dot_117 (+2 lines, kit2 tail) +* empirically terminate in vorm and tvorm (standalone validated) +* probe: error +* expected: Illegal string for procedure extension +#: procedureextension = .# +Symbol x; +Local t = x; +Print t; +.end +assert runtime_error? +*--#] cov_procext_dot_117_0105_procext_dot_117 : + +*--#[ cov_ac_bigrep2_37_0154_ac_bigrep2_37 : +* farm probe 0154_ac_bigrep2_37 (+2 lines, kit2 tail) +* empirically terminate in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +CFunction f,g; +Local test = f( +#do i = 1,400 +(x*`i'+y*`i'+`i'),(x*`i'+y*`i'+`i'),(x*`i'+y*`i'+`i'),(x*`i'+y*`i'+`i'), +#enddo +g(x)); +Print; +.end +#pend_if threaded? || mpi? +assert runtime_error? +*--#] cov_ac_bigrep2_37_0154_ac_bigrep2_37 : + +*--#[ cov_save_twice_36_0197_save_twice_36 : +* farm probe 0197_save_twice_36 (+2 lines, kit2 tail) +* empirically terminate in vorm and tvorm (standalone validated) +* probe: clean +* Same expression saved twice to same file (index chain update) +Symbol x; +Local e1 = (x+2)^2; +Print; +.sort +Save probe_chain.dat, e1; +Print; +.sort +Save probe_chain.dat, e1; +Print; +.end +#pend_if mpi? +assert runtime_error? +*--#] cov_save_twice_36_0197_save_twice_36 : + +*--#[ cov_pgcd_fact_bigcoef_48_0216_pgcd_fact_bigcoef_48 : +* farm probe 0216_pgcd_fact_bigcoef_48 (+2 lines, kit2 tail) +* empirically terminate in vorm and tvorm (standalone validated) +* probe: clean +Symbol x,y; +Local t = (999999999999999999999999999999*(x+2*y+1)*(x^2+y+3)*(3*x+y))/((x+2*y+1)*(x^2+y+3)*(2*x+7*y+5)); +Factorize t; +Print; +.end +assert runtime_error? +*--#] cov_pgcd_fact_bigcoef_48_0216_pgcd_fact_bigcoef_48 : + +*--#[ cov_multiexpr_7_0218_multiexpr_7 : +* farm probe 0218_multiexpr_7 (+2 lines, kit2 tail) +* empirically terminate in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +Local e1 = (x+1)^5; +Local e2 = x^3 + x; +Local e3 = 7 - x^4; +.store +Save smul.dat,e1,e2,e3; +Print; +.end +#pend_if mpi? +assert runtime_error? +*--#] cov_multiexpr_7_0218_multiexpr_7 : + +*--#[ cov_illend_string_1_0023_illend_string_1 : +* farm probe 0023_illend_string_1 (+2 lines, kit2 tail) +* empirically warning in vorm and tvorm (standalone validated) +* probe: error +* expected: illegal end of condition +#if ( "unterminated string > 0 ) + #message yes +#endif +.end +assert warning? +*--#] cov_illend_string_1_0023_illend_string_1 : + +*--#[ cov_add_quote_105_0057_add_quote_105 : +* farm probe 0057_add_quote_105 (+2 lines, kit2 tail) +* empirically warning in vorm and tvorm (standalone validated) +* probe: error +* expected: Irregular use of double quotes in #add instruction +#opendictionary mydict +#add foo:"bar +.end +assert warning? +*--#] cov_add_quote_105_0057_add_quote_105 : + +*--#[ cov_ckpt_units_28_0125_ckpt_units_28 : +* farm probe 0125_ckpt_units_28 (+2 lines, kit2 tail) +* empirically warning in vorm and tvorm (standalone validated) +* probe: clean +* covers checkpoint time interval units s/m/h/d; if units are mandatory +* this may instead error with "Unrecognized time interval in ON Checkpoint statement" +* (a DeprecationWarning is printed unless FORM_IGNORE_DEPRECATION is set, +* so the asserts are warning-independent) +Symbol x; +On checkpoint 5s; +On checkpoint 3m; +On checkpoint 2h; +On checkpoint 4d; +Local res = x; +Print; +.end +assert succeeded? || warning? +assert result("res") =~ expr("x") +*--#] cov_ckpt_units_28_0125_ckpt_units_28 : + +*--#[ cov_dolarg_recursive_chain_101_0132_dolarg_recursive_chain_1 : +* farm probe 0132_dolarg_recursive_chain_101 (+2 lines, kit2 tail) +* empirically warning in vorm and tvorm (standalone validated) +* probe: clean +Symbol x; +Local F = x; +$j = 2; +$i = $j + 1; +#do i = 1,$i +Print; +.enddo +.end +#pend_if threaded? +assert warning? +*--#] cov_dolarg_recursive_chain_101_0132_dolarg_recursive_chain_1 : +*--#[ cov_r3c_encdec : +* r3 composite: clean probes, 5 programs +* farm probe 0000_enc_bigintarg (+5 lines, r3) +* probe: clean +* big integer subexpression arg: passes the numerical-arg checks, gets encoded +CFunction f; +Local test = f(1,2,123456789012345678901234567890); +Transform f encode(1,last):base=10; +Print; +.end +* farm probe 0000_enc_nofit (+13 lines, r3) +* probe: clean +* 10 args of 1 with maximal base: result needs more words than the old +* argument area -> RunEncode "does not fit" relocation path +CFunction f; +Local test = f(1,1,1,1,1,1,1,1,1,1); +Transform f encode(1,last):base=536870911; +Print; +.end +* farm probe 0000_enc_subarg (+4 lines, r3) +* probe: clean +* symbolic subexpression arg in encode range +CFunction f; +Symbol x; +Local test = f(1,2,x^2+1); +Transform f encode(1,last):base=10; +Print; +.end +* farm probe 0004_dec_pow2 (+10 lines, r3) +* probe: clean +* integer with zero low word, nonzero high word: "Not an integer" scan path +CFunction f; +Local test = f(8589934592,1,2); +Transform f decode(1,last):base=10; +Print test; +.end +* farm probe 0004_dec_subarg (+4 lines, r3) +* probe: clean +* non-numerical subterm first arg (x+1): "Not numerical" skip in RunDecode +Symbol x; +CFunction f; +Local test = f(x+1,12345,678); +Transform f decode(1,last):base=10; +Print test; +.end +assert succeeded? +*--#] cov_r3c_encdec : + +*--#[ cov_r3c_implmul : +* r3 composite: clean probes, 4 programs +* farm probe 0001_impl_rev_zeros (+11 lines, r3) +* probe: clean +* reverse-range implode: zero absorption working backward (RunImplode 1944-1957) +CFunction f; +Symbol a; +Local test = f(0,0,1,0,a,0,0,0,-1); +Transform f implode(9,1); +Print; +.end +* farm probe 0002_mul_vecidx (+12 lines, r3) +* probe: clean +* vector and index arguments together in mulargs range +Vector p; +Index mu; +CFunction f; +Local test = f(p,mu,2); +Transform f mulargs(1,last); +Print; +.end +* farm probe 0005_pow_expr (+3 lines, r3) +* probe: clean +* expression name as exponent (TEXPRESSION branch) +Symbol x,y; +Local fexp = 1; +Local test = y^fexp; +Print test; +.end +* farm probe 0005_pow_set (+9 lines, r3) +* probe: clean +* set as exponent: x^{1,2} expands via Exp_ conversion +Symbol x; +Local test = x^{1,2}; +Print test; +.end +assert succeeded? +*--#] cov_r3c_implmul : + +*--#[ cov_r3c_wildtop : +* r3 composite: clean probes, 5 programs +* farm probe 0006_setarr_sum (+12 lines, r3) +* probe: clean +* set element with summation parameter as index (simp4token backward scan +* for enclosing sum_ matches the set index symbol) +Symbols a,a1,a2,a3,n; +Functions f,g1,g2; +Set aa:a1,a2,a3; +Set gg:g1,g2; +Local test = f(a1)+f(a2); +id f(a?aa) = sum_(n,1,2,gg[n]); +Print test; +.end +* farm probe 0007_wild_setpair (+10 lines, r3) +* probe: clean +* a?set1?set2: element of set1 replaced by corresponding element of set2 +Symbols a,a1,a2,b1,b2; +Functions f; +Set aa:a1,a2; +Set bb:b1,b2; +Local test = f(a1)*f(a2); +id f(a?aa?bb) = a*f(a); +Print test; +.end +* farm probe 0065_wildnames_growth (+11 lines, r3) +* probe: clean +* many argument-list wildcards in one id: AddWildcardName buffer growth +* (wildcard-name buffer starts at 100 bytes, doubles on overflow) +Symbols x; +CFunction f,g; +id f(?a01,?a02,?a03,?a04,?a05,?a06,?a07,?a08,?a09,?a10,?a11,?a12,?a13,?a14,?a15,?a16,x?) = g(?a01); +Print; +.end +* farm probe 0066_topol_dotprod (+50 lines, r3) +* probe: clean +* ToPolynomial DOALL: DOTPRODUCT, VECTOR and INDEX piece branches +Vectors p,q; +Indices i,j; +Local test = p.q + p(i)*q(j) + i*j; +ToPolynomial; +Print; +.end +* farm probe 060_bplus_pow_h2 (+4 lines, r3) +* probe: clean +Symbols x,y,a,b; +Local F = (a+b)*x^2*y + (a-b)*x*y^2 + x*y; +B+ x,y; +.sort +Local D = F[x]^3 - F[x^2]*F[x] + F[1]*F[x^2]; +Print D; +.end +assert succeeded? +*--#] cov_r3c_wildtop : + +*--#[ cov_r3c_repl : +* r3 composite: clean probes, 7 programs +* multiterm replacement is accepted in 5.0.2 +Symbol x,y; +CFunction f; +Local test = f(x); +Transform f replace(1,last)=(xarg_,(xarg_+1)*(xarg_+2)); +Print test; +.end +* farm probe 0003_repl_farg_nofit (+13 lines, r3) +* probe: clean +CFunction f,g; +Local test = f(1,2); +Transform f replace(1,last)=(farg_,5); +Print test; +.end +* farm probe 0003_repl_iarg_sub (+5 lines, r3) +* probe: clean +Index mu,k; +Vector p1; +CFunction f; +Local test = f(p1(mu),1); +Transform f replace(1,last)=(iarg_,k); +Print test; +.end +* farm probe 0003_repl_minvec (+17 lines, r3) +* probe: clean +Vector p,q; +CFunction f; +Local test = f(-p,1); +Transform f replace(1,last)=(parg_,q); +Print test; +.end +* farm probe 0003_repl_multi_gen (+43 lines, r3) +* probe: clean +Vector p,q; +Index mu; +Symbol y; +CFunction f; +Local test = f(y,p,mu,1,2); +Transform f replace(1,last)=(y,1,p,q,mu,2); +Print test; +.end +* farm probe 0003_repl_multi_tensor (+7 lines, r3) +* probe: clean +Vector p,q; +Index mu1,mu2; +Tensor t; +Local test = t(mu1,3,p,2); +Transform t replace(1,last)=(mu1,mu2,p,q); +Print test; +.end +* farm probe 0003_repl_parg_tensor (+8 lines, r3) +* probe: clean +Vector p,q,r; +Tensor t; +Local test = t(p,q,3); +Transform t replace(1,last)=(parg_,r); +Print test; +.end +assert succeeded? +*--#] cov_r3c_repl : + +*--#[ cov_r3c_storetb : +* r3 composite: clean probes, 8 programs +* farm probe 0033_tostorage_vars (+17 lines, r3) +* probe: clean +* .store of an expression using every variable class: ToStorage namelist +* write branches (store.c 2242-2261) +Auto S x; +Auto V p; +Auto I i; +Auto C f; +Set sv: x; +Mod 7; +Global e = f(x,p(i)) + x*p.p + f(i) + x^2; +.sort +Print e; +.store +.end +* farm probe 0024_save_idxover (+15 lines, r3) +* probe: clean +* Save of >INFILEINDEX stored expressions: the file index overflows and a +* new index block is chained into the save file (CoSave i<=0 branch, +* store.c 462-480) +Auto S x; +#do i = 1,20 +Global g`i' = x^`i' + `i'; +#enddo +.store +Save p024a.dat, g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12,g13,g14,g15,g16,g17,g18,g19,g20; +.end +Load p024a.dat; +Local T = g1+g17+g20; +.sort +Print T; +.end +* (runs clean in 5.0.2: file creation is deferred to the open) +TableBase "/no/such/dir/bad1.tbl" create; +.end +* farm probe 0063_tb_readdto (+5 lines, r3) +* probe: clean +* adding the same table twice: second AddTableName walks the search loop +Symbol x; +Table,sparse,f(1); +Fill f(1) = x; +TableBase "dd1.tbl" create; +TableBase "dd1.tbl" addto f; +TableBase "dd1.tbl" addto f; +TableBase "dd1.tbl" addto f(1); +.end +* farm probe 0081_tb_on_off (+13 lines, r3) +* probe: clean +* TableBase on/off compress subkeys (CoTBon/CoTBoff) +CTable,sparse f(1); +#do i = 1,5 + Fill f(`i') = `i'; +#enddo +.sort +TableBase "p0081on.tbl" create; +TableBase "p0081on.tbl" addto f; +TableBase "p0081on.tbl" on compress; +.end +TableBase "p0081on.tbl" open; +TableBase "p0081on.tbl" off compress; +TableBase "p0081on.tbl" audit; +.end +* farm probe 0079_spec_big (+3 lines, r3) +* probe: clean +* large spectator content: forces the PutInSpectator flush branch +#: scratchsize 1 +Symbols x; +CreateSpectator S1,"p0079c.spec"; +Local F = (x+1)^30*(x-2)^30; +.sort +ToSpectator S1; +.sort +CopySpectator G = S1; +Print G; +.end +assert succeeded? +*--#] cov_r3c_storetb : + +*--#[ cov_r3c_optfmt : +* r3 composite: clean probes, 8 programs +* farm probe 0037_opt_extrasym (+10 lines, r3) +* probe: clean +* scheme option with extra-symbol names (N1_ style): CoOptimizeOption +* extrasym branch (compcomm.c 6952-6964) +Symbols a,b,x; +Local F = x*(a+b)*(a-b) + b^3; +.sort +Format O1,scheme=(Z1_,Z2_); +.sort +#optimize F +#write "%O" +#clearoptimize +.end +* farm probe 0037_opt_extrasymnum (+9 lines, r3) +* probe: clean +* scheme option with extrasym(n) numbered extra symbols: +* CoOptimizeOption parenthesized extrasym branch (compcomm.c 6982-6996) +Symbols a,b,x; +ExtraSymbols array Z; +Local F = x*(a+b)*(a-b) + b^3; +.sort +Format O1,scheme=(Z(1),Z(2)); +.sort +#optimize F +#write "%O" +#clearoptimize +.end +* farm probe 0068_debugflag_twice (+27 lines, r3) +* probe: clean +* second debugflag=1 printing pass in a later module (print_expr branch) +Symbols a,b,c; +Local F = (a+b)*(c+a) + a^2; +Format O1,debugflag=1; +.sort +#optimize F +#write "%O" +#clearoptimize +Local G = (a+c)^3 + b*c^2; +Format O2,debugflag=1,method=greedy; +.sort +#optimize G +#write "%O" +#clearoptimize +.end +* farm probe 0068_horner_many (+3 lines, r3) +* probe: clean +* many variables force deep build_Horner_tree recursion +Symbols a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12; +Local F = (a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+a11+a12)^3; +Format O1,method=greedy; +.sort +#optimize F +#write "%O" +#clearoptimize +.end +* farm probe 0073_setextattr_stderr (+11 lines, r3) +* probe: clean +* #setexternalattr with stderr attribute (DoSetExternalAttr stderr branch) +#setexternalattr stderr=terminal +#external cat +#rmexternal +#setexternalattr stderr=/tmp/probe073_stderr.txt,shell=noshell,kill=0 +#rmexternal +.end +* farm probe 0077_setup_dotchar (+5 lines, r3) +* probe: clean +* #: dotchar STRINGVALUE and #: insidefirst ONOFFVALUE +#: dotchar , +#: insidefirst off +Symbols x; +Local F = x; +Print; +.end +* farm probe 0077_setup_path_env (+24 lines, r3) +* probe: clean +* #: path with backtick environment substitution (ProcessOption 203-243) +#: path `HOME' +Symbols x; +Local F = x; +Print; +.end +* farm probe 0073_write_fortran90 (+4 lines, r3) +* probe: clean +* Fortran90 mode continuation ('&' continuation in writeToChannel) +Symbols x; +Format Fortran90; +.sort +#write "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" +.end +assert succeeded? +*--#] cov_r3c_optfmt : + +*--#[ cov_r3c_dolclean : +* r3 composite: clean probes, 8 programs, $-variables present +#pend_if threaded? || mpi? +* farm probe 0012_dol_idrhs_2 (+6 lines, r3) +* probe: clean +Vector p,q; +Local F = p; +$a = q; +id p = $a; +Print; +.end +* farm probe 0016_dol_bigint_11 (+4 lines, r3) +* probe: clean +Symbol s1; +Local F = 1; +$b = 123456789012345678901234567890; +If ( $b > 0 ) Print F; +Print; +.end +* farm probe 0016_frac_dollar_18 (+2 lines, r3) +* probe: clean +Local F = 1; +.sort +$n = 3/4; +.sort +#if ( '$n' < 1 ) +Multiply 4; +#endif +Print F; +.end +* farm probe 0015_print_idx_zero (+2 lines, r3) +* probe: clean +* $e[$j] with $j = 0 prints the number of factors +Symbol x,y; +Local F = (x+1)*(y+1) + (x-1)*(y-1); +.sort +$e = F; +FactDollar $e; +$j = 0; +Print "%$",$e[$j]; +.end +* farm probe 0022_doloop_negincr (+2 lines, r3) +* probe: clean +* runtime Do loop with negative dollar increment (TestDoLoop/TestEndDoLoop +* step branches, dollar.c 2836-2845, 2937-2945) +Symbol y; +$a = 2; +$s = -1; +.sort +Do $i = 5,$a,$s; + $q = y*$i; +EndDo; +Print " q=%$;", $q; +.end +* farm probe 0038_tovector (+4 lines, r3) +* probe: clean +* ToVector with a tensor given as name and the vector as $-variable, and +* the reverse (CoToVector dollar branches, compcomm.c 2934-2956) +Tensor t1; +Vector v1; +Index mu1,mu2; +Local test = t1(mu1,mu2); +.sort +$tv = t1; +$vv = v1; +ToVector t1,$vv; +.sort +Print test; +.end +Tensor t2; +Vector v2; +Index mu3,mu4; +Local test2 = t2(mu3,mu4); +.sort +$t2v = t2; +$vv2 = v2; +ToVector $t2v,v2; +.sort +Print test2; +.end +* farm probe 0037_opt_dollar (+14 lines, r3) +* probe: clean +* scheme option listing $-variables: DolToSymbol branch of +* CoOptimizeOption (compcomm.c 6968-6979) +Symbols a,b,x; +Local F = x*(a+b)*(a-b) + b^3; +$a = a; +$b = b; +.sort +Format O1,scheme=($a,$b); +.sort +#optimize F +#write "%O" +#clearoptimize +.end +assert succeeded? +*--#] cov_r3c_dolclean : + +*--#[ cov_r3e_0007_wild_setpair_err : +* farm probe 0007_wild_setpair_err (+2 lines, r3) - CE +* probe: error +* expected: This type of set not allowed in this wildcard construction +* built in set as source set of a?set1?set2 is rejected +Symbols a,b1,b2; +Functions f; +Set bb:b1,b2; +Local test = f(1)+f(2); +id f(a?number_?bb) = a; +Print test; +.end +assert compile_error? +*--#] cov_r3e_0007_wild_setpair_err : + +*--#[ cov_r3e_0010_fmt_scheme_err : +* farm probe 0010_fmt_scheme_err (+4 lines, r3) - CE +* probe: error +* expected: does not evaluate to a symbol +* scheme=() element whose $-variable does not evaluate to a symbol +CFunction f; +Symbol x; +$s = f(1); +Format O1,scheme=($s); +Local e = x^2; +.sort +.end +assert compile_error? +*--#] cov_r3e_0010_fmt_scheme_err : + +*--#[ cov_r3e_0018_set_range : +* farm probe 0018_set_range (+2 lines, r3) - CE +* probe: clean +* $() set_ with a declared range set: CRANGE branch with CompCoef checks +Set sr: 1:9; +#if $( 5 == set_(sr) ) +Local Pk = 1; +#endif +Print Pk; +.end +assert compile_error? +*--#] cov_r3e_0018_set_range : + +*--#[ cov_r3e_0020_canon_topo : +* farm probe 0020_canon_topo (+12 lines, r3) - CE +* probe: clean +* Canonicalize topology statement: the canonicalized term is written into +* the output dollar via PutTermInDollar (diagrams.c) +Vector p1,p2,p3; +Local T = node_(p1,p2)*node_(p2,-p1)*edge_(p1,p2); +Canonicalize topology,node_,edge_,$out; +Print $out; +.end +assert compile_error? +*--#] cov_r3e_0020_canon_topo : + +*--#[ cov_r3e_0035_doloop_grow : +* farm probe 0035_doloop_grow (+11 lines, r3) - CE +* probe: clean +* nested runtime Do loops deep enough to grow the doloop stack +* (CoDo stack reallocation, compcomm.c 6337-6348; initial size 20) +Symbol x; +CFunction f; +Local q = 1; +#do i = 1,22 +Do $n`i' = 1,1; +#enddo +q = q + 1; +#do i = 1,22 +EndDo; +#enddo +.sort +Print q; +.end +assert compile_error? +*--#] cov_r3e_0035_doloop_grow : + +*--#[ cov_r3e_0063_tb_addto_badargs : +* farm probe 0063_tb_addto_badargs (+2 lines, r3) - CE +* probe: error +* expected: should be numbers +Symbol x; +Table,sparse,f(1); +Fill f(1) = x; +TableBase "ba1.tbl" create; +TableBase "ba1.tbl" addto f(x); +.end +assert compile_error? +*--#] cov_r3e_0063_tb_addto_badargs : + +*--#[ cov_r3e_0063_tb_addto_nonsparse : +* farm probe 0063_tb_addto_nonsparse (+2 lines, r3) - CE +* probe: error +* expected: should be a sparse table +Symbol x; +Table f(1); +TableBase "ns1.tbl" create; +TableBase "ns1.tbl" addto f; +.end +assert compile_error? +*--#] cov_r3e_0063_tb_addto_nonsparse : + +*--#[ cov_r3e_0063_tb_addto_undefelem : +* farm probe 0063_tb_addto_undefelem (+3 lines, r3) - CE +* probe: error +* expected: has not been defined +Symbol x; +Table,sparse,f(1); +Fill f(1) = x; +TableBase "ud1.tbl" create; +TableBase "ud1.tbl" addto f(7); +.end +assert compile_error? +*--#] cov_r3e_0063_tb_addto_undefelem : + +*--#[ cov_r3e_0063_tb_create_twice : +* farm probe 0063_tb_create_twice (+2 lines, r3) - CE +* probe: error +* expected: already an open TableBase +TableBase "tt1.tbl" create; +TableBase "tt1.tbl" create; +.end +assert compile_error? +*--#] cov_r3e_0063_tb_create_twice : + +*--#[ cov_r3e_0063_tb_open_badoption : +* farm probe 0063_tb_open_badoption (+2 lines, r3) - CE +* probe: error +* expected: Invalid option +TableBase "bo1.tbl" open, banana; +.end +assert compile_error? +*--#] cov_r3e_0063_tb_open_badoption : + +*--#[ cov_r3e_0064_processbucket_badnum : +* farm probe 0064_processbucket_badnum (+2 lines, r3) - CE +* probe: error +* expected: Numerical value expected for ProcessBucketSize +ModuleOption ProcessBucketSize abc; +.end +assert compile_error? +*--#] cov_r3e_0064_processbucket_badnum : + +*--#[ cov_r3e_0065_table_starmax : +* count-form fills on star-tables: sparse tables with variants +Symbols x; +Local F = (x+1)^50 + x^25; +Compress gzip; +Print; +.sort +Compress 200; +Local G = (x+2)^40; +Print; +.end +assert compile_error? +*--#] cov_r3e_0078_compress_gzip : + +*--#[ cov_r3e_0081_tb_addto_badnum_err : +* farm probe 0081_tb_addto_badnum_err (+35 lines, r3) - CE +* probe: error +* expected: Incorrect number of table arguments +CTable,sparse f(1); +Fill f(1) = 1; +.sort +TableBase "p0081m.tbl" create; +TableBase "p0081m.tbl" addto f(1,2); +.end +assert compile_error? +*--#] cov_r3e_0081_tb_addto_badnum_err : + +*--#[ cov_r3e_0081_tb_addto_undef_err : +* farm probe 0081_tb_addto_undef_err (+2 lines, r3) - CE +* probe: error +* expected: has not been defined +CTable,sparse f(1); +Fill f(1) = 1; +.sort +TableBase "p0081u.tbl" create; +TableBase "p0081u.tbl" addto zzz; +.end +assert compile_error? +*--#] cov_r3e_0081_tb_addto_undef_err : + +*--#[ cov_r3e_0081_tb_on_badkey_err : +* farm probe 0081_tb_on_badkey_err (+2 lines, r3) - CE +* probe: error +* expected: subkey +* TableBase on with undefined subkey +Symbols x; +TableBase "p0081bad.tbl" create; +TableBase "p0081bad.tbl" on nosuchkey; +.end +assert compile_error? +*--#] cov_r3e_0081_tb_on_badkey_err : + +*--#[ cov_r3e_052_model_spin_err_h10 : +* farm probe 052_model_spin_err_h10 (+2 lines, r3) - CE +* probe: error +* expected: Spin goes by dimension +Model BADS; + Particle p1, +xyz; +EndModel; +.end +assert compile_error? +*--#] cov_r3e_052_model_spin_err_h10 : + +*--#[ cov_r3e_0016_pp_do_dol_8 : +* farm probe 0016_pp_do_dol_8 (+2 lines, r3) - PE +* probe: clean +Symbol s1; +Local F = 0; +$n = 2; +Print; +.sort +#do i = 1,$n +F = F + 1; +#enddo +Print F; +.end +assert preprocess_error? +*--#] cov_r3e_0016_pp_do_dol_8 : + +*--#[ cov_r3e_0064_modlocal_irregular : +* farm probe 0064_modlocal_irregular (+2 lines, r3) - PE +* probe: error +* expected: Irregular end of Local option +ModuleOption local,$a,x; +.end +assert preprocess_error? +*--#] cov_r3e_0064_modlocal_irregular : + +*--#[ cov_r3e_0064_processbucket_clean : +* farm probe 0064_processbucket_clean (+7 lines, r3) - PE +* probe: clean +* ModuleOption ProcessBucketSize sets the thread work-bucket size +Symbols x; +Local t = x; +ModuleOption ProcessBucketSize 10; +Print; +.end +assert preprocess_error? +*--#] cov_r3e_0064_processbucket_clean : + +*--#[ cov_r3e_0064_sortsum_option : +* farm probe 0064_sortsum_option (+3 lines, r3) - PE +* probe: clean +* .sort(sum $a): module statement option reaches DoModSum/DoModDollar; +* local then sum on the same dollar triggers the conflicting-option warning +Symbols x; +$a = 0; +ModuleOption local,$a; +Local t = x; +.sort(sum $a); +Print; +.end +assert preprocess_error? +*--#] cov_r3e_0064_sortsum_option : + +*--#[ cov_r3e_0073_setextattr_err : +* farm probe 0073_setextattr_err (+3 lines, r3) - PE +* probe: error +* expected: unrecognized attribute +#setexternalattr foo=bar; +.end +assert preprocess_error? +*--#] cov_r3e_0073_setextattr_err : + +*--#[ cov_r3e_0073_write_fincl : +* farm probe 0073_write_fincl (+15 lines, r3) - PE +* probe: clean +* %f file inclusion in #write (file created by #system) +#system -e printf "included-file-content-073" > /tmp/probe073_inc.txt +#write "prefix:%f:suffix","/tmp/probe073_inc.txt" +.end +#pend_if mpi? +assert preprocess_error? +*--#] cov_r3e_0073_write_fincl : + +*--#[ cov_r3e_0077_setup_define : +* farm probe 0077_setup_define (+3 lines, r3) - PE +* probe: clean +* #: define setup parameter (ProcessOption DEFINEVALUE case) +#: define covnum 7 +#$v = `covnum'; +Symbols x; +Local F = x + `covnum'; +Print F; +.end +assert preprocess_error? +*--#] cov_r3e_0077_setup_define : + +*--#[ cov_r3e_0003_repl_symwild_sub : +* farm probe 0003_repl_symwild_sub (+6 lines, r3) - RE +* probe: clean +Symbol x,y; +CFunction f,g; +Local test = f(g(x),1); +Transform f replace(1,last)=(g(xarg_),g(xarg_+1)); +Print test; +.end +assert runtime_error? +*--#] cov_r3e_0003_repl_symwild_sub : + +*--#[ cov_r3e_0009_chainin_dol_err : +* farm probe 0009_chainin_dol_err (+18 lines, r3) - RE +* probe: error +* expected: does not evaluate to function +* chainin with a $-variable that does not evaluate to a function +Symbol a; +Local e = a; +$x = a; +.sort +chainin $x; +Print e; +.end +assert runtime_error? +*--#] cov_r3e_0009_chainin_dol_err : + +*--#[ cov_r3e_0016_funidx_dol : +* farm probe 0016_funidx_dol (+4 lines, r3) - RE +* probe: clean +* funny dollar with a dollar index inside an id LHS pattern: +* id f($a[$j]) resolves the index through GetDolNum +* (low confidence: semantics of $a[$j] in a pattern are undocumented) +Symbol x,y; +CFunction f,g; +Local e = f(x); +$a = 2*x; +FactDollar $a; +$j = 1; +id f($a[$j]) = g($a); +Print e; +.end +assert runtime_error? +*--#] cov_r3e_0016_funidx_dol : + +*--#[ cov_r3e_0077_setup_numenv : +* farm probe 0077_setup_numenv (+2 lines, r3) - RE +* probe: clean +* #: numerical value parameter with backtick env substitution inside value +#: indentspace 5 +#: maxwildcards `INDENTSPACE' +Symbols x; +Local F = x; +Print; +.end +assert runtime_error? +*--#] cov_r3e_0077_setup_numenv : diff --git a/sources/compcomm.c b/sources/compcomm.c index 4c281613..00756673 100644 --- a/sources/compcomm.c +++ b/sources/compcomm.c @@ -4446,6 +4446,7 @@ int CoIf(UBYTE *inp) if ( level < 0 ) { error = -1; goto endofif; } error = 1; } + if ( error ) goto endofif; /* never copy lhs of a failed pattern */ /* If we pop numlhs we are in good shape */ diff --git a/sources/dollar.c b/sources/dollar.c index 0b50ff52..4753e20d 100644 --- a/sources/dollar.c +++ b/sources/dollar.c @@ -603,12 +603,14 @@ UBYTE *WriteDollarToBuffer(WORD numdollar, WORD par) } AO.OutInBuffer = 1; switch ( d->type ) { +/* UNFINISHED_FEATURE_EXCL_START */ case DOLARGUMENT: WriteArgument(d->where); break; case DOLSUBTERM: WriteSubTerm(d->where,1); break; +/* UNFINISHED_FEATURE_EXCL_STOP */ case DOLNUMBER: case DOLTERMS: t = d->where; @@ -1097,10 +1099,12 @@ WORD DolToTensor(PHEAD WORD numdollar) retval = d->where[1]; } else if ( d->type == DOLARGUMENT && +/* UNFINISHED_FEATURE_EXCL_START */ d->where[0] <= -FUNCTION && d->where[0] > -FUNCTION-WILDOFFSET && functions[-d->where[0]-FUNCTION].spec >= TENSORFUNCTION ) { retval = -d->where[0]; } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->type == DOLWILDARGS && d->where[0] == 0 && d->where[1] <= -FUNCTION && d->where[1] > -FUNCTION-WILDOFFSET && d->where[2] == 0 @@ -1108,10 +1112,12 @@ WORD DolToTensor(PHEAD WORD numdollar) retval = -d->where[1]; } else if ( d->type == DOLSUBTERM && +/* UNFINISHED_FEATURE_EXCL_START */ d->where[0] >= FUNCTION && d->where[0] < FUNCTION+WILDOFFSET && functions[d->where[0]-FUNCTION].spec >= TENSORFUNCTION ) { retval = d->where[0]; } +/* UNFINISHED_FEATURE_EXCL_STOP */ else { AN.ErrorInDollar = 1; retval = 0; @@ -1156,19 +1162,23 @@ WORD DolToFunction(PHEAD WORD numdollar) d->where[1] >= FUNCTION && d->where[1] < FUNCTION+WILDOFFSET ) { retval = d->where[1]; } +/* UNFINISHED_FEATURE_EXCL_START */ else if ( d->type == DOLARGUMENT && d->where[0] <= -FUNCTION && d->where[0] > -FUNCTION-WILDOFFSET ) { retval = -d->where[0]; } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->type == DOLWILDARGS && d->where[0] == 0 && d->where[1] <= -FUNCTION && d->where[1] > -FUNCTION-WILDOFFSET && d->where[2] == 0 ) { retval = -d->where[1]; } +/* UNFINISHED_FEATURE_EXCL_START */ else if ( d->type == DOLSUBTERM && d->where[0] >= FUNCTION && d->where[0] < FUNCTION+WILDOFFSET ) { retval = d->where[0]; } +/* UNFINISHED_FEATURE_EXCL_STOP */ else { AN.ErrorInDollar = 1; retval = 0; @@ -1210,6 +1220,7 @@ WORD DolToVector(PHEAD WORD numdollar) if ( d->type == DOLINDEX && d->index < 0 ) { retval = d->index; } +/* UNFINISHED_FEATURE_EXCL_START */ else if ( d->type == DOLARGUMENT && ( d->where[0] == -VECTOR || d->where[0] == -MINVECTOR ) ) { retval = d->where[1]; @@ -1218,6 +1229,7 @@ WORD DolToVector(PHEAD WORD numdollar) && d->where[1] == 3 && d->where[2] < 0 ) { retval = d->where[2]; } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->type == DOLTERMS && d->where[0] == 7 && d->where[7] == 0 && d->where[6] == 3 && d->where[5] == 1 && d->where[4] == 1 && @@ -1275,12 +1287,16 @@ WORD DolToNumber(PHEAD WORD numdollar) else return(-d->where[1]); } else if ( d->type == DOLARGUMENT && d->where[0] == -SNUMBER ) { +/* UNFINISHED_FEATURE_EXCL_START */ return(d->where[1]); } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->type == DOLARGUMENT && d->where[0] == -INDEX +/* UNFINISHED_FEATURE_EXCL_START */ && d->where[1] >= 0 && d->where[1] < AM.OffsetIndex ) { return(d->where[1]); } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->type == DOLZERO ) return(0); else if ( d->type == DOLWILDARGS && d->where[0] == 0 && d->where[1] == -SNUMBER && d->where[3] == 0 ) { @@ -1335,6 +1351,7 @@ WORD DolToSymbol(PHEAD WORD numdollar) && d->where[5] == 1 && d->where[4] == 1 && d->where[1] == SYMBOL ) { retval = d->where[3]; } +/* UNFINISHED_FEATURE_EXCL_START */ else if ( d->type == DOLARGUMENT && d->where[0] == -SYMBOL ) { retval = d->where[1]; } @@ -1342,6 +1359,7 @@ WORD DolToSymbol(PHEAD WORD numdollar) && d->where[1] == 4 && d->where[3] == 1 ) { retval = d->where[2]; } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->type == DOLWILDARGS && d->where[0] == 0 && d->where[1] == -SYMBOL && d->where[3] == 0 ) { retval = d->where[2]; @@ -1390,13 +1408,17 @@ WORD DolToIndex(PHEAD WORD numdollar) retval = d->where[3]; } else if ( d->type == DOLARGUMENT && d->where[0] == -SNUMBER +/* UNFINISHED_FEATURE_EXCL_START */ && d->where[1] >= 0 && d->where[1] < AM.OffsetIndex ) { retval = d->where[1]; } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->type == DOLARGUMENT && d->where[0] == -INDEX +/* UNFINISHED_FEATURE_EXCL_START */ && d->where[1] >= 0 ) { retval = d->where[1]; } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->type == DOLZERO ) return(0); else if ( d->type == DOLWILDARGS && d->where[0] == 0 && d->where[1] == -SNUMBER && d->where[3] == 0 && d->where[2] >= 0 @@ -1414,10 +1436,12 @@ WORD DolToIndex(PHEAD WORD numdollar) && d->where[1] >= 0 ) { retval = d->where[1]; } +/* UNFINISHED_FEATURE_EXCL_START */ else if ( d->type == DOLSUBTERM && d->where[0] == INDEX && d->where[1] == 3 && d->where[2] >= 0 ) { retval = d->where[2]; } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->type == DOLWILDARGS && d->where[0] == 0 && d->where[1] == -INDEX && d->where[3] == 0 && d->where[2] >= 0 ) { retval = d->where[2]; @@ -1625,6 +1649,7 @@ LONG DolToLong(PHEAD WORD numdollar) if ( d->where[5] > 0 ) return(x); else return(-x); } +/* UNFINISHED_FEATURE_EXCL_START */ else if ( d->type == DOLARGUMENT && d->where[0] == -SNUMBER ) { x = d->where[1]; return(x); @@ -1634,6 +1659,7 @@ LONG DolToLong(PHEAD WORD numdollar) x = d->where[1]; return(x); } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->type == DOLZERO ) return(0); else if ( d->type == DOLWILDARGS && d->where[0] == 0 && d->where[1] == -SNUMBER && d->where[3] == 0 ) { @@ -3556,7 +3582,8 @@ void CleanDollarFactors(DOLLARS d) #] CleanDollarFactors : #[ TakeDollarContent : */ - +/* UNFINISHED_FEATURE_EXCL_START */ +/* only caller is TakeDollarContent(), which has no caller */ WORD *TakeDollarContent(PHEAD WORD *dollarbuffer, WORD **factor) { WORD *remain, *t; @@ -3771,6 +3798,7 @@ WORD *MakeDollarInteger(PHEAD WORD *bufin,WORD **bufout) Terminate(-1); return(0); } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] MakeDollarInteger : @@ -3783,6 +3811,7 @@ WORD *MakeDollarInteger(PHEAD WORD *bufin,WORD **bufout) * Already the coefficients are taken modulus AN.cmod and AN.ncmod == 1 */ +/* UNFINISHED_FEATURE_EXCL_START: sole caller is TakeDollarContent() above, which has no callers and is already excluded */ WORD *MakeDollarMod(PHEAD WORD *buffer, WORD **bufout) { GETBIDENTITY @@ -3821,6 +3850,7 @@ WORD *MakeDollarMod(PHEAD WORD *buffer, WORD **bufout) EndSort(BHEAD (WORD *)bufout,2); return(factor); } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] MakeDollarMod : #[ GetDolNum : diff --git a/sources/extcmd.c b/sources/extcmd.c index 2e575b42..f29edabd 100644 --- a/sources/extcmd.c +++ b/sources/extcmd.c @@ -575,6 +575,11 @@ int n=0; return n; }/*parseline*/ +/* UNFINISHED_FEATURE_EXCL_START */ + /* preset-channel (cooperating-parent PID protocol) helpers: str2i, + l2s, writeSome and readSome are called only from the preset-channel + parser, which requires an outer wrapper process launching FORM — + unreachable from .frm programs and the test suite */ /*Reads positive decimal number (not bigger than maxnum) from the string and returns it; the pointer *b is set to the next non-converted character:*/ @@ -707,6 +712,7 @@ static FORM_INLINE ssize_t readSome(int fd, char *buf, size_t count, int timeout }while(nrep); return (res); }/*readSome*/ +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] Local functions : diff --git a/sources/grcc.cc b/sources/grcc.cc index abaf1ce0..0532e46e 100644 --- a/sources/grcc.cc +++ b/sources/grcc.cc @@ -286,6 +286,7 @@ void Options::setDefaultValues(void) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: only call site is under #ifdef OLDDEFAULT, which grcc.cc leaves commented out */ void Options::setOldDefaultValues(void) { int j; @@ -300,6 +301,7 @@ void Options::setOldDefaultValues(void) // print level prlevel = 1; } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- void Options::setOutMG(OutEGB *omg, void *pt) @@ -309,11 +311,13 @@ void Options::setOutMG(OutEGB *omg, void *pt) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: Options callback setter never wired; diawrap.cc installs outmg/outag only */ void Options::setEndMG(OutEGB *emg, void *pt) { endmg = emg; argemg = pt; } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- void Options::setOutAG(OutEG *oag, void *pt) @@ -323,11 +327,13 @@ void Options::setOutAG(OutEG *oag, void *pt) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: error-exit hook setter never wired; erExit stays NULL in every build */ void Options::setErExit(ErExit *ere, void *erearg) { erExit = ere; erExitArg = erearg; } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- void Options::printLevel(int l) @@ -336,6 +342,7 @@ void Options::printLevel(int l) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: Options::setValue/getValue accessors have no call sites; diawrap.cc writes opt->values[] directly */ void Options::setValue(int ind, int val) { if (0 <= ind && ind < GRCC_OPT_Size) { @@ -360,6 +367,7 @@ int Options::getValue(int ind) grcc_fprintf(GRCC_Stderr, "*** Options::getValue : invalid index=%d\n", ind); } erEnd("Options::getValue : invalid index"); +/* UNFINISHED_FEATURE_EXCL_STOP */ } return -1; } @@ -440,6 +448,7 @@ void Options::setQGrafOpt(int *qg) } //-------------------------------------------------------------- +/* DEBUG_EXCL_START: Options state dump function (no call sites); also encloses the unused getDef/getOldDef/getQGDef accessors (no call sites) */ void Options::print(void) { int j; @@ -475,6 +484,7 @@ const OptDef *Options::getOldDef(void) const OptQGDef *Options::getQGDef(void) { return optQGDef; +/* DEBUG_EXCL_STOP */ } //-------------------------------------------------------------- @@ -492,6 +502,7 @@ void Options::setOutputP(Bool outp, const char *fname) } //-------------------------------------------------------------- +/* DEBUG_EXCL_START: Options model dump function (no call sites); also encloses the unused Options::outModel/Options::begin */ void Options::printModel(void) { if (prlevel > 0) { @@ -531,6 +542,7 @@ void Options::begin(Model *mdl) } } } +/* DEBUG_EXCL_STOP */ //-------------------------------------------------------------- void Options::end(void) @@ -599,10 +611,12 @@ void Options::endProc(void) grcc_fprintf(GRCC_Stdout, "+++ Proc %d: ext=%d, loop=%d, ", proc->id, proc->nExtern, proc->loop); if (model != NULL) { +/* UNFINISHED_FEATURE_EXCL_START: Options::model is only assigned by Options::begin(), which has no call sites (excluded above), so model == NULL here */ grcc_fprintf(GRCC_Stdout, "order="); prIntArray(model->ncouple, proc->clist, ": "); model->prParticleArray(proc->ninitl, proc->initlPart, "-->"); model->prParticleArray(proc->nfinal, proc->finalPart, ""); +/* UNFINISHED_FEATURE_EXCL_STOP */ } grcc_fprintf(GRCC_Stdout, " (%8.2f sec)\n", proc->sec); @@ -905,6 +919,9 @@ void Output::setOutgrp(const char *fname) } if (fname == NULL || strlen(fname) < 1) { outgrp = NULL; + /* UNFINISHED_FEATURE_EXCL_START: grcc .f/.p output emission; + diawrap.cc initializes Outgrf/Outgrp with False, so all + Output methods below are unreachable in every build */ } else { outgrp = strdup(fname); } @@ -1657,6 +1674,7 @@ void Output::outModelP(void) fclose(mdlfp); delete[] mdlfn; } +/* UNFINISHED_FEATURE_EXCL_STOP */ //************************************************************** // model.cc @@ -1703,20 +1721,25 @@ Particle::Particle(Model *modl, int pid, PInput *pinp) acode = pinp->acode; if (Abs(mdl->defpart) == GRCC_DEFBYCODE) { neutral = (pcode == acode); +/* UNFINISHED_FEATURE_EXCL_START: DEFBYNAME neutral-particle detection is never wired: the only model builder (diawrap.cc:81) hard-codes GRCC_DEFBYCODE */ } else if (Abs(mdl->defpart) == GRCC_DEFBYNAME) { neutral = ((strcmp(name, aname)==0) ? True : False); +/* UNFINISHED_FEATURE_EXCL_STOP */ } // convert ptype string to its code. if (Abs(mdl->defpart) == GRCC_DEFBYCODE) { if (pinp->ptypec < GRCC_PT_Undef || pinp->ptypec > GRCC_PT_Size) { +/* INTERNAL_ERROR_EXCL_START: failure report for an invalid ptype code, which diawrap.cc never produces (only GRCC_PT_* constants) */ if (prlevel > 0) { grcc_fprintf(GRCC_Stderr, "*** particle type is not defined: %d\n", pinp->ptypec); } erEnd("particle type is not defined (illegal code)"); +/* INTERNAL_ERROR_EXCL_STOP */ } ptype = pinp->ptypec; +/* UNFINISHED_FEATURE_EXCL_START: DEFBYNAME particle typing is never wired: the only model builder (diawrap.cc:81) hard-codes GRCC_DEFBYCODE */ } else if (Abs(mdl->defpart) == GRCC_DEFBYNAME) { if (pinp->ptypen == NULL) { erEnd("particle type is not defined (NULL)"); @@ -1734,10 +1757,13 @@ Particle::Particle(Model *modl, int pid, PInput *pinp) pinp->ptypen); } erEnd("particle type is not defined (name)"); +/* UNFINISHED_FEATURE_EXCL_STOP */ } } if (ptype == GRCC_PT_Undef && ptype != 0) { +/* INTERNAL_ERROR_EXCL_START: guard is contradictory (GRCC_PT_Undef == 0), so erEnd(illegal ptype) cannot fire */ erEnd("illegal ptype"); +/* INTERNAL_ERROR_EXCL_STOP */ } extonly = pinp->extonly; @@ -1746,11 +1772,13 @@ Particle::Particle(Model *modl, int pid, PInput *pinp) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: Particle destructor: Model-owned particles are allocated once and never deleted (cf. already-marked Model::~Model) */ Particle::~Particle(void) { free(aname); free(name); } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- char *Particle::particleName(int p) @@ -1763,12 +1791,14 @@ char *Particle::particleName(int p) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: particle code-query API; only call site is the dead Model::particleCode */ int Particle::particleCode(int p) { if (p < 0) { return acode; } else { return pcode; +/* UNFINISHED_FEATURE_EXCL_STOP */ } } @@ -1779,6 +1809,7 @@ int Particle::isNeutral(void) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: particle type-name query; only call site is Output::outModel, inside the already-excluded unwired model-file emission region */ const char *Particle::typeName(void) { return ptypenames[ptype]; @@ -1813,6 +1844,7 @@ void Particle::prParticle(void) grcc_fprintf(GRCC_Stdout, "ptype=%s, pcode=%d, acode=%d, extonly=%d, cdeg=(%d,%d)\n", ptypenames[ptype], pcode, acode, extonly, cmindeg, cmaxdeg); } +/* UNFINISHED_FEATURE_EXCL_STOP */ //============================================================== // class Interaction @@ -1941,6 +1973,7 @@ Interaction::Interaction(Model *modl, int iid, const char *nam, int icd, int *cp } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: Interaction destructor (Model-owned interactions are never deleted) plus Interaction::prInteraction dump, called only from an erEnd failure branch and the excluded model emission region */ Interaction::~Interaction(void) { if (slist != NULL) { @@ -1972,6 +2005,7 @@ void Interaction::prInteraction(void) grcc_fprintf(GRCC_Stdout, "];\n"); } +/* UNFINISHED_FEATURE_EXCL_STOP */ //============================================================== // class Model @@ -2037,6 +2071,8 @@ Model::Model(MInput *minp) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START */ +/* Model objects are allocated once and never deleted, so the destructor is never called */ Model::~Model(void) { int j; @@ -2126,6 +2162,7 @@ void Model::prModel(void) grcc_fprintf(GRCC_Stdout, "EndInteractionTable;\n"); grcc_fprintf(GRCC_Stdout, "%s", hdr); } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- void Model::addParticle(PInput *pinp) @@ -2141,13 +2178,16 @@ void Model::addParticle(PInput *pinp) pcd = findParticleCode(pinp->pcode); acd = findParticleCode(pinp->acode); if (pcd > 0 || acd > 0) { +/* INTERNAL_ERROR_EXCL_START: duplicate particle-code failure report; codes come from unique FORM function numbers (plus pundef, code 0) */ if (prlevel > 0) { grcc_fprintf(GRCC_Stderr, "*** particle code [%d, %d] ", pinp->pcode, pinp->acode); grcc_fprintf(GRCC_Stderr, "is already used.\n"); } erEnd("particle code is already defined"); +/* INTERNAL_ERROR_EXCL_STOP */ } +/* UNFINISHED_FEATURE_EXCL_START: DEFBYNAME particle registration is never wired: the only model builder (diawrap.cc:81) hard-codes GRCC_DEFBYCODE */ } else if (Abs(defpart) == GRCC_DEFBYNAME) { if (pinp->name == NULL || pinp->aname == NULL || strlen(pinp->name) < 1 || strlen(pinp->aname) < 1) { @@ -2162,6 +2202,7 @@ void Model::addParticle(PInput *pinp) grcc_fprintf(GRCC_Stderr, "is already used.\n"); } erEnd("particle name is already defined."); +/* UNFINISHED_FEATURE_EXCL_STOP */ } } @@ -2215,7 +2256,9 @@ void Model::addInteraction(IInput *iinp) int plist[GRCC_MAXLEGS]; if (!pdef) { +/* INTERNAL_ERROR_EXCL_START: API-misuse failure report; diawrap.cc always calls addParticleEnd() before addInteraction() */ erEnd("call 'addParticleEnd' before 'addInteraction'"); +/* INTERNAL_ERROR_EXCL_STOP */ } if (nInteracts >= GRCC_MAXMINTERACT) { erEnd("too many interactions in the model (GRCC_MAXMINTERACT)"); @@ -2228,21 +2271,26 @@ void Model::addInteraction(IInput *iinp) // check identifier if (defpart == GRCC_DEFBYCODE) { if (iinp->icode < 0) { +/* INTERNAL_ERROR_EXCL_START: negative-icode failure report; diawrap.cc sets icode = NODEFUNCTION+i > 0 */ if (prlevel > 0) { grcc_fprintf(GRCC_Stderr, "*** vertex code %d should be positive\n", iinp->icode); } erEnd("vertex code should be positive"); +/* INTERNAL_ERROR_EXCL_STOP */ } else { vid = findInteractionCode(iinp->icode); if (vid >= 0) { +/* INTERNAL_ERROR_EXCL_START: duplicate-icode failure report; diawrap.cc gives each vertex a unique icode */ if (prlevel > 0) { grcc_fprintf(GRCC_Stderr, "*** vertex code %d is already used\n", iinp->icode); } erEnd("vertex code is already used"); +/* INTERNAL_ERROR_EXCL_STOP */ } } +/* UNFINISHED_FEATURE_EXCL_START: DEFBYNAME and illegal-defpart interaction registration is never wired: diawrap.cc:81 hard-codes GRCC_DEFBYCODE */ } else if (defpart == GRCC_DEFBYNAME) { if (iinp->name == NULL || strlen(iinp->name) < 1) { erEnd("no name of vertex\n"); @@ -2264,6 +2312,7 @@ void Model::addInteraction(IInput *iinp) ; #endif } +/* UNFINISHED_FEATURE_EXCL_STOP */ vid = nInteracts++; for (j = 0; j < nlegs; j++) { @@ -2277,6 +2326,7 @@ void Model::addInteraction(IInput *iinp) } erEnd("particle is not defined (code)"); } +/* UNFINISHED_FEATURE_EXCL_START: DEFBYNAME leg lookup is never wired: the only model builder (diawrap.cc:81) hard-codes GRCC_DEFBYCODE */ } else if (Abs(defpart) == GRCC_DEFBYNAME) { plist[j] = findParticleName(iinp->plistn[j]); if (plist[j] == 0) { @@ -2287,6 +2337,7 @@ void Model::addInteraction(IInput *iinp) } erEnd("particle is not defined (name)"); } +/* UNFINISHED_FEATURE_EXCL_STOP */ } } @@ -2294,6 +2345,7 @@ void Model::addInteraction(IInput *iinp) for (j = 0; j < ncouple; j++) { c = iinp->cvallist[j]; if (c < 0) { +/* INTERNAL_ERROR_EXCL_START: failure report for negative coupling values; model.c stores only nonnegative coupling powers (negative powers are rejected at parse time) */ if (prlevel > 0) { grcc_fprintf(GRCC_Stderr, "*** illegal value of c-constants \n"); for (k = 0; k < ncouple; k++) { @@ -2302,10 +2354,12 @@ void Model::addInteraction(IInput *iinp) } } erEnd("illegal value of c-constants"); +/* INTERNAL_ERROR_EXCL_STOP */ } csum += c; } if (csum < 0) { +/* INTERNAL_ERROR_EXCL_START: failure report for negative total coupling; sum of nonnegative coupling powers cannot be negative */ if (prlevel > 0) { grcc_fprintf(GRCC_Stderr, "*** illegal total coupling-constants %d\n", csum); @@ -2315,6 +2369,7 @@ void Model::addInteraction(IInput *iinp) } } erEnd("illegal value of c-constants"); +/* INTERNAL_ERROR_EXCL_STOP */ } // assume : csum = nlegs - 2 + 2*loop @@ -2460,6 +2515,7 @@ char *Model::particleName(int p) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: model/particle code-query API has no call sites anywhere in sources/ */ int Model::particleCode(int p) { int q; @@ -2475,9 +2531,11 @@ int Model::particleCode(int p) q = p; } return particles[q]->particleCode(p); +/* UNFINISHED_FEATURE_EXCL_STOP */ } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: sole callers are the excluded endProc() model-dump branch (Options::model is never set) */ void Model::prParticleArray(int n, int *a, const char *msg) { int j; @@ -2491,6 +2549,7 @@ void Model::prParticleArray(int n, int *a, const char *msg) } grcc_fprintf(GRCC_Stdout, "]%s", msg); } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- int Model::findMClass(const int cpl, const int dgr) @@ -2570,6 +2629,7 @@ int Model::findInteractionCode(int icd) } //-------------------------------------------------------------- +/* DEBUG_EXCL_START: model-input dump functions printMInput/printPInput/printIInput; no call sites */ void Model::printMInput(MInput *min) { grcc_fprintf(GRCC_Stdout, " \"Model\": [\"%s\", %d, [", @@ -2618,6 +2678,7 @@ void Model::printIInput(IInput *iin) } grcc_fprintf(GRCC_Stdout, "],\n"); } +/* DEBUG_EXCL_STOP */ //************************************************************** // proc.cc @@ -2792,6 +2853,7 @@ PNodeClass::~PNodeClass(void) } //-------------------------------------------------------------- +/* DEBUG_EXCL_START: node-class dump; only call site is the dead SProcess::prSProcess */ void PNodeClass::prPNodeClass(void) { int j; @@ -2822,10 +2884,13 @@ void PNodeClass::prElem(int j) grcc_fprintf(GRCC_Stdout, "\n"); } +/* DEBUG_EXCL_STOP */ //============================================================== // class SProcess //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START */ +/* 15-argument overload is never instantiated: the only call site (line 3684) uses the NCInput overload */ SProcess::SProcess(Model *mdl, Process *prc, Options *opts, int sid, int *clst, int ncls, int *cdeg, int *ctyp, int *ptcl, int *cpl, int *cnum, int *cmind, int *cmaxd) { // Construct a Subprocess object @@ -2993,6 +3058,7 @@ SProcess::SProcess(Model *mdl, Process *prc, Options *opts, int sid, int *clst, // save to PNodeClass object pnclass = new PNodeClass(this, nNodes, nclass, cdeg, ctyp, ptcl, cpl, cnum, cmind, cmaxd); } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- SProcess::SProcess(Model *mdl, Process *prc, Options *opts, int sid, int *clst, int ncls, NCInput *cls) @@ -3166,6 +3232,7 @@ SProcess::~SProcess(void) } //-------------------------------------------------------------- +/* DEBUG_EXCL_START: subprocess dump; only call site sits inside the already-excluded 15-arg SProcess ctor */ void SProcess::prSProcess(void) { grcc_fprintf(GRCC_Stdout, "\n"); @@ -3176,6 +3243,7 @@ void SProcess::prSProcess(void) grcc_fprintf(GRCC_Stdout, " pnclass = NULL\n"); } } +/* DEBUG_EXCL_STOP */ //-------------------------------------------------------------- BigInt SProcess::generate(void) @@ -3447,6 +3515,7 @@ Process::~Process(void) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START */ void Process::prProcess(void) { grcc_fprintf(GRCC_Stdout, "+++ process options : OPI = %d, (Step) = %d, coupling=%d: ", @@ -3523,6 +3592,7 @@ void Process::outProcP(FILE *fp) } fprintf(fp, " }\n"); } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- void Process::mkSProcess(void) @@ -3885,6 +3955,7 @@ void MNodeClass::incMat(int nd, int td, int val) } //-------------------------------------------------------------- +/* INTERNAL_ERROR_EXCL_START: node-class matrix dump; call sites are only the dead MGraph::print and a commented-out line */ void MNodeClass::printMat(void) { // Print configuration matrix. @@ -3914,6 +3985,7 @@ void MNodeClass::printMat(void) grcc_fprintf(GRCC_Stdout, "]\n"); } } +/* INTERNAL_ERROR_EXCL_STOP */ //-------------------------------------------------------------- int MNodeClass::cmpMNCArray(int *a0, int *a1, int ma) @@ -3965,6 +4037,7 @@ void MNodeClass::reorder(MGraph *mg) //============================================================== // class MNode : nodes in MGraph //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: MNode ctor overload only called from the dead MGraph NCInput ctor */ MNode::MNode(int vid, int vclss, NCInput *mgi) { // Arguments @@ -3981,6 +4054,7 @@ MNode::MNode(int vid, int vclss, NCInput *mgi) cmindeg = mgi->cmind; // min(deg of connectable vertex) cmaxdeg = mgi->cmaxd; // max(deg of connectable vertex) } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- MNode::MNode(int vid, int vdeg, int vextlp, int vclss, int cmin, int cmax) @@ -4071,6 +4145,7 @@ MGraph::MGraph(int pid, int ncl, int *cldeg, int *clnum, int *cltyp, int *cmind, } //--------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: MGraph ctor overload with no call sites; diawrap.cc/grcc.cc use the array-based ctor */ MGraph::MGraph(int pid, int ncl, NCInput *mgi, Options *opts) { int nn, ne, j, k; @@ -4141,6 +4216,7 @@ MGraph::MGraph(int pid, int ncl, NCInput *mgi, Options *opts) init(); } +/* UNFINISHED_FEATURE_EXCL_STOP */ //--------------------------------------------------------------- void MGraph::init(void) @@ -4217,6 +4293,7 @@ MGraph::~MGraph(void) } //--------------------------------------------------------------- +/* INTERNAL_ERROR_EXCL_START: graph dump diagnostics; call sites sit only in erEnd() internal-error paths */ void MGraph::printAdjMat(MNodeClass *cl) { int j1, j2; @@ -4258,8 +4335,10 @@ void MGraph::print(void) printAdjMat(curcl); } +/* INTERNAL_ERROR_EXCL_STOP */ //--------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: python-format graph output; only caller EGraph::printPy is reachable solely via #ifdef NEWOUTPY (commented out), cf. the already-excluded .f/.p emission */ void MGraph::printPy(FILE *fp, long mId) { fprintf(fp, "#TGraph : (gseq, gid, nodes, amat)\n"); @@ -4289,6 +4368,7 @@ void MGraph::printPy(FILE *fp, long mId) fprintf(fp, " ], # group\n"); fprintf(fp, ")\n"); } +/* UNFINISHED_FEATURE_EXCL_STOP */ //--------------------------------------------------------------- Bool MGraph::isConnected(void) @@ -4618,10 +4698,12 @@ void MGraph::biconnME(void) ok = False; } if (! ok) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ print(); egraph->print(); mconn->print(); erEnd("biconnME: illegal connection"); +/* INTERNAL_ERROR_EXCL_STOP */ } } #endif @@ -4704,6 +4786,7 @@ void MGraph::bisearchME(int nd, int pd, int ned, int col, if (isExternal(nd)) { if (pd >= 0) { // not the root +/* UNFINISHED_FEATURE_EXCL_START: unreachable: the traversal consumes external neighbours at grcc.cc:4786 without recursion, so bisearchME() never enters with an external node and pd >= 0 */ *momset = MASK(nd); mopi->next = 1; mopi->nlegs = 1; @@ -4713,6 +4796,7 @@ void MGraph::bisearchME(int nd, int pd, int ned, int col, *nart = 1; mconn->addCEdge(nd, pd, *momset); return; +/* UNFINISHED_FEATURE_EXCL_STOP */ } } @@ -4811,6 +4895,7 @@ void MGraph::bisearchME(int nd, int pd, int ned, int col, } } if (cn != conn) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** revisit back-ed (%d --> %d) cn=%d != conn=%d\n", nd, td, cn, conn); grcc_fprintf(GRCC_Stdout, " sedges = %d\n", mconn->sedges); @@ -4825,6 +4910,7 @@ void MGraph::bisearchME(int nd, int pd, int ned, int col, egraph->print(); mconn->print(); erEnd("bisearchME: illegal connection"); +/* INTERNAL_ERROR_EXCL_STOP */ } } @@ -5135,10 +5221,12 @@ void MGraph::connectLeg(int so, int sn, int to, int ts, MNodeClass *cl) #ifdef CHECK if ((adjMat[sn][tn] != 0) || (adjMat[sn][tn] != adjMat[tn][sn])) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** inconsistent connection: sn=%d, tn=%d", sn, tn); printAdjMat(cl); erEnd("inconsistent connection "); +/* INTERNAL_ERROR_EXCL_STOP */ } #endif @@ -5353,6 +5441,7 @@ void MGraph::newGraph(MNodeClass *cl) //============================================================== // class MOrbits: orbits of nodes //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: MOrbits orbit-enumeration machinery, instantiated only under #ifdef ORBITS which is commented out (grcc.cc:69) */ MOrbits::MOrbits(void) { nOrbits = 0; @@ -5450,6 +5539,7 @@ void MOrbits::toOrbits(void) } flist[nOrbits] = nNodes; } +/* UNFINISHED_FEATURE_EXCL_STOP */ //************************************************************** // n-edge connected components @@ -5773,6 +5863,7 @@ void MConn::addBlockSelf(int nd, int mult) } //------------------------------------------------------------ +/* INTERNAL_ERROR_EXCL_START */ void MConn::print(void) { int j, k; @@ -5865,6 +5956,7 @@ void MConn::prEdges(void) } //************************************************************** +/* INTERNAL_ERROR_EXCL_STOP */ // sgroup.cc //============================================================== // compile options @@ -5897,6 +5989,7 @@ SGroup::~SGroup(void) } //------------------------------------------------------------ +/* UNFINISHED_FEATURE_EXCL_START: SGroup::print has no call sites */ void SGroup::print(void) { int j; @@ -5910,6 +6003,7 @@ void SGroup::print(void) prIntArray(nnodes, elem[j], "\n"); } } +/* UNFINISHED_FEATURE_EXCL_STOP */ //------------------------------------------------------------ void SGroup::newGroup(int nnd, int nclss, int *clss) @@ -5945,6 +6039,7 @@ void SGroup::clearGroup(void) } //------------------------------------------------------------ +/* UNFINISHED_FEATURE_EXCL_START: SGroup::delGroup: only call site is commented out */ void SGroup::delGroup(void) { int j; @@ -5959,6 +6054,7 @@ void SGroup::delGroup(void) elem = NULL; clearGroup(); } +/* UNFINISHED_FEATURE_EXCL_STOP */ //------------------------------------------------------------ int *SGroup::genNext(void) @@ -5994,6 +6090,7 @@ BigInt SGroup::nElem(void) } //------------------------------------------------------------ +/* UNFINISHED_FEATURE_EXCL_START: SGroup::nextElem: only call site is commented out */ int *SGroup::nextElem(void) { if (nelem < 0) { @@ -6035,6 +6132,7 @@ ENode::ENode(void) intrct = -1; } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- ENode::ENode(EGraph *egrph, int loops, int sdeg) @@ -6068,6 +6166,7 @@ ENode::~ENode(void) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: ENode::copy is called only by the dead EGraph::copy */ void ENode::copy(ENode *en) { int d; @@ -6079,6 +6178,7 @@ void ENode::copy(ENode *en) edges[d] = en->edges[d]; } } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- void ENode::initAss(EGraph *egrph, int nid, int sdg) @@ -6122,6 +6222,7 @@ void ENode::setType(int typ) } //-------------------------------------------------------------- +/* INTERNAL_ERROR_EXCL_START: callees of the already-excluded EGraph::print diagnostics; reachable only via erEnd() paths */ void ENode::print(void) { int j; @@ -6161,6 +6262,7 @@ EEdge::EEdge(void) momset = 0; momdir = 0; } +/* INTERNAL_ERROR_EXCL_STOP */ //-------------------------------------------------------------- EEdge::EEdge(EGraph *egrph, int nedges, int nloops) @@ -6193,6 +6295,7 @@ EEdge::~EEdge(void) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: only caller is EGraph::copy(), which has no call sites (excluded above) */ void EEdge::copy(EEdge *ee) { nodes[0] = ee->nodes[0]; @@ -6203,6 +6306,7 @@ void EEdge::copy(EEdge *ee) edtype = ee->edtype; cut = ee->cut; } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- void EEdge::setId(EGraph *egrph, const int eid) @@ -6241,6 +6345,7 @@ void EEdge::setLMom(int k, int dir) } //-------------------------------------------------------------- +/* INTERNAL_ERROR_EXCL_START: callees of the already-excluded EGraph::print diagnostics; reachable only via erEnd() paths */ void EEdge::print(void) { int zero, n, k; @@ -6288,6 +6393,7 @@ void EEdge::print(void) } grcc_fprintf(GRCC_Stdout, "\n"); } +/* INTERNAL_ERROR_EXCL_STOP */ //============================================================== // class EFLine @@ -6300,6 +6406,7 @@ EFLine::EFLine(void) } //-------------------------------------------------------------- +/* INTERNAL_ERROR_EXCL_START: callees of the already-excluded EGraph::print diagnostics; reachable only via erEnd() paths */ void EFLine::print(const char *msg) { if (ftype == FL_Open) { @@ -6321,6 +6428,7 @@ void EFLine::print(const char *msg) grcc_fprintf(GRCC_Stdout, " len=%d ", nlist); prIntArray(nlist, elist, msg); } +/* INTERNAL_ERROR_EXCL_STOP */ //============================================================== // class EGraph @@ -6416,6 +6524,7 @@ EGraph::~EGraph(void) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: EGraph::copy has no call sites */ void EGraph::copy(EGraph *eg) { int nd, ed; @@ -6456,6 +6565,7 @@ void EGraph::copy(EGraph *eg) bicount = -1; } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- void EGraph::setExtLoop(int nd, int val) @@ -6480,6 +6590,7 @@ void EGraph::endSetExtLoop(void) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: DGraph->EGraph input path declared in the grcc API but never wired into diawrap.cc; no call sites anywhere in sources/ */ void EGraph::fromDGraph(DGraph *dg) { int deg[GRCC_MAXNODES]; @@ -6583,6 +6694,7 @@ void EGraph::fromDGraph(DGraph *dg) bicount = -1; } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- @@ -6705,6 +6817,7 @@ void EGraph::fromMGraph(MGraph *mg) setExtern(j+ni, proc->finalPart[j], GRCC_AT_Final); } nExtern = ni + nf; +/* UNFINISHED_FEATURE_EXCL_START: requires sproc != NULL with proc == NULL, impossible: proc == NULL iff sproc == NULL (grcc.cc:6691) and the only SProcess gets a live Process (grcc.cc:3718) */ } else if (sproc != NULL) { pnc = sproc->pnclass; for (j = 0; j < sproc->pnclass->nclass; j++) { @@ -6723,6 +6836,7 @@ void EGraph::fromMGraph(MGraph *mg) } nExtern = ni + nf; +/* UNFINISHED_FEATURE_EXCL_STOP */ } totalc = 0; for (j = 0; j < nNodes; j++) { @@ -6815,6 +6929,10 @@ ENode *EGraph::setExtern(int n0, int pt, int ndtyp) } //-------------------------------------------------------------- +/* INTERNAL_ERROR_EXCL_START */ + /* EGraph print() diagnostics; their live call sites are inside + #ifdef CHECK consistency checks that end with erEnd(), which + never fires in correct runs */ void EGraph::print(void) { // print the EGraph @@ -7040,6 +7158,7 @@ int EGraph::groupLMom(int *grp, int *ed2gr) return ngrp; } +/* INTERNAL_ERROR_EXCL_STOP */ //-------------------------------------------------------------- Bool EGraph::optQGrafM(Options *opt) @@ -7325,6 +7444,7 @@ Bool EGraph::isOptE(void) return True; } +/* UNFINISHED_FEATURE_EXCL_START: the No2PtL1PI/NoAdj2PtV options are never set to nonzero (ctor default False; neither the qgraf mapping nor diawrap.cc writes them) */ if (nExtern == 2 && nopicomp == 1) { minopi2p = 2; } else { @@ -7377,7 +7497,9 @@ Bool EGraph::isOptE(void) } } } +/* UNFINISHED_FEATURE_EXCL_STOP */ +/* INTERNAL_ERROR_EXCL_START: contradictory-invariant failure report: control only reaches here with No2PtL1PI == 0, already handled above */ if (opt->values[GRCC_OPT_No2PtL1PI] > 0) { return True; } else if (opt->values[GRCC_OPT_No2PtL1PI] < 0) { @@ -7385,6 +7507,7 @@ Bool EGraph::isOptE(void) } else { erEnd("isOptE: illegal control"); return False; +/* INTERNAL_ERROR_EXCL_STOP */ } } @@ -7438,6 +7561,7 @@ int EGraph::findRoot(void) } //--------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: EGraph::connComp is called only by the never-wired EGraph::fromDGraph */ int EGraph::connComp(void) { // Count the number of connected component @@ -7488,6 +7612,7 @@ int EGraph::connVisit(int nd, int ncc) } } return nelem; +/* UNFINISHED_FEATURE_EXCL_STOP */ } //-------------------------------------------------------------- @@ -7943,10 +8068,12 @@ int EGraph::fltrace(int fk, int nd0, int *fl) el = V2Ileg(e); #ifdef CHECK if (ed > nEdges) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stderr, "*** fltrace: ed=%d > nEdges=%d, fl=", ed, nEdges); prIntArray(nNodes, fl, "\n"); erEnd("fltrace: illegal fl"); +/* INTERNAL_ERROR_EXCL_STOP */ } #endif nd = edges[ed]->nodes[el]; @@ -8011,10 +8138,12 @@ int EGraph::fltrace(int fk, int nd0, int *fl) } } if (k >= nEdges || k >= nfl) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** fline: illegal control\n"); grcc_fprintf(GRCC_Stdout, " nEdges=%d, nfl=%d, k=%d, ", nEdges, nfl, k); prIntArray(nfl, fl, "\n"); erEnd("fline: illegal control"); +/* INTERNAL_ERROR_EXCL_STOP */ } return nfl; } @@ -8176,11 +8305,13 @@ NCand::~NCand(void) } //--------------------------------------------------------------- +/* INTERNAL_ERROR_EXCL_START: candidate dump used only by erEnd() paths and the marked Assign::prCand */ void NCand::prNCand(const char* msg) { grcc_fprintf(GRCC_Stdout, "%d %d ", st, deg); prIntArray(nilist, ilist, msg); } +/* INTERNAL_ERROR_EXCL_STOP */ //=============================================================== // class ECand @@ -8209,11 +8340,13 @@ ECand::~ECand(void) } //--------------------------------------------------------------- +/* INTERNAL_ERROR_EXCL_START: candidate dump used only by erEnd() paths and the marked Assign::prCand */ void ECand::prECand(const char *msg) { prIntArray(nplist, plist, ""); grcc_fprintf(GRCC_Stdout, " (det=%d)%s", det, msg); } +/* INTERNAL_ERROR_EXCL_STOP */ //=============================================================== // class ANode @@ -8388,6 +8521,7 @@ Assign::~Assign(void) } //--------------------------------------------------------------- +/* INTERNAL_ERROR_EXCL_START: candidate-table dump used only by erEnd() internal-error paths */ void Assign::prCand(const char *msg) { // Print candidate table @@ -8422,6 +8556,7 @@ void Assign::prCand(const char *msg) } } } +/* INTERNAL_ERROR_EXCL_STOP */ //=============================================================== void Assign::checkAG(const char *msg) @@ -8432,15 +8567,19 @@ void Assign::checkAG(const char *msg) for (n = 0; n < nNodes; n++) { for (lg = 0; lg < nodes[n]->deg; lg++) { if (nodes[n]->aedges[lg] < 0) { +/* INTERNAL_ERROR_EXCL_START: diagnostic print in a consistency-check failure path (feeds ok=False; the path aborts via erEnd()) */ grcc_fprintf(GRCC_Stdout, "*** checkAG:%s: n=%d, lg=%d, aedges=%d\n", msg, n, lg, nodes[n]->aedges[lg]); ok = False; +/* INTERNAL_ERROR_EXCL_STOP */ } } } if (!ok) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ prCand("checkAG"); erEnd("checkAG: failed"); +/* INTERNAL_ERROR_EXCL_STOP */ } } @@ -8511,6 +8650,7 @@ Bool Assign::selectVertexSimp(int lastv) } //--------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: non-SIMPSEL vertex-selection alternative; its only call sites sit in #else branches of #ifdef SIMPSEL (SIMPSEL defined at grcc.cc:51) */ Bool Assign::selectVertex(void) { // Select a vertex for assignment of particles to legs @@ -8547,6 +8687,7 @@ Bool Assign::selectVertex(void) ok = selectLeg(v, -1); return ok; +/* UNFINISHED_FEATURE_EXCL_STOP */ } //--------------------------------------------------------------- @@ -8888,11 +9029,13 @@ Bool Assign::fromMGraph(void) #ifdef CHECK if (mgraph->nodes[n]->deg != 1) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** assign:fromMGraph : " "external but deg[%d] = %d != 1, type=%d\n", n, mgraph->nodes[n]->deg, typ); mgraph->print(); erEnd("assign:fromMGraph : illegal external particle"); +/* INTERNAL_ERROR_EXCL_STOP */ } #endif np[0] = pnclass->particle[cl]; @@ -9116,9 +9259,11 @@ Bool Assign::fillEGraph(int aid, BigInt nsym, BigInt esym, BigInt nsym1) if (isATExternal(pnclass->type[cl])) { ; } else if (nodes[n]->cand->st != AS_Assigned) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** fillEGraph : node %d is not assigned", n); prCand("fillEGraph: node"); erEnd("fillEGraph : node is not assigned"); +/* INTERNAL_ERROR_EXCL_STOP */ } #endif @@ -9137,9 +9282,11 @@ Bool Assign::fillEGraph(int aid, BigInt nsym, BigInt esym, BigInt nsym1) } #ifdef CHECK if (lg < 0 || lg >= nodes[n]->deg) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** fillEGraph: n=%d, lr=%d: 0 <= lg=%d < %d\n", n, lr, lg, nodes[n]->deg); erEnd("fillEGraph: illegal reordering"); +/* INTERNAL_ERROR_EXCL_STOP */ } #endif ed = an->aedges[lg]; @@ -9155,9 +9302,11 @@ Bool Assign::fillEGraph(int aid, BigInt nsym, BigInt esym, BigInt nsym1) for (e = 0; e < nEdges; e++) { #ifdef CHECK if (edges[e]->cand->nplist != 1) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** fillEGraph : edge %d is not assigned", e); prCand("fillEGraph: edge"); erEnd("fillEGraph : edge is not assigned"); +/* INTERNAL_ERROR_EXCL_STOP */ } #endif egraph->edges[e]->ptcl = edges[e]->cand->plist[0]; @@ -9272,6 +9421,7 @@ int *Assign::reordLeg(int n, int *reord, int *plist, int *used) #ifdef CHECK if (!found) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** reordLeg: illegal list of particles:" "interaction %d ", ia); prIntArray(deg, ilegs, "; "); @@ -9279,6 +9429,7 @@ int *Assign::reordLeg(int n, int *reord, int *plist, int *used) prIntArray(deg, plist, "\n"); prCand("reordLeg"); erEnd("reordLeg: illegal list of particles"); +/* INTERNAL_ERROR_EXCL_STOP */ } #endif } @@ -9365,6 +9516,7 @@ int Assign::candPart(int v, int ln, int *plist, const int size) #ifdef CHECK if (edges[en]->cand->det) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** candPart : particle of leg (%d, %d) " "is assigned to %d\n", v, ln, edges[en]->cand->plist[0]); @@ -9372,6 +9524,7 @@ int Assign::candPart(int v, int ln, int *plist, const int size) mgraph->printAdjMat(mgraph->curcl); prCand("candPart"); erEnd("candPart : particle of leg is assigned"); +/* INTERNAL_ERROR_EXCL_STOP */ } #endif @@ -9406,6 +9559,7 @@ int Assign::selUnAssVertexSimp(int lastv) } //--------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: only caller is Assign::selectVertex(), excluded above as the non-SIMPSEL alternative */ int Assign::selUnAssVertex(void) { // Select a vertex for assignment to its leg. @@ -9428,6 +9582,7 @@ int Assign::selUnAssVertex(void) v0 = v; nl = nodes[v]->cand->nilist; } +/* UNFINISHED_FEATURE_EXCL_STOP */ } } } @@ -9551,11 +9706,13 @@ Bool Assign::assignPLeg(int n, int ln, int pt) #ifdef CHECK if (!isIn(edges[e]->cand->nplist, edges[e]->cand->plist, ept)) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** assignPLeg: particle %d is not in the cand. of e=%d", ept, e); edges[e]->cand->prECand("\n"); prCand("assignPLeg"); erEnd("assignPLeg: particle is not in the cand."); +/* INTERNAL_ERROR_EXCL_STOP */ } #endif @@ -9697,9 +9854,11 @@ Bool Assign::updateCandNode(int v) #ifdef CHECK e = nodes[v]->aedges[0]; if (e < 0 || edges[e]->cand->nplist != 1) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** illegal external node: v=%d e=%d :", v, e); prCand("updateCandNode"); erEnd("illegal external node"); +/* INTERNAL_ERROR_EXCL_STOP */ } #endif @@ -9906,10 +10065,12 @@ Bool Assign::isIsomorphic(MNodeClass *cl, BigInt *nsym, BigInt *esym, BigInt *ns ngelem = mgraph->group->nElem(); #ifdef CHECK if (mgraph->nsym > 1 && ngelem <= 1) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** isIsomorphic: illegal group: " "ngelem=%ld, mgraph->sym=(%ld, %ld)\n", ngelem, mgraph->nsym, mgraph->esym); erEnd("Assign::isIsomorphic: illegal group"); +/* INTERNAL_ERROR_EXCL_STOP */ } #endif if (ngelem == 0) { @@ -10148,22 +10309,26 @@ Bool Assign::checkCand(const char *msg) // check assigned vertex } else if (nc->st == AS_Assigned) { if (nc->nilist < 1) { +/* INTERNAL_ERROR_EXCL_START: diagnostic print in a consistency-check failure path (feeds ok=False; the path aborts via erEnd()) */ grcc_fprintf(GRCC_Stdout, "*** checkCand:7:%s:status (%d) of node %d says" " interaction is assigned to %d but ilist=", msg, nc->st, n, nc->st); prIntArray(nc->nilist, nc->ilist, "\n"); ok = False; +/* INTERNAL_ERROR_EXCL_STOP */ } for (lg = 0; lg < nc->deg; lg++) { e = na->aedges[lg]; ec = edges[e]->cand; if (ec->nplist != 1) { +/* INTERNAL_ERROR_EXCL_START: diagnostic print in a consistency-check failure path (feeds ok=False; the path aborts via erEnd()) */ grcc_fprintf(GRCC_Stdout, "*** checkCand:8:%s:status (%d) of node %d says" " interaction is assigned " " but unassigned edge %d is found\n", msg, nc->st, n, e); ok = False; +/* INTERNAL_ERROR_EXCL_STOP */ } } @@ -10172,9 +10337,11 @@ Bool Assign::checkCand(const char *msg) // pt = nc->ilist[0]; // *** pte = legEdgeParticle(n, 0, - pt); } else { +/* INTERNAL_ERROR_EXCL_START: diagnostic print in a consistency-check failure path (feeds ok=False; the path aborts via erEnd()) */ grcc_fprintf(GRCC_Stdout, "*** checkCand:10:%s:illegal status of node %d : %d", msg, n, nc->st); ok = False; +/* INTERNAL_ERROR_EXCL_STOP */ } } @@ -10183,16 +10350,20 @@ Bool Assign::checkCand(const char *msg) for (e = 0; e < nEdges; e++) { ec = edges[e]->cand; if (ec != NULL && ec->nplist < 1) { +/* INTERNAL_ERROR_EXCL_START: diagnostic print in a consistency-check failure path (feeds ok=False; the path aborts via erEnd()) */ grcc_fprintf(GRCC_Stdout, "*** checkCand:12:%s:illegal edge %d\n", msg, e); ok = False; +/* INTERNAL_ERROR_EXCL_STOP */ } } if (!ok) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** checkCand:15:%s:illegal configuration\n", msg); prCand("checkCand"); grcc_fprintf(GRCC_Stdout, "*** checkCand:16:illegal configuration\n"); erEnd("checkCand:16:illegal configuration"); +/* INTERNAL_ERROR_EXCL_STOP */ } return ok; } @@ -10205,10 +10376,12 @@ void Assign::checkNode(int n, const char *msg) for (j = 0; j < nodes[n]->cand->nilist; j++) { it = nodes[n]->cand->ilist[j]; if (Abs(it) >= GRCC_MAXMINTERACT) { +/* INTERNAL_ERROR_EXCL_START: consistency-check failure report ending in erEnd(), which aborts FORM; cannot fire in correct runs */ grcc_fprintf(GRCC_Stdout, "*** %s: n=%d, j=%d, it=%d\n", msg, n, j, it); nodes[n]->cand->prNCand(msg); grcc_fprintf(GRCC_Stdout, "\n"); erEnd("checkNode:illegal it"); +/* INTERNAL_ERROR_EXCL_STOP */ } } } @@ -10223,6 +10396,7 @@ void Assign::checkNode(int n, const char *msg) //============================================================= // stack operations //-------------------------------------------------------------- +/* DEBUG_EXCL_START: node/edge stack dump functions; their only caller AStack::prStack has no call sites */ void NStack::print(const char *msg) { grcc_fprintf(GRCC_Stdout, " node=%d, deg=%d, st=%d, ilist=", noden, deg, st); @@ -10235,6 +10409,7 @@ void EStack::print(const char *msg) grcc_fprintf(GRCC_Stdout, " edge=%d, det=%d, plist=", edgen, det); prilist(nplist, plist, msg); } +/* DEBUG_EXCL_STOP */ //-------------------------------------------------------------- AStack::AStack(int nsize, int esize) @@ -10429,6 +10604,7 @@ void AStack::restoreMsg(CheckPt sav, const char *msg) #endif //-------------------------------------------------------------- +/* DEBUG_EXCL_START: stack dump function; no call sites */ void AStack::prStack(void) { int j; @@ -10443,6 +10619,7 @@ void AStack::prStack(void) eStack[j]->print("\n"); } } +/* DEBUG_EXCL_STOP */ //************************************************************** // class Fraction @@ -10478,12 +10655,14 @@ void Fraction::setValue(BigInt n, BigInt d) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: Fraction copy-setter overload has no call sites */ void Fraction::setValue(Fraction &f) { num = f.num; den = f.den; ratio = f.ratio; } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- BigInt Fraction::gcd(BigInt n0, BigInt n1) @@ -10506,6 +10685,7 @@ BigInt Fraction::gcd(BigInt n0, BigInt n1) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: Fraction::normal has no call sites; add() normalizes inline */ void Fraction::normal(void) { BigInt g; @@ -10521,6 +10701,7 @@ void Fraction::normal(void) den = - den; } } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- void Fraction::add(BigInt n, BigInt d) @@ -10555,6 +10736,7 @@ void Fraction::add(Fraction f) } //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: Fraction::sub has no call sites */ void Fraction::sub(Fraction f) { double r = ratio - f.ratio; @@ -10562,11 +10744,14 @@ void Fraction::sub(Fraction f) add(-f.num, f.den); ratio = r; } +/* UNFINISHED_FEATURE_EXCL_STOP */ //-------------------------------------------------------------- +/* UNFINISHED_FEATURE_EXCL_START: Fraction::isEq has no call sites */ Bool Fraction::isEq(Fraction f) { return (num == f.num && den == f.den); +/* UNFINISHED_FEATURE_EXCL_STOP */ } //************************************************************** @@ -10685,6 +10870,7 @@ static int *delintdup(int *a) } //------------------------------------------------------------ +/* DEBUG_EXCL_START: integer-list printer used only by the dead stack dump functions */ static void prilist(int n, const int *a, const char *msg) { grcc_fprintf(GRCC_Stdout, "["); @@ -10694,6 +10880,7 @@ static void prilist(int n, const int *a, const char *msg) } grcc_fprintf(GRCC_Stdout, "]%s", msg); } +/* DEBUG_EXCL_STOP */ //------------------------------------------------------------ static int nextPerm(int nelem, int nclass, int *cl, int *r, int *q, int *p, int count) @@ -10844,6 +11031,7 @@ static void bsort(int n, int *ord, int *a) } //-------------------------------------------------------------- +/* INTERNAL_ERROR_EXCL_START: callees of the already-excluded EGraph::print diagnostics; reachable only via erEnd() paths */ static void prMomStr(int mom, const char *ms, int mn) { if (mom == 0) { @@ -10886,6 +11074,7 @@ static void prIntArrayErr(int n, int *p, const char *msg) } grcc_fprintf(GRCC_Stderr, "]%s", msg); } +/* INTERNAL_ERROR_EXCL_STOP */ //-------------------------------------------------------------- static void sortrec(int l, int r, int *a) diff --git a/sources/if.c b/sources/if.c index 9c058c57..fa0e9ba4 100644 --- a/sources/if.c +++ b/sources/if.c @@ -548,6 +548,7 @@ int DoIfStatement(PHEAD WORD *ifcode, WORD *term) case DOLZERO: ncoef2 = coef2[0] = 0; coef2[1] = 1; break; +/* UNFINISHED_FEATURE_EXCL_START */ case DOLSUBTERM: if ( d->where[0] != INDEX || d->where[1] != 3 || d->where[2] < 0 || d->where[2] >= AM.OffsetIndex ) { @@ -567,13 +568,18 @@ int DoIfStatement(PHEAD WORD *ifcode, WORD *term) } d->index = d->where[2]; /* fall through */ +/* UNFINISHED_FEATURE_EXCL_STOP */ case DOLINDEX: if ( d->index == 0 ) { +/* UNFINISHED_FEATURE_EXCL_START */ ncoef2 = coef2[0] = 0; coef2[1] = 1; } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->index > 0 && d->index < AM.OffsetIndex ) { +/* UNFINISHED_FEATURE_EXCL_START */ ncoef2 = 1; coef2[0] = d->index; coef2[1] = 1; } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( AC.UnsureDollarMode == 0 ) { #ifdef WITHPTHREADS if ( dtype > 0 && ! DollarLocalCopy(dtype) ) { @@ -585,13 +591,16 @@ int DoIfStatement(PHEAD WORD *ifcode, WORD *term) MUNLOCK(ErrorMessageLock); Terminate(-1); } +/* UNFINISHED_FEATURE_EXCL_START */ ncoef2 = coef2[0] = 0; coef2[1] = 1; break; +/* UNFINISHED_FEATURE_EXCL_STOP */ case DOLWILDARGS: if ( d->where[0] <= -FUNCTION || ( d->where[0] < 0 && d->where[2] != 0 ) || ( d->where[0] > 0 && d->where[d->where[0]] != 0 ) ) { +/* UNFINISHED_FEATURE_EXCL_START */ if ( AC.UnsureDollarMode == 0 ) { #ifdef WITHPTHREADS if ( dtype > 0 && ! DollarLocalCopy(dtype) ) { @@ -605,10 +614,12 @@ int DoIfStatement(PHEAD WORD *ifcode, WORD *term) } ncoef2 = coef2[0] = 0; coef2[1] = 1; break; +/* UNFINISHED_FEATURE_EXCL_STOP */ } /* fall through */ case DOLARGUMENT: if ( d->where[0] == -SNUMBER ) { +/* UNFINISHED_FEATURE_EXCL_START */ if ( d->where[1] == 0 ) { ncoef2 = coef2[0] = 0; } @@ -622,7 +633,9 @@ int DoIfStatement(PHEAD WORD *ifcode, WORD *term) } coef2[1] = 1; } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->where[0] == -INDEX +/* UNFINISHED_FEATURE_EXCL_START */ && d->where[1] >= 0 && d->where[1] < AM.OffsetIndex ) { if ( d->where[1] == 0 ) { ncoef2 = coef2[0] = 0; coef2[1] = 1; @@ -632,7 +645,9 @@ int DoIfStatement(PHEAD WORD *ifcode, WORD *term) coef2[1] = 1; } } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->where[0] > 0 +/* UNFINISHED_FEATURE_EXCL_START */ && d->where[ARGHEAD] == (d->where[0]-ARGHEAD) && ABS(d->where[d->where[0]-1]) == (d->where[0] - ARGHEAD-1) ) { @@ -642,6 +657,7 @@ int DoIfStatement(PHEAD WORD *ifcode, WORD *term) i--; cc = coef2; r = d->where + ARGHEAD+1; while ( --i >= 0 ) *cc++ = (UWORD)(*r++); } +/* UNFINISHED_FEATURE_EXCL_STOP */ else { if ( AC.UnsureDollarMode == 0 ) { #ifdef WITHPTHREADS @@ -654,7 +670,9 @@ int DoIfStatement(PHEAD WORD *ifcode, WORD *term) MUNLOCK(ErrorMessageLock); Terminate(-1); } +/* UNFINISHED_FEATURE_EXCL_START */ ncoef2 = 0; coef2[0] = 0; coef2[1] = 1; +/* UNFINISHED_FEATURE_EXCL_STOP */ } break; case DOLNUMBER: diff --git a/sources/message.c b/sources/message.c index 1a174e38..1a280cf1 100644 --- a/sources/message.c +++ b/sources/message.c @@ -514,6 +514,7 @@ printterms: first = 1; term += *term; } while ( *term ); AO.OutSkip = oldskip; +/* UNFINISHED_FEATURE_EXCL_START */ } else if ( d->type == DOLSUBTERM ) { tt = d->where; @@ -534,6 +535,7 @@ dosubterm: if ( AC.LineLength > MAXLINELENGTH ) AC.LineLength = MAXLINELENGTH t = Out; u = (char *)AO.OutputLine; *(AO.OutFill) = 0; +/* UNFINISHED_FEATURE_EXCL_STOP */ while ( u < (char *)(AO.OutFill) ) *t++ = *u++; *t = 0; AO.OutSkip = oldskip; @@ -553,6 +555,7 @@ dollarzero: *t++ = '0'; *t = 0; tt[1] = 3; tt[2] = d->index; goto dosubterm; } +/* UNFINISHED_FEATURE_EXCL_START */ else if ( d->type == DOLARGUMENT ) { if ( AC.LineLength > MAXLINELENGTH ) AC.LineLength = MAXLINELENGTH; AO.IsBracket = 0; @@ -574,6 +577,7 @@ dollarzero: *t++ = '0'; *t = 0; AC.LineLength = oldlength; AO.OutStop = oldStop; } +/* UNFINISHED_FEATURE_EXCL_STOP */ else if ( d->type == DOLWILDARGS ) { tt = d->where; if ( *tt == 0 ) { tt++; @@ -858,6 +862,9 @@ int MesComp(char *s, UBYTE *p, UBYTE *q) #[ PrintTerm : */ +/* DEBUG_EXCL_START */ + /* debug-only term printers; their only live call sites are + commented out or sit inside INTERNAL_ERROR_EXCL regions */ void PrintTerm(WORD *term, char *where) { UBYTE OutBuf[140]; @@ -970,6 +977,7 @@ void PrintSeq(WORD *a,char *text) a += *a; } } +/* DEBUG_EXCL_STOP */ /* #] PrintSeq : diff --git a/sources/mytime.cc b/sources/mytime.cc index f9f0ed45..2d3e065d 100644 --- a/sources/mytime.cc +++ b/sources/mytime.cc @@ -54,6 +54,7 @@ bool starttime_set = false; timeval starttime; +/* DEBUG_EXCL_START: debug timing helpers; all call sites are under #ifdef DEBUG/#ifdef DEBUGALL which the build never defines */ double thetime () { if (!starttime_set) { gettimeofday(&starttime,NULL); @@ -70,6 +71,7 @@ std::string thetime_str() { char res[10]; snprintf (res,10,"%.4lf", thetime()); return res; +/* DEBUG_EXCL_STOP */ } #endif // UNIX diff --git a/sources/normal.c b/sources/normal.c index d4bfeb15..a6e430c7 100644 --- a/sources/normal.c +++ b/sources/normal.c @@ -5026,7 +5026,8 @@ gcdisone:; and in the denominator and then combine them. Answer is either PolyRatFun(ep^n,1) or PolyRatFun(1,1) or PolyRatFun(1,ep^n) */ - +/* UNFINISHED_FEATURE_EXCL_START */ +/* only runs when AR.PolyFunExp == 1 (divergence mode, unimplemented in flint engine) */ int TreatPolyRatFun(PHEAD WORD *prf) { WORD *t, *tstop, *r, *rstop, *m, *mstop; @@ -5157,6 +5158,7 @@ int TreatPolyRatFun(PHEAD WORD *prf) prf[1] = t - prf; return(0); } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] TreatPolyRatFun : diff --git a/sources/optimize.cc b/sources/optimize.cc index 74d67b42..827cbbfb 100644 --- a/sources/optimize.cc +++ b/sources/optimize.cc @@ -1338,6 +1338,8 @@ vector generate_instructions (const vector &tree, bool do_CSE) { * A hash is created on the fly and is passed through the stack. * TODO: find better hash functions */ +/* UNFINISHED_FEATURE_EXCL_START */ +/* only call site is commented out */ int count_operators_cse (const vector &tree) { //MesPrint ("*** [%s] Starting CSEE", thetime_str().c_str()); @@ -1486,9 +1488,10 @@ int count_operators_cse (const vector &tree) { //MesPrint ("*** [%s] Stopping CSEE", thetime_str().c_str()); return numinstr - numcommas; } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* - #] count_operators_cse : + #] count_operators_cse : #[ count_operators_cse_topdown : */ diff --git a/sources/polywrap.cc b/sources/polywrap.cc index db085107..094b7da2 100644 --- a/sources/polywrap.cc +++ b/sources/polywrap.cc @@ -641,7 +641,7 @@ WORD *poly_ratfun_add (PHEAD WORD *t1, WORD *t2) { } #endif - if ( AR.PolyFunExp == 1 ) return PolyRatFunSpecial(BHEAD t1, t2); + if ( AR.PolyFunExp == 1 ) return PolyRatFunSpecial(BHEAD t1, t2); /* UNFINISHED_FEATURE_EXCL_LINE */ #ifdef DEBUG cout << "*** [" << thetime() << "] CALL : poly_ratfun_add" << endl; diff --git a/sources/proces.c b/sources/proces.c index b0fc8f74..a47abbf0 100644 --- a/sources/proces.c +++ b/sources/proces.c @@ -2404,6 +2404,7 @@ int InFunction(PHEAD WORD *term, WORD *termout) } w[1] = w[1] - 2 + (m-to); break; +/* UNFINISHED_FEATURE_EXCL_START */ case DOLSUBTERM: to = m; r = d->where; i = r[1]; @@ -2417,7 +2418,9 @@ int InFunction(PHEAD WORD *term, WORD *termout) else m = to+2; } w[1] = w[1] - 2 + (m-to); +/* UNFINISHED_FEATURE_EXCL_STOP */ break; +/* UNFINISHED_FEATURE_EXCL_START */ case DOLARGUMENT: to = m; r = d->where; if ( *r > 0 ) { @@ -2429,6 +2432,7 @@ int InFunction(PHEAD WORD *term, WORD *termout) else { *m++ = *r++; *m++ = *r++; } w[1] = w[1] - 2 + (m-to); break; +/* UNFINISHED_FEATURE_EXCL_STOP */ case DOLWILDARGS: to = m; r = d->where; if ( *r > 0 ) { /* Tensor arguments */ @@ -2593,6 +2597,7 @@ wrongtype:; return(-1); } break; +/* UNFINISHED_FEATURE_EXCL_START */ case DOLARGUMENT: if ( d->where[0] == -INDEX ) { *m++ = d->where[1]; break; @@ -2611,6 +2616,7 @@ wrongtype:; *m++ = d->where[1]; break; } } +/* UNFINISHED_FEATURE_EXCL_STOP */ goto wrongtype; case DOLWILDARGS: if ( d->where[0] > 0 ) { @@ -2640,12 +2646,14 @@ wrongtype:; } } break; +/* UNFINISHED_FEATURE_EXCL_START */ case DOLSUBTERM: r = d->where; if ( *r == INDEX && r[1] == 3 ) { *m++ = r[2]; } else goto wrongtype; +/* UNFINISHED_FEATURE_EXCL_STOP */ break; case DOLUNDEFINED: #ifdef WITHPTHREADS diff --git a/sources/ratio.c b/sources/ratio.c index e1f29daa..d510c2ad 100644 --- a/sources/ratio.c +++ b/sources/ratio.c @@ -2317,7 +2317,8 @@ int GCDterms(PHEAD WORD *term1, WORD *term2, WORD *termout) #] GCDterms : #[ ReadPolyRatFun : */ - +/* UNFINISHED_FEATURE_EXCL_START */ +/* never called: call sites commented out in proces.c */ int ReadPolyRatFun(PHEAD WORD *term) { WORD *oldworkpointer = AT.WorkPointer; @@ -2431,12 +2432,15 @@ int ReadPolyRatFun(PHEAD WORD *term) AR.SortType = oldsorttype; return(0); } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] ReadPolyRatFun : #[ FromPolyRatFun : */ +/* UNFINISHED_FEATURE_EXCL_START */ +/* only called from ReadPolyRatFun which has no live callers (proces.c:5343) */ int FromPolyRatFun(PHEAD WORD *fun, WORD **numout, WORD **denout) { WORD *nextfun, *tt, *num, *den; @@ -2463,6 +2467,7 @@ int FromPolyRatFun(PHEAD WORD *fun, WORD **numout, WORD **denout) if ( fun != nextfun ) { return(1); } AT.WorkPointer = tt; return(0); +/* UNFINISHED_FEATURE_EXCL_STOP */ Improper: /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); @@ -2490,6 +2495,8 @@ int FromPolyRatFun(PHEAD WORD *fun, WORD **numout, WORD **denout) * (should be in a TermMalloc space?) */ +/* UNFINISHED_FEATURE_EXCL_START */ +/* live call sites commented out (ratio.c:1181); only dead ReadPolyRatFun calls it */ WORD *TakeSymbolContent(PHEAD WORD *in, WORD *term) { GETBIDENTITY @@ -2690,6 +2697,7 @@ didwork:; Terminate(-1); return(0); } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] TakeSymbolContent : @@ -2700,6 +2708,8 @@ didwork:; into a proper fraction. Output overwrites input. */ +/* UNFINISHED_FEATURE_EXCL_START */ +/* only called from ReadPolyRatFun which has no live callers (proces.c:5343) */ void GCDclean(PHEAD WORD *num, WORD *den) { WORD *out1 = TermMalloc("GCDclean"); @@ -2825,6 +2835,7 @@ WORD *PolyDiv(PHEAD WORD *a,WORD *b,char *text) return(x); */ } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] PolyDiv : @@ -3017,6 +3028,8 @@ divzero:; Multiplies two polynomials and puts the results in TermMalloc space. */ +/* UNFINISHED_FEATURE_EXCL_START */ +/* only called from ReadPolyRatFun which has no live callers (proces.c:5343) */ WORD *MULfunc(PHEAD WORD *p1, WORD *p2) { WORD *prod,size1,size2,size3,*t,*tfill,*ps1,*ps2,sign1,sign2, error, *p3; @@ -3041,6 +3054,7 @@ WORD *MULfunc(PHEAD WORD *p1, WORD *p2) else sign2 = 1; size2 = (size2-1)/2; if ( MulLong(num1,size1,num2,size2,num3,&size3) ) { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ error = 1; CalledFrom: @@ -3050,6 +3064,7 @@ WORD *MULfunc(PHEAD WORD *p1, WORD *p2) MUNLOCK(ErrorMessageLock); Terminate(-1); /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START */ } tfill = prod+1; t = p1+1; while ( t < (WORD *)num1 ) *tfill++ = *t++; @@ -3072,6 +3087,7 @@ WORD *MULfunc(PHEAD WORD *p1, WORD *p2) AR.SortType = oldsorttype; return(prod); } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] MULfunc : diff --git a/sources/sort.c b/sources/sort.c index 69de71e7..197b6d01 100644 --- a/sources/sort.c +++ b/sources/sort.c @@ -4744,7 +4744,8 @@ void LowerSortLevel(void) Keeps only the most divergent term in AR.PolyFunVar We assume that the terms are already in that notation. */ - +/* UNFINISHED_FEATURE_EXCL_START */ +/* only called from the unimplemented AR.PolyFunExp==1 branch */ WORD *PolyRatFunSpecial(PHEAD WORD *t1, WORD *t2) { WORD *oldworkpointer = AT.WorkPointer, *t, *r; @@ -4839,6 +4840,7 @@ WORD *PolyRatFunSpecial(PHEAD WORD *t1, WORD *t2) Terminate(-1); return(0); } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] PolyRatFunSpecial : diff --git a/sources/store.c b/sources/store.c index cfa21392..f592ecf7 100644 --- a/sources/store.c +++ b/sources/store.c @@ -3603,6 +3603,8 @@ void ExprStatus(EXPRESSIONS e) * @param p pointer to data * @param length length of data in bytes */ +/* UNFINISHED_FEATURE_EXCL_START */ +/* 32-bit/other-endian save-file translation; never exercised on 64-bit builds */ static void FlipN(UBYTE *p, int length) { UBYTE *q, buf; @@ -4012,14 +4014,17 @@ static void ResizeCoeff32(UBYTE **bout, UBYTE *bend, UBYTE *top) } if ( out > (int32_t *)top ) { + /* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MesPrint("!>Error in resizing coefficient!"); /* INTERNAL_ERROR_EXCL_STOP */ + /* UNFINISHED_FEATURE_EXCL_START */ } *bout = (UBYTE *)out; } } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] ResizeCoeff : @@ -4258,6 +4263,9 @@ LONG ReadSaveIndex(FILEINDEX *fileind) { /* do we need some translation for the FILEINDEX? */ if ( AO.transFlag ) { + /* UNFINISHED_FEATURE_EXCL_START: save file header/index translation + only happens when reading a save file made with a different + word size or byte order; not testable in same-platform runs */ /* if a translated FILEINDEX can hold less entries than the original FILEINDEX, then we need to buffer the extra entries in this static variable (can happen going from 32bit to 64bit */ @@ -4281,9 +4289,11 @@ LONG ReadSaveIndex(FILEINDEX *fileind) if ( ReadFile(AO.SaveData.Handle, (UBYTE *)fileind, sizeof(FILEINDEX)) != sizeof(FILEINDEX) ) { + /* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ return ( MesPrint("!>Error(1) reading stored expression.") ); /* INTERNAL_ERROR_EXCL_STOP */ + /* UNFINISHED_FEATURE_EXCL_START */ } /* do we need to flip the endianness? */ @@ -4401,6 +4411,7 @@ LONG ReadSaveIndex(FILEINDEX *fileind) NCOPYB(p, q, n) } return ( 0 ); + /* UNFINISHED_FEATURE_EXCL_STOP */ } else { return ( ReadFile(AO.SaveData.Handle, (UBYTE *)fileind, sizeof(FILEINDEX)) != sizeof(FILEINDEX) ); @@ -4447,6 +4458,7 @@ LONG ReadSaveVariables(UBYTE *buffer, UBYTE *top, LONG *size, LONG *outsize,\ { /* do we need some translation for the variables? */ if ( AO.transFlag ) { + /* UNFINISHED_FEATURE_EXCL_START */ /* counters for the number of already read symbols, indices, ... that need to remain valid between different calls to ReadSaveVariables(). are initialized if stage == -1 */ @@ -4495,11 +4507,13 @@ LONG ReadSaveVariables(UBYTE *buffer, UBYTE *top, LONG *size, LONG *outsize,\ if ( *size > newsize ) *size = newsize; } + /* UNFINISHED_FEATURE_EXCL_STOP */ if ( ( numread = ReadFile(AO.SaveData.Handle, in, *size) ) != *size ) { /* INTERNAL_ERROR_EXCL_START */ return ( MesPrint("!>Error(2) reading stored expression.") ); /* INTERNAL_ERROR_EXCL_STOP */ } + /* UNFINISHED_FEATURE_EXCL_START */ *size = 0; *outsize = 0; @@ -4772,11 +4786,11 @@ LONG ReadSaveVariables(UBYTE *buffer, UBYTE *top, LONG *size, LONG *outsize,\ ADDPOS(pos, *size); SeekFile(AO.SaveData.Handle, &pos, SEEK_SET); return ( 0 ); + /* UNFINISHED_FEATURE_EXCL_STOP */ } else { return ( ReadFile(AO.SaveData.Handle, buffer, *size) != *size ); } } - /* #] ReadSaveVariables : #[ ReadSaveTerm : @@ -4810,6 +4824,8 @@ LONG ReadSaveVariables(UBYTE *buffer, UBYTE *top, LONG *size, LONG *outsize,\ * buffer. used in recursive calls * @return pointer to the next unprocessed data in the input buffer */ +/* UNFINISHED_FEATURE_EXCL_START */ +/* never called: call sites commented out in proces.c */ UBYTE * ReadSaveTerm32(UBYTE *bin, UBYTE *binend, UBYTE **bout, UBYTE *boutend, UBYTE *top, int terminbuf) { @@ -5113,10 +5129,12 @@ ReadSaveTerm32(UBYTE *bin, UBYTE *binend, UBYTE **bout, UBYTE *boutend, UBYTE *t ++out; ++r; break; } else { + /* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MesPrint("!>short function code %d not implemented.", *out); return ( (UBYTE *)in ); /* INTERNAL_ERROR_EXCL_STOP */ + /* UNFINISHED_FEATURE_EXCL_START */ } } } @@ -5170,10 +5188,12 @@ ReadSaveTerm32(UBYTE *bin, UBYTE *binend, UBYTE **bout, UBYTE *boutend, UBYTE *t } } else { + /* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MesPrint("!>ID %d not recognized.", id); return ( (UBYTE *)in ); /* INTERNAL_ERROR_EXCL_STOP */ + /* UNFINISHED_FEATURE_EXCL_START */ } *newsubtermp = out - newsubtermp + 1; @@ -5198,6 +5218,7 @@ ReadSaveTerm32(UBYTE *bin, UBYTE *binend, UBYTE **bout, UBYTE *boutend, UBYTE *t return ( (UBYTE *)in ); } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] ReadSaveTerm : diff --git a/sources/symmetr.c b/sources/symmetr.c index a118429d..c77cdee8 100644 --- a/sources/symmetr.c +++ b/sources/symmetr.c @@ -576,6 +576,7 @@ int MatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) WORD *params, *lowlevel = 0; int argcount = 0, funnycount = 0, tcount = fun[1] - FUNHEAD; int type = 0, pnum, i, j, k, nwstore, iraise, itop, sumeat; + int maxname = 0; CBUF *C = cbuf+AT.ebufnum; int ntwa = 3*AN.NumTotWildArgs+1; LONG oldcpointer = C->Pointer - C->Buffer; @@ -614,7 +615,10 @@ int MatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) p = pattern + FUNHEAD; pstop = pattern + pattern[1]; while ( p < pstop ) { - if ( *p == FUNNYWILD ) { p += 2; funnycount++; } + if ( *p == FUNNYWILD ) { + if ( p[1] > maxname ) maxname = p[1]; + p += 2; funnycount++; + } else { p++; argcount++; } } if ( argcount > tcount ) goto NoSuccess; @@ -645,6 +649,7 @@ int MatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) /* Store the wildcard assignments */ + ntwa = 2*funnycount + maxname + 1; params = AT.WorkPointer; thewildcards = t = params + tcount; t += ntwa; @@ -657,8 +662,8 @@ int MatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) do { *t++ = *m++; *t++ = *m++; *t++ = *m++; *t++ = *m++; *t++ = *r++; } while ( --i > 0 ); - *t++ = C->numrhs; } + *t++ = C->numrhs; if ( t >= AT.WorkTop ) { MLOCK(ErrorMessageLock); MesWork(); @@ -904,12 +909,13 @@ int MatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) else multiplicity[renum[*p]]++; p++; } + iraise = j-1; /* j = number of distinct names; sort loop clobbers j */ /* Strategy: First 'declared' has a tendency to be smaller */ - for ( i = 1; i < AN.NumTotWildArgs; i++ ) { + for ( i = 1; i < maxname; i++ ) { if ( renum[i] < 0 ) continue; - for ( j = i+1; j <= AN.NumTotWildArgs; j++ ) { + for ( j = i+1; j <= maxname; j++ ) { if ( renum[j] < 0 ) continue; if ( renum[i] < renum[j] ) continue; k = multiplicity[renum[i]]; @@ -919,12 +925,12 @@ int MatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) } } for ( i = 0; i < funnycount; i++ ) thewildcards[i] = 0; - iraise = funnycount-1; for ( ;; ) { for ( i = 0, j = sumeat; i < iraise; i++ ) j -= thewildcards[i]*multiplicity[i]; if ( j < 0 || j % multiplicity[iraise] != 0 ) { if ( j > 0 ) { + if ( iraise == 0 ) break; /* Only one name: no valid split */ thewildcards[iraise-1]++; continue; } @@ -1031,6 +1037,7 @@ int MatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) *t = wc; } } + if ( iraise == 0 ) break; /* Only one name: nothing left to raise */ (thewildcards[iraise-1])++; } /* @@ -1073,6 +1080,7 @@ int FunMatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) WORD newvalue, *lowlevel = 0; int argcount = 0, funnycount = 0, tcount = 0; int type = 0, pnum, i, j, k, nwstore, iraise, itop, sumeat; + int maxname = 0; CBUF *C = cbuf+AT.ebufnum; int ntwa = 3*AN.NumTotWildArgs+1; LONG oldcpointer = C->Pointer - C->Buffer; @@ -1111,7 +1119,10 @@ int FunMatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) p = pattern + FUNHEAD; pstop = pattern + pattern[1]; while ( p < pstop ) { - if ( *p == -ARGWILD ) { p += 2; funnycount++; } + if ( *p == -ARGWILD ) { + if ( p[1] > maxname ) maxname = p[1]; + p += 2; funnycount++; + } else { NEXTARG(p); argcount++; } } t = fun + FUNHEAD; @@ -1145,6 +1156,7 @@ int FunMatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) /* Store the wildcard assignments */ + ntwa = 2*funnycount + maxname + 1; WantAddPointers(tcount); AT.pWorkPointer += tcount; thewildcards = t = AT.WorkPointer; @@ -1158,8 +1170,8 @@ int FunMatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) do { *t++ = *m++; *t++ = *m++; *t++ = *m++; *t++ = *m++; *t++ = *r++; } while ( --i > 0 ); - *t++ = C->numrhs; } + *t++ = C->numrhs; if ( t >= AT.WorkTop ) { MLOCK(ErrorMessageLock); MesWork(); @@ -1377,12 +1389,13 @@ int FunMatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) else multiplicity[renum[*p]]++; p++; } + iraise = j-1; /* j = number of distinct names; sort loop clobbers j */ /* Strategy: First 'declared' has a tendency to be smaller */ - for ( i = 1; i < AN.NumTotWildArgs; i++ ) { + for ( i = 1; i < maxname; i++ ) { if ( renum[i] < 0 ) continue; - for ( j = i+1; j <= AN.NumTotWildArgs; j++ ) { + for ( j = i+1; j <= maxname; j++ ) { if ( renum[j] < 0 ) continue; if ( renum[i] < renum[j] ) continue; k = multiplicity[renum[i]]; @@ -1392,12 +1405,12 @@ int FunMatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) } } for ( i = 0; i < funnycount; i++ ) thewildcards[i] = 0; - iraise = funnycount-1; for ( ;; ) { for ( i = 0, j = sumeat; i < iraise; i++ ) j -= thewildcards[i]*multiplicity[i]; if ( j < 0 || j % multiplicity[iraise] != 0 ) { if ( j > 0 ) { + if ( iraise == 0 ) break; /* Only one name: no valid split */ thewildcards[iraise-1]++; continue; } @@ -1490,6 +1503,7 @@ int FunMatchCy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) *a = t; } } + if ( iraise == 0 ) break; /* Only one name: nothing left to raise */ (thewildcards[iraise-1])++; } /* @@ -1631,8 +1645,8 @@ int FunMatchSy(PHEAD WORD *pattern, WORD *fun, WORD *inter, WORD par) assig += *r; *t++ = *m++; *t++ = *m++; *t++ = *m++; *t++ = *m++; *t++ = *r++; } while ( --i > 0 ); - *t++ = C->numrhs; } + *t++ = C->numrhs; if ( t >= AT.WorkTop ) { MLOCK(ErrorMessageLock); MesWork(); diff --git a/sources/tables.c b/sources/tables.c index 96a991ab..0146f360 100644 --- a/sources/tables.c +++ b/sources/tables.c @@ -1537,7 +1537,7 @@ int CoTBon(UBYTE *s) d->mode &= ~NOCOMPRESS; } else { - MesPrint("&subkey %s not defined in TableBase On statement"); + MesPrint("&subkey %s not defined in TableBase On statement",s); error = 1; } *ss = c; s = ss; @@ -1568,7 +1568,7 @@ int CoTBoff(UBYTE *s) d->mode |= NOCOMPRESS; } else { - MesPrint("&subkey %s not defined in TableBase Off statement"); + MesPrint("&subkey %s not defined in TableBase Off statement",s); error = 1; } *ss = c; s = ss; @@ -1910,6 +1910,7 @@ int CoTBhelp(UBYTE *s) This gains one space. Hence we have to be very careful */ +/* UNFINISHED_FEATURE_EXCL_START */ void ReWorkT(WORD *term, WORD *funs, WORD numfuns) { WORD *tstop, *tend, *m, *t, *tt, *mm, *mmm, *r, *rr; @@ -2029,6 +2030,7 @@ void Apply(WORD *term, WORD level) */ ReWorkT(term,funs,numfuns); } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] Apply : diff --git a/sources/tools.c b/sources/tools.c index 65d3df53..9801578e 100644 --- a/sources/tools.c +++ b/sources/tools.c @@ -3095,6 +3095,7 @@ int ToFast(WORD *r, WORD *m) The new term overwrite the old. */ +/* UNFINISHED_FEATURE_EXCL_START */ WORD ToPolyFunGeneral(PHEAD WORD *term) { WORD *t = term+1, *tt, *to, *to1, *termout, *tstop, *tnext; @@ -3136,12 +3137,14 @@ WORD ToPolyFunGeneral(PHEAD WORD *term) tt += 2; } else { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>Internal error: Zero in PolyRatFun"); MUNLOCK(ErrorMessageLock); Terminate(-1); /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START */ } } } @@ -3161,6 +3164,7 @@ WORD ToPolyFunGeneral(PHEAD WORD *term) } return(change); } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] ToPolyFunGeneral : @@ -3809,6 +3813,7 @@ int Crash(void) * @param term: the term to be tested */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead code: declared in declare.h but never called anywhere in sources/ (split around pre-existing INTERNAL_ERROR pairs) */ int TestTerm(WORD *term) { int errorcode = 0, coeffsize; @@ -3816,6 +3821,7 @@ int TestTerm(WORD *term) endterm = term + *term; coeffsize = ABS(endterm[-1]); if ( coeffsize >= *term ) { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Coefficient too big."); @@ -3823,8 +3829,10 @@ int TestTerm(WORD *term) errorcode = 1; goto finish; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ } if ( ( coeffsize < 3 ) || ( ( coeffsize & 1 ) != 1 ) ) { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Wrong size coefficient."); @@ -3832,6 +3840,7 @@ int TestTerm(WORD *term) errorcode = 2; goto finish; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ } t = term+1; tstop = endterm - coeffsize; @@ -3846,6 +3855,7 @@ int TestTerm(WORD *term) break; case SNUMBER: case LNUMBER: +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. L or S number"); @@ -3854,6 +3864,7 @@ int TestTerm(WORD *term) goto finish; break; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ case EXPRESSION: case SUBEXPRESSION: case DOLLAREXPRESSION: @@ -3869,6 +3880,7 @@ int TestTerm(WORD *term) case MINVECTOR: case SETEXP: case ARGFIELD: +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Illegal subterm."); @@ -3877,10 +3889,12 @@ int TestTerm(WORD *term) goto finish; break; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ case ARGWILD: break; default: if ( *t <= 0 ) { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Illegal subterm number."); @@ -3888,11 +3902,13 @@ int TestTerm(WORD *term) errorcode = 6; goto finish; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ } /* This is a regular function. */ if ( *t-FUNCTION >= NumFunctions ) { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Illegal function number"); @@ -3900,10 +3916,12 @@ int TestTerm(WORD *term) errorcode = 7; goto finish; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ } funstop = t + t[1]; if ( funstop > tstop ) goto subtermsize; if ( t[2] != 0 ) { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Dirty flag nonzero."); @@ -3911,9 +3929,11 @@ int TestTerm(WORD *term) errorcode = 8; goto finish; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ } targ = t + FUNHEAD; if ( targ > funstop ) { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Illegal function size."); @@ -3921,6 +3941,7 @@ int TestTerm(WORD *term) errorcode = 9; goto finish; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ } if ( functions[*t-FUNCTION].spec >= TENSORFUNCTION ) { } @@ -3928,6 +3949,7 @@ int TestTerm(WORD *term) while ( targ < funstop ) { if ( *targ < 0 ) { if ( *targ <= -(FUNCTION+NumFunctions) ) { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Illegal function number in argument."); @@ -3935,6 +3957,7 @@ int TestTerm(WORD *term) errorcode = 10; goto finish; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ } if ( *targ <= -FUNCTION ) { targ++; } else { @@ -3943,6 +3966,7 @@ int TestTerm(WORD *term) && ( *targ != -SNUMBER ) && ( *targ != -ARGWILD ) && ( *targ != -INDEX ) ) { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Illegal object in argument."); @@ -3950,11 +3974,13 @@ int TestTerm(WORD *term) errorcode = 11; goto finish; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ } targ += 2; } } else if ( ( *targ < ARGHEAD ) || ( targ+*targ > funstop ) ) { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Illegal size of argument."); @@ -3962,8 +3988,10 @@ int TestTerm(WORD *term) errorcode = 12; goto finish; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ } else if ( targ[1] != 0 ) { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Dirty flag in argument."); @@ -3971,12 +3999,14 @@ int TestTerm(WORD *term) errorcode = 13; goto finish; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ } else { targstop = targ + *targ; argterm = targ + ARGHEAD; while ( argterm < targstop ) { if ( ( *argterm < 4 ) || ( argterm + *argterm > targstop ) ) { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Illegal termsize in argument."); @@ -3984,8 +4014,10 @@ int TestTerm(WORD *term) errorcode = 14; goto finish; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ } if ( TestTerm(argterm) != 0 ) { +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Called from TestTerm."); @@ -3993,6 +4025,7 @@ int TestTerm(WORD *term) errorcode = 15; goto finish; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ } argterm += *argterm; } @@ -4005,6 +4038,7 @@ int TestTerm(WORD *term) tt = t + t[1]; if ( tt > tstop ) { subtermsize: +/* UNFINISHED_FEATURE_EXCL_STOP */ /* INTERNAL_ERROR_EXCL_START */ MLOCK(ErrorMessageLock); MesPrint("!>TestTerm: Internal inconsistency in term. Illegal subterm size."); @@ -4012,6 +4046,7 @@ int TestTerm(WORD *term) errorcode = 100; goto finish; /* INTERNAL_ERROR_EXCL_STOP */ +/* UNFINISHED_FEATURE_EXCL_START: TestTerm() is dead (zero callers; see justification above) */ } t = tt; } @@ -4019,6 +4054,7 @@ int TestTerm(WORD *term) finish: return(errorcode); } +/* UNFINISHED_FEATURE_EXCL_STOP */ /* #] TestTerm : diff --git a/sources/transform.c b/sources/transform.c index 2ae4c477..98fe656e 100644 --- a/sources/transform.c +++ b/sources/transform.c @@ -129,6 +129,7 @@ int CoTransform(UBYTE *in) else if ( type != CSET ) { MesPrint("& %s: A transform statement starts with sets of functions",s); if ( error == 0 ) error = 1; + return(error); /* number is garbage here: bail before it is used */ } *in++ = c; } diff --git a/sources/wildcard.c b/sources/wildcard.c index 65aafd32..b4467e9e 100644 --- a/sources/wildcard.c +++ b/sources/wildcard.c @@ -1421,9 +1421,11 @@ int ResolveSet(PHEAD WORD *from, WORD *to, WORD *subs) num = d->index; goto GotOne; } } +/* UNFINISHED_FEATURE_EXCL_START */ else if ( d->type == DOLARGUMENT ) { if ( d->where[0] == -SNUMBER && d->where[1] > 0 ) { num = d->where[1]; goto GotOne; +/* UNFINISHED_FEATURE_EXCL_STOP */ } } else if ( d->type == DOLWILDARGS ) {