An Action Based Theory of Context