AC-contract: Run-time verication of context-aware applications