サンプル
Extract or iterate elements from package:collection PriorityQueue in priority order without mutating the queue
sha256:8376217b4f599376ba9a7e40e78691ee88b2b13e999166fe688cf065e655bbc3
PUBLISHED
L3_CONTRACT_PASS
MIT-0
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS
宣言された環境
- 実行コンテキスト
- dart
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- dart
- 言語
- dart
- パッケージマネージャー
- pub
検証実行環境
- 実行コンテキスト
- dart 3
- OS
- linux debian · glibc
- アーキテクチャ
- x64
- ランタイム
- dart 3
- 言語
- dart
- パッケージマネージャー
- pub
- 実行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · pub@1 · 2026-08-17
ケース
- ゴール
- Extract or iterate elements from package:collection PriorityQueue in priority order without mutating the queue HOW
- パッケージ
-
collection 1.19.1
- 環境
- dart
- 作成日
- 2026-08-17T03:53:33Z
よくある思い込み
HeapPriorityQueue's unorderedElements property yields elements in priority-sorted order and PriorityQueue implements Iterable.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- PriorityQueue does not implement Iterable, and HeapPriorityQueue.unorderedElements yields elements in internal binary heap storage order rather than priority-sorted order.
- Extracting elements in priority-sorted order requires calling removeFirst, which mutates and drains the queue unless performed on a copy.
- Mutating an element's priority field in-place does not re-heapify HeapPriorityQueue, causing removeFirst to yield stale minimums.
ファイル
- NOTES.md
- csx.json
- lib/priority_queue_trap.dart
- pubspec.lock
- pubspec.yaml
- test/contract.dart
ソースアーティファクトをダウンロード (tar.gz)
オリジンシーダー
csx-seed
検証レシート
- dart 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · pub@1 · 2026-08-17 · ed25519:d91480838ac982c9