Skip to content

Commit 8ad742b

Browse files
Yatin Manerkarpolgreen
authored andcommitted
Address @polgreen's code review comments for PR #133.
1 parent ca20a5a commit 8ad742b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main/scala/uclid/lang/ModuleFlattener.scala

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,6 @@ class ModuleInstantiatorPass(module : Module, inst : InstanceDecl, targetModule
263263
}.toList.flatten
264264
}
265265

266-
def createNextInputAssignments(varMap : VarMap) : List[Statement] = { List() }
267-
268266
val (varMap, externalSymbolMap) = createVarMap()
269267
val targetInstVarMap = targetModule.getAnnotation[InstanceVarMapAnnotation].get.iMap
270268

@@ -276,7 +274,6 @@ class ModuleInstantiatorPass(module : Module, inst : InstanceDecl, targetModule
276274

277275
val newVariables = createNewVariables(varMap)
278276
val newInputs = createNewInputs(varMap)
279-
val newInputAssignments = createNextInputAssignments(varMap)
280277
val newAxioms = newModule.axioms.map {
281278
ax => {
282279
val idP = ax.id.flatMap(axId => Some(NameProvider.get(axId.toString() + "_axiom")))
@@ -359,7 +356,7 @@ class ModuleInstantiatorPass(module : Module, inst : InstanceDecl, targetModule
359356
// add initialization for the instance.
360357
override def rewriteInit(init : InitDecl, context : Scope) : Option[InitDecl] = {
361358
newModule.init match {
362-
case Some(initD) => Some(InitDecl(BlockStmt(List.empty, newInputAssignments ++ List(initD.body) ++ List(init.body))))
359+
case Some(initD) => Some(InitDecl(BlockStmt(List.empty, List(initD.body) ++ List(init.body))))
363360
case None => Some(init)
364361
}
365362
}
@@ -384,7 +381,7 @@ class ModuleInstantiatorPass(module : Module, inst : InstanceDecl, targetModule
384381
// rewrite module.
385382
override def rewriteModuleCall(modCall : ModuleCallStmt, context : Scope) : Option[Statement] = {
386383
if (modCall.id == inst.instanceId) {
387-
Some(BlockStmt(List.empty, newInputAssignments ++ newNextStatements))
384+
Some(BlockStmt(List.empty, newNextStatements))
388385
} else {
389386
Some(modCall)
390387
}

0 commit comments

Comments
 (0)