These invention(s) broadly relate to computing machines (hardware and software) and electronic circuits.
Malware plays a key role in attacking computer systems [1]. Typically, malware sabotages the purpose of the machine instructions executing on a digital computer. Also, there is no computational mechanism or machine method in the prior art of digital computers and register machine model [2, 3, 4] for healing (self-repairing) damaged instructions. On pages 124-163 of [2], Knuth describes a specific register machine model, called MIX. Processor architectures, such as the Intel Core i7 and ARM Cortex-A8, are covered in [4]; these architectures specify physical realizations of the register machine model.
Our invention(s) describe systems that heal from a broader implementation than the register machine model and digital computers so that our machine-implemented methods may also be applied to systems [5] of machines, which have subsystems that do not solely rely on executing digital computer instructions. Some systems can be implemented with analog machines such as an Archimedean screw [6].
At any moment, a register machine's state lies in a countable phase space; on the other hand, some physical systems [7] are more aptly modelled by a flow on a metric space [8] that is a continuum. A continuum is often defined as a compact, connected, metric space or a compact, connected, Hausdorff space [9]. Sometimes a continuum is not compact. The real numbers are a continuum. The continuum property has important design implications when building self-modifiable physical systems that perform a useful task.
Our invention(s) pertains to machines, systems, or electronic circuits that perform tasks: for example, the energy system in mitochondria, or an autonomous transportation system. Our primary goal is to develop and enhance the implementation of machine-implemented methods of repairing a system when the system is malfunctioning. In the field of biology, a malfunctioning system, in some cases, is called a disease. Herein, we describe novel machine-implemented methods in our invention(s):
Hitherto there has not been an invention or discovery of self-modifiable differential equations; to date there has not been a scientific language or formal system of machine-implemented methods for describing how to heal differential equations or computer instructions. These are important invention(s) so that we can design and improve systems that protect our critical infrastructure and health: biological systems, energy systems, GPS, manufacturing systems, and transportation systems.
One of our inventions defines, describes and applies self-modifiability and its machine-implemented methods in machines and physical systems such as an electronic circuit. Our invention(s) describe how to heal (self-repair) a malfunctioning system or machine, or network of machines, or an electronic circuit, or a network of electronic circuits. A computational machine is described that can simultaneously execute multiple machine instructions and a software simulation is described. The machine's simultaneous execution property enables to use one or more machine-implemented methods to repair instructions that have been damaged or removed; specifically, these machine-implemented methods use self-modifiability (via meta instructions) to heal damaged instructions. Another class of embodiments of our inventions uses self-modifiable methods to build electronic circuits that can heal.
Computation is typically implemented with a group of machines or system or circuits that perform a task. In an embodiment, one or more machines or circuits performing a useful task are executing cryptographic machine instructions that encrypt a message. In an embodiment, the cryptographic instructions sign a message so it can be authenticated. In an embodiment, one or more machines or one or more circuits performing a useful task are executing machine learning instructions that implement deep learning. In an embodiment, the execution of the deep learning by these machine instructions is based on large language model. In an embodiment, one or more machines or circuits performing a useful task are executing the TCP/IP protocol. In an embodiment, one or more machines or circuits performing a useful task are executing machine instructions that comprise an operating system. In an embodiment, one or more machines or circuits performing a useful task are executing machine instructions that are retrieving data from a database.
Our invention(s) describe and define meta variables (implemented in hardware or software) and meta operator machines, and show how to add or replace variables and differential equations in machines and electronic circuits: these machine-implemented methods and circuit-implemented methods are novel and necessary inventions for figuring out and healing a malfunctioning machine or a malfunctioning program or a malfunctioning circuit. Meta variables and meta operator machines provide general machine-implemented methods for healing a system, machine, or circuit that performs a useful task.
In the following figures, although they may depict various examples of the invention, the invention is not limited to the examples depicted in the figures.
Recent research has shown how adversarial electronic interactions can disable systems. Insulin injectors have been sabotaged so that the spurious reporting of the insulin level erratically turns off and on the flow of insulin [10]. In another medical device attack, electronically sabotaged pacemakers can produce dangerous shock commands [11]. Injecting clock glitches can skip cryptographic instructions [12].
Out-of-band signal injection attacks alter the measurements of sensors or actuator inputs at the hardware layer [13]. These attacks target the conversion process from a physical quantity to an analog property.
Typically, hardware attacks sabotage the intended dynamical behavior of the electronics. Moreover, there are currently no general mathematical models for describing how an extreme electromagnetic injection (EEMI) attack propagates in electronic components [15].
Current flip-flops are electronic circuits that have two stable physical states which can store information (0 or 1). A flip-flop's state is changed when signals are applied to one or more of its control inputs. Flip-flops are fundamental storage elements in sequential logic.
D flip-flops are commonly used in digital electronics to build computers and communication systems. One of our inventions applies self-modifiable circuits, using differential equations, in order to stabilize a D flip-flop during a noise attack. Another invention introduces meta variables as a new hardware tool for detecting if a flip-flop orbit has been manipulated. When implemented in hardware or software, meta variables and meta operators can heal a flip-flop orbit disrupted by noise. Overall, we invent new circuits, methods and machines in hardware and software for healing a system that performs a task.
We describe an example of a computer program that malfunctions when one bit is sabotaged. We demonstrate this with C source code that adds 3 integers. This C code shows how a 1-bit change to the address of only one instruction can substantially alter the program's behavior so that the C program is malfunctioning.
A computer program can be viewed as a discrete dynamical system [16]. A set of differential equations specifies a different type of dynamical system that can sometimes model analog machines. When a dynamical system that performs a task is changed so that the task is no longer adequately performed, it is desirable to have a process or mechanism to heal the system. This means that part of the system should detect a change and part of the system should self-modify the damaged system back to the original system that adequately performed the task. A dynamical system that can change itself is called self-modifiable.
A more concrete way to think about this is to view a dynamical system as a system that is governed by a collection of rules. In the case of differential equations, each equation is a rule; in a computational machine, each machine instruction is a rule. A dynamical system is self-modifiable if it can change its own rules: this means the dynamical system can add new rules to itself; it can replace current rules with new rules; or it can delete (remove) rules. Usually, a self-modifiable dynamical system is non-autonomous because the rules governing its behavior can change as a function of time.
In the section titled “The Active Element Machine” we describe a computational machine that can add new rules or delete rules when a “dynamical event” occurs during the machine's execution. Overall, our machine uses “meta instructions” to change its own rules.
Related work on self-repair and self-modification is split between biology and computer science. Biology focuses on understanding biological complexity [17, 18] and DNA repair [19]. Computer science emphasizes implementations of code repair and AI.
DNA repair [20] has been extensively studied for over fifty years. The models of DNA explain repair at the biomolecular level [19], but they do not propose a self-modifiability principle, based on adding new rules or replacing rules; and they do not provide a computational mechanism or a machine for healing a system or another machine.
In [21], self-modifying systems are proposed as a means for understanding the development of complexity in biology: “the popular belief is that the increase of complexity in evolution poses no deep or unsolved problem.” Subsequently, the author observes, “the increase of complexity becomes a deep problem”, and paradoxically states, “We shall see that in a formal system complexity can never increase at all.” The paradox is due to the author using Turing machines as the formal model to explain the development of biological complexity. The rules of a Turing machine do not change, so there is not any notion of self-repair or healing.
The mathematics described in [21] doesn't actually self-modify: e.g., there is no formalism for adding new variables and equations as time proceeds. Moreover, Turing machines are described in [21]'s “self-modifying systems”, even though the rules governing a Turing machine program stay fixed. The author's choice of using Turing machines as a model of “self-modifying systems” begs the following question: How can the complexity of a biological system increase when the formal rules describing that system do not change?
In [22], a semantic code search method is described whose goal is to repair register machine programs. The method uses human-coded fragments in a database to repair buggy C programs, written by novice students. It has a 19 percent success rate on benchmarked bugs. It has no principle of self-modifiability. It has no methods or machines for self-repairing instructions.
Active elements compute simultaneously. AEM instructions specify time, while standard compilers and language theory [29] do not specify time. In native hardware, an AEM can simultaneously execute 100,000 instructions or more, and eliminate the von Neumann bottleneck [30].
First, we provide a summary description of the AEM. Then a small AEM program is described that computes if a complete monochromatic graph on 3 vertices exists. Then we describe how self-modifiability can repair a program.
An AEM is composed of computational objects called active elements or elements. There are three kinds of elements: input, computational and output active elements. Input elements process information received from the environment or another AEM. Computational elements receive pulses from the input elements and other computational elements and transmit new pulses to computational and output active elements. Output elements receive pulses from input and computational elements. Every element is active in the sense that each one can receive and transmit pulses simultaneously.
Each pulse has an amplitude and a width. The width represents how long the amplitude lasts as input to the element that receives the pulse. If element Ei simultaneously receives pulses with amplitudes summing to a value greater than Ei's threshold and Ei's refractory period has expired, then Ei fires. When Ei fires, it sends pulses to other elements. If Ei fires at time t, a pulse reaches element Ek at time t+τik where τik is the delay (transmission time) from Ei to Ek.
In the section titled “Active Element Machine Language”, a specification of the AEM language defines four instructions and two keywords. An element instruction creates a new active element or updates an element's parameters: (element (time 2) (name L) (threshold −3) (refractory 2) (last 0)). In input element instructions, parameters threshold, refractory and last may be omitted.
At time t=2, if element L does not exist, then L is created. Element L's threshold is set to −3. L's refractory period is set to 2, and L's last time fired is set to 0. After time t=2, element L exists indefinitely with the same threshold and refractory values until a new element instruction with name value L executes at a later time.
A connection instruction connects two elements: (connection (time 2) (from C) (to L) (amp −7) (width 6) (delay 3)). At time t=2, a connection from element C to element L is created. The pulse amplitude is set to −7. The pulse width is set to 6. The transmission time is set to 3.
A fire instruction fires an input element and sends input, by transmitting pulses to other active elements: (fire (time 3) (name C)) fires element C at t=3.
In (name v), value v uniquely identifies the active element in element and fire instructions. In expression (from v) (to w), values v and w uniquely identify a connection: (connection (time 2) (from v) (to w) (amp 7) (width 6) (delay 3)).
A meta instruction can self-modify an AEM program: (meta (name E) (window 1 5) (C (args a b))). If element E fires (a dynamical event) during the time window [1, 5], this meta instruction executes and creates instruction C with arguments a and b.
Suppose an element instruction is contained in a meta instruction and an element instruction with the same name value already exists in the AEM program. If the meta instruction executes, then the element instruction in the meta instruction replaces the one in the AEM program. A similar replacement occurs for fire instructions if the name values are the same. A similar replacement occurs for a connection instruction in a meta instruction if the from and to values are the same.
Keyword dT represents an infinitesimal [31] amount of time that helps coordinate almost simultaneous events. dT<q for every rational q>0, and dT>0.
We define a program with 4 input active elements A, B, C, and D and one computational element E.
The fire instructions cause elements A, B, C, D and E to fire at t=0. The parameters of the elements and their connections are shown in tables 1 and 2.
At t=4, E fires because the sum of E's input is 14 and 14 is greater than E's threshold of 9. Since E fires at t=4, E cannot fire again until t=8 or afterward. At time t=8, the sum of E's input is 7, and 7 is less than E's threshold. Hence, E does not fire a second time.
We describe an AEM program that computes a simple graph theory problem. In the section titled “An Active Element Machine Method that Self-Repairs”, we describe the use of meta instructions to repair instructions that have been removed from a valid AEM program.
K5 is the complete graph on 5 vertices, {1, 2, 3, 4, 5}. In
We specify an AEM program that determines whether a coloring of K5 contains a complete monochromatic subgraph on 3 vertices (triangle). Monochromatic means the subgraph has only blue edges or only red edges. In
This graph problem comes from Ramsey theory [32], which has extensive applications [33] in computer science, ergodic theory, information theory, logic, and number theory. Ramsey number r(j, l) is the least integer n such that if the edges of the complete graph Kn are colored with only red and blue, then there always exists a complete subgraph Kj containing only red edges or there exists a complete subgraph Kt with only blue edges. Computing r(j, l) is an NP-hard problem [34]. r(j, l) grows so fast that r(5, 5) is unknown.
Below are 5 red edge input element instructions. The one named R12 represents that edge {1, 2} is red.
Below are 5 blue edge input element instructions, where Bij ranges over {B13, B14, B24, B25, B35}.
Below are 5 instructions that fire the red edge elements, and 5 instructions that fire the blue edge elements.
For each red edge {j, k}, there is a meta instruction
where Rjk is one of R12, R23, R34, R45, R15.
For each blue edge {j, k}, there is a meta instruction
where Bjk is one of B13, B14, B24, B25, B35.
For each 3 distinct vertices {i, j, k} in {1, 2, 3, 4, 5}, create red element R_ijk and blue element B_ijk.
For each set of 3 distinct vertices {i, j, k}, compute if all three edges {i, j}, {i, k}, {j, k} are blue.
For each set of three distinct vertices {i, j, k}, compute if all three edges {i, j}, {i, k}, {j, k} are red.
We built a software tool that simulates the active element machine. We compiled our C code [35] to a dynamic library (59,552 bytes), named AEM.dylib. Library AEM.dylib runs on macOS Big Sur, and can execute all four AEM instructions.
The AEM can simultaneously execute multiple instructions, while C code compiles to register machine instructions that can only execute sequentially. By finessing the use of dT in our AEM programs, we can avoid simulations that produce different computing results than an actual AEM program, implemented in hardware, would produce. Before demonstrating self-repair, we describe two software simulations of our AEM program defined in the previous section.
During the first simulation, the following firing activity occurs. At time 0, elements B13, B14, B24 B25, B35, R12, R15, R23, R34, and R45 fire. None of the elements B_ijk or R_ijk ever fire: thus, K5's coloring does not contain a blue or red triangle.
If {3, 5} is colored red instead of blue, instruction (fire (time 0) (name R35)) replaces (fire (time 0) (name B35)). Also, (element (time 0) (name R35) (threshold 1) (refractory 1) (last −1)) replaces (element (time 0) (name B35) (threshold 1) (refractory 1) (last −1)).
During the second simulation, the new AEM program produces the following firing activity. At time t=0, elements B13, B14, B25, B24, R12, R15 R23, R34, R35 and R45 fire. Also, element R_345 fires at t=1: This means that the new coloring of K5 has a red triangle {3, 4, 5}.
Now we show how the new AEM program can be protected. Suppose the new AEM program is sabotaged by removing the connection instruction:
When element R35 fires, the pulse of amplitude 2 is not sent to R_345 and the input sum to R_345 never goes above 4, so R_345 never fires even though the new coloring of K5 contains the red triangle {3, 4, 5}.
We can heal the removal of this connection with the following meta instruction:
Similarly, for each connection from Rij to R_ijk, we can heal the removal with the meta instruction:
We can add a similar meta instruction for each connection from Rjk to R_ijk and for each connection from Rik to R_ijk. We can also protect the blue connections by adding a meta instruction for each connection from Bij to B_ijk.
We can add a similar meta instruction to heal broken connections for each connection from Bjk to B_ijk and for each connection from Bik to B_ijk.
Let be the integers, and fix infinitesimal dT [31]. Define extended integers ={m+k dT: m, k∈}. In, keyword dT is described, which establishes an order on : for example, 3−5dT<3−4dT.
Γ, Ω, and Δ are index sets that index the input, computational, and output active elements, respectively. Intersections Γ∩Ω and Ω∩Δ can be empty or non-empty. A machine architecture, denoted as (, , ), consists of a collection of input active elements, denoted as ={Ei: i∈Γ}; a collection of computational active elements ={Ei: i∈Ω}; and a collection of output active elements ={Ei: i∈Δ}.
Each computational and output active element, Ei, has the following components and properties:
Input active elements that are not computational have the same properties as computational elements, except they receive no inputs ϕki from elements in this machine. Input elements are externally firable, by an external source from the environment or an output element from a distinct machine (, , ). An input element can fire at any time after its refractory period has expired. An element can be an input and computational element; an element can be an output and computational element. When an output element Ei is not a computational element (i∈Δ−Ω), then Ei does not send pulses to elements in this machine.
If gi(s)=1, then active element Ei fired at time s. Refractory period ri is the amount of time that must elapse after Ei just fired before Ei can fire again. τki is the transmission time: If element Ek fires at time t, a pulse sent from Ek reaches Ei at time t+τki. Pulse amplitude Aki is the height of the pulse that Ek sends to Ei after Ek has fired. After this pulse reaches Ei, pulse width ωki indicates how long the pulse lasts as input to Ei. If Aki=0, no connection exists from Ek to Ei.
A minimal programming language defines four instructions: element, connection, fire, and meta.
An AEM program is defined with Backus-Naur syntax.
ϵ indicates a blank string that terminates an expression.
The rules below cover extended integer arithmetic.
An element instruction specifies the time when an active element is created or its parameter values are updated. Its Backus-Naur syntax is shown below.
Keyword time tags a time value s (extended integer) when the element is created or updated. If the name value is E, keyword name tags name E of the active element. Keyword threshold tags a threshold θE(s). Keyword refractory tags a refractory value rE(s), and last tags a last time fired value ΨE(s).
A connection instruction creates or updates a connection from one active element to another active element. Its Backus-Naur syntax is shown below.
Keyword time tags a time value s when the connection is created or updated. Keyword from tags a name E of the active element that sends a pulse with these updated values. Keyword to tags a name B of the active element that receives a pulse with these updated values. Keyword amp tags a pulse amplitude value AE,B(s) that is assigned to this connection. Keyword width tags a pulse width value ωE,B(s). Keyword delay tags a transmission time τE,B(s).
When the AEM clock reaches time s, symbols E and B are name values that must refer to an element that already has been created or updated before or at time s. Not all of the connection parameters have to be in a connection instruction. If the connection does not exist beforehand and the width and delay values are not specified appropriately, then the amplitude is set to 0: this “zero” connection has no effect on the AEM computation. The connection exists indefinitely with the same parameter values until a new connection instruction is executed between from element E and to element B.
A fire instruction has the following syntax. <f_cmd>::=(fire (time <aint>) (name <ename>)) The fire instruction fires the active element indicated by the name tag at the time indicated by the time tag. This instruction can be used to fire input active elements.
Keyword dT represents a positive infinitesimal amount of time. If m and n are integers and 0≤m<n, then mdT<ndT. Also, dT>0 and dT is less than every positive rational number; and −dT<0 and −dT is greater than every negative rational number.
dT coordinates almost simultaneous events that are non-commutative or indeterminate: e.g. element A may be receiving a pulse from element B at the same time that a connection between them is removed.
Keyword clock evaluates to an integer, and is the current AEM time. clock is an instance of <ename>.
If the current AEM time is 5, then (element (time clock) (name clock) (threshold 1) (refractory 1) (last −1)) executes as (element (time 5) (name 5) (threshold 1) (refractory 1) (last −1)).
After (element (time clock) (name clock) (threshold 1) (refractory 1) (last −1)) is created, then this instruction is executed with the current clock time. If this instruction is in the original AEM program before the clock starts at 0, then the following sequence of elements named 0, 1, 2, . . . are created.
A meta instruction executes an instruction <cmd> when an active element fires within a window of time.
For example, E is the name of the active element in (meta (name E) (window 1 w) (C (args t a)). Keyword window tags a time interval, called a window of time. 1 and w are extended integers that locate the boundary points. If w>0, the window of time is [1, 1+w]. If w<0, the window is [1+w, 1].
Instruction C executes each time that E fires during the window of time. If the window is omitted, then instruction C executes at any time that element E fires. If the instruction C is a connection instruction and the connection values are zero or omitted and the (from E1) (to E2) in the connection instruction match with elements E1 and E2 already exists in the machine, then the connection from E1 to E2 is deleted (removed).
If the instruction C is an element instruction and the element (name E) already exists in the machine and the threshold expression is omitted or the refractory expression is 0 (refractory 0) or omitted, then the element E is removed (deleted) from the active element machine and all connections to or from E are removed from the active element machine.
A one-way hash function Φ, has the property that given an output value z, it is computationally intractable to find an information element mz such that Φ(mz)=z. In other words, a one-way function Φ is a function
that can be easily computed, but that its inverse Φ−1 is computationally intractable to compute [45]. A computation that takes 10101 computational steps is considered to have computational intractability of 10101.
More details are provided on computationally intractable. In an embodiment, there is an amount of time T that encrypted information must stay secret. If encrypted information has no economic value or strategic value after time T, then computationally intractable means that the number of computational steps required by all the world's computing power will take more time to compute than time T. Let C(t) denote all the world's computing power at the time t in years.
Consider an online bank transaction that encrypts the transaction details of that transaction. Then in most embodiments, the number of computational steps that can be computed by all the world's computers for the next 30 years is in many embodiments likely to be computationally intractable as that particular bank account is likely to no longer exist in 30 years or have a very different authentication interface.
To make the numbers more concrete, the 2013 Chinese supercomputer that broke the world's computational speed record computes about 33,000 trillion calculations per second [46]. If T=1 one year and we can assume that there are at most 1 billion of these supercomputers. (This can be inferred from economic considerations, based on a far too low 1 million dollar price for each supercomputer. Then these 1 billion supercomputers would cost 1,000 trillion dollars.). Thus, C(2014)×1 year is less than 109×33×1015×3600×24×365=1.04×1033 computational steps.
As just discussed, in some embodiments and applications, computationally intractable may be measured in terms of how much the encrypted information is worth in economic value and what is the current cost of the computing power needed to decrypt that encrypted information. In other embodiments, economic computational intractability may be useless. For example, suppose a family wishes to keep their child's whereabouts unknown to violent kidnappers. Suppose T=100 years because it is about twice their expected lifetimes. Then 100 years×C(2064) is a better measure of computationally intractable for this application. In other words, for critical applications that are beyond an economic value, one should strive for a good estimate of the world's computing power.
One-way functions that exhibit completeness and a good avalanche effect or the strict avalanche criterion [47] are preferable embodiments: these properties are favorable for one-way hash functions. The definition of completeness and a good avalanche effect are quoted directly from [47]:
A hash function, also denoted as Φ, is a function that accepts as its input argument an arbitrarily long string of bits (or bytes) and produces a fixed-size output of information. The information in the output is typically called a message digest or digital fingerprint. In other words, a hash function maps a variable length m of input information to a fixed-sized output, Φ(m), which is the message digest or information digest. Typical output sizes range from 160 to 512 bits, but can also be larger. An ideal hash function is a function Φ, whose output is uniformly distributed in the following way: Suppose the output size of Φ is n bits. If the message m is chosen randomly, then for each of the 2n possible outputs z, the probability that Φ(m)=z is 2−1. In an embodiment, the hash functions that are used are one-way.
A good one-way hash function is also collision resistant. A collision occurs when two distinct information elements are mapped by the one-way hash function Φ to the same digest. Collision resistant means it is computationally intractable for an adversary to find collisions: more precisely, it is computationally intractable to find two distinct information elements m1, m2 where m1≠m2 and such that Φ(m1)=Φ(m2).
A number of one-way hash functions may be used to implement one-way hash function 148. In an embodiment, SHA-512 can implement one-way hash function 148, designed by the NSA and standardized by NIST [48]. The message digest size of SHA-512 is 512 bits. Other alternative hash functions are of the type that conform with the standard SHA-384, which produces a message digest size of 384 bits. SHA-1 has a message digest size of 160 bits. An embodiment of a one-way hash function 148 is Keccak [49]. An
embodiment of a one-way hash function 148 is BLAKE [50]. An embodiment of a one-way hash function 148 is Gr∅stl [51]. An embodiment of a one-way hash function 148 is JH [52]. Another embodiment of a one-way hash function is Skein [53].
A Turing computable property is a property that can be computed by a register machine. Since active element machine programs can execute Turing computable algorithms [27], the healing examples demonstrated in can be extended with more general methods. For example, a new output active element Oc can be adjoined to an active element machine program for the sole purpose of detecting some Turing computable property c has changed in the damaged active element machine program. One can adjoin meta instructions of the form (meta (name Oc) h) where if active element Oc fires, the firing of Oc indicates that property c is awry. Hence, instruction h self-modifies the active element machine program so that adjoining instruction h at least partially heals the damaged active element machine program.
Before we provide a formal description, we give two examples of properties, named ϕ1 and ϕ2.
Let denotes the set of all active element machine programs. A property of all programs is defined as a characteristic function ϕ: →{0, 1}. When ϕ(P)=1, then property ϕ holds on program P. If ϕ(P)=0, then property ϕ is violated on P. ϕ is a Turing computable property if ϕ is Turing computable on . For a finite set of programs ⊂, a restriction ϕ|: F→{0, 1} can be Turing computable, yet ϕ is not necessarily Turing computable on .
A subprogram S of an active element machine program P is any subset of instructions selected from P. An extension program of S is a finite set of active element machine instructions adjoined to S. Machine-implemented method 9 demonstrates healing capabilities of an active element machine program. Machine-implemented method 9 describes how program H heals a damaged (malfunctioning) program P.
P is an active element machine program. ϕ is a Turing computable property (a property that can be computed by a digital computer algorithm) of program P. An active element machine subprogram S of P can compute whether property ϕ holds on program P or is violated. An extension active element machine program H of S can execute and restore program (heal) P if P is damaged and H is not damaged. Moreover, program S can verify that ϕ computes the same value on the original program P.
Method 9 starts with program S, and describes how to build program H that heals program P.
Name value X must not occur in P because any firing activity of X must not interfere with firing activity of other elements in P. ϕ has the same value on the restored program as the original program P.
Overall, machine-implemented method 9 is a general method for how instructions that self-modify the program can help repair a damaged program. Self-modifiable instructions play a fundamental role in healing a damaged program. In some embodiments, a Turing computable property ϕi can be the ith bit of a one-way hash function (described in the previous section) applied to program P that checks if tampering of P has occurred.
Before we show how to self-modify a differential equation, we describe some ordinary differential equations. Then we describe a machine-implementable formal language for building differential equations that are machine-implementable or circuit-implementable. Finally, we show a damaged one and illustrate how to heal it when it is part of a circuit.
We define ordinary differential equations that can compute the Boolean operator OR, where OR(1, 0)=OR(0, 1)=OR(1, 1)=1, and OR(0, 0)=0. Consider equations
The initial values x0 and y0 are Boolean inputs 0 or 1. Variable z computes the output. z's initial value is always z0=0. We tested that z converges to the correct Boolean output for all 4 pairs of initial values x0, y0∈{0, 1}, using Julia [37]. For example, table 3 assumes initial conditions x0=0; y0=1; and z0=0.
If x0=0, y0=1 and z0=0, then
and
when t>0. Thus,
when z<1, and
By symmetry,
Lastly, the relevant fixed points (x, y, z) of
are (0, 1, 1), (1, 0, 1), (0, 0, 0), (1, 1, 1), and have the same input-output values as OR. (The fixed points are all (x, y, z) such that
e.g. (2, 2, 0). Sometimes fixed points are called equilibrium points.)
Equations
compute AND(0, 0)=AND(1, 0)=AND(0, 1)=0, and AND(1, 1)=1. Relevant fixed points are (0, 1, 0), (1, 0, 0), (0, 0, 0), (1, 1, 1). With input x and output z,
In the AEM, the firing of an element in a meta instruction adds a new connection or new element, or replaces some of the parameters in an existing element or connection. When meta instructions create new elements and connections, these new computational objects are representable by one or more new variables. This is evident from the machine architecture definition in of the appendix. In short, we identify two advances (novelties) in our invention(s) over prior art that are critical to self-modifying a differential equation that is circuit-implementable and/or machine-implementable.
We define a meta variable machine, a machine detectable event, and a meta execution time. Standard variables are variables that occur in an ordinary differential equation. In
x and z are standard variables. Define ω1, . . . ωn as meta variables. Define x1, . . . , xn as standard variables. (Machine variables can have type standard or type meta. In some embodiments, the type specifies an interpreter or compiler how to construct these machines or circuits) Each fi is a machine-implemented or circuit function.
is a meta equation that is machine-implemented or implemented in a circuit. In some embodiments, it is an electronic circuit.
Let X be a topological space (e.g., phase space), where derivatives can be defined. At any time t, a standard variable's value xi(t) and a meta variable's value ωi(t) both lie in X. Let A be a Lebesgue measurable [38] subset of X. (Set A is measurable so that an integral is physically well-defined: that is, it can be implemented as machine method or a physical circuit.) A signed characteristic function on A is χA: X→{−1, 1}. If x is in A, then χA(x)=1; if x is not in A, then χA(x)=−1. X is the domain of χA, and {−1, 1} is the range. Let θω be a threshold. Composing χA and meta variable ω, a machine detectable event occurs when
In embodiments, when quantum events or quantum phenomena or other complex physical properties are used to build a machine or circuit, a more general description of a detectable event is described. In quantum mechanics, the following provides a physical description of quantum wave behavior:
Let f: X×X×[0, ∞)→X be a machine-implemented or circuit implemented function, where f's first argument is ω(t); f's second argument is dω/dt; and its third argument is t. Call ⊆X a detectable region in phase space. A physically detectable event in phase space occurs if
Define meta operator execution time τω as the infimum of all times s that satisfy inequality 0.1 or phase space condition 0.3. (The infimum of a set of real numbers is the greatest lower bound.) A meta operator ω machine, bound to meta variable ω, executes at time τω. (In inequality 0.1, integrating ω(t)'s orbit and executing ω is physically analogous to a meta instruction executing when an active element A fires, due to the sum of A's input pulses exceeding A's threshold.)
Meta operator machines enable us to build self-modifiable differential equations that can specify self-modifiable circuits. Meta operator machines or circuits execute or machine-implement self-repair of a machine or healing system or circuit that is malfunctioning. A system of differential equations is a set of differential equations. For example,
is a system.
Our formal language for meta operator machines works as follows. A create operator machine creates an empty system, and assigns a name with syntax (time, name). (0, ) creates an empty system ={ } at time 0.
An initialize operator machine declares a variable with a name and its type; assigns an initial value; and places the variable in a system. 's syntax is (time, variable_name, variable_type, initial_value, system_name). For example, (0, x, standard, 0, ) creates x at time 0; defines x as a standard variable; and assigns x the initial value of 0 (i.e., x0=0). Argument indicates that x is a variable in a system named .
An adjoin operator machine adjoins a new differential equation to a system. 's syntax is (time, equation, system_name). is executed at a time specified by the first argument. In simpler cases, the time is explicitly stated. In other cases, the time is the greatest lower bound of all times s which satisfy integral inequality 0.1 or 0.3 in the section, titled “Meta Variables”. For example, execute 7 meta operators shown below:
Afterward, system
A replace operator machine replaces a variable with an equation or variable, or replaces an equation with another equation. 's syntax is (time, old_exp, new_exp, grammar, system_name). The argument time behaves the same as time in the adjoin operator. Sometimes the 2nd argument old_exp represents the current variable that will be replaced by a new variable or equation, indicated by the 3rd argument new_exp. Sometimes old_exp represents an equation that will be replaced by a new equation new_exp. The 4th argument grammar is a pattern matching scheme. For replacement to occur, an expression in old_exp, must be accepted by a grammar, specified in grammar. It may be a semi-Thue grammar [39]. (Also, see pages 220-223 in [29] that describes these grammars.) If grammar is ∅ or omitted, a replacement occurs at time specified by time. Overall, plays a similar role to a meta instruction in an AEM.
Meta operator machines or circuits can remove and add variables to equations that machine-implement or circuit-implement self-modifiability. Variables spaces specify how meta operator machines or circuits add new variables or remove variables. Variable spaces are useful when they create a new variable, by measuring a quantum random event [40], which can help self-modifiable differential equations evolve and increase their complexity as time proceeds. This complexity property provides advantages in machine learning applications of self-modifiability.
Let , and ≥0 be the counting, real numbers and non-negative reals, respectively. Define variable space V={u1, u2, . . . , un, . . . } in order to add a new standard variable ui to a differential equation. Define dual variable space
Define a variable operator Φ: ≥0→ that adds or removes variables from a self-modifiable dynamical system . If Φ(ti)=ui, then meta operator (ti, Φ(ti), standard, 0, ) adds standard variable ui to system if ui doesn't already exist in . For our purposes, a system is a set of ordinary or partial differential equations. For some systems that represent an appropriate physical system or circuit, a restriction can be placed on Φ: e.g., {r∈≥0: Φ(r)∈V∪
Adding a small amount of noise to the OR ODE so that
a Julia simulation is shown in table 4 with initial values x0=y0=0. Table 4 shows that z moves to an incorrect output value because x and y move away from their initial values x0=y0=0.
Define circuit-implemented equation
with meta variable ω. Set A=. Set initial value ω(0)=0. Then
Set θω=10−6. Define
If there is physical noise
noise accumulates so that
first θω at time s. At time s, ω self modifies to
This change repairs noise in circuit-implemented equation dx/dt near x=0.
ω will not repair noise near x=1. One can repair noise around both x0=0 and x0=1, by splitting A, for some ϵ>0, into A0=(−ϵ, ϵ) and A1=(1−ϵ, 1+ϵ), and creating two replacement operators ω
A D flip-flop gate model [14, 15] is our starting point from which we describe and substantially enhance in order to build our invention(s) that heal electronic circuits.
In
Let c, d and L0 be constants that are real numbers. For a fixed point p=(p1, p2) in the square {(x, y)∈2: −2≤x, y≤2} and any point u=(u1, u2)∈2, define metric ∥p−u∥2=(p1−u1)2+(p2−u2)2. Define a radially symmetric function centered at p as
Function Lp(u) helps define a differential equation (0.9) flip-flop model. (In the section titled “Adding Input to the Circuit” signal input is added. In the section titled “Noise Can Disrupt Flip-Flop Toggling in Circuits” noise input is added to our circuit model.)
α(u) and β(u) have two favorable properties:
The rest of this section describes and defines machine-implemented method functions that help build α(u) and β(u) in hardware circuits such as the one in
and define
For u=(u1, u2) and fixed point p=(p1, p2), define ∠(p, u)=atan2(p2−u2, p1−u1). Circuit-implemented method ∠(p, u) computes the angle between the x-axis and the vector {right arrow over (p)}−{right arrow over (u)}, where {right arrow over (p)}=p1, p2 and {right arrow over (u)}=u1, u2. Recall that
Define ϕA(u)=atan2(sin γ(u), cos γ(u)), where γ(u)=π−ϕB(u).
Constants c=0.8, d=1, L0=2, and κ=3, and fixed points a=(1, −1) and b=(−1, 1) generated the vector field shown in
L0=2, κ=3, fixed points a and b, on opposite sides of u2=u1, vanish: a bifurcation occurs near
These bifurcation values are important for the self-modifiable method that will be described later, as the self-modifiable circuit S, shown in
For u=(u1, u2), line u2=u1 is a boundary of the system of circuit-implemented equations, defined in equation (0.9), because it separates initial points u(0) that eventually reach fixed point a=(1, −1) and points that eventually reach fixed point b=(−1,1). In electronics, u2=u1 is sometimes called a wall; in dynamical systems, u2=u1 is a stable manifold with saddle fixed point (0, 0). For all initial points u(0)=(x0, y0) satisfying x0<y0, the orbit of u(0) converges to b=(−1, 1). For all points u(0)=(x0, y0) satisfying x0>y0, the orbit of u(0) converges to a=(1, −1).
We add input signal (t) with constants K1, K2:
An embodiment of input signal (t) to the flip-flop circuit is defined that illustrates how an input signal can toggle the flip-flop between fixed points a=(1, −1) and b=(−1,1). This corresponds to storing a 0 or 1 with the flip-flop. For parameters T0, period ρ and pulse width τ, define r(t, T0, ρ)=(t−T0) mod ρ. Define
(t)=ψ(t, 16, 24, 1.8) is shown in
Point u(16) is very close to stable fixed point b=(−1, 1). (t)'s effect on u(t)'s orbit is shown in
During time period (17.8, 20], (t)=0. u(t)'s orbit follows the voltage field in
At time t=40, (40)=−1 so there is an abrupt change in the orbit. During time period [40, 41.8],
We describe how (t)'s toggling relates to a digital logic table in
If input constants K1, K2 are too small, then |K1| and |K2| must be substantially different. When |K1| and |K2| are small and |K1|≠|K2|, u(t)'s orbit cannot be successfully toggled from one fixed point to the other fixed point because the vector field is close to zero near the saddle point (0, 0). When K1=0.6, K2=−0.6, c=0.8, d=1, L0=2, κ=3 with u(0)=(−1.7, 0.8) as in
Successful toggling depends upon the time width τ of input signal (t). For example, when K1=1.5 and K2=−1.5 with u(0)=(−1.7, 0.8) and τ=1, the orbit successfully crosses the boundary u2=u1. When τ=0.8, the orbit does not cross u2=u1 and by time t=24, u(24)≈(−0.986, 0.987)≈b.
Parameter constants such as K1, K2, c, d, L0, κ and the boundary u2=u1 are critical to properly tuning the self-modifiable circuit, so it can heal a flip-flop circuit from a noise attack.
A noise pulse can disrupt flip-flop toggling. Noise term η(t) is added to equation (0.5). K3, K4 are constants.
Set h(t, l, f)=sin(2πf(t−l). Set g(t, l, δ, k)=tan h(k(t−l)+tan h(−k(t−l+δ). In
In
is the time location of the noise.
is the frequency of function h. δ=1 is the time width of function g. Constant k=5 sets the steepness of g on each side of time l.
is the amplitude.
disrupts u2(t)'s orbit during time period [14.5, 17.5] because |η(t)|<10−19 whenever t lies in [0, 14.5)∪(17.5, +∞).
When a simulated EEMI attacks a D flip-flop, an effective attack creates enough noise for a long enough period of time so that the orbit of the flip-flop circuit is corrupted with respect to the boundary u2=u1. The noise causes the output Q(t) (
An information theory [41, 42] analogy is helpful in explaining our invention(s) and distinguishing our inventions from information theory. Suppose Alice transmits 16 bits of signal to Bob. If any of the 16 bits are flipped due to noise in the transmission medium, Bob has no way of knowing if any of the bits have been flipped. To repair errors that occur during the transmission of the signal, Alice must transmit additional bits that help Bob with error code correction [43]. It is important to clarify a fundamental difference between information theory and error code correction and the invention(s) described herein. Information theory and error code correction do not address when the computation performed by Alice and Bob makes a mistake (due to flaws in the hardware, software, or external physical effects such as electromagnetic radiation) or is sabotaged from noise delivered by a sentient being with the purpose of subverting the purpose of the computation. In this sense, the invention(s) described herein are more fundamental than information theory, and error correction based on information theory. To make an analogy, it is similar to asking whether the brain is more fundamental than the muscles in the body that the brain actuates.
An extension of machine-implemented equation (0.6) adds new circuit variables (e.g., new subcircuits) that heal the flip-flop orbit when it is disrupted by noise. Set v1(t)=(u1(t), u2(t)). For i≥2, set vi(t)=(u2i−1(t), u2i(t)). Define n machine-implemented (or circuit-implemented) differential equations, where each i is in 1, . . . , n:
Analogous to α(u) and β(u) in the section titled “A D Flip Flop Gate Model”, circuit-implemented angles α1 and β1 are computed between the two vectors derived from u1 and u2. If i≥2, angles αi and βi are computed between the two vectors derived from u2−1 and u2i.
When n=2, two new variables u3, u4 and two or more standard differential equations are added to the system. System (machine-implemented equations) u(t)=(u1(t), u2(t), u3(t), u4(t)) is subject to equation (0.7). Configure boundary conditions u1(0)=u3(0) and u2(0)=u4(0). (In some embodiments, the boundary conditions correspond to voltages: that is, the voltages of u1 and u3 at time 0 are equal, and the voltages of u2 and u4 at time 0 are equal.) Configure input constants K1,1=K2,1=0.6, and K1,2=K2,2=−1.5. Set noise constants K1,3=K2,3=K2,4=0, and K1,4=1.
Both v1(t) and v2(t) have the same stable fixed points a=(a1, a2) and b=(b1, b2). Hence, if noise injection does not occur, then the orbits of circuit-implemented v1(t) is identical to circuit-implemented v2(t): v1(t)=v2(t) for all t.
When u1 and u2 in a circuit perform the computation, then u1 and u2 are called signal variables. Moreover, u3 and u4 are called repair or healing variables. (Variables u3 and u4 are analogous to error correction bits.) For each i in {1, 2}, define machine-implemented or circuit-implemented meta differential equations:
with initial conditions ω1(0)=ω2(0)=0. ω1 and ω2 are meta variables. Define two thresholds θ1, θ2>0 and two meta operator execution times s1, s2. (Meta variables and meta operator machines are comprehensively described in sections titled “Meta Variable Machines” and “Meta Operator Machines and Circuits”. For example, the section titled “Meta Variable Machines” defines machine detectable events.
Let s1 be the first time, where |ω1(s)|≥θ1. Then
If s1 exists, at time s1 a machine-implemented method (meta operator) 1 bound to ω1 executes: 1 modifies
in
Let s2 be the soonest time such that |ω2(s2)|≥θ2. Then
If s2 exists, then at time s2 machine-implemented method (meta operator) 2 bound to ω2 executes: 2 modifies
in
Both Machine Execution Time A and B satisfy a machine-implemented or circuit-implemented physically detectable event condition (0.3), defined in section titled “Meta Variable Machines”. A machine-implemented or circuit-implemented meta operator 1 is defined in machine-implemented method 1.
Set θ1=θ2=0.01.
Circuit variables (u3, u4) help heal an attack on (u1, u2) in machine-implemented method 2.
In meta operator 2, the same noise injection is used as in the section titled “Noise Can Disrupt Flip-Flop Toggling in Circuits” that caused the flip-flop toggling to fail, as shown in
Observe that K2,3=K2,4=0, so healing variables u3, u4 are not attacked with noise. Also, K1,4=1, so variable u2 is disrupted by noise near t=16. (In
If the thresholds are set to θ1=θ2=1 and the time width δ of η(t) is set to 1.4, then meta operator 2 no longer can heal the noise disruption. For these same values, θ1=θ2=1 and δ=1.4, if width τ of (t) increases from 1.8 to 2.0, then meta operator 2 successfully heals the stronger noise injection, even with very weak thresholds θ1=θ2=1. There are two effects. Meta operator 2 heals u2's orbit at t≈15.63. The second effect is that η(t) is effectively 0 after t=17, and (t)=1 until t=18, as shown in
Consider that meta variables ω1, ω2 integrate the difference between variables u1, u3 and u2, u4, respectively:
where i is 1 or 2. If |ω2|≥θ2=1, then |u2−u4|≥1. This means it is likely that the (u1, u2) and (u3, u4) orbits are on opposite sides of the line u2=u1, implying that u2's orbit was disrupted from its correct orbit.
Meta operator 3 increases the pulse width of (t).
Meta machine operator 4 combines meta operators 2 and 3.
Operator 2 changes the vector field.
Operator 3 changes the input signal.
In some embodiments, the role of each variable is decentralized over time. Usually, a noise injection only lasts for a short period of time. Decentralization of a task between variables addresses the weakness that a sophisticated Mallory will attempt to attack the weakest part of the system. Hence, in meta operators 1, 2, 3 and 4, if Mallory knows or guesses which variables perform the healing, Mallory will likely attack the healing variables.
To address this single point (variable) of failure, in enhanced embodiments, the circuit variables should heal each other in one or more variable cycles. Decentralization enables each variable to have a dual purpose: signal and healing. After showing how machine-implemented method 2 (meta operator 2) fails on a noise attack on its healing variable, machine-implemented method 5 or circuit-implemented method 5 (meta operator 5) is defined that is more robust to noise. Lastly, we explain variable cyclicity and how changes in the noise parameters and number of variables affects the efficacy of machine-implemented method 5 (meta operator 5).
A noise attack on machine-implemented method 2 (meta operator 2) is examined. A successful attack provides an example that demonstrates the intuition of Mallory attacking the healing variable.
In
To address the failure of meta operator 2 when both circuit variables u2 and u4 are attacked, a self-modifiable circuit embodiment is extended to six variables (u1, u2, u3, u4, u5, u6). In circuit-implemented method (0.7), i=1,2, or 3. Similar to the section titled “Adding Healing Variables” , set circuit values to K1,1=K2,1=K3,1=0.6 and K1,2=K2,2=K3,2=−1.5, so the same constants are used with input (t).
Define meta circuit variables so that the signal and healing functionality in the circuit is decentralized over the variables (i.e., decentralized over the circuit). Let ω1, ω2, and ω3 be the meta variables with initial boundary conditions ω1(0)=ω2(0)=ω3(0)=0. Use circuit value θ to represent all three thresholds. Circuit-implemented method 5 (meta operator) depends upon three meta variable circuit equations:
In an embodiment,
represents the change in voltage with respect to time of circuit variable u4 that represents the voltage of line u4. In an embodiment,
represents the change in voltage with respect to time of circuit variable u2 that represents the voltage of line u2. In an embodiment,
represents the change in voltage with respect to time of circuit variable u6 that represents the voltage of line u6.
In an another embodiment,
represents the change in current with respect to time of circuit variable u4 that represents the current of line u4. In an embodiment,
represents the change in current with respect to time of circuit variable u2 that represents the current of line u2. In an embodiment,
represents the change in current with respect to time of circuit variable u6 that represents the current of line u6.
Variables u2, u4, and we have cyclic interdependencies. In meta operator 5,
depends upon u4 and u6.
depends upon u2 and u6; and
depends upon u2 and u4. If variable y depends upon variable x, write x→y. From the three equations, there are six variable 2-cycles: all ui→uj→ui such that i≠j and {i, j}⊂{2, 4, 6}. There are six variable 3-cycles: all ui→uj→uk→ui such that sets {i, j, k}={2, 4, 6}.
Intuitively, when noise η3 attacks u4, u2 and u6 restore u4. When η2 attacks u2, then u4 and u6 still agree so they can heal u2. Depending upon the time, u2, u4, and we play different roles. This is why six variables can ameliorate a two pulse attack on u2 and u4.
Keeping η3's parameters fixed, if δ2 lies in (½, ¾], meta operator (machine-implemented method) 5 successfully heals the noise. When δ2=0.76 and θ1=θ2=0.2, a bifurcation in the circuit's dynamical behavior is about to occur, which causes the circuit to no longer perform its intended flip-flop computation. (A bifurcation occurs when the orbit does not cross u2=u1.) At ζ2=0.76,
The relative timing of noise pulses is also critical. If pulses η2 and η3 are separated in time, meta operator (machine-implemented method) 5 is far more robust: when δ2=1, and η2's time location
meta operator (machine-implemented method) 5 successfully heals, shown in
As the number of variables n increases, the circuit complexity of machine-implemented methods increases. When n is beyond 8, there are more potential variable interdependencies that can create robust healing of the circuit. If n≥8, successful noise attacks require more noise pulses delivered on multiple variables. (This means Mallory requires more electromagnetic energy to deliver her noise attacks.) Also, it is far more challenging for Mallory to inject noise pulses so that on multiple variables their time locations overlap. (This means Mallory's multiple noise pulses need to be time coordinated to be effective.)
Our self-modifiable circuit has two copies C1 and C2 of the flip-flop circuit in
In an embodiment, machine-implemented method 2 (meta operator 2) describes how subcircuit S behaves. In some embodiments, shown in
If thresholds θ1 or θ2 are exceeded, then S sends output that self-modifies circuit C1 according to the section titled “Adding Healing Variables”.
In an embodiment, subcircuit S contains a voltage difference circuit, as shown in
In other embodiments, a self-modifiable circuit may contain a third copy C3 of the flip-flop circuit in
In some embodiments, a self-modifiable circuit may contain a subcircuit S that contains three voltage difference subcircuits as shown in
In digital hardware design and theoretical computer science, the final result of a computation is a fixed point. After a Turing machine halts [44], the final result is the machine's state and symbols stored on the tape. A Turing machine's halting configuration is represented by a fixed point.
Fixed points are simpler objects in dynamical systems theory. Besides fixed points, nonlinear systems can have periodic orbits, limit cycles, dense orbits, and chaotic attractors.
Some approaches that do not use fixed points as machine-implemented methods:
Although the invention(s) have been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the true spirit and scope of the invention. In addition, modifications may be made without departing from the essential teachings of the invention.
This application claims priority benefit of U.S. Provisional Patent Application with Ser. No. 63/435,223, entitled “Machines and Systems that Heal”, filed Dec. 23, 2022, which is incorporated herein by reference. This application claims priority benefit of U.S. Provisional Patent Application with Ser. No. 63/608, 193, entitled “Circuits, Machines and Systems that Heal”, filed Dec. 9, 2023, which is incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
63435223 | Dec 2022 | US | |
63608193 | Dec 2023 | US |