Too few intervals generated when two events have the same name and timestamp

Issue #38 resolved
Sean Kauffman repo owner created an issue

When a rule matches two of the same interval and two events arrive with the same timestamp (this is really an edge case) there should be more intervals generated than there are. The problem is that the monitoring algorithm skips matching an interval against itself. This can be seen with an interval of the form

B :- x:A coincide y:A map { v -> (x.v*2) + y.v }

if two A intervals arrive with the same timestamp and different v’s, then this should (according to the logic’s set-based semantics) produce four intervals with every combination of the As. In fact, technically there should be an interval produced when only one A appears, since it coincides with itself.

B :- x:A coincide y:A

where A|0 is the input should produce the same as B :- A.

The solution may be to simply remove the code that skips matching an interval against itself, but perhaps there’s more going on here. In addition, it may make sense to restructure the algorithm a little bit since it has some duplicated code that was left that way from when it used recursion.

Comments (1)

  1. Sean Kauffman reporter

    This has been fixed, along with removing the subscription lists and implementing compiler functional tests.

  2. Log in to comment