|
|
This page is an accompaniment to the paper *Skylines for Symbolic Energy Consumption Analysis*. Below we present a number of SECA programs along with their skylines. An extended version of the paper and the implementation of the tool are also available.
|
|
|
|
|
|
## Code with a bug
|
|
|
|
|
|
```c
|
|
|
int main() {
|
|
|
x=SENS.readTemp();
|
... | ... | @@ -26,3 +27,23 @@ int sleep(int n) |
|
|
|
|
|
[![](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/raw/master/code/website/bug-main-no-merge.svg)](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/blob/master/code/website/bug-main-no-merge-highres.svg)
|
|
|
[![](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/raw/master/code/website/bug-main.svg)](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/blob/master/code/website/bug-main-highres.svg)
|
|
|
|
|
|
|
|
|
## Code with common initial segment
|
|
|
|
|
|
```c
|
|
|
int main() {
|
|
|
LED1.switchOn();
|
|
|
LED2.switchOn();
|
|
|
if( TERM.readInt() <= 5 ) {
|
|
|
LED1.switchOff();
|
|
|
}
|
|
|
else {
|
|
|
LED2.switchOff();
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
```
|
|
|
|
|
|
[![](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/raw/master/code/website/common-initial-segment-main-no-merge.svg)](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/blob/master/code/website/common-initial-segment-main-no-merge-highres.svg)
|
|
|
[![](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/raw/master/code/website/common-initial-segment-main.svg)](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/blob/master/code/website/common-initial-segment-main-highres.svg) |