Difference between revisions of "C Programs"
From Termination-Portal.org
Jump to navigationJump to searchJ.waldmann (talk | contribs) (Created page with "== Proposed semantics == * The starting point is the main function without arguments. * Functions which are only declared, but not defined, are considered to be termin...") |
J.waldmann (talk | contribs) |
||
Line 1: | Line 1: | ||
+ | [[Category:Categories]] | ||
+ | |||
== Proposed semantics == | == Proposed semantics == | ||
Revision as of 10:38, 14 May 2014
Proposed semantics
- The starting point is the main function without arguments.
- Functions which are only declared, but not defined, are considered to be terminating, have no side effects, and return a non-deterministic value according to the function's return type.
- The special (and only declared) function __VERIFIER_nondet_String() returns a non-deterministic C String, i.e., a pointer to some freshly allocated memory where the last byte of this allocation is the value '\0' (we may provide a standard implementation for this function, but provers are allowed to hard-code its semantics)
- In C, memory-unsafe programs can behave arbitrarily. Therefore, neither YES nor NO is a correct result for programs violating memory safety. So a proof of memory safety needs to be part of a termination proof. If there is interest for that, we could also offer an additional category where memory safety can be assumed and where no programs are allowed which might violate memory safety.
- We assume integers to be mathematical integers, i.e., over- or underflows cannot occur. If there is interest for that, we could also offer an additional category where overflows of unsigned integers are treated as two's complement overflows and where neither YES nor NO is a correct result for programs with overflows of signed integers.
- The scoring should be the same as in all other categories (proving termination or non-termination both gives 1 point and we have to decide upon the handling of wrong answers in the same way for all categories).
- time limit: 300 seconds
Discussion
- proposed time limit (5 min) is between the limits used in SV-COMP (15 min) and termcomp (1 min)
See also
Section D. of Termination Competition on Software Verification (SV-COMP)