diff --git a/src/main/scala/fhetest/Checker/Utils.scala b/src/main/scala/fhetest/Checker/Utils.scala index f72309d..1fe3858 100644 --- a/src/main/scala/fhetest/Checker/Utils.scala +++ b/src/main/scala/fhetest/Checker/Utils.scala @@ -3,7 +3,7 @@ package fhetest.Checker import fhetest.Utils.* import fhetest.Generate.T2Program import fhetest.TEST_DIR -import fhetest.LibConfig +import fhetest.Generate.LibConfig import io.circe._ import io.circe.generic.semiauto._ diff --git a/src/main/scala/fhetest/Config.scala b/src/main/scala/fhetest/Config.scala index 9d71456..e6fa8bd 100644 --- a/src/main/scala/fhetest/Config.scala +++ b/src/main/scala/fhetest/Config.scala @@ -2,6 +2,7 @@ package fhetest import fhetest.Utils.* import fhetest.Generate.Strategy +import Generate.LibConfig class Config( var fileName: Option[String] = None, diff --git a/src/main/scala/fhetest/Generate/AbsProgram.scala b/src/main/scala/fhetest/Generate/AbsProgram.scala index 436f5e3..8965f81 100644 --- a/src/main/scala/fhetest/Generate/AbsProgram.scala +++ b/src/main/scala/fhetest/Generate/AbsProgram.scala @@ -3,7 +3,6 @@ package fhetest.Generate import scala.util.Random import fhetest.Generate.Utils.* import fhetest.Utils.ENC_TYPE -import fhetest.LibConfig import fhetest.Utils.* case class AbsProgram( diff --git a/src/main/scala/fhetest/Generate/AbsProgramGenerator.scala b/src/main/scala/fhetest/Generate/AbsProgramGenerator.scala index 9f25af8..d78d3e9 100644 --- a/src/main/scala/fhetest/Generate/AbsProgramGenerator.scala +++ b/src/main/scala/fhetest/Generate/AbsProgramGenerator.scala @@ -1,7 +1,6 @@ package fhetest.Generate import scala.util.Random -import fhetest.LibConfig import fhetest.Utils.ENC_TYPE // Template Generation Strategy diff --git a/src/main/scala/fhetest/LibConfig.scala b/src/main/scala/fhetest/Generate/LibConfig.scala similarity index 97% rename from src/main/scala/fhetest/LibConfig.scala rename to src/main/scala/fhetest/Generate/LibConfig.scala index a95aa70..0afa795 100644 --- a/src/main/scala/fhetest/LibConfig.scala +++ b/src/main/scala/fhetest/Generate/LibConfig.scala @@ -1,4 +1,4 @@ -package fhetest +package fhetest.Generate import fhetest.Utils.* @@ -94,7 +94,8 @@ Ciphertext tmp_;""" case SecurityLevel.HEStd_256_classic => "tc256" } - lazy val moduliStr = s"vector { $firstModSize$scaleModsStr, $firstModSize }" + lazy val moduliStr = + s"vector { $firstModSize$scaleModsStr, $firstModSize }" lazy val plainModStr = if (scheme == Scheme.CKKS) "" else s"parms.set_plain_modulus(${encParams.plainMod});" diff --git a/src/main/scala/fhetest/Generate/LibConfigGenerator.scala b/src/main/scala/fhetest/Generate/LibConfigGenerator.scala index 397fdda..7e93da1 100644 --- a/src/main/scala/fhetest/Generate/LibConfigGenerator.scala +++ b/src/main/scala/fhetest/Generate/LibConfigGenerator.scala @@ -1,6 +1,5 @@ package fhetest.Generate -import fhetest.LibConfig import fhetest.Utils.* import scala.util.Random @@ -144,7 +143,6 @@ case class RandomLibConfigGenerator(encType: ENC_TYPE) Some(Random.between(1, 100000 + 1)) val randomBoundOpt: Option[Int | Double] = randomScheme match { - // # case Scheme.BFV | Scheme.BGV => Some(Random.between(1, 1000 + 1)) case Scheme.CKKS => Some(Random.between(1, math.pow(2, 64) + 1)) diff --git a/src/main/scala/fhetest/Generate/T2Program.scala b/src/main/scala/fhetest/Generate/T2Program.scala index 13856ac..5f0d351 100644 --- a/src/main/scala/fhetest/Generate/T2Program.scala +++ b/src/main/scala/fhetest/Generate/T2Program.scala @@ -1,5 +1,3 @@ package fhetest.Generate -import fhetest.LibConfig - case class T2Program(content: String, libConfig: LibConfig) diff --git a/src/main/scala/fhetest/Generate/ValidFilter.scala b/src/main/scala/fhetest/Generate/ValidFilter.scala index 8632ece..df9752e 100644 --- a/src/main/scala/fhetest/Generate/ValidFilter.scala +++ b/src/main/scala/fhetest/Generate/ValidFilter.scala @@ -1,6 +1,6 @@ package fhetest.Generate -import fhetest.LibConfig +// TODO: This must be removed because currently the Libconfig generation logic handle thees validations import fhetest.Utils.* def mulDepthIsSmall(realMulDepth: Int, configMulDepth: Int): Boolean = diff --git a/src/main/scala/fhetest/Phase/Check.scala b/src/main/scala/fhetest/Phase/Check.scala index 4ae91fb..c690402 100644 --- a/src/main/scala/fhetest/Phase/Check.scala +++ b/src/main/scala/fhetest/Phase/Check.scala @@ -2,7 +2,7 @@ package fhetest.Phase import fhetest.Checker.* import fhetest.Generate.T2Program -import fhetest.LibConfig +import fhetest.Generate.LibConfig import fhetest.Utils.* import fhetest.Checker.DumpUtil diff --git a/src/main/scala/fhetest/Phase/Print.scala b/src/main/scala/fhetest/Phase/Print.scala index 80ae65f..c14809c 100644 --- a/src/main/scala/fhetest/Phase/Print.scala +++ b/src/main/scala/fhetest/Phase/Print.scala @@ -7,7 +7,7 @@ import org.twc.terminator.t2dsl_compiler.T2DSLsyntaxtree.Goal; import java.nio.file.{Files, Paths} import java.io.*; -import fhetest.LibConfig +import fhetest.Generate.LibConfig // TODO: Refactor optional arguments case object Print {