Text this: From Formal Semantics to Verified Slicing : A Modular Framework with Applications in Language Based Security