rysavy-ondrej / ethanol

An experimental environment for context-based flow artifact analysis.
1 stars 0 forks source link

Dealing with delayed Tags. #21

Closed rysavy-ondrej closed 9 months ago

rysavy-ondrej commented 11 months ago

How to deal with tags that are not provided on time?

Is it possible to update the host context with tags coming late?

rysavy-ondrej commented 11 months ago

One possibility is to use SERIAL ID for tracking the tags in the enhancement_data table.

WINDOW-BASED DETECTION: If the ID is later than the last ID used for completing the window and the validity intersects the window, then we detected the tag, which was missed.

When computing host context objects, we should freeze the enhancement data to those of max ID when closing the window -> it can be done by adding another condition in the where clause "ID < window.max_tag_id".

For maintaining this we need a new table for windows:

CREATE TABLE window
{
    id SERIAL PRIMARY KEY,  
    max_tag_id BIGINT,
    validity TSRANGE
} 

CONTEXT-BASED DETECTION: Or we can add ID of the last tag within the host_context:

...
    max_tag_id BIGINT,

then when a delayed tag is identified it would be possible to directly search the affected contexts.

UPDATE: How to perform the tag update? TODO!

rysavy-ondrej commented 9 months ago

Systematically implemented via ContextProvider: