Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDD x>=0 and x<0 #100

Open
Brandhoej opened this issue Mar 12, 2023 · 0 comments
Open

CDD x>=0 and x<0 #100

Brandhoej opened this issue Mar 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Brandhoej
Copy link
Contributor

Clock guard x >= 0

Expected

  • The resulting pointer should point to a CDD node which is equivalent to true (In other wordsisEquiv should return true).
  • The resulting pointer should preferably point to the terminal true node after reduction (In other words after calling reduce the CDD should have isTrue return True).
  • The resulting pointer should if isTrue returns True be a terminal node (In other words after reducing and isTrue returns true then isTerminal should return true).

Actual

  • isEquiv to true returns false.
  • isTrue returns false.
  • isTerminal returns false.
  • Interpretation of the CDD dot image below: Looks correct as the diagonal constraint on the global clock allows all valuations of x (x1 on the image) to be true.
    The dot output before and after reduction is the same (preview):
digraph G {
"0x7ff83c9826d1" [shape=box, label="1", style=filled, height=0.3, width=0.3];
"0x7ff83c9826d0" [shape=box, label="0", style=filled, height=0.3, width=0.3];
"0x7ff80c1b00400" [shape=octagon, color = black, label="x1-x0"];
"0x7ff80c1b00400" -> "0x7ff83c9826d1" [style=dashed, label="[0;INF["];
}

x  = 0

Experimentation
True gives the same result (Here the x is added to the cdd. Without the clock we just get the terminal true node which is correct).
x >= n gives the same result for a negative n value.
x >= n || True gives the same result where n is 0 or negative.
x < n || x >= n gives the same result even if n is negative.

Clock guard x < 0

Expected

  • The resulting pointer should point to a CDD node which is equivalent to false (In other wordsisEquiv should return false).
  • The resulting pointer should preferably point to the terminal false node after reduction (In other words after calling reduce the CDD should have isFalse return True).
  • The resulting pointer should if isFalse returns True be a terminal node (In other words after reducing and isFalse returns true then isTerminal should return true).

Actual

  • isEquiv to false returns false.
  • isFalse returns false.
  • isTerminal returns false.
    The dot output before and after reduction is the same (preview):
digraph G {
"0x7ff09e67f6d1" [shape=box, label="1", style=filled, height=0.3, width=0.3];
"0x7ff09e67f6d0" [shape=box, label="0", style=filled, height=0.3, width=0.3];
"0x7ff0701400500" [shape=octagon, color = black, label="x1-x0"];
"0x7ff0701400500" -> "0x7ff09e67f6d1" [style=dashed, label="[0;0["];
}

x   0
Experimentation
WIP

@Brandhoej Brandhoej added the bug Something isn't working label Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant