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
Problem description
We can create a new CDD node with an interval using the method below.
/** * Creates a new CDD node corresponding to the constraint \a lower * <~ \a i - \a j <~ \a upper, where \a i and \a j are clock indexes and * \a lower and \a upper are bounds. * @param i a clock index * @param j a clock index * @param lower a lower bound * @param upper an upper bound * @return a CDD node encoding the interval * @see cdd_upper */externddNode*cdd_interval(int32_ti, int32_tj, raw_tlower, raw_tupper);
So, for example, if we want to create a CDD node with the interval 0 <= x - y <= 2, we first convert the bounds into raw bounds: 1 for the unstrict lower bound and 5 for the unsrict upper bound. Then we call cdd_interval(1, 2, 1, 5) (just assume for the sake of simplicity that x has clock index 1 and y has 2). The result is a CDD node having the interval 0 < x - y <= 2, i.e., the strictness of the lower bound has changed.
Similarly, if we want 0 < x - y <= 2, we call cdd_interval(1, 2, 0, 5) and we get 0 <= x - y <= 2.
Root cause analysis
Internally, cdd_interval calls cdd_interval_from_level. This method does the actual work.
The actual interval of a CDD is a stack of bounds cdd_refstacktop. So cdd_interval_from_level adds the lower and upper bounds to this stack with (ignoring the checks for -INF and INF to simplify the explanation)
The translation of this stack into intervals is (INF to low)->cddfalse, (complement_strictness_of(low), high)->cddtrue, (complement_strictness_of(high), INF)->cddfalse.
So now you see that our desired interval has a flipped lower bound strictness.
Potential solutions
When cdd_interval_from_level pushes the lower bound to the interval stack, it should pushes it with the complementary strictness. But we see that cdd_interval_from_level is used several times by other methods, so other methods might work with this 'error'.
The text was updated successfully, but these errors were encountered:
Problem description
We can create a new CDD node with an interval using the method below.
So, for example, if we want to create a CDD node with the interval
0 <= x - y <= 2
, we first convert the bounds into raw bounds:1
for the unstrict lower bound and5
for the unsrict upper bound. Then we callcdd_interval(1, 2, 1, 5)
(just assume for the sake of simplicity thatx
has clock index 1 andy
has 2). The result is a CDD node having the interval0 < x - y <= 2
, i.e., the strictness of the lower bound has changed.Similarly, if we want
0 < x - y <= 2
, we callcdd_interval(1, 2, 0, 5)
and we get0 <= x - y <= 2
.Root cause analysis
Internally,
cdd_interval
callscdd_interval_from_level
. This method does the actual work.The actual interval of a CDD is a stack of bounds
cdd_refstacktop
. Socdd_interval_from_level
adds the lower and upper bounds to this stack with (ignoring the checks for-INF
andINF
to simplify the explanation)The translation of this stack into intervals is (
INF
tolow
)->cddfalse
, (complement_strictness_of(low
),high
)->cddtrue
, (complement_strictness_of(high
),INF
)->cddfalse
.So now you see that our desired interval has a flipped lower bound strictness.
Potential solutions
When
cdd_interval_from_level
pushes the lower bound to the interval stack, it should pushes it with the complementary strictness. But we see thatcdd_interval_from_level
is used several times by other methods, so other methods might work with this 'error'.The text was updated successfully, but these errors were encountered: