rewrite rules: analysis: tests for typing (start)