After rebasing onto main, apply the substance of upstream review-comment
commits (1ef557c972, 35faec3db1):
- timer.py: stricter validation (raise TypeError for unknown subscript
elements), bypass atexit via os._exit on failure.
- test_basic.py: simpler test cases per review (drop unnecessary parens,
use call form in test_callable_syntax), updated docstring.
- TimerUtils.qll: docstring update reflecting the t[dead(n)] / t[never]
forms.
The 'dead(2)' annotation in test_boolean.py:27 is kept because our
NewCfgBranchTimestamps check (added on this branch) requires it.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
These tests consist of various Python constructions (hopefully a
somewhat comprehensive set) with specific timestamp annotations
scattered throughout. When the tests are run using the Python 3
interpreter, these annotations are checked and compared to the "current
timestamp" to see that they are in agreement. This is what makes the
tests "self-validating".
There are a few different kinds of annotations: the basic `t[4]` style
(meaning this is executed at timestamp 4), the `t.dead[4]` variant
(meaning this _would_ happen at timestamp 4, but it is in a dead
branch), and `t.never` (meaning this is never executed at all).
In addition to this, there is a query, MissingAnnotations, which checks
whether we have applied these annotations maximally. Many expression
nodes are not actually annotatable, so there is a sizeable list of
excluded nodes for that query.
These tests consist of various Python constructions (hopefully a
somewhat comprehensive set) with specific timestamp annotations
scattered throughout. When the tests are run using the Python 3
interpreter, these annotations are checked and compared to the "current
timestamp" to see that they are in agreement. This is what makes the
tests "self-validating".
There are a few different kinds of annotations: the basic `t[4]` style
(meaning this is executed at timestamp 4), the `t[dead(4)]` variant
(meaning this _would_ happen at timestamp 4, but it is in a dead
branch), and `t[never]` (meaning this is never executed at all).
In addition to this, there is a query, MissingAnnotations, which checks
whether we have applied these annotations maximally. Many expression
nodes are not actually annotatable, so there is a sizeable list of
excluded nodes for that query.