A Formal Framework for Run-Time Verification of Web Applications