Skip to content

ReplaceLoop(), If(FindLoop(...)) errors #578

@jodavies

Description

@jodavies

Syntax errors in these functions don't terminate FORM, so something like

Symbol x;
CFunction f,g,h;
Index i1,...,i3;

Local test =
	+ g(i1,i2)*g(i1,i2)
	+ g(i1,i2)*g(i1,i3)
	+ g(i1,i2,i3)*g(i1,i2,i3)
	+ h(i1,i2)*h(i1,i2)
	+ h(i1,i2)*h(i1,i3)
	+ h(i1,i2,i3)*h(i1,i2,i3)
	;

ReplaceLoop g, arguments=2, loopsize=2, outfun=f;
ReplaceLoop g, arguments=2, loopsize=2, outfun=f;
ReplaceLoop g, arguments=3, loopsize=2, outfun=f;

If (FindLoop(h, loopsize=1));
    Multiply x;
EndIf;

Print +s;
.end

produces nonsense.

compcomm.c:DoFindLoop should probably just Terminate at the syntax label, and goto it in all error cases and not just some of them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions