The main types user around the egg interface.
An intermediate structure to represent problems as trees of strings.
Equations
Instances For
Equations
- CvxLean.instInhabitedEggTree = { default := CvxLean.Tree.leaf "" }
Helper structure to keep track of the arguments, some of which may be pre-determined, when
translating from atom trees to trees with constructors in the egg language.
- arg: CvxLean.EggTreeOpArgTag
- val: String → CvxLean.EggTreeOpArgTag
Instances For
Once EggTree is flattened into S-expressions, it can be turned into an EggMinimization. This
is what will by JSONified and sent to egg. It is split into objective functions and constraints,
with their tag. Note that egg builds one problem term from this. However, it is useful to keep
track of the names of the components so that when egg comes back with a sequence of rewrites it
can easily indicate the location of the rewrite.
- objFun : String
Instances For
Every EggDomain is infered from a constraint named constraintName, and it corresponds to
a variable or parameter named varOrParamName. This structure keeps track of that.
- constraintName : String
- varOrParamName : String
- domain : CvxLean.EggDomain
Instances For
An EggOCTree with also the domain information.
Instances For
A request consists of an EggMinimization and a list of domains per variable (or parameter).
- probName : String
- domains : List (String × CvxLean.EggDomain)
- target : CvxLean.EggMinimization
Instances For
Recall that, in egg, rewrites can be forward or backward (in the response).
- Forward: CvxLean.EggRewriteDirection
- Backward: CvxLean.EggRewriteDirection
Instances For
Equations
- CvxLean.instDecidableEqEggRewriteDirection x y = if h : x.toCtorIdx = y.toCtorIdx then isTrue ⋯ else isFalse ⋯
A rewrite returned by egg.
- rewriteName : String
This is the name of the lemma used for rewriting.
- direction : CvxLean.EggRewriteDirection
Forward or backward.
- location : String
The name of the constraint or
"objFun". - subexprFrom : String
Source sub-expression.
- subexprTo : String
Target sub-expression.
- expectedTerm : String
The context expression with a
"?"in place of the sub-expression. For example, if we are rewritingx + (y + z)intox + (z + y), the expected term would bex + ?, withsubexprFromset toy + zandsubexprToset toz + y.