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

FormulaTransformEngine

Guides

  • FormulaTransformEngine
  • FormulaTransformEngine

Symbols

  • AddFormulaTransformRegistryPath
  • ApplyFormulaTransform
  • CompileFormulaHeuristicRule
  • CompileFormulaObligationDischarger
  • CompileFormulaStructuralTransform
  • CompileFormulaTargetPlanner
  • CompileFormulaTransformRule
  • FormulaTransformHandleRequest
  • FTMatchAlgebraicStructure
  • FTSolveParameters
  • GetFormulaTransformObligations
  • InspectFormulaTransformRegistry
  • PlanFormulaTransform
  • PlanFormulaTransformParts
  • ReloadFormulaTransformRegistry
  • AddFormulaTransformRegistryPath
  • ApplyFormulaTransform
  • CompileFormulaHeuristicRule
  • CompileFormulaObligationDischarger
  • CompileFormulaStructuralTransform
  • CompileFormulaTargetPlanner
  • CompileFormulaTransformRule
  • FormulaTransformHandleRequest
  • FTMatchAlgebraicStructure
  • FTSolveParameters
  • GetFormulaTransformObligations
  • InspectFormulaTransformRegistry
  • PlanFormulaTransform
  • PlanFormulaTransformParts
  • ReloadFormulaTransformRegistry
Lightmarey`FormulaTransformEngine`
CompileFormulaTransformRule
​
CompileFormulaTransformRule[json]
验证声明式公式变换规则,并注册其匹配器、方向、条件和参数默认值。
​
更多信息和选项
▪
用于添加具名规范规则,把匹配的表达式变换为等式或不等式。
▪
编译过程只接受声明式数据。可执行构造、未知编译原语、未绑定模板槽和不一致的方向都会被拒绝。
▪
成功时返回包含 Status -> "Compiled"、Kind -> "FormulaTransformRule"、Name、规范化字段和 Raw 的关联。无效输入返回 Status -> "Failure"、FailureType -> "InvalidRuleJSON" 以及 Issues 列表。
▪
参数:
json
Association
描述符字段如下表所示。
▪
描述符字段:
name
String,必需
注册表名称。
extends
String
可选的基础规则名称。
matchers
List
声明式表达式匹配器。
orientations
List
方向、关系和结果模板。
conditions
List
符号条件或谓词条件。
parameters
List
参数声明及默认值。
parameterDefaults
Association
其他参数默认值。
compatibleHeuristics
字符串列表
本规则允许使用的启发式规则。
​
范例  
(1)
基本范例  
(1)
In[1]:=
Needs["Lightmarey`FormulaTransformEngine`"]
编译并注册一个最小有效描述符:
In[2]:=
CompileFormulaTransformRule
[Association["name""ExampleEquality","matchers"{Association["name""AnyIntegral","operator""Integral","bodySlot""body","domainSlot""domain"]},"orientations"{Association["name""Identity","direction""Equal","relation""Equal","lhs""$selected","rhs""$selected"]}]]
Out[2]=
StatusCompiled,KindFormulaTransformRule,HeadCompiledFormulaTransformRule,RegistryKindCanonicalFormulaTransform,NameExampleEquality,Extends,FamilyExampleEquality,Runtime,Matchers{nameAnyIntegral,operatorIntegral,bodySlotbody,domainSlotdomain},Orientations{nameIdentity,directionEqual,relationEqual,lhs$selected,rhs$selected},Conditions{},DerivedBindings,CompatibleHeuristics{},ParameterDefaults,RawnameExampleEquality,matchers{nameAnyIntegral,operatorIntegral,bodySlotbody,domainSlotdomain},orientations{nameIdentity,directionEqual,relationEqual,lhs$selected,rhs$selected}
无效描述符返回结构化诊断,而不会执行任意代码:
In[1]:=
CompileFormulaTransformRule
[Association[]]
Out[1]=
StatusFailure,KindFormulaTransform,FailureTypeInvalidRuleJSON,MessageFormula transform rule JSON was rejected.,Issues{name must be a non-empty string.},Rule
参见
CompileFormulaHeuristicRule
▪
CompileFormulaStructuralTransform
▪
CompileFormulaTargetPlanner
▪
CompileFormulaObligationDischarger
相关指南
▪
FormulaTransformEngine
""

© 2026 Wolfram. All rights reserved.

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