refactored inv->expr translation