Syntactic and semantic structure in propositional dynamic logic