Open tueda opened 4 months ago
https://github.com/jodavies/form/commit/b356d5fcf681aca635cd9f2d1c9cae9daf35ab30
This sorts out the valgrind error, but that is not the cause of the test errors.
To me that looks like a change of convention (adding topo_ functions for enumeration) but also a bug: I would not expect the factor of 1/4
.
To remove the coefficients, you only need to comment out the symmetry factor code at the end of ProcessTopology
. Probably this was just a copy-and-paste from ProcessDiagram
and this bit was not removed. Commenting the "Topology counter" lines removes the topo_
tags (but here someone needs to decide if this should stay, and lose true backward compatibility with 4.3.1).
Then the only difference with the test output I think, is the node numbers start at 1 instead of 0.
Diagrams_3
fails for a different reason. There it crashes in the print routine because it gets bad input:
#0 0x0000555555591c89 in FindVector (num=800000213) at dict.c:293
#1 0x0000555555668ac7 in WriteArgument (t=t@entry=0x7fffede60130) at sch.c:1485
#2 0x000055555566b309 in WriteSubTerm (sterm=sterm@entry=0x7fffede6010c, first=<optimised out>, first@entry=0) at sch.c:1941
#3 0x000055555566b7c6 in WriteInnerTerm (term=<optimised out>, first=0) at sch.c:2130
In the failing term, there is a -10
(MINVECTOR) followed by 3
, so FindVector
tries to access the names array at 3-AM.OffsetVector
which is 800000213
.
Diagrams_3
fails for a different reason. There it crashes in the print routine because it gets bad input:#0 0x0000555555591c89 in FindVector (num=800000213) at dict.c:293 #1 0x0000555555668ac7 in WriteArgument (t=t@entry=0x7fffede60130) at sch.c:1485 #2 0x000055555566b309 in WriteSubTerm (sterm=sterm@entry=0x7fffede6010c, first=<optimised out>, first@entry=0) at sch.c:1941 #3 0x000055555566b7c6 in WriteInnerTerm (term=<optimised out>, first=0) at sch.c:2130
In the failing term, there is a
-10
(MINVECTOR) followed by3
, soFindVector
tries to access the names array at3-AM.OffsetVector
which is800000213
.
The problem here is that not enough external vectors are defined. Here
https://github.com/vermaseren/form/blob/9637b9a8ba584fa9b10fef38b0939972e13357f6/sources/diawrap.cc#L568
it tries to access (for "Diagrams_3") the 9th element (at index 8) of the set, which only has 8 elements. So it lands on the "3" of the implicitly declared {3,4}
set (if you swap this to {4,3}
you get 4 back).
So somewhere needs to be a proper check of the number of internal lines, against the size of the set.
But the more major issue is that the number of topologies returned doesn't agree with the manual. There it claims there should be 9 topologies (or 8 in the case of external line symmetry). Now we get 6 in both cases.
Even if the plan is to now remove the topologies_
function, we still need a good set of tests for diagrams_
. To that end I started with something simple: comparing the number of diagrams generated by qgraf
and FORM
for a simple phi3 model. Already for a 1-loop propagator, there is a difference that I don't understand: qgraf
generates two diagrams with its "default" options: the 1l propagator, and a tadpole. FORM
does not generate the tadpole, though I do not specify NoTadpoles_
.
If I tell both qgraf and form not to generate tadpoles, then the diagram counts agree.
The 5.0.0-beta reference manual says
but this is not the case and the test cases
Diagrams_1
, ...,Diagrams_4
incheck/example.frm
fail. For example,Diagrams_1
isand should give, as in the manual,
but it suffers from memory bugs: