Commit dbb0d3b8 authored by Anastasiia's avatar Anastasiia

update Daisy with subdivision according to RelErrorPhase last changes

parent 4484f64c
......@@ -52,20 +52,22 @@ object RelThroughAbsPhase extends DaisyPhase with Subdivision with ErrorFunction
override val definedOptions: Set[CmdLineOptionDef[Any]] = Set(
ChoiceOptionDef("rel-rangeMethod", "Method to use for range analysis",
Set("affine", "interval", "smtreuse", "smtredo"), "interval"),
ParamOptionDef("divLimit", "Max amount of interval divisions", divLimit.toString),
ParamOptionDef("divLimit", "Max amount of interval divisions", divLimit.toString),
ParamOptionDef("totalOpt", "Max total amount of analysis runs", totalOpt.toString),
ChoiceOptionDef("subdiv", "Method to subdivide intervals", Set("simple", "model"), "simple"),
ChoiceOptionDef("approach", "Approach for expressions", Set("taylor", "naive"), "taylor"),
// fixme change name to not overlap with RangeErrorPhase or put into Main
FlagOptionDef("noRoundoff", "No initial roundoff errors"),
FlagOptionDef("denormals","Include parameter for denormals in the FP abstraction"))
val deltaName = "delta"
val epsilonName = "eps"
var reporter: Reporter = null
override def run(ctx: Context, prg: Program): (Context, Program) = {
reporter = ctx.reporter
reporter.info(s"\nStarting $name")
val timer = ctx.timers.analysis.start
val timer = ctx.timers.relAbs.start
// default range method: intervals
var rangeMethod = "interval"
......@@ -86,6 +88,8 @@ object RelThroughAbsPhase extends DaisyPhase with Subdivision with ErrorFunction
case _ =>
reporter.warning(s"Unknown range method: $s, choosing default (interval)!")
}
case ParamOption("divLimit", value) => divLimit = value.toInt
case ParamOption("totalOpt", value) => totalOpt = value.toInt
case FlagOption("noInitialErrors") => trackInitialErrs = false
case FlagOption("noRoundoff") => trackRoundoffErrs = false
case ChoiceOption("precision", s) => s match {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment