[GAP Forum] Run GAP command for x seconds

Carl-Fredrik Nyberg Brodda (MTH - Postgraduate Researcher) C.Nyberg-Brodda at uea.ac.uk
Wed Jan 27 14:53:14 GMT 2021


Hi all,

A problem which I recently stumbled upon is the following: is there a way to execute a given GAP command only for a certain amount of time, before stepping past the command and continuing execution?

Let us say I have a table of finitely many finitely presented groups, and wish to see whether GAP has a "naive" solution for their word problem. I find a KnuthBendixRewritingSystem() of the group, and then run MakeConfluent() on this rewriting system. Of course, this process may not terminate at all! But sometimes it does. My problem is essentially that I wish to run MakeConfluent() for some amount of time (say 5 seconds), and then, if the command has not terminated, continue on with the next group. This avoids all decidability issues, and would in other programming languages be easily implemented with a timer.

Of course the problem is general, so the above is just a use-case. Is there something that can help with this?

Best,
Carl-Fredrik Nyberg Brodda


More information about the Forum mailing list