-
Notifications
You must be signed in to change notification settings - Fork 5
Wrong ghosts declaration checking for include= specs #513
Copy link
Copy link
Open
Description
When specs are composed via include=, ghost variables "leak" up through the spec chain even when the spec that sets the ghost (the "setter spec") is not included in the current verification trace.
This means a spec is forced to declare_global a ghost variable that no spec in its entire trace ever sets — which is meaningless and blocks verification with error E0011.
fresh_object_address_spec (native_specs.move)
├── declares SpecFreshObjectAddress ghost
├── SETS ghost via ensures()
│
enter_market_inner_spec (include = fresh_object_address_spec)
├── declares SpecFreshObjectAddress ghost
├── uses global<SpecFreshObjectAddress>() in ensures()
├── ghost setter IS in scope ✅
│
enter_market_return_spec (include = enter_market_inner_spec)
├── does NOT include fresh_object_address_spec
├── ghost setter NOT in scope
├── system spec used for fresh_object_address (no ghost)
├── ❌ BUG: still required to declare SpecFreshObjectAddress
└── ERROR: "Ghost variable ... must be declared" (E0011)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels