// ===== Memory Events =====
private void addEvent(Event e, int globalId, int localId) {
        EventData data = eventMap.getOrCreate(e);
        data.setId(globalId);
        data.setLocalId(localId);
        eventList.add(data);
        data.setWasExecuted(true);
        if (data.isMemoryEvent()) {
            // ===== Memory Events =====
        	BigInteger address = ((MemEvent) e).getAddress().getIntValue(e, model, context);
            data.setAccessedAddress(address);
            if (!addressReadsMap.containsKey(address)) {
                addressReadsMap.put(address, new HashSet<>());
                addressWritesMap.put(address, new HashSet<>());
            }
            if (data.isRead()) {
                data.setValue(new BigInteger(model.evaluate(((RegWriter)e).getResultRegisterExpr()).toString()));
                addressReadsMap.get(address).add(data);
            } else if (data.isWrite()) {
                data.setValue(((MemEvent)e).getMemValue().getIntValue(e, model, context));
                addressWritesMap.get(address).add(data);
                writeReadsMap.put(data, new HashSet<>());
                if (data.isInit()) {
                    addressInitMap.put(address, data);
                }
            } else {
                throw new RuntimeException("Unexpected memory event");
            }
        } else if (data.isFence()) {
            // ===== Fences =====
            String name = ((Fence)data.getEvent()).getName();
            fenceMap.computeIfAbsent(name, key -> new HashSet<>()).add(data);
        } else if (data.isJump()) {
            // ===== Jumps =====
            // We override the meaning of execution here. A jump is executed IFF its condition was true.
            data.setWasExecuted(((CondJump)e).didJump(model, context));
        } else {
            //TODO: Maybe add some other events (e.g. assertions)
            // But for now all non-visible events are simply registered without
            // having any data extracted
        }
    }
data.setWasExecuted(true);
if (data.isMemoryEvent()) {
// ===== Memory Events =====
BigInteger address = ((MemEvent) e).getAddress().getIntValue(e, model, context);
data.setAccessedAddress(address);
private void addEvent(Event e, int globalId, int localId) {
EventData data = eventMap.getOrCreate(e);
data.setId(globalId);
data.setLocalId(localId);
eventList.add(data);
data.setWasExecuted(true);
if (data.isMemoryEvent()) {
// ===== Memory Events =====
BigInteger address = ((MemEvent) e).getAddress().getIntValue(e, model, context);
data.setAccessedAddress(address);
if (!addressReadsMap.containsKey(address)) {
addressReadsMap.put(address, new HashSet<>());
addressWritesMap.put(address, new HashSet<>());
}
if (data.isRead()) {
data.setValue(new BigInteger(model.evaluate(((RegWriter)e).getResultRegisterExpr()).toString()));
addressReadsMap.get(address).add(data);
} else if (data.isWrite()) {
private void addEvent(Event e, int globalId, int localId) {
EventData data = eventMap.getOrCreate(e);
data.setId(globalId);
data.setLocalId(localId);
eventList.add(data);
data.setWasExecuted(true);
if (data.isMemoryEvent()) {
// ===== Memory Events =====
BigInteger address = ((MemEvent) e).getAddress().getIntValue(e, model, context);
data.setAccessedAddress(address);
if (!addressReadsMap.containsKey(address)) {
addressReadsMap.put(address, new HashSet<>());
addressWritesMap.put(address, new HashSet<>());
}
if (data.isRead()) {
data.setValue(new BigInteger(model.evaluate(((RegWriter)e).getResultRegisterExpr()).toString()));
addressReadsMap.get(address).add(data);
} else if (data.isWrite()) {
data.setValue(((MemEvent)e).getMemValue().getIntValue(e, model, context));
addressWritesMap.get(address).add(data);
writeReadsMap.put(data, new HashSet<>());
if (data.isInit()) {
addressInitMap.put(address, data);
}
} else {
throw new RuntimeException("Unexpected memory event");
}
} else if (data.isFence()) {