Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.23 KB

File metadata and controls

37 lines (25 loc) · 1.23 KB

priority queue scheduler

Language: Python · Sphere: programming · Category: Async

Signature: (deadline: float) → str

What it does

Priority Queue with Deadline Scheduling Module

This module implements a priority queue that supports deadline-aware scheduling and preemption hints for task management.

Guarantee

When it runs, priority queue scheduler guarantees pq.size() == 5; pq.size() == 2; order == ['urgent-1', 'urgent-2', 'bg-1', 'bg-3', 'bg-2'] (proven by run).

Checkable constraints:

  • pq.size() == 5
  • order == ['urgent-1', 'urgent-2', 'bg-1', 'bg-3', 'bg-2']
  • pq.pop_next_task() is None and pq.is_empty()
  • tie_order == ['crit', 'norm', 'low']
  • [pq.pop_next_task().task_id for _ in range(2)] == ['first', 'second']
  • past.task_id == 'past' and past.is_overdue() is True
  • past.time_until_deadline() < 0
  • fut.is_overdue() is False and fut.time_until_deadline() > 400

Verification evidence

  • Green-run: ✓ passes (re-run under the extractor's gate)
  • Constraint strength: recovery (truth-pinned)
  • Independent oracle: — none yet (green-run candidate; not an axiom under the frozen ruler)
  • Peer review: unreviewed

△ AURA Pattern Library — © Reality Optimizer