Skip to content

Commit 5e01997

Browse files
authored
Merge pull request #369 from UQ-PAC/dsa-tests-fix
DSA tests fix
2 parents ec45cca + cee36b6 commit 5e01997

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/main/scala/analysis/data_structure_analysis/IntervalDSA.scala

+4-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ class IntervalGraph(
188188
callTransfer(phase, dcc, source, target)
189189
case dcc: DirectCallConstraint if dcc.target.name == "indirect_call_launchpad" =>
190190
resolveIndirectCall(dcc)
191-
.filterNot(proc => proc.isExternal.getOrElse(false) || proc.name.startsWith("_"))
191+
.filterNot(proc =>
192+
dcc.call.parent.parent == proc || proc.isExternal.getOrElse(false) || proc.name.startsWith("_")
193+
)
192194
.foreach(proc =>
193195

194196
val (source, target) = if phase == TD then (this, graphs(proc)) else (graphs(proc), this)
@@ -238,6 +240,7 @@ class IntervalGraph(
238240
.exprToCells(sourceExpr)
239241
.map(source.find)
240242
.map(cell =>
243+
assert(cell.node.isUptoDate)
241244
val (node, offset) =
242245
target.findNode(cell.node.clone(target, true, oldToNew))
243246
if offset == 0 then node.get(cell.interval)

src/test/scala/IntervalDSATest.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class IntervalDSATest extends AnyFunSuite {
4040
staticAnalysis = None,
4141
boogieTranslation = BoogieGeneratorConfig(),
4242
outputPrefix = "boogie_out",
43-
dsaConfig = Some(DSAConfig(Set.empty))
43+
dsaConfig = Some(DSAConfig(Set(Norm)))
4444
)
4545
)
4646
}

0 commit comments

Comments
 (0)