Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

VirtualMachine

Guides

  • Virtual Machine Package

Symbols

  • VirtualMachineAdd
  • VirtualMachineDefinition
  • VirtualMachineExecute
  • VirtualMachineList
  • VirtualMachine
  • VirtualMachineObject
  • VirtualMachineObjectQ
  • $VirtualMachines

Other

  • Intel4004
  • MOS6502
  • NFA
  • PDP1
  • PDP8
  • RegisterMachine
Wolfram`VirtualMachine`
VirtualMachine
​
VirtualMachine["name"]
creates a virtual machine instance defined by
"name"
.
​
​
VirtualMachine["name",assoc]
creates a virtual machine instance with a configuration specified by
assoc
.
​
Details and Options

Examples  
(7)
Basic Examples  
(2)
Create an instance of the
PDP-1
virtual machine:
In[1]:=
pdp1=
VirtualMachine
["PDP-1"]
Out[1]=
VirtualMachineObject
Machine: PDP-1
StepCount: 0
InstructionRegister: [???]
(00)
ProgramCounter: 0000

Get a list of the available properties:
In[2]:=
pdp1["Properties"]
Out[2]=
{ConsoleState,Machine,MemoryState,MemoryView,ProcessorState,ScreenState,StepCount}
Get an association representing the processor state:
In[3]:=
pdp1["ProcessorState"]//Dataset
Out[3]=
InstructionRegister
0
ProgramCounter
0
Overflow
0
Accumulator
0
InputOutputRegister
0
ProgramFlags
0
MemoryAddressRegister
0
MemoryBufferRegister
0
​
Create an instance of a "RegisterMachine" with a simple program:
In[1]:=
rm=
VirtualMachine
["RegisterMachine","Program"{"INC"[1],"INC"[2],"DECJ"[2,1]}]
Out[1]=
VirtualMachineObject
Machine: RegisterMachine
StepCount: 0
Status: Waiting

Get a list of the available commands:
In[2]:=
rm["Commands"]
Out[2]=
{Reset,Run}
Run the register machine for 10 steps:
In[3]:=
VirtualMachineExecute
[rm,"Run",10]
Out[3]=
VirtualMachineObject
Machine: RegisterMachine
StepCount: 10
Status: Waiting
(StepsConstrained)

Get a dataset representing the evolution of the register machine:
In[4]:=
rm["EvolutionDataset"]
Out[4]=
Step
Instruction
ProgramCounter
Registers
0
None
1
{0,0}
1
INC[1]
2
{1,0}
2
INC[2]
3
{1,1}
3
DECJ[2, 1]
1
{1,0}
4
INC[1]
2
{2,0}
5
INC[2]
3
{2,1}
6
DECJ[2, 1]
1
{2,0}
7
INC[1]
2
{3,0}
8
INC[2]
3
{3,1}
9
DECJ[2, 1]
1
{3,0}
10
INC[1]
2
{4,0}
Scope  
(1)

Properties & Relations  
(2)

Possible Issues  
(1)

Neat Examples  
(1)

SeeAlso
VirtualMachineObject
 
▪
VirtualMachineExecute
 
▪
VirtualMachineDefinition
RelatedGuides
▪
Virtual Machine Package
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com