Hao-Yen TangDeploy AI in your team
Menu

Draw-to-Real · DEVELOPMENT EXAMPLE

Draw-to-Real starts here: check the spec.

A local Python example that checks voltage and sampling limits, flags missing or conflicting values, and links each result to its source requirement.

Compare the four local outcomes.

Four local checker runs compare requirement completeness, consistency and tool execution.

Complete requirements

PASS · exit 0

Voltage bounds of 2.7–4.2 V and sampling bounds of 1–60 s are numeric and internally consistent within the supported grammar.

Missing upper bound

NEEDS_CLARIFICATION · exit 2

REQ-004 leaves the sampling upper bound unresolved (? s). A numeric bound is needed before the requirement set is complete.

Conflicting voltage bounds

CONFLICT · exit 3

REQ-001 requires at least 4.5 V while REQ-002 allows at most 4.2 V, leaving no feasible voltage range.

Checker execution failure

TOOL_ERROR · exit 4

An injected RuntimeError exercises the checker’s fault handling. The checker stops and returns TOOL_ERROR.

Full local check records: inputs, parsed fields and outputs

Four actual local outcomes.

The site build runs the checker against complete, incomplete and conflicting requirements. PASS confirms complete, internally consistent requirements; the fault-injection case exercises TOOL_ERROR handling.

Complete requirements

Outcome: PASS

Input requirements

  • REQ-001: supply_voltage >= 2.7 V
    Parsed fields: supply_voltage · >= · 2.7 · V
  • REQ-002: supply_voltage <= 4.2 V
    Parsed fields: supply_voltage · <= · 4.2 · V
  • REQ-003: sample_interval >= 1 s
    Parsed fields: sample_interval · >= · 1 · s
  • REQ-004: sample_interval <= 60 s
    Parsed fields: sample_interval · <= · 60 · s

Check results and source IDs

  • required:supply_voltage:>=: PASS
    REQ-001 — Bound present.
  • required:supply_voltage:<=: PASS
    REQ-002 — Bound present.
  • range:supply_voltage: PASS
    REQ-001, REQ-002 — Range is nonempty.
  • required:sample_interval:>=: PASS
    REQ-003 — Bound present.
  • required:sample_interval:<=: PASS
    REQ-004 — Bound present.
  • range:sample_interval: PASS
    REQ-003, REQ-004 — Range is nonempty.

Observed tool exit code: 0

Missing upper bound

Outcome: NEEDS_CLARIFICATION

Input requirements

  • REQ-001: supply_voltage >= 2.7 V
    Parsed fields: supply_voltage · >= · 2.7 · V
  • REQ-002: supply_voltage <= 4.2 V
    Parsed fields: supply_voltage · <= · 4.2 · V
  • REQ-003: sample_interval >= 1 s
    Parsed fields: sample_interval · >= · 1 · s
  • REQ-004: sample_interval <= ? s
    Parsed fields: sample_interval · <= · unresolved · s

Check results and source IDs

  • required:supply_voltage:>=: PASS
    REQ-001 — Bound present.
  • required:supply_voltage:<=: PASS
    REQ-002 — Bound present.
  • range:supply_voltage: PASS
    REQ-001, REQ-002 — Range is nonempty.
  • required:sample_interval:>=: PASS
    REQ-003 — Bound present.
  • required:sample_interval:<=: NEEDS_CLARIFICATION
    REQ-004 — Explicit numeric bound required.

Observed tool exit code: 2

Conflicting voltage bounds

Outcome: CONFLICT

Input requirements

  • REQ-001: supply_voltage >= 4.5 V
    Parsed fields: supply_voltage · >= · 4.5 · V
  • REQ-002: supply_voltage <= 4.2 V
    Parsed fields: supply_voltage · <= · 4.2 · V
  • REQ-003: sample_interval >= 1 s
    Parsed fields: sample_interval · >= · 1 · s
  • REQ-004: sample_interval <= 60 s
    Parsed fields: sample_interval · <= · 60 · s

Check results and source IDs

  • required:supply_voltage:>=: PASS
    REQ-001 — Bound present.
  • required:supply_voltage:<=: PASS
    REQ-002 — Bound present.
  • range:supply_voltage: CONFLICT
    REQ-001, REQ-002 — Empty feasible range.
  • required:sample_interval:>=: PASS
    REQ-003 — Bound present.
  • required:sample_interval:<=: PASS
    REQ-004 — Bound present.
  • range:sample_interval: PASS
    REQ-003, REQ-004 — Range is nonempty.

Observed tool exit code: 3

Injected checker failure

Outcome: TOOL_ERROR

Input requirements

  • REQ-001: supply_voltage >= 2.7 V
    Parsed fields: supply_voltage · >= · 2.7 · V
  • REQ-002: supply_voltage <= 4.2 V
    Parsed fields: supply_voltage · <= · 4.2 · V
  • REQ-003: sample_interval >= 1 s
    Parsed fields: sample_interval · >= · 1 · s
  • REQ-004: sample_interval <= 60 s
    Parsed fields: sample_interval · <= · 60 · s

Check results and source IDs

No successful check results were accepted.

Tool error: RuntimeError: Deliberately injected checker execution failure.

Observed tool exit code: 4

A range check is an intersection.

Consistent and conflicting voltage boundsREQ-001 at 2.7 volts and REQ-002 at 4.2 volts allow 2.7 through 4.2 volts. Changing the lower bound to 4.5 volts leaves no value at or below 4.2 volts.Complete: 2.7 ≤ voltage ≤ 4.2 V2.74.2Nonempty range → PASSConflict: voltage ≥ 4.5 V and voltage ≤ 4.2 V4.24.5No overlap → CONFLICT
The voltage bounds show the checker’s actual inputs. Numeric lower and upper sampling-interval bounds complete the check.

The checker identifies missing numeric bounds, catches conflicting requirements and returns TOOL_ERROR for an injected fault. Engineers use consistent requirements to guide design and verification.

From a requirement to a reviewable result.

Define the input

Supply-voltage and sampling-interval limits use an explicit, bounded grammar. A question mark preserves an unresolved value.

Extract and check

A schema validator extracts the ID, metric, comparator, value and unit. A fixed local checker tests required bounds and range consistency.

Review the report

Each check refers to the source requirement IDs. An engineer must confirm the assumptions and decide what needs clarification before design work.

Discuss a requirements workflow.