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
        }
    }
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()) {
           
        	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()) {
           
            String name = ((Fence)data.getEvent()).getName();
            fenceMap.computeIfAbsent(name, key -> new HashSet<>()).add(data);
        } else if (data.isJump()) {
           
           
            data.setWasExecuted(((CondJump)e).didJump(model, context));
        } else {
           
           
           
        }
    }
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()) { 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()) { string name = ((fence)data.getevent()).getname(); fencemap.computeifabsent(name, key -> new hashset<>()).add(data); } else if (data.isjump()) { data.setwasexecuted(((condjump)e).didjump(model, context)); } else { } }