Skip to content

try_for tactic (timeouts in tactics) #3812

Open
@digama0

Description

@digama0

The situation does not seem to have changed since #1364 , but there is no current issue tracking this so I thought I would open this so we don't forget. There is currently no equivalent of the try_for tactic from lean 3, which amounts to a metaprogramming API which allows you to abort a tactic call if a heartbeat limit is exceeded. CoreM has a heartbeat counter, and there is also a (unrelated?) heartbeat counter in the C++ code, but attempts to hook these up into a reliable timeout mechanism appear to have failed.

Desired behavior:

example : True := by
  -- Note, this may not actually work as a test case 
  -- since `try_for` counts heartbeats and `sleep` counts ms. 
  -- Substitute any expensive tactic for a better test
  fail_if_success try_for 100 (sleep 1000)
  try_for 10000 (sleep 1000)
  trivial

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-lowWe are not planning to work on this issueenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions