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:
“But before the extremity of the Cape had completely sunk, it appeared like a filmy sliver of land lying flat on the ocean, and later still a mere reflection of a sand-bar on the haze above. Its name suggests a homely truth, but it would be more poetic if it described the impression which it makes on the beholder.”
—Henry David Thoreau (18171862)