... | ... | @@ -102,3 +102,42 @@ int main() { |
|
|
|
|
|
[![](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/raw/master/code/website/split-and-merge-main-no-merge.svg)](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/blob/master/code/website/split-and-merge-main-no-merge-highres.svg)
|
|
|
[![](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/raw/master/code/website/split-and-merge-main.svg)](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/blob/master/code/website/split-and-merge-main-highres.svg)
|
|
|
|
|
|
|
|
|
## A program with three execution paths
|
|
|
|
|
|
Infeasible paths are omitted by the symbolic execution.
|
|
|
|
|
|
```c
|
|
|
int main()
|
|
|
{
|
|
|
x = TERM.readInt();
|
|
|
|
|
|
if( x <= 5 )
|
|
|
{
|
|
|
LED1.switchOn();
|
|
|
LED1.switchOff();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
LED2.switchOn();
|
|
|
LED2.switchOff();
|
|
|
}
|
|
|
|
|
|
if( x <= 10 )
|
|
|
{
|
|
|
LED1.switchOn();
|
|
|
LED1.switchOff();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
LED2.switchOn();
|
|
|
LED2.switchOff();
|
|
|
}
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
```
|
|
|
|
|
|
[![](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/raw/master/code/website/infeasible-omitted-main-no-merge.svg)](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/blob/master/code/website/infeasible-omitted-main-no-merge-highres.svg)
|
|
|
[![](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/raw/master/code/website/infeasible-omitted-main.svg)](https://gitlab.science.ru.nl/mklinik/eca-symbolic-execution/blob/master/code/website/infeasible-omitted-main-highres.svg) |