From f5dce65d29d83ef4cf0ad59d2daf66b15d967af5 Mon Sep 17 00:00:00 2001 From: Tianrui Zheng Date: Fri, 13 Dec 2024 20:31:49 +0100 Subject: [PATCH] Remove useless code Signed-off-by: Tianrui Zheng --- .../model/ExecutionModelManager.java | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/verification/model/ExecutionModelManager.java b/dartagnan/src/main/java/com/dat3m/dartagnan/verification/model/ExecutionModelManager.java index b51211ca17..c3a38569a1 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/verification/model/ExecutionModelManager.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/verification/model/ExecutionModelManager.java @@ -175,39 +175,6 @@ private void extractMemoryLayout() { } } - // Getting the correct relation to extract is tricky. - // In the case of redefinition, we care about the one defined last. - // If there is no redefinition, we simply return the original one. - private Relation getRelationWithName(String name) { - // First check if the original definition is asked. - if (name.endsWith("#0")) { - String originalName = name.substring(0, name.lastIndexOf("#")); - return wmm.getRelation(originalName); - } - - int maxId = -1; - for (Relation r : wmm.getRelations()) { - int defIndex = -1; - for (String n : r.getNames()) { - if (n.startsWith(name + "#")) { - defIndex = tryParseInt(n).orElse(-1); - if (defIndex > -1) { break; } - } - } - maxId = Math.max(maxId, defIndex); - } - return maxId != -1 ? wmm.getRelation(name + "#" + maxId) : wmm.getRelation(name); - } - - private Optional tryParseInt(String s) { - try { - int n = Integer.parseInt(s.substring(s.lastIndexOf("#") + 1)); - return Optional.of(n); - } catch (NumberFormatException e) { - return Optional.empty(); - } - } - private void extractRelations() { Set relsToExtract = new HashSet<>(wmm.getRelations()); for (Relation r : relsToExtract) { createModel(r); }