|
|
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();
|
|
|
if( x <= 10 ) {
|
|
|
LED1.switchOn();
|
|
|
} else {
|
|
|
LED2.switchOn();
|
|
|
}
|
|
|
sleep(100);
|
|
|
if( x < 10 ) {
|
|
|
LED1.switchOff();
|
|
|
} else {
|
|
|
LED2.switchOff();
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
<iframe src="https://blog.fefe.de" width="300" height="300"></iframe> |
|
|
int sleep(int n)
|
|
|
{
|
|
|
return n;
|
|
|
}
|
|
|
```
|
|
|
|
|
|
![foo](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/blob/master/code/website/bug-main.svg "Title Text") |
|
|
\ No newline at end of file |