Papers
Topics
Authors
Recent
Search
2000 character limit reached

Reflective Abstract State Machines (rASMs)

Updated 8 July 2026
  • Reflective Abstract State Machines (rASMs) are abstract models that integrate an algorithm’s code into its state, allowing for dynamic self-modification.
  • They employ linguistic reflection to inspect and update their own rule set and signature during execution, extending classical ASM postulates.
  • rASMs maintain bounded exploration by ensuring that even self-modifying systems achieve finite, structured state transitions.

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 (Ferrarotti et al., 2017). 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 (Schewe et al., 2020).

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 (Ferrarotti et al., 2017).

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 (Schewe et al., 2020).

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 (Ferrarotti et al., 2017).

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 (Ferrarotti et al., 2017). In the 2020 treatment, the behavioural theory is presented with four postulates: Sequential Time, Abstract State, Background, and Bounded Exploration (Schewe et al., 2020). 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

(S,A),({\bf S}, A),

where S{\bf S} is a first-order structure and AA is the current sequential algorithm. Runs are sequences

(S0,A0),(S1,A1),(S2,A2),({\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 (Ferrarotti et al., 2017).

The reflective Abstract State requirement adds a representation of the current algorithm to the state itself. In the 2017 account, this is written as

(S,A)=SSA,({\bf S}, A) = {\bf S} \cup {\bf S}_A,

where SA{\bf S}_A is a finite first-order structure encoding AA, for example as an abstract syntax tree (Ferrarotti et al., 2017). In the 2020 formulation, each state is a structure over a possibly dynamic signature ΣS\Sigma_S with an extended base set BextB_{ext} containing the standard base set together with terms over BB and S{\bf S}0. Each state contains explicit subsignature(s) S{\bf S}1 representing the current algorithm, and there is a way to extract from S{\bf S}2 a sequential algorithm S{\bf S}3 governing updates (Schewe et al., 2020).

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 (Schewe et al., 2020). This explicit background formalizes the bridge between code-as-data and executable syntax that the 2017 account described through the encoding structure S{\bf S}4 and the map S{\bf S}5 (Ferrarotti et al., 2017).

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 (Schewe et al., 2020). 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 (Ferrarotti et al., 2017). The rule to be executed in state S{\bf S}6 is given by

S{\bf S}7

and the applicable signature is

S{\bf S}8

This semantics makes the current rule state-dependent in an exact operational sense (Schewe et al., 2020).

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 (Ferrarotti et al., 2017). The 2020 theory specifies that in successor states only new function symbols are added, written as S{\bf S}9 (Schewe et al., 2020). 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 (Ferrarotti et al., 2017, Schewe et al., 2020).

In the 2017 account, the witness set is divided into a data part and a code part,

AA0

Two extended states strongly coincide on AA1 if they agree on the values of terms in AA2 and, for terms in AA3, the associated “raised” code representations also agree in value and representation. Under this condition,

AA4

The map

AA5

provides the connection between elements of the code structure and ground terms in the code vocabulary (Ferrarotti et al., 2017).

The 2020 theory preserves the same principle but formulates it using the extended base set and an extraction function AA6. If two states strongly coincide over a finite witness set AA7, meaning that they agree on the values of AA8 and on the extracted terms AA9, then their update sets coincide (Schewe et al., 2020). 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

(S0,A0),(S1,A1),(S2,A2),({\bf S}_0, A_0), ({\bf S}_1, A_1), ({\bf S}_2, A_2), \ldots0

with (S0,A0),(S1,A1),(S2,A2),({\bf S}_0, A_0), ({\bf S}_1, A_1), ({\bf S}_2, A_2), \ldots1 extracting the bounded set of active terms from the current self-representation (Schewe et al., 2020). This is a technically important compression: the machine need not

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Reflective Abstract State Machines (rASMs).