File tree 9 files changed +21
-18
lines changed
dartagnan/src/main/java/com/dat3m/dartagnan/parsers/cat
9 files changed +21
-18
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ Rewritten by Luc Maranget for herd7
9
9
10
10
*)
11
11
12
- include "basic.cat"
13
12
include "c11_cos.cat"
14
13
include "c11_los.cat"
15
14
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ Rewritten by Luc Maranget for herd7
14
14
may be missing. As a consequence, reads may have no rf-edge if they read from initial memory.
15
15
*)
16
16
17
- include "basic.cat"
18
17
include "c11_cos.cat"
19
18
include "c11_los.cat"
20
19
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 8
8
* following GenMC's implementation
9
9
*)
10
10
11
- include "basic.cat"
12
-
13
11
(* coherence *)
14
12
let rs = [W];po-loc;[W] | [W];(po-loc?;rf;rmw)* (* release sequence *)
15
13
(* GenMC uses the same sw definition as RC11 *)
Original file line number Diff line number Diff line change 12
12
// GPU: Graphics processing unit. The GPU scope is the set of all threads executing in the same cluster as the current thread.
13
13
// SYS: System. The SYS scope is the set of all threads in the current program.
14
14
15
- include "basic.cat"
16
-
17
15
(*******************)
18
16
(* Auxiliaries *)
19
17
(*******************)
Original file line number Diff line number Diff line change 26
26
// The ASPLOS'19 paper and the documentation refer to "rf | fr" (non-optional).
27
27
// We follow the later.
28
28
29
- include "basic.cat"
30
-
31
29
(*******************)
32
30
(* Auxiliaries *)
33
31
(*******************)
File renamed without changes.
Original file line number Diff line number Diff line change 2
2
* Copyright (C) Huawei Technologies Co., Ltd. 2024. All rights reserved.
3
3
* SPDX-License-Identifier: MIT
4
4
*
5
- * Version 0.9.1
5
+ * Version 0.9.3
6
6
*/
7
7
8
8
(* Notation
55
55
56
56
let ext = ext & ((~IW) * M)
57
57
let int = int | (IW * M)
58
-
59
- include "basic.cat"
58
+ let rfe = rf & ext
59
+ let coe = co & ext
60
+ let fre = fr & ext
61
+ let rfi = rf & int
62
+ let coi = co & int
63
+ let fri = fr & int
60
64
61
65
(** Atomicity **)
62
66
empty rmw & (fre;coe)
@@ -66,8 +70,8 @@ acyclic co | rf | fr | po-loc
66
70
67
71
let Marked = RLX | ACQ | REL | SC
68
72
let Plain = ~Marked
69
- let Acq = ACQ | (SC & R )
70
- let Rel = REL | (SC & W )
73
+ let Acq = ( ACQ | SC) & (R | F )
74
+ let Rel = ( REL | SC) & (W | F )
71
75
72
76
(** Ordering **)
73
77
(* In our model, dependencies only order stores:
Original file line number Diff line number Diff line change 1
1
package com .dat3m .dartagnan .parsers .cat ;
2
2
3
+ import com .dat3m .dartagnan .GlobalSettings ;
3
4
import com .dat3m .dartagnan .exception .AbortErrorListener ;
4
5
import com .dat3m .dartagnan .exception .MalformedMemoryModelException ;
5
6
import com .dat3m .dartagnan .exception .ParsingException ;
@@ -62,6 +63,17 @@ public String toString() {
62
63
VisitorCat (Path includePath ) {
63
64
this .includePath = includePath ;
64
65
this .wmm = new Wmm ();
66
+ includeStdlib ();
67
+ }
68
+
69
+ private void includeStdlib () {
70
+ try {
71
+ // The standard library is a cat file stdlib.cat which all models include by default
72
+ final CatParser parser = getParser (CharStreams .fromPath (Path .of (GlobalSettings .getCatDirectory () + "/stdlib.cat" )));
73
+ parser .mcm ().accept (this );
74
+ } catch (IOException e ) {
75
+ throw new ParsingException ("Error parsing stdlib.cat file" , e );
76
+ }
65
77
}
66
78
67
79
@ Override
You can’t perform that action at this time.
0 commit comments