Meta-interpreters and Reflection
Prolog is a homoiconic language and provides many facilities for reflection. Its implicit execution strategy makes it possible to write a concise meta-circular evaluator (also called meta-interpreter) for pure Prolog code. Since Prolog programs are themselves sequences of Prolog terms (:-/2
is an infix operator) that are easily read and inspected using built-in mechanisms (like read/1
), it is easy to write customized interpreters that augment Prolog with domain-specific features.
Read more about this topic: Prolog
Famous quotes containing the word reflection:
“The Americans ... have invented so wide a range of pithy and hackneyed phrases that they can carry on an amusing and animated conversation without giving a moments reflection to what they are saying and so leave their minds free to consider the more important matters of big business and fornication.”
—W. Somerset Maugham (18741965)