Level 1 — Understand
Classify each of the following as: (a) a statement, (b) an open statement / predicate, (c) not a statement. Explain your reasoning.
What is the difference between a statement and an open statement? Give a programming example of each.
State the Law of Excluded Middle. Name one common computing context where it does not hold, and explain why that context deviates from classical logic.
Level 2 — Apply
Consider this Python function:
def should_retry(attempt: int, error_code: int, is_idempotent: bool) -> bool:
return attempt < 3 and error_code >= 500 and is_idempotentIdentify the three atomic statements that compose the return expression.
The function is called as
should_retry(2, 503, True). Evaluate each atomic statement
and the compound statement. Show your work.
A new requirement arrives: “also retry on error code 429, but only if the attempt count is less than 5.” Rewrite the function. Identify what new atomic statements you introduced.
Level 3 — Design
A monitoring system stores the result of health checks as boolean
variables: db_healthy, cache_healthy,
api_healthy. These are evaluated once per minute and
cached.
Identify at least two ways the boolean storage model creates contract violations (FM8).
Propose a design that preserves the simplicity of boolean
evaluation at the decision point (the if statement) while
making the temporal assumptions explicit. Name the tradeoff you are
making (AT3).
A teammate proposes replacing the three booleans with a single
SystemHealth enum with values HEALTHY, DEGRADED, PARTIAL,
UNHEALTHY. What does this solve? What does it cost? Name the tradeoff
explicitly using AT framework notation.