Skip to content
Snippets Groups Projects
  • Jan Rochel's avatar
    66742f49
    [e-acsl] pathological example exposing translation error · 66742f49
    Jan Rochel authored
    [kernel] functions.c:120: Failure:
      mkBinOp: unsupported operator for such operands 2L == __gen_e_acsl_at
      (type of e1: long, type of e2: __e_acsl_mpz_t)
    
    This occurs notable for code using stdlib.h unless the flag
    "-keep-unused-functions none" is given.
    
    The reason for this is a memoisation issue. In the example there are two
    occurrences of j, in two terms of the form \at(j, Old).
    They are typed differently according to their context. However the
    memoisation in Translate_ats does not take into account the typing.
    More specifically it uses Analyses_datatype.At_data for memoising the
    translations, which relies on structural equivalence of terms.
    66742f49
    History
    [e-acsl] pathological example exposing translation error
    Jan Rochel authored
    [kernel] functions.c:120: Failure:
      mkBinOp: unsupported operator for such operands 2L == __gen_e_acsl_at
      (type of e1: long, type of e2: __e_acsl_mpz_t)
    
    This occurs notable for code using stdlib.h unless the flag
    "-keep-unused-functions none" is given.
    
    The reason for this is a memoisation issue. In the example there are two
    occurrences of j, in two terms of the form \at(j, Old).
    They are typed differently according to their context. However the
    memoisation in Translate_ats does not take into account the typing.
    More specifically it uses Analyses_datatype.At_data for memoising the
    translations, which relies on structural equivalence of terms.
functions.c 3.27 KiB