Term-rewriting programming languages