Skip to content

Enhance kmir show with --statistics and --leaves (#707)#741

Merged
automergerpr-permission-manager[bot] merged 1 commit into
masterfrom
ptoken-upstream
Oct 14, 2025
Merged

Enhance kmir show with --statistics and --leaves (#707)#741
automergerpr-permission-manager[bot] merged 1 commit into
masterfrom
ptoken-upstream

Conversation

@Stevengre
Copy link
Copy Markdown
Contributor

It is used to print better proof_status.md for solana-token, aiming to include all the information useful to fast investigate the result and update tests.md.

Example output with --statistics and --leaves:

STATISTICS
-----------
Total nodes: 10

Node roles (exclusive):
  failing : 2  ids: 10, 12
  split   : 1  ids: 6
  normal  : 7  ids: 3, 4, 5, 7, 8, 9, 11
  (root nodes omitted from totals: 1, 2)

Leaf paths from init:
  total leaves (non-root): 2
  reachable leaves       : 2
  total steps            : 2193

  leaf 10: steps 893, path 1 -> 3 -> 4 -> 5 -> 6 -> 8 -> 10
  leaf 12: steps 1300, path 1 -> 3 -> 4 -> 5 -> 6 -> 7 -> 9 -> 11 -> 12

LEAF <k> CELLS
---------------
Node 10:
  #traverseProjection ( toLocal ( 2 ) , AllocRef ( allocId ( 600719 ) , .ProjectionElems , noMetadata ) , projectionElemDeref  .ProjectionElems , .Contexts )
  ~> #readProjection ( false )
  ~> #freezer#discriminant(_,_)_RT-DATA_Evaluation_Evaluation_MaybeTy0_ ( ty ( 600110 ) ~> .K )
  ~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ ( place ( ... local: local ( 4 ) , projection: .ProjectionElems ) ~> .K )
  ~> #execStmts ( statement ( ... kind: statementKindAssign ( ... place: place ( ... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place ( ... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place ( ... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 621308 ) )  .Statements )
  ~> #execTerminator ( terminator ( ... kind: terminatorKindReturn , span: span ( 621307 ) ) )

Node 12:
  #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandConstant ( constOperand ( ... span: span ( 603598 ) , userTy: noUserTypeAnnotationIndex , const: mirConst ( ... kind: constantKindZeroSized , ty: ty ( 600118 ) , id: mirConstId ( 39 ) ) ) ) , args: operandConstant ( constOperand ( ... span: span ( 603599 ) , userTy: noUserTypeAnnotationIndex , const: mirConst ( ... kind: constantKindAllocated ( allocation ( ... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00+\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap ( ... ptrs: provenanceMapEntry ( ... offset: 0 , allocId: allocId ( 600074 ) )  .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 600073 ) , id: mirConstId ( 474 ) ) ) )  operandMove ( place ( ... local: local ( 5 ) , projection: .ProjectionElems ) )  .Operands , destination: place ( ... local: local ( 4 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionCleanup ( basicBlockIdx ( 4 ) ) ) , span: span ( 603600 ) ) ) ~> .K

(cherry picked from commit 4a6892b)

…--leaves` (#707)

It is used to print better `proof_status.md` for solana-token, aiming to
include all the information useful to fast investigate the result and
update `tests.md`.

Example output with `--statistics` and `--leaves`:

```
STATISTICS
-----------
Total nodes: 10

Node roles (exclusive):
  failing : 2  ids: 10, 12
  split   : 1  ids: 6
  normal  : 7  ids: 3, 4, 5, 7, 8, 9, 11
  (root nodes omitted from totals: 1, 2)

Leaf paths from init:
  total leaves (non-root): 2
  reachable leaves       : 2
  total steps            : 2193

  leaf 10: steps 893, path 1 -> 3 -> 4 -> 5 -> 6 -> 8 -> 10
  leaf 12: steps 1300, path 1 -> 3 -> 4 -> 5 -> 6 -> 7 -> 9 -> 11 -> 12

LEAF <k> CELLS
---------------
Node 10:
  #traverseProjection ( toLocal ( 2 ) , AllocRef ( allocId ( 600719 ) , .ProjectionElems , noMetadata ) , projectionElemDeref  .ProjectionElems , .Contexts )
  ~> #readProjection ( false )
  ~> #freezer#discriminant(_,_)_RT-DATA_Evaluation_Evaluation_MaybeTy0_ ( ty ( 600110 ) ~> .K )
  ~> #freezer#setLocalValue(_,_)_RT-DATA_KItem_Place_Evaluation1_ ( place ( ... local: local ( 4 ) , projection: .ProjectionElems ) ~> .K )
  ~> #execStmts ( statement ( ... kind: statementKindAssign ( ... place: place ( ... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place ( ... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place ( ... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 621308 ) )  .Statements )
  ~> #execTerminator ( terminator ( ... kind: terminatorKindReturn , span: span ( 621307 ) ) )

Node 12:
  #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandConstant ( constOperand ( ... span: span ( 603598 ) , userTy: noUserTypeAnnotationIndex , const: mirConst ( ... kind: constantKindZeroSized , ty: ty ( 600118 ) , id: mirConstId ( 39 ) ) ) ) , args: operandConstant ( constOperand ( ... span: span ( 603599 ) , userTy: noUserTypeAnnotationIndex , const: mirConst ( ... kind: constantKindAllocated ( allocation ( ... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00+\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap ( ... ptrs: provenanceMapEntry ( ... offset: 0 , allocId: allocId ( 600074 ) )  .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 600073 ) , id: mirConstId ( 474 ) ) ) )  operandMove ( place ( ... local: local ( 5 ) , projection: .ProjectionElems ) )  .Operands , destination: place ( ... local: local ( 4 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionCleanup ( basicBlockIdx ( 4 ) ) ) , span: span ( 603600 ) ) ) ~> .K
```

(cherry picked from commit 4a6892b)
@Stevengre Stevengre marked this pull request as ready for review October 14, 2025 04:26
@Stevengre Stevengre self-assigned this Oct 14, 2025
Copy link
Copy Markdown
Collaborator

@jberthold jberthold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@automergerpr-permission-manager automergerpr-permission-manager Bot merged commit 5432828 into master Oct 14, 2025
7 checks passed
@automergerpr-permission-manager automergerpr-permission-manager Bot deleted the ptoken-upstream branch October 14, 2025 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants