-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly handle side-effects when removing switch statements
Signed-off-by: Mihai Budiu <mbudiu@vmware.com>
- Loading branch information
Mihai Budiu
committed
Oct 28, 2022
1 parent
b5980b6
commit dcd7656
Showing
7 changed files
with
65 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
bit<4> f(in bit<4> d) { | ||
return d; | ||
} | ||
|
||
control c(in bit<4> v) { | ||
apply { | ||
switch(f(v)) { | ||
} | ||
} | ||
} | ||
|
||
control C(in bit<4> b); | ||
package top(C c); | ||
|
||
top(c()) main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
bit<4> f(in bit<4> d) { | ||
return d; | ||
} | ||
control c(in bit<4> v) { | ||
apply { | ||
switch (f(v)) { | ||
} | ||
} | ||
} | ||
|
||
control C(in bit<4> b); | ||
package top(C c); | ||
top(c()) main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
control c(in bit<4> v) { | ||
apply { | ||
} | ||
} | ||
|
||
control C(in bit<4> b); | ||
package top(C c); | ||
top(c()) main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
control c(in bit<4> v) { | ||
apply { | ||
} | ||
} | ||
|
||
control C(in bit<4> b); | ||
package top(C c); | ||
top(c()) main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
bit<4> f(in bit<4> d) { | ||
return d; | ||
} | ||
control c(in bit<4> v) { | ||
apply { | ||
switch (f(v)) { | ||
} | ||
} | ||
} | ||
|
||
control C(in bit<4> b); | ||
package top(C c); | ||
top(c()) main; |
Empty file.