---
title: Reflective Abstract State Machines (rASMs)
url: https://www.emergentmind.com/topics/reflective-abstract-state-machines-rasms
type: topic
---

# Reflective Abstract State Machines (rASMs)

Searching arXiv for the specified papers and closely related work on reflective sequential algorithms and reflective ASMs.
Reflective Abstract State Machines (rASMs) are Abstract State Machines in which the currently executed algorithm is itself part of the state and may be updated during execution. In the reflective setting, reflection is understood as *linguistic reflection*: the algorithm can inspect and change its own description, rather than merely manipulate ordinary data. This extends Gurevich’s sequential ASM framework, where runs are determined by fixed rules, to a class of reflective sequential algorithms (RSAs) whose behaviour may evolve step by step. The 2017 formulation introduced reflective analogues of Gurevich’s postulates and proposed reflective ASMs as a candidate machine model [1705.10708]. The 2020 work developed a full behavioural theory of RSAs, refined the postulates, introduced reflective sequential ASMs (rsASMs), and proved that all RSAs are captured by this machine model [2001.01873].

## 1. Historical and conceptual setting

rASMs arise from the attempt to generalize Gurevich’s ASM thesis for sequential algorithms to algorithms that can modify their own behaviour. In the classical sequential ASM setting, states are first-order structures and execution is governed by a fixed rule set. The algorithm does not change itself during a run. The reflective extension departs from this fixed-rule assumption by incorporating the current algorithm into the state, thereby enabling self-modification as part of ordinary state transition semantics [1705.10708].

The motivating notion of reflection is explicitly linguistic. The relevant phenomenon is not only that a system can manipulate symbolic encodings of programs, but that these encodings determine the algorithm to be executed in the current state. The 2017 paper treated this as a conjectural extension of the sequential ASM thesis, while the 2020 paper recast the reflective setting as a behavioural theory of reflective sequential algorithms and supplied a corresponding characterization theorem [2001.01873].

This development places rASMs at the intersection of abstract algorithmics, self-modifying computation, and metaprogramming semantics. The examples named in the source material—self-modifying code and LISP’s `eval`—indicate the practical provenance of the reflective idea, but the formal contribution is an axiomatic account of when such behaviour still qualifies as sequential and can be represented in ASM form [1705.10708].

## 2. Reflective sequential algorithms and their postulates

The core object underlying rASMs is the reflective sequential algorithm. In the 2017 presentation, RSAs are characterized by three reflective postulates: Reflective Sequential Time, Reflective Abstract State, and Reflective Bounded Exploration [1705.10708]. In the 2020 treatment, the behavioural theory is presented with four postulates: Sequential Time, Abstract State, Background, and Bounded Exploration [2001.01873]. The change in presentation reflects a refinement rather than a reversal: the later formulation isolates the background requirements needed for manipulating code representations and terms as values.

Under Reflective Sequential Time, each state includes not only ordinary data but also the current algorithm. In the 2017 notation, an extended state has the form
$$
({\bf S}, A),
$$
where ${\bf S}$ is a first-order structure and $A$ is the current sequential algorithm. Runs are sequences
$$
({\bf S}_0, A_0), ({\bf S}_1, A_1), ({\bf S}_2, A_2), \ldots
$$
in which the next state is determined by applying the current algorithm to its own extended state [1705.10708].

The reflective Abstract State requirement adds a representation of the current algorithm to the state itself. In the 2017 account, this is written as
$$
({\bf S}, A) = {\bf S} \cup {\bf S}_A,
$$
where ${\bf S}_A$ is a finite first-order structure encoding $A$, for example as an abstract syntax tree [1705.10708]. In the 2020 formulation, each state is a structure over a possibly dynamic signature $\Sigma_S$ with an extended base set $B_{ext}$ containing the standard base set together with terms over $B$ and $\Sigma_S$. Each state contains explicit subsignature(s) $\Sigma_{alg} \subseteq \Sigma_S$ representing the current algorithm, and there is a way to extract from $S|_{\Sigma_{alg}}$ a sequential algorithm $\mathcal{A}(S)$ governing updates [2001.01873].

The Background Postulate of the 2020 theory makes explicit the infrastructure required by reflection. The background must provide an infinite reserve of values and function symbols, equality, undefinedness, truth values and connectives, tuples and projection, natural numbers and operations, and mechanisms to represent and update sequential algorithms. Two central operations are `raise` and `drop`: `raise` turns values representing code fragments into interpretable terms, while `drop` interprets terms as values or programs [2001.01873]. This explicit background formalizes the bridge between code-as-data and executable syntax that the 2017 account described through the encoding structure ${\bf S}_A$ and the map $\mathit{raise}_{({\bf S}, A)}$ [1705.10708].

## 3. Extended states, self-representation, and dynamic signatures

The decisive structural move in rASMs is to treat the algorithm as state. In the 2020 rsASM model, each state contains a distinguished 0-ary function symbol `self` whose value is a tree describing both the signature and the main rule to be executed in that state [2001.01873]. The root labeled `self` has two children: one represents the signature and one represents the current rule. This makes the operative program a first-class component of the machine state.

The reflective state is therefore not merely a data state plus an annotation. It is a combined structure in which code and data are uniformly subject to state transition. The 2017 paper describes the algorithm component as a finite first-order structure encoding the current algorithm; the 2020 paper refines this into a tree-based self-representation with explicit extraction of the signature and executable rule [1705.10708]. The rule to be executed in state $S$ is given by
$$
r_S = raise(rule(val_S(self))),
$$
and the applicable signature is
$$
\Sigma_S = raise(signature(val_S(self))).
$$
This semantics makes the current rule state-dependent in an exact operational sense [2001.01873].

A further consequence is that the vocabulary may change during a run. The 2017 formulation already notes that RSAs can dynamically add new function symbols [1705.10708]. The 2020 theory specifies that in successor states only new function symbols are added, written as $\Sigma_S \subseteq \Sigma_{\tau(S)}$ [2001.01873]. This dynamic signature discipline distinguishes reflective ASMs from ordinary sequential ASMs, in which both the signature and the main rule are fixed.

The following comparison, drawn from the supplied material, highlights the central contrast.

| Feature | Standard ASM | Reflective ASM / rsASM |
|---|---|---|
| State | First-order structure | Data plus code-as-data |
| Rule set | Fixed throughout run | May evolve step by step |
| Transitions | Data only | Data and/or code |
| Vocabulary | Fixed | Can change dynamically |
| Bounded exploration | Finite data witnesses | Finite data and code witnesses |
| Behavioral equivalence | Isomorphism of runs | More subtle |

This comparison suggests that reflection is not an ancillary extension but a reorganization of the semantic role of state itself.

## 4. Bounded exploration, strong coincidence, and terms as values

A central question for any reflective machine model is whether self-modification destroys the bounded exploration principle characteristic of ASMs. Both papers argue that it does not. The reflective bounded exploration postulate states that, for each RSA, there exists a finite witness set such that agreement on this finite set suffices to determine the update set [1705.10708; 2001.01873].

In the 2017 account, the witness set is divided into a data part and a code part,
$$
W = W_S \cup W_A.
$$
Two extended states strongly coincide on $W$ if they agree on the values of terms in $W_S$ and, for terms in $W_A$, the associated “raised” code representations also agree in value and representation. Under this condition,
$$
\Delta({\bf S}_1,A_1) = \Delta({\bf S}_2,A_2).
$$
The map
$$
\mathit{raise}_{({\bf S}, A)}: S_A \rightarrow \mathit{Ground}_A
$$
provides the connection between elements of the code structure and ground terms in the code vocabulary [1705.10708].

The 2020 theory preserves the same principle but formulates it using the extended base set and an extraction function $\beta$. If two states strongly coincide over a finite witness set $W$, meaning that they agree on the values of $W$ and on the extracted terms $\beta(W)$, then their update sets coincide [2001.01873]. Because the algorithm itself may change, witness terms may produce new terms upon interpretation, leading to what the source description calls a “doubling” of interpretation. The significance is that bounded exploration remains finite even though the current program is state-dependent.

For rsASMs specifically, the witness can be taken to be
$$
W = \{self\},
$$
with $\beta(self)$ extracting the bounded set of active terms from the current self-representation [2001.01873]. This is a technically important compression: the machine need not

Source: https://www.emergentmind.com/topics/reflective-abstract-state-machines-rasms