RewriteRule
it.grypho.scala.leonardo.scalar.RewriteRule
case class RewriteRule(lhs: _Expression, rhs: _Expression, condition: (Map[String, _Expression], _Variable) => Boolean, name: String)
A rewrite rule: match lhs, check condition, produce rhs.
Value parameters
- condition
-
a guard over the bindings and the context variable —
∫ dv/(a²+v²)needs the holeato be free of the integration variable, which is only readable once that variable is threaded in. The combinators below (freeOf, nonZero, …) are the intended way to build one. - lhs
-
the pattern, built from ordinary nodes plus _Pattern holes
- name
-
a label, for diagnostics and test failure messages
- rhs
-
the template, whose
_Patternholes are filled from the match
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article