- Notifications
You must be signed in to change notification settings - Fork148
Release Notes Form 4.2.0
We introduce Form 4.2.0, a new minor release. We have made more than 360 revisions,including more than 50 bugfixes, and the introduction of more than 20 new features.
Three highlights of the new features areid all,Format O4, andPolyratfun expand.
The statementid all generatesall matches instead of just the first:
CF v,f,s;L F = v(1,2,3,4);id all v(?a,?b) = f(?a)*s(?b);Print +s;.endF = + f*s(1,2,3,4) + f(1)*s(2,3,4) + f(1,2)*s(3,4) + f(1,2,3)*s(4) + f(1,2,3,4)*s ;This statement is useful, for example, to generate automorphisms of graphs.
Format O4 is a new output mode for polynomials. It uses local search methodsto reduce the number of operations in the polynomial. Generally it producesbetter results and is faster than O3.For example:
S a,b,c,d,e,f,g,h,i,j,k,l,m,n;L G = (4*a^4+b+c+d + i^4 + g*n^3)^10 + (a*h + e + f*i*j + g + h)^8 + (i + j + k + l + m + n)^12;Format O4,saIter=300; * use 300 iterations for optimization.sort#optimize G#write "Optimized with Horner scheme: `optimscheme_'"#write "Number of operations in output: `optimvalue_'"#clearoptimize.endOptimized with Horner scheme: h,a,f,j,d,c,b,i,e,m,g,k,l,nNumber of operations in output: 1937ThePolyratfun, which is used for rational coefficients, now supportsexpansion. For example:
S ep;CF rat;Polyratfun rat;L F = rat(1+ep,ep^2 + 3*ep + 1);Print +s;.sortPolyratfun rat(expand,ep,5);Print +s;.endproduces
F = + rat(ep + 1,ep^2 + 3*ep + 1).... F = + rat(1 - 2*ep + 5*ep^2 - 13*ep^3 + 34*ep^4 - 89*ep^5)Further changes are described in the Changelog below.
- Duplicated labels in a module now give compiler errors, which were justignored in previous versions(#69)
- Now FORM does not accept
:=in defining expressions likeLocal F := 1;and gives compiler errors(84d7188,#293) - Introduction of pattern matching withminus vector may break programswritten for previous versions. Now
f(-v?)matches with bothf(-p)(wherev = p) andf(p)(v = -p) (but does not match with a genericvector-like object, e.g.,f(p+q), which is currently not supported).To avoid the latter match, one needs to usevector_asf(-v?vector_).
Textual manipulation on the output.
#Add#CloseDictionary#OpenDictionary#UseDictionary
Storage for spectator terms.
CopySpectatorCreateSpectatorEmptySpectatorRemoveSpectatorToSpectator
tempsortdirsetup parameter,$FORMTMPSORTenvironment variable and-tscommand line option to specify a directory for sort fileswtimestatssetup parameter,On/Off wtimestatsstatement and-Wcommand line option to print the wall-clock time on the master(#127)T(= 10^12) was added as an unit prefix for integer parameters
activeexprnames_andnumactiveexprs_variables allow one to enumeratecurrently active expressions(#175)optimvalue_andoptimscheme_variables provide additional informationfrom output optimizationpid_variable gives the process identifier of the FORM processtoupper_()andtolower_()macros to convert text to upper/lower case#AppendPathand#PrependPathto manipulate the FORMPATH at runtime#Ifisdefined()checks if an object has been defined
#ReverseIncludereads an input file but in reverse order#SkipExtraSymbolsadds a number of dummy extra symbols, which can be used tokeep extra symbols in previous output optimizations(forum?f=8&t=133)
ArgToExtraSymbolconverts function arguments into external symbols(#137)CommuteInsetdeclares partially commutative sets(forum?f=8&t=131)Delete ExtraSymbolsremoves extra symbols from the system(forum?f=8&t=133)FormatO4option to use local stochastic search for output optimizationQuadFortranoption to print numbers as quadruple floating-point numbers inFortran compilers
Identifyalloption generates all matches
Ifoccurs()checks if variables occur inside the current term
PolyRatFun- the second function
RATas the reciprocal of apolyratfun expandanddivergenceoptions to expandpolyratfunwith respect toa symbol
- the second function
Table- zero-dimensional sparse tables, which behave as pure functions.Some examples can be found in#86
onefilloption to fill table elements with1by default
Transform
vector_, the set of all declared vectors(#84)
id_tries for simple replacementsmul_performs polynomial multiplication(#49)partitions_generates all partitions of the argumentsperm_generates all permutations of the argumentsputfirst_moves a function argument to the first position(#86)
- [parform]
FillExpressionis now available(#17) - The test suite was rewritten to work without
strace(#20) - Setup options
pathandincdirare now available as in the reference manual(#72) - Sets now can have negative vectors(#78)
BracketandAntibracketnow accept a set(#87)#$var=...and#Insideare now allowed inside other statements(#135)- Now
NTHREADS_is always1for the sequential FORM and ParFORM.(#159)
- [tform] Fixed a bug with
Collect(#11) - [tform] Fixed a crash in factorizing a constant(#18)
- Fixed failures of substitutions immediately after
PutInside/AntiPutInside(#30) - Fixed a bug of
transform,replacethatxarg_acted only on symbols(#54) - Fixed a bug with combining
Bracket+andIntoHide(#61) - Fixed a bug that
PolyRatFunin functions always gave errors(#73) - Fixed a freeze with
$x^n?in LHS(#77) - Fixed wrong results by simplifications on powers (
exp_function)(#90) - Put a runtime check for gamma matrix without spin line(#94)
- Fixed failures in pattern matching with
?aand symmetric functions(#117) - Fixed a bug that
repeatis ignored for some of generated terms ofdd_(#121) - Fixed a behaviour of redefining hidden expressions that made duplicates(#129)
- Fixed corrupted characters in printing the maximum negative integer(#139)
- Fixed a crash of
Bracket+for large functions(#142) - Fixed a bug that a set of indices matched to a number(#153)
- Fixed a bug in
Keep Bracketwhich ran out the compressed buffer(#154) - Fixed a bug that
expr[x]lost some terms withBracket+for functions(#162) - Fixed
Normalizeto work withf(-v)wherevis a vector(#163) - [tform] Fixed a crash of
expr[x]withBracket+and big expressions(#165) - Fixed a behaviour of
count_in functions(#167) - Fixed a bug that argument field wildcards were not expanded for
distrib_(#186) - Fixed
gcd_with0(#191) - Fixed a bug in the preprocessor that a comment character was eaten after a blcok construction(forum?f=3&t=135)
- Fixed a bug in the compiler to parse arguments for
ArgImplode/ArgExplode(forum?f=3&t=169) - Fixed the
Argumentenvironment with sets of functions(forum?f=3&t=187) - [parform] Fixed bugs in
InParallel(forum?f=8&t=158) - Fixed
#write "%e",exprfor Fortran(44cf65f,aecd000) - Fixed
Delete Storage(44cf65f) - Fixed the
DoubleFortranmode that printed an integer as a floating-point number unnecessarily(e80f244) - Fixed an infinite loop bug in polynomial GCD and increased performance(58bb42d,726f55d,483d98f)
- [parform] Fixed a failure in disabling parallelization for global $-variables(928e8c9)
- Fixed a bug in factorization due to corruption of the coefficient in Hensel lifting(6f06e94)
- [sequential form] Fixed a forgotten initialization of a pointer. This led to crashes with $-variables storing big polynomials(b32e53e)
- Fixed signs with functions inside functions(baa5b36)
- Fix a memory bug in
MakeInteger(4cc67db) - [tform] Fixed a bug in
Hide(e73c865) - Fixed a bug that caused a hide file not deleted at termination(1e6bfda)
- Fixed the compiler to correctly recognize
!<vector or set>option of theToTensorstatement(e9643be) - Fixed a silent crash due to workspace overflow in function pattern matching(a8b0f2d)
- Fixed memory bugs at the startup that gave unreasonable crashes in some circumstances(9b58d87)
- Fixed build errors and improved portability(7136dda,6990928,043727c)
- Fixed a nasty bug in
Bracket+(1ddffec) - Fixed a rare bug in
Bracket+(0f784ed) - Fixed memory allocation for $-variables, which seemed to be problematic only on macOS(f6b7409)
And some other small bug fixes, improvements and code refactoring.