source: CIVL/examples/library/civlc/heap.cvl

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 336 bytes
Line 
1/** implementin $malloc using $havoc and $seq **/
2#include<civlc.cvh>
3#include<seq.cvh>
4#include<stdio.h>
5
6struct Heap{
7 int h1[][];
8 int h2[][];
9};
10
11int main(){
12 struct Heap h;
13
14 //$seq_init(&h.h1, 0, NULL);
15 //$seq_init(&h.h2, 0, NULL);
16
17 int tmp[5];
18 $havoc(&tmp);
19 $seq_append(&h.h1, &tmp, 1);
20 printf("heap: %s\n", h);
21}
22
Note: See TracBrowser for help on using the repository browser.