What actively maintained languages support first-class term rewriting?

0
0
Asked By MellowCedar42 On

Can you recommend full-fledged, actively maintained programming languages—other than Prolog—that support term rewriting as a core feature or are designed primarily around it? I'm looking for a standalone language rather than a library, DSL, compiler extension, or macro system. Pure seems close to what I want, but it has not been updated in several years. The main idea is a formal rewriting system where users define rules that transform values or terms.

2 Answers

Answered By QuietHarbor7 On

Maude is probably the closest match. It is a complete language and environment built around rewriting logic, with algebraic specifications and rules that transform terms. It is much more directly focused on formal term rewriting than ordinary macro systems.

Answered By SilverMaple19 On

Macros can sometimes be used to transform program syntax, but that is a different use of the word “rewriting.” Macro systems generally rewrite source code during compilation, while term-rewriting languages define rules that operate on values or symbolic terms. For the latter, you’ll want to look at languages based on rewriting logic rather than languages with metaprogramming features.

MellowCedar42 -

Right, I’m specifically interested in the formal term-rewriting model: defining rules that transform terms or values, not source-to-source macros.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.