Structured plans and observation reduction for plans with contexts