A program can be transformed by replacing things with their equivalents: variables with their values, function calls with the code of the function, conditionals on constants with selected code. e.g.,
main()
{
int x=5;
count(x);
}
-->
main()
{
count(5);
}
-->
main()
{
if(5>0)
{
count(4);
printf("%d ",4);
}
}
-->
main()
{
count(4);
printf("%d ",4);
}
-->
main()
{
if(4>0)
{
count(3);
printf("%d ",3);
}
printf("%d ",4);
}
-->
main()
{
count(3);
printf("%d ",3);
printf("%d ",4);
}
--> ... -->
main()
{
count(0);
printf("%d ",0);
printf("%d ",1);
printf("%d ",2);
printf("%d ",3);
printf("%d ",4);
}
-->
main()
{
if(0>0)
{
count(-1);
printf("%d ",-1);
}
printf("%d ",0);
printf("%d ",1);
printf("%d ",2);
printf("%d ",3);
printf("%d ",4);
}
-->
main()
{
printf("%d ",0);
printf("%d ",1);
printf("%d ",2);
printf("%d ",3);
printf("%d ",4);
}