示例#1
0
void main() {
  PSLL_ENTRY x, y, z;
  x = SLL_create(nondet());
  y = SLL_create(nondet());
  z = splice(x, y);
  SLL_destroy(z);
}
示例#2
0
void main(void) {
  PSLL_ENTRY head,head1;

  head = SLL_create(nondet());
  head1 = SLL_create(nondet());
  traverse(head);
  SLL_destroy(head);
  SLL_destroy(head1);
}
void main() {
  PSLL_ENTRY x = NULL, y, c, h, elem, prev;
  x = SLL_create(17);

  c = x;
  x = NULL;
  while (c != NULL) {
    y = c;
    c = c->Flink;
    y->Flink = NULL;
    elem = x;
    prev = NULL;
    while (elem != NULL) {
      if (elem->Data >= y->Data) {
	y->Flink = elem;
	if (prev == NULL) { x = y; goto retn; }
	prev->Flink = y;
	goto retn;
      }
      elem = elem->Flink;
      prev = elem;
    }
    y->Flink = elem;
    if (prev == NULL) { x = y; goto retn; }
    prev->Flink = y;
  retn: ;
  }

  SLL_destroy(c);
  SLL_destroy(x);
}
示例#4
0
文件: copy.c 项目: ChunHungLiu/SLAyer
void main() {
  PSLL_ENTRY x = NULL, y = NULL;
  x = SLL_create(nondet());
  y = copy(x);
  SLL_destroy(x);
  SLL_destroy(y);
}
void main() {
  PSLL_ENTRY x = NULL;
  x = SLL_create(nondet());
  x = reverse_negative_sublists2(x);
  reverse_negative_sublists(&x);
  SLL_destroy(x);
}
示例#6
0
void main() {
  PSLL_ENTRY x = NULL, y = NULL;
  x = SLL_create(nondet());
  y = copy(x);
  free(&y);
/*   SLL_destroy(x); */
/*   SLL_destroy(y); */
}
示例#7
0
void main() {
  PSLL_ENTRY head;

  head = SLL_create(nondet());

  reverse_div(&head);

  SLL_destroy(head);
}
示例#8
0
int main()
{
    int const A[] = { 1, 2, 3, 4, 5 };
    int const n = sizeof(A)/sizeof(A[0]);

    struct SLL* sll = SLL_create(n,A);
    SLL_destroy(sll);

    return 0;
}
示例#9
0
int main(void)
{
    PSLL_ENTRY head;

    int s = __llbmc_nondef_int();
    __llbmc_assume(s <= 10);
    head = SLL_create(10);

    return 0;
}
示例#10
0
文件: ex9.c 项目: ArtisticCoding/T2
int main()
{
    PSLL_ENTRY x = NULL, y = NULL;
    int s = __llbmc_nondef_int();
    __llbmc_assume(s <= 5);
    x = SLL_create(s);
    y = copy(x);
    SLL_destroy(x);
    SLL_destroy(y);
    return 0;
}
示例#11
0
void main() {
  PSLL_ENTRY x = SLL_create(nondet());

  print_list(x); printf_s("\n");

  filter(&x, 1);

  print_list(x);

  SLL_destroy(x);
}
示例#12
0
void main(void) {
	PSLL_ENTRY head, x;

	head = SLL_create(nondet());
	x = head;

	while (x != NULL) {
		x = head->Flink;
	}

	SLL_destroy(head);
}
示例#13
0
struct SLL* SLL_create(int const n, int const* const A)
{
    struct SLL* sll;

    if (n == 0)
        return 0;

    sll = (struct SLL*)malloc(sizeof(struct SLL));
    sll->data = A[0];
    sll->next = SLL_create(n-1,A+1);

    return sll;
}
示例#14
0
void main(void) {
	PSLL_ENTRY head, x;
	int i;

	head = SLL_create(nondet());
	x = head;

	while (x != NULL && i > 0) {
		if (nondet()) {
			i--;
		} else {
			x = x->Flink;
		}
	}

	SLL_destroy(head);
}
示例#15
0
void main() {
    PSLL_ENTRY x;
    x = SLL_create(17);
    x = insertion_sort(x);
    SLL_destroy(x);
}
示例#16
0
void main(void) {
  PSLL_ENTRY head;

  head = SLL_create(nondet());
  traverse(head);
}