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

PatternMatcher

Guides

  • A Virtual Machine for the Pattern Matcher

Symbols

  • CompilePatternToBytecode
  • CreatePatternMatcherVirtualMachine
  • PatternBytecodeDisassemble
  • PatternBytecodeInformation
  • PatternBytecode
  • PatternBytecodeQ
  • PatternMatcherEnableTrace
  • PatternMatcherExecute
  • PatternMatcherMatch
  • PatternMatcherMatchQ
  • PatternMatcherReplace
  • PatternMatcherStep
  • PatternMatcherTraceEnabled
  • PatternMatcherTraceEnabledQ
  • PatternMatcherVirtualMachine
  • PatternToMatchFunction
DanielS`PatternMatcher`
PatternMatcherTraceEnabledQ
​
PatternMatcherTraceEnabledQ
[]
returns
True
if execution tracing is currently enabled,
False
otherwise.
​
Details and Options
Examples  
(1)
Basic Examples  
(1)
By default, pattern matching tracing is disabled:
In[1]:=
PatternMatcherTraceEnabledQ
[]
Out[1]=
False
Execute a match:
In[2]:=
PatternMatcherExecute
[f[x_Integer],f[5]]
Out[2]=
ResultTrue,CyclesExecuted17,BindingsGlobal`x5
Enable the tracing of the execution with
PatternMatcherEnableTrace
:
In[3]:=
PatternMatcherEnableTrace
[True]
Out[3]=
True
Execute the same match again, now with tracing:
In[4]:=
PatternMatcherExecute
[f[x_Integer],f[5]]
⋮ BEGIN_BLOCK L0 depth = 1
⋮ BEGIN_BLOCK L3 depth = 2
☑ MATCH_LENGTH
SUCCESS
%e0 len = 1 expected = 1
☑ MATCH_HEAD
SUCCESS
%e0 == f
 MOVE %e 1←%e 0 = f[5]
» GET_PART %e2 := part(%e 0,1)
 MOVE %e 0←%e 2 = 5
☑ MATCH_HEAD
SUCCESS
%e0 == Integer
 MOVE %e 3←%e 0 = 5
↧ BIND_VAR Global`x←%e 3 = 5 (no trail)
→ JUMP L6 pc = 12
 MOVE %e 0←%e 1 = f[5]
 SAVE_BINDINGS 1 bindings copied
⋮ END_BLOCK L3 depth = 1 (merged)
→ JUMP L2 pc = 19
 SAVE_BINDINGS 1 bindings copied
 EXPORT_BINDINGS saved 1bindings
 LOAD_IMM %b 0←True
 HALT stopping executioncycles = 17
Out[4]=
ResultTrue,CyclesExecuted17,BindingsGlobal`x5
SeeAlso
PatternMatcherEnableTrace
 
▪
PatternMatcherExecute
 
▪
PatternMatcherVirtualMachine
RelatedGuides
▪
A Virtual Machine for the Pattern Matcher
""

© 2026 Wolfram. All rights reserved.

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