/**
@Begin
@Global_define:
+ @DeclareVar:
typedef struct tag_elem {
Tag id;
unsigned int data;
}
} tag_elem_t;
- spec_queue<tag_elem_t> __queue;
- Tag __tag;
+ spec_queue<tag_elem_t> queue;
+ Tag tag;
+ @InitVar:
+ queue = spec_queue<tag_elem_t>();
+ tag = Tag();
@Happens_before:
# Only check the happens-before relationship according to the id of the
# commit_point_set. For commit_point_set that has same ID, A -> B means
@Begin
@Interface: Enqueue
@Commit_point_set: Enqueue_Success_Point
- @ID: __tag.getCurAndInc()
+ @ID: __sequential.tag.getCurAndInc()
@Action:
# __ID__ is an internal macro that refers to the id of the current
# interface call
@Code:
- __queue.enqueue(tag_elem_t(__ID__, val));
+ __sequential.queue.enqueue(tag_elem_t(__ID__, val));
@End
*/
void enqueue(queue_t *q, unsigned int val)
@Begin
@Interface: Dequeue
@Commit_point_set: Dequeue_Success_Point
- @ID: __queue.peak().tag
+ @ID: __sequential.queue.peak().tag
@Action:
@Code:
- unsigned int _Old_Val = __queue.dequeue().data;
+ unsigned int _Old_Val = __sequential.queue.dequeue().data;
@Post_check:
_Old_Val == __RET__
@End