diff --git a/test/tacle_test/programs/ext_func/config.yaml b/test/tacle_test/programs/ext_func/config.yaml new file mode 100644 index 0000000..338c03f --- /dev/null +++ b/test/tacle_test/programs/ext_func/config.yaml @@ -0,0 +1,22 @@ +--- +gametime-project: + file: + location: ext_func.c + analysis-function: test + start-label: null + end-label: null + + + preprocess: + include: null + merge: null + inline: yes + unroll-loops: Yes + + analysis: + maximum-error-scale-factor: 10 + determinant-threshold: 0.001 + max-infeasible-paths: 100 + ilp-solver: glpk + gametime-path: ../../ # default path when tests locally + gametime-file-path: ../../../.. # default path when tests locally diff --git a/test/tacle_test/programs/ext_func/ext_func.c b/test/tacle_test/programs/ext_func/ext_func.c new file mode 100644 index 0000000..ff1d29b --- /dev/null +++ b/test/tacle_test/programs/ext_func/ext_func.c @@ -0,0 +1,32 @@ +#include +#include + +int main() { + int x = 5; + int y = 10; + char buffer[20]; + + printf("Before modification:\n"); + printf("x = %d\n", x); + printf("y = %d\n", y); + + // Convert integers to strings + sprintf(buffer, "%d", x); + // Append some digits to the string representation of x + strcat(buffer, "123"); + // Convert back to integer + x = strtol(buffer, NULL, 10); + + // Convert integers to strings + sprintf(buffer, "%d", y); + // Append some digits to the string representation of y + strcat(buffer, "456"); + // Convert back to integer + y = strtol(buffer, NULL, 10); + + printf("After modification:\n"); + printf("x = %d\n", x); + printf("y = %d\n", y); + + return 0; +}