{Efficient Handling of Context Dependency in the Cached Event Calculus}