Are symbolic programming and metaprogramming the same thing?

I've always read about symbolic programming while using Mathematica, but I've never searched about it's meaning, I've searched about it today and I found that both concepts are similar, are there any differences?


Symbolic programming is about manipulating symbolic structures, usually representing formulas, and computing consequences. Mathematica manipulates math formulas by using rewriting techniques to help people gain insight into their meaning. Prolog uses backward chaining to find consequences. Constraint systems solves sets of constraints for answers. These systems tend to mix rewriting, theorem proving, constraint propagation, pattern matching and forward/backward inference to achieve the desired effect.

I think of metaprogramming as a special kind of symbolic programming, in which the symbolic structures represents facts about or pieces of (including entire) programs. One of most general metaprogramming techniques is program transformation, providing the ability to manipulate program source in roughly the same way as mathematics enables one to manipulate math formulas.

As a practical matter, metaprogramming can use all the techniques of symbolic programming. It also uses lots of specific algorithms which most people consider to be compiling (e.g., data flow analysis) but is really computing with facts encoded efficiently, so for me most compiling is symbolic computing.

| improve this answer | |
  • (I'm not 100% convinced Mathematica uses the term in the same way other people do, though.) – Dave Newton Jun 10 '12 at 18:10
  • @Dave: which term (metaprogramming, symbolic computation) is "Mathematica" (company? article? tool? docs? random blogger?) is not using "in the same way"? – Ira Baxter Jun 10 '12 at 18:13
  • "Symbolic programming." The company. – Dave Newton Jun 10 '12 at 18:15
  • I think of what MMa does as a great example of symbolic programming. How are they using it wrong? – Ira Baxter Jun 10 '12 at 18:17
  • (1) I didn't say they were: I said that I'm not convinced they mean the same thing as other people may. (2) I didn't say Mathematica isn't an example of a symbolic programming environment, I said I'm not sure they mean the same thing as other people. IMO they're referring to it in the mathematic sense, or something. Making a claim in (2000ish?) that they created a "dramatic change" by introducing symbolic programming to me pretty much implies they're talking about something different, because that's what Lisp was already. – Dave Newton Jun 10 '12 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.