add ACSL annotation

This commit is contained in:
Yoichi Umezawa
2016-03-16 15:42:32 +09:00
parent 8dd9f5ef3f
commit 593cf98015
3 changed files with 54 additions and 2 deletions

View File

@@ -271,6 +271,17 @@ void fill_note(void *note, struct thread *thread, void *regs)
* should be zero.
*/
/*@
@ requires \valid(thread);
@ requires \valid(regs);
@ requires \valid(coretable);
@ requires \valid(chunks);
@ behavior success:
@ ensures \result == 0;
@ assigns coretable;
@ behavior failure:
@ ensures \result == -1;
@*/
int gencore(struct thread *thread, void *regs,
struct coretable **coretable, int *chunks)
{
@@ -510,6 +521,10 @@ int gencore(struct thread *thread, void *regs,
* \param coretable An array of core chunks.
*/
/*@
@ requires \valid(coretable);
@ assigns \nothing;
@*/
void freecore(struct coretable **coretable)
{
struct coretable *ct = *coretable;