Call the egg
sub-process and get a list of rewrites #
This file defines the runEggRequest
function, which is used to call the egg
sub-process. Some
pre-processing is necessary to encode domains and minimization problems into the JSON. Also, some
post-processing is needed to parse the JSON response.
Taken from
Equations
- j.getStr! = match j with | Lean.Json.str a => a | x => ""
Instances For
Equations
- j.getArr! = match j with | Lean.Json.arr a => a | x => #[]
Instances For
Equations
- MetaM.ofExcept e = match e with | Except.error msg => Lean.throwError ((Lean.MessageData.ofFormat ∘ Std.format) (toString msg)) | Except.ok x => pure x
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- CvxLean.surroundQuotes s = "\"" ++ s ++ "\""
Instances For
JSONify an EggMinimization. NOTE: Tuples are lists of two elements.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
JSONify an EggRequest
.
NOTE: Tuples are lists of two elements.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- x.toString = match x with | CvxLean.EggRewriteDirection.Forward => "fwd" | CvxLean.EggRewriteDirection.Backward => "bwd"
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- CvxLean.instToStringEggRewrite = { toString := CvxLean.EggRewrite.toString }
Call the egg
sub-process by runnning the executable egg-pre-dcp/utils/egg-pre-dcp
, generated
by running lake build EggPreDCP
. The input is passed via standard input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Read egg
's output and trun it into an array of EggRewrite
s.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Run request to egg
and parse the output to get an array of rewrites, if successful.
Equations
- One or more equations did not get rendered due to their size.