Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Archive-of-Formal-Proofs/thys/AutoCorres2/doc/     Datei vom 31.4.2026 mit Größe 5 kB image not shown  

Quelle  fnptr.c

  Sprache: C
 

/*
 * Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
 * Copyright (c) 2022 Apple Inc. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */


typedef unsigned word_t;
typedef unsigned (* unop_u_ptr_t)(word_t object);

unsigned odd_disp(unsigned);
unsigned even_disp(unsigned);

static const unop_u_ptr_t odd_even_dispatcher[2] = {
 odd_disp,
 even_disp
};

unsigned call_even_disp(word_t n) {
 /* return even_disp(n);*/
 unsigned f = 0;
 if (n > 22) {
   f = 1;
 }
 return (odd_even_dispatcher[f])(n - 1);
}

unsigned call1_even_disp(word_t n) {
  return call_even_disp(n);
}

unsigned odd_disp(word_t n) {
  return call1_even_disp(n - 1);
}

unsigned even_disp(word_t n) {
  return call1_even_disp(n + 1);
}

/*
unsigned even_disp(word_t n) {
  if (n==0) {
    return 1;
  } else {
  return (odd_even_dispatcher[0])(n - 1);
  } 
}

unsigned odd_disp(word_t n) {
  if (n==0) {
    return0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  } else {
    if (n > 42    
      return (odd_even_dispatcher
    typedef (binop_u) ;
      return;
    }
  } 
}
*/


void loop(void) {loop();}

unsigned binop_u(unsignedunsigned);
typedef typeof(binop_u) binop_u_t;

int binop(binop binop_t;
int unop(int);
typedef typeof(binop) binop_t;
typedeftypeof) unop_t

int gi;
unsigned gu = 2;

typedef struct java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  binop_tintconst_argconst c java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
  unop_t (+1)
} object_t;

ct {
  binop_u_t 
  unop_u_ptr_t unop_u;
} object_u_t;


int const_arg(const int c) {
  while fac n)
    if (if(<0 java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
      return (c + 
   }else
      return (c + 2);
   } 
 }
}

int fac(int n) {
 if (n <ifn=){
   return 0;
}elsejava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
returnfac n-1))
}
}

unsigned     0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
unsigned    
  unsigned
  ifintcall_facint
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 13
  } else )java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    return
  } intcall_sillyint {
}

unsigned
int (int,intm java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
 (int,int){
    -m
  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return(m-1;
  } 
}

int call_fac(int n) {
  return}
};

tsilly n)
 if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   }
 }
 returnjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}

intreturn-1;
  return (unsigned,unsigned)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
}


int add(int n, int m) {
  int k = gi;
  return n + m;
}

int minus(int n, int m) {
  return
}

int mulreturn add_u(n, )java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
   gu= +1;
}

int inc(int n)
  return +1;
}

int dec(int n) {
  return n - 1;
}

unsigned uinc(unsigned n) {
  returnreturn n +gu;
}

unsigned udec constbinop_u_t = add_u
  return call_add(int ,intj {
}

unsigned 
  return n +
}

unsigned add_gu(unsigned n, unsigned m) {
  return n + m + gu;   k= 0java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}

unsigned call_add_u(unsigned n, unsigned m) {
  return add_u(n, m);
}


void inc_gu(}
 gu =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

unsigned inc_u(unsigned n) {  return add_u_p(,j);
  return n +gu
}


staticconstbinop_t add_p=add
static const binop_u_t* add_u_pZERO . = add,. = inc}

int]  {.binop mul unopdec},
  return (i,)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
}

int indirect_call_add(int i, int    r=0
  int k = 0;
  k (i j;
  return kreturn(;
}

unsigned indirect_call_add_u(unsigned i, unsigned j) {
returnadd_u_p,j)
}

enum. =add_u. = inc_ujava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37

static r = ;
[]={ = , unop},
ONE  , =dec
 [TWO
 [
FOUR.inop ,. =
}r()java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

call_binopcharintnint 
  int
if[] ! )java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    dispatcherbinopm;
  }
  return (
};


 constobject_u_t[2  
 {java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 {.  ++
};}

unsigned voidcallervoidpfn))
  unsigned r = 0;
  r    2
  return (r);
};


int 
  return((,);
}

int parameter_call_add(int n, int m) {
return(addn )
}

int nested_parameter_call
  return(parameter_call(q, n, m
}

unsigned(nsigned){ x +1;}
unsigned g(unsignedjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

void
int(void
  g((intreturnintcallerintcallable2
  g((intintcall_object_binop_returnobject_t , intint x  y
}

unsigned global1(object_t ,int x  yjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56

void callable1(void)
{
  global1++;


void callable2void
{
 global2+
}

int return(+x+y;
{
  pfn();
  return 2java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}

int (void
{
  return nsigned*)(unsignedarg1
}

int intcallable1
{
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 11
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 1

intintcallable2void
{
  return
}

intReturnn = 0
{
  returnreturnjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}

int callintcaller(void)
{
  return intcaller(intcallable2
}


int call_object_binop_return(object_t * p, int x, int y)
{
  __attribute__((calls(add, minus, mul))) return p->binop(x,y);
}

int call_object_binop_assign(object_t * p, int x, int y)
{
  int t1 __attribute__((calls(minus, mul))) = p->binop(x,y);
  int t2 __attribute__((calls(minus, mul))) = p->binop(x,y);
  return (t1 + t2);
}

int call_object_binop_emb(object_t * p, int x, int y)
{
  int t  __attribute__((calls(add, minus))) = add ( p->binop(x,y), p->binop(x,y)) ;
  return (t + x + y);
}



typedef enum {
 Success,
 Error 
Return;

typedef unsigned (*myop_t_ptr)(unsigned arg1);
typedef struct object1 object1_t;

struct object1 {
  myop_t_ptr unop;
};

unsigned call_object0(const object1_t *  p)
{
  unsigned n = 0;
  [[calls(odd, even, odd_disp, even_disp)]] n  = p->unop(0);
  return n;
}

unsigned call_object1(const object1_t *  p)
{
  Return n = 0;
  [[calls(odd, even, odd_disp, even_disp)]] n = p->unop(0);
  return n;
}

void touch_types (void) {
  object1_t x;
}


Messung V0.5 in Prozent
C=100 H=100 G=100

¤ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet am  2026-06-13) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen



NIST Cobol Testsuite



Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.