I think a meta-circular interpreter for Prolog would fit this description nicely. Prolog excels at writing interpreters in general, and in particular admits exceptionally short <i>meta-circular meta-interpreters</i>, i.e., interpreters written in Prolog that can interpret pure Prolog code, including their own source code.<p>An example of such a meta-circular Prolog interpreter is:<p><pre><code> mi([]).
mi([G0|Gs0]) :-
clause(G0, Rs, Gs0),
mi(Rs).
</code></pre>
It can interpret pure Prolog code, a Turing-complete subset of first-order predicate logic. For example, given the following clauses:<p><pre><code> clause(natnum(0), Rs, Rs).
clause(natnum(s(X)), [natnum(X)|Rs], Rs).
</code></pre>
It yields:<p><pre><code> ?- mi([natnum(X)]).
X = 0
; X = s(0)
; X = s(s(0))
; X = s(s(s(0)))
; X = s(s(s(s(0))))
; ... .
</code></pre>
The meta-interpreter's own code can also be represented in this way:<p><pre><code> clause(mi([]), Rs, Rs).
clause(mi([G0|Gs0]), [clause(G0,Rs,Gs0),mi(Rs)|Ls], Ls).
clause(clause(Head, Rs0, Rs), Ls, Ls) :- clause(Head, Rs0, Rs).
</code></pre>
And now it can interpret its own source code, interpreting any given program, arbitrarily deeply nested. For example:<p><pre><code> ?- mi([mi([mi([natnum(X)])])]).
X = 0
; X = s(0)
; X = s(s(0))
; X = s(s(s(0)))
; ... .
</code></pre>
Tested with Scryer Prolog.