You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.
I can not give a small example here, but sometimes when I use krun, a rule that I expect to apply, does not get normally applied, but when I use a debugger and go step by step, the rule gets applied.
I tried to narrow the scope of the problem, the problem seems to be in the function ConstrainedTerm.evaluateConstraints:
If I set a breakpoint after int x = candidates.size();, the value of x is 0 but if I put a break point right before that line and then evaluate one step, the value of x becomes 1.
I am not familiar with the code base (or Java 8 streams) but this phenomenon makes me suspect that this is a concurrency bug. Possibily
List<ConjunctiveFormula> candidates = ...
is being evaluated is being evaluated in a separate thread that has data race with the thread executing the rest of the function.
The text was updated successfully, but these errors were encountered:
kheradmand
changed the title
Problem in ConstrainedTerm.evaluateConstraints (possibly a concurrency bug)
Problem in ConstrainedTerm.evaluateConstraints
Apr 2, 2018
It is most probably not a concurrency problem because first of all I don't think there are multiple threads involved here, and second, even adding a long delay does not solve the problem:
I can not give a small example here, but sometimes when I use krun, a rule that I expect to apply, does not get normally applied, but when I use a debugger and go step by step, the rule gets applied.
I tried to narrow the scope of the problem, the problem seems to be in the function
ConstrainedTerm.evaluateConstraints
:If I set a breakpoint after
int x = candidates.size();
, the value ofx
is0
but if I put a break point right before that line and then evaluate one step, the value ofx
becomes1
.I am not familiar with the code base (or Java 8 streams) but this phenomenon makes me suspect that this is a concurrency bug. Possibily
is being evaluated is being evaluated in a separate thread that has data race with the thread executing the rest of the function.
The text was updated successfully, but these errors were encountered: