[Termtools] About memory examples in C category

Matthias Heizmann heizmann at informatik.uni-freiburg.de
Tue Jul 28 05:00:46 CEST 2015


Hi Thomas, hi all,

On Monday, July 27, 2015 13:29:34 Thomas Ströder wrote:
> "Programs where the evaluation order of operations is not defined
> according to the C standard are not allowed. As an example, the program
> 
> int main(){
>     int x = 0;
>     while( x++ == x );
> }
> 
> is not allowed since the evaluation order between ++ and == is not
> defined according to the C standard."

I like the idea of "a rule like this". However, yet I do not have an idea how 
we can state such a rule precisely.

I see two problems with your suggestion.
1. What exactly is an operation? The C standard uses the term "operation" but 
I think it is never defined.

2. According to my notion of 'operation' your rule also forbids programs that 
contain the expression
    f1() + f2()
because the C standard does not define whether 'f1()' or 'f2()' is evaluated 
first. Is that you intension?
If yes, this is fine for me, but I guess then we have several programs (at 
least MutualRecursion_1a_false-termination.c) that have to be excluded from 
the competition.

Furthermore, I think it is a problem that we do not have a tool that can check 
compliance with your rule. We would have to check all programs manually.

Best,
Matthias


PS: Sorry for the delayed response. In the next days I will be able to respond 
more quickly.







On Monday, July 27, 2015 13:29:34 Thomas Ströder wrote:
> Dear Akihisa,
> 
> I agree with you. What about the following additional rule:
> 
> "Programs where the evaluation order of operations is not defined
> according to the C standard are not allowed. As an example, the program
> 
> int main(){
>     int x = 0;
>     while( x++ == x );
> }
> 
> is not allowed since the evaluation order between ++ and == is not
> defined according to the C standard."
> 
> Would all participants of the C category be fine with that rule or do
> you see problems with it? If all participants agree, I would add it to
> the rules on termination-portal.
> 
> Best regards,
> 
>   Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.lri.fr/pipermail/termtools/attachments/20150728/267b2624/attachment-0001.sig>


More information about the Termtools mailing list