Parametric trace expressions for runtime verification of Java-like programs