parser: refactor some execution analysis functions