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

CodeEquivalenceUtilities

Guides

  • Code Equivalence Utilities

Tech Notes

  • Adding New Transformation Rules

Symbols

  • CodeEquivalentQ
  • EquivalenceTestData
  • FromCanonicalForm
  • MakeCanonicalForm
  • ToCanonicalForm
  • TransformHold
  • TransformRelease
  • $AllowedEvaluationPatterns
Wolfram`CodeEquivalenceUtilities`
$AllowedEvaluationPatterns
​
​
$AllowedEvaluationPatterns
represents a set of default patterns to allow during sandbox evaluation.
​
Examples  
(6)
Basic Examples  
(2)
Enable messaging for sandbox events:
In[1]:=
On[EvaluateSafely::unsafe];
By default, sandbox rules will prevent some evaluations that would otherwise give equivalent outputs::
In[2]:=
Put[Range[10],"data.wl"];
In[3]:=
CodeEquivalentQ
[Get["data.wl"],Range[10]]
EvaluateSafely
::unsafe
:Sandboxed the following expressions: HoldComplete[<<data.wl]
​
Out[3]=
False
Allow an evaluation pattern:
In[4]:=
$AllowedEvaluationPatterns
=HoldPattern[Get["data.wl"]];
In[5]:=
CodeEquivalentQ
[Get["data.wl"],Range[10]]
Out[5]=
True
Restore the default value:
In[6]:=
$AllowedEvaluationPatterns
=.
In[7]:=
CodeEquivalentQ
[Get["data.wl"],Range[10]]
EvaluateSafely
::unsafe
:Sandboxed the following expressions: HoldComplete[<<data.wl]
​
Out[7]=
False
​
Give a list of patterns:
In[1]:=
$AllowedEvaluationPatterns
={_Get,_Put};
In[2]:=
CodeEquivalentQ
[(Put[Range[10],"data.wl"];Get["data.wl"]),Range[10]]
Out[2]=
True
In[3]:=
$AllowedEvaluationPatterns
=.
Properties & Relations  
(3)

Possible Issues  
(1)

SeeAlso
CodeEquivalentQ
""

Powered by the Wolfram Cloud More about Wolfram Technology

© 2022 Wolfram Research, Inc. All rights reserved. Terms of Use Privacy Contact Us