> #include <assert.h>
< typedef /*@only@*/ erc o_erc; < static o_erc db[numERCS]; --- > static erc db[numERCS];
< /*@globals internalState@*/ < /*@modifies s, internalState@*/ --- > /*@globals internalState, stderr@*/ > /*@modifies s, internalState, *stderr@*/
< printf ("Employees:\n"); --- > check (printf ("Employees:\n") >= 0);
< printf ("%s", printVal); --- > check (printf ("%s", printVal) >= 0);
< db_status db_hire (employee e) db d; --- > db_status db_hire (employee e) db d; FILE *stderr;
< modifies d; --- > modifies d, *stderr^;
< void db_uncheckedHire (employee e) db d; --- > void db_uncheckedHire (employee e) db d; FILE *stderr;
< modifies d; --- > modifies d, *stderr^;
< int db_query (db_q q, empset s) db d; internalState; --- > int db_query (db_q q, empset s) db d; internalState; FILE *stderr;
< modifies s, internalState; --- > modifies s, internalState, *stderr^;
< bool db_promote (int ssNum) db d; --- > bool db_promote (int ssNum) db d; FILE *stderr;
< modifies d; --- > modifies d, *stderr^;
< void db_print(void) db d; FILE *stdout; --- > void db_print(void) db d; FILE *stdout; FILE *stderr;
< modifies *stdout^; --- > modifies *stdout^, *stderr^;
< void db_initMod(void) db d; internalState; --- > void db_initMod(void) db d; internalState; FILE *stderr;
< modifies d, internalState; --- > modifies d, internalState, *stderr^;
< /*@globals internalState@*/ /*@modifies internalState@*/ --- > /*@globals internalState, stderr, stdout@*/ > /*@modifies internalState, *stderr, *stdout@*/
< printf ("FormatPos: Wrong number of arguments. Given %d needs 0.\n", < argc - 1); --- > check (fprintf (stderr, "FormatPos: Wrong number of arguments. " > "Given %d needs 0.\n", argc - 1) >= 0);
< printf("Size should be 0.\n"); --- > check (printf("Size should be 0.\n") >= 0);
< printf("Size should be 500.\n"); --- > check (printf("Size should be 500.\n") >= 0);
< printf("Size should be 250.\n"); --- > check (printf("Size should be 250.\n") >= 0);
< printf("Size should be 350.\n"); --- > check (printf("Size should be 350.\n") >= 0);
< printf("Size should be 350.\n"); --- > check (printf("Size should be 350.\n") >= 0);
< printf("Print two different employees:\n"); --- > check (printf("Print two different employees:\n") >= 0);
< printf("%s\n", &(na[0])); --- > check (printf("%s\n", &(na[0])) >= 0);
< printf("Should print true: %s\n", < bool_unparse (/*@-usedef@*/ status == DBS_DUPLERR /*@=usedef@*/)); --- > check (printf("Should print true: %s\n", > bool_unparse (/*@-usedef@*/ status == DBS_DUPLERR /*@=usedef@*/)) > >= 0);
< printf("Employees 0 - 19\n"); --- > check (printf("Employees 0 - 19\n") >= 0);
< printf("Employees 0 - 16, 18 - 19\n"); --- > check (printf("Employees 0 - 16, 18 - 19\n") >= 0);
< printf("Should get two females: %d\n%s\n", i, sprintResult); --- > check (printf("Should get two females: %d\n%s\n", i, sprintResult) >= 0);
< printf("Should get two females and ten males: %d\n%s\n", i, sprintResult); --- > check (printf("Should get two females and ten males: %d\n%s\n", i, sprintResult) > >= 0);
< printf("Should get two females: %d\n%s\n", i, sprintResult); --- > check (printf("Should get two females: %d\n%s\n", i, sprintResult) >= 0);
< printf("Should get 18 employees\n"); --- > check (printf("Should get 18 employees\n") >= 0);
< imports employee; --- > imports employee, <stdio>;
< only empset empset_create(void) --- > only empset empset_create(void) FILE *stderr;
> modifies *stderr^;
< | bool : void | empset_insert (empset s, employee e) internalState; --- > | bool : void | empset_insert (empset s, employee e) > internalState; FILE *stderr;
< modifies s, internalState; --- > modifies s, internalState, *stderr^;
< void empset_insertUnique (empset s, employee e) internalState; --- > void empset_insertUnique (empset s, employee e) internalState; FILE *stderr;
< modifies s, internalState; --- > modifies s, internalState, *stderr^;
< only empset empset_union(empset s1, empset s2) internalState; --- > only empset empset_union(empset s1, empset s2) > internalState; FILE *stderr;
< modifies internalState; --- > modifies internalState, *stderr^;
< only empset empset_disjointUnion (empset s1, empset s2) internalState; --- > only empset empset_disjointUnion (empset s1, empset s2) > internalState; FILE *stderr;
< modifies internalState; --- > modifies internalState, *stderr^;
< void empset_intersect (empset s1, empset s2) internalState; --- > void empset_intersect (empset s1, empset s2) internalState; FILE *stderr;
< modifies s1, internalState; --- > modifies s1, internalState, *stderr^;
< only char *empset_sprint(empset s) --- > only char *empset_sprint(empset s) FILE *stderr;
> modifies *stderr^;
< void empset_initMod (void) internalState; --- > void empset_initMod (void) internalState; FILE *stderr;
< modifies internalState; --- > modifies internalState, *stderr^;
< --- > # include <assert.h>
< static size_t int_toSize (int x) /*@*/ --- > static size_t int_toSize (int x) /*@globals stderr@*/ /*@modifies *stderr@*/
< fprintf (stderr, "Error: int_toSize is negative: %d", x); --- > check (fprintf (stderr, "Error: int_toSize is negative: %d", x) >= 0);
< printf ("Malloc returned null in erc_create\n"); --- > check (fprintf (stderr, "Malloc returned null in erc_create\n") >= 0);
< printf ("Malloc returned null in erc_insert\n"); --- > check (fprintf (stderr, "Malloc returned null in erc_insert\n") >= 0);
< printf ("Malloc returned null in erc_sprint\n"); --- > check (fprintf (stderr, "Malloc returned null in erc_sprint\n") >= 0);
< imports eref; --- > imports eref, <stdio>;
< only erc erc_create(void) --- > only erc erc_create(void) FILE *stderr;
> modifies *stderr^;
< void erc_insert(erc c, eref er) --- > void erc_insert(erc c, eref er) FILE *stderr;
< modifies c; --- > modifies c, *stderr^;
< void erc_join(erc c1, erc c2) --- > void erc_join(erc c1, erc c2) FILE *stderr;
< modifies c1; --- > modifies c1, *stderr^;
< only char *erc_sprint(erc c) --- > only char *erc_sprint(erc c) FILE *stderr;
> modifies *stderr^;
< void erc_initMod (void) internalState; --- > void erc_initMod (void) internalState; FILE *stderr;
< modifies internalState; --- > modifies internalState, *stderr^;
< printf ("Malloc returned null in eref_alloc\n"); --- > check (fprintf (stderr, "Malloc returned null in eref_alloc\n") >= 0);
< printf ("Malloc returned null in eref_alloc\n"); --- > check (fprintf (stderr, "Malloc returned null in eref_alloc\n") >= 0);
< printf ("Malloc returned null in eref_initMod\n"); --- > check (fprintf (stderr, "Malloc returned null in eref_initMod\n") >= 0);
< printf ("Malloc returned null in eref_initMod\n"); --- > check (fprintf (stderr, "Malloc returned null in eref_initMod\n") >= 0);
< imports employee; --- > imports employee, <stdio>;
< eref eref_alloc(void) map m; --- > eref eref_alloc(void) map m; FILE *stderr;
< modifies m; --- > modifies m, *stderr^;
< void eref_initMod(void) map m; internalState; --- > void eref_initMod(void) map m; FILE *stderr; internalState;
< modifies m, internalState; --- > modifies m, internalState, *stderr^;
< only ereftab ereftab_create(void) --- > only ereftab ereftab_create(void) FILE *stderr;
> modifies *stderr^;
< void ereftab_insert(ereftab t, employee e, eref er) --- > void ereftab_insert(ereftab t, employee e, eref er) FILE *stderr;
< modifies t; --- > modifies t, *stderr^;
< void ereftab_initMod (void) internalState; --- > void ereftab_initMod (void) internalState; FILE *stderr;
< modifies internalState; --- > modifies internalState, *stderr^;