From f3dddf42141ac75c940f136b1d2bbe5857f1e500 Mon Sep 17 00:00:00 2001 From: Hernan Ponce de Leon Date: Mon, 13 Nov 2023 08:29:40 +0100 Subject: [PATCH] Use newly introduced makeNonDetOfType method for poisons Signed-off-by: Hernan Ponce de Leon --- .../dat3m/dartagnan/parsers/program/visitors/VisitorLlvm.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/parsers/program/visitors/VisitorLlvm.java b/dartagnan/src/main/java/com/dat3m/dartagnan/parsers/program/visitors/VisitorLlvm.java index 21447fd6f0..26b9583332 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/parsers/program/visitors/VisitorLlvm.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/parsers/program/visitors/VisitorLlvm.java @@ -868,9 +868,7 @@ public Expression visitArrayConst(ArrayConstContext ctx) { @Override public Expression visitPoisonConst(PoisonConstContext ctx) { // It is correct to replace a poison value with an undef value or any value of the type. - BooleanType booleanType = types.getBooleanType(); - var nondeterministicExpression = new BNonDet(booleanType); - return expressions.makeCast(nondeterministicExpression, expectedType); + return makeNonDetOfType(expectedType); } @Override