Availability:C-language interface function
PL_engine_t PL_query_engine(qid_t 
qid)Return the engine to which qid belongs. Note that interacting 
with a query or the Prolog terms associated with a query requires the 
engine to be current. See PL_set_engine().