Commit 704a55da authored by Raphaël Monat's avatar Raphaël Monat

updating gitignore

parent 642cc545
......@@ -30,7 +30,6 @@ hol4/*/.*
hol4/heap
hol4/output/heap
hol4/output/certificate_*
daisy
rawdata/*
.ensime*
/daisy
......
......@@ -33,9 +33,16 @@ object ChoosePrecisionPhase extends DaisyPhase {
var randomMP = false
for (opt <- ctx.options) opt match {
case FlagOption("randomMP") => randomMP = true
// case ParamOption("precFile") =>
case _ =>
}
//val (fncIdMap, varIdMap) = buildIdentifier(prg)
//val identifierMap = parseFile(fileName, fncIdMap, varIdMap, reporter, prg.id)
// need to introduce downcasts qnd check before thqt?
var varPrecisionMap: Map[Identifier, Map[Identifier, Precision]] = Map()
val uniformPrecision = ctx.constantPrecision
......@@ -125,7 +132,7 @@ object ChoosePrecisionPhase extends DaisyPhase {
}
(prg.defs.map(fnc => (fnc.id.name -> fnc.id)).toMap,
prg.defs.map(fnc => (fnc.id.name -> buildIdentifierMapFunction(fnc, fnc.id))).toMap)
prg.defs.map(fnc => (fnc.id.name -> buildIdentifierMapFunction(fnc))).toMap)
}
def parseFile(f:String, fncIdMap:Map[String, Identifier], varIdMap:Map[String, Map[String, Identifier]], reporter:Reporter, dummyId:Identifier) : Map[Identifier, Map[Identifier, Precision]] = {
......@@ -152,29 +159,31 @@ object ChoosePrecisionPhase extends DaisyPhase {
fncIdMap.get(currentFunction) match {
case Some(i) =>
currentIdentifier = i
currentFunctionMap.clear()
currentFunctionMap = Map()
case None => reporter.fatalError(s"$currentFunction was not found in the identifier map.")
}
else if(line.contains("="))
{
currentTypes = line.split('=').map(_.trim)
idMap(currentFunction).get(currentTypes(0)) match {
case Some(id_v) =>
val type_v = currentTypes(1) match {
case "Float" => Float32
case "Double" => Float64
case "DoubleDouble" => DoubleDouble
case "QuadDouble" => QuadDouble
case _ => reporter.fatalError(s"The type of variable $id_v in function $currentFunction is unknown.") }
currentFunctionMap += (id_v -> type_v)
case None => reporter.fatalError(s"${currentTypes(0)} not found in the identifier map of $currentFunction.")
}
}
else if(line.contains("="))
{
currentTypes = line.split('=').map(_.trim)
varIdMap(currentFunction).get(currentTypes(0)) match {
case Some(id_v) =>
val type_v = currentTypes(1) match {
case "Float" => Float32
case "Double" => Float64
case "DoubleDouble" => DoubleDouble
case "QuadDouble" => QuadDouble
case _ => reporter.fatalError(s"The type of variable $id_v in function $currentFunction is unknown.") }
currentFunctionMap += (id_v -> type_v)
case None => reporter.fatalError(s"${currentTypes(0)} not found in the identifier map of $currentFunction.")
}
else
reporter.fatalError(s"Format error in $f")
}
else
reporter.fatalError(s"Format error in $f")
}
bufferedSource.close
typeMap += (currentIdentifier -> currentFunctionMap)
typeMap
}
}
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