Note that this predicate will only accept/generate store names that have been created with local/1, store/1, not anonymous store handles created via store_create/1. Note: StoreHandle gets unified with an atom or a compound term, and the store is identified by this term's toplevel functor together with the context module.
:- local store(shed).
:- local store(warehouse/3).
?- current_store(shed).
Yes (0.00s cpu)
?- current_store(heap).
No (0.00s cpu)
?- current_store(X).
X = shed
More (0.00s cpu) ? ;
X = warehouse(_184, _185, _186)
More (0.00s cpu) ? ;
No (0.00s cpu)