#ifndef DEQUE_H
#define DEQUE_H
+#include <spec_lib.h>
+#include <stdlib.h>
+#include <cdsannotate.h>
+#include <specannotation.h>
+#include <model_memory.h>
typedef struct {
atomic_size_t size;
#include <model-assert.h>
#endif
+#include <spec_lib.h>
+#include <stdlib.h>
+#include <cdsannotate.h>
+#include <specannotation.h>
+#include <model_memory.h>
+
using namespace std;
/**
ReplaceIfMatch(COND_ReplaceIfMatchSucc)
}
@Happens_before:
- Write_interface -> Read_interface
+ //Write_interface -> Read_interface
+ Put->Get
+ Put->Put
@End
*/
}
/**
- @Begin
+// @Begin
@Interface: PutIfAbsent
@Commit_point_set:
Write_Success_Point | PutIfAbsent_Fail_Point
}
/**
- @Begin
+// @Begin
@Interface: RemoveAny
@Commit_point_set: Write_Success_Point
@ID: getKeyTag(key)
}
/**
- @Begin
+// @Begin
@Interface: RemoveIfMatch
@Commit_point_set:
Write_Success_Point | RemoveIfMatch_Fail_Point
}
/**
- @Begin
+// @Begin
@Interface: ReplaceAny
@Commit_point_set:
Write_Success_Point
}
/**
- @Begin
+// @Begin
@Interface: ReplaceIfMatch
@Commit_point_set:
Write_Success_Point | ReplaceIfMatch_Fail_Point
#include <threads.h>
#include <stdatomic.h>
+#include <spec_lib.h>
+#include <stdlib.h>
+#include <cdsannotate.h>
+#include <specannotation.h>
+#include <model_memory.h>
+
#include "librace.h"
#define RW_LOCK_BIAS 0x00100000
#include <stdatomic.h>
#include <unrelacy.h>
+#include <spec_lib.h>
+#include <stdlib.h>
+#include <cdsannotate.h>
+#include <specannotation.h>
+#include <model_memory.h>
+
struct mcs_node {
std::atomic<mcs_node *> next;
std::atomic<int> gate;
#include <unrelacy.h>
#include <common.h>
+#include <spec_lib.h>
+#include <stdlib.h>
+#include <cdsannotate.h>
+#include <specannotation.h>
+#include <model_memory.h>
+
/**
@Begin
@Class_begin
#include <stdatomic.h>
+#include <spec_lib.h>
+#include <stdlib.h>
+#include <cdsannotate.h>
+#include <specannotation.h>
+#include <model_memory.h>
+
#define MAX_NODES 0xf
typedef unsigned long long pointer;
#include <stdlib.h>
#include <stdio.h>
+#include <spec_lib.h>
+#include <stdlib.h>
+#include <cdsannotate.h>
+#include <specannotation.h>
+#include <model_memory.h>
+
#include "librace.h"
/**
#include <unrelacy.h>
#include <atomic>
+#include <spec_lib.h>
+#include <stdlib.h>
+#include <cdsannotate.h>
+#include <specannotation.h>
+#include <model_memory.h>
+
#include "eventcount.h"
/**
}
{
(str = <IDENTIFIER>.image {res = str;})
- (<OPEN_BRACKET> str = Type() { res = res + "<" + str; }
- (<COMMA> str = Type() { res = res + ", " + str; })* <CLOSE_BRACKET>
+ (<LESS_THAN> str = Type() { res = res + "<" + str; }
+ (<COMMA> str = Type() { res = res + ", " + str; })* <GREATER_THAN>
{ res = res + ">"; }
)?
{
params = new ArrayList<VariableDeclaration>();
}
<TEMPLATE>
- <OPEN_BRACKET>
+ <LESS_THAN>
(type = <IDENTIFIER>.image
name = <IDENTIFIER>.image
{
params.add(new VariableDeclaration(type, name));
}
)*
- <CLOSE_BRACKET>
+ <GREATER_THAN>
{
//System.out.println(params);
return params;