Skip to content

Commit

Permalink
Introduce stdlib.cat
Browse files Browse the repository at this point in the history
Signed-off-by: Hernan Ponce de Leon <[email protected]>
  • Loading branch information
hernan-poncedeleon authored and hernanponcedeleon committed Oct 10, 2024
1 parent 7ffb695 commit a4d1226
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 15 deletions.
1 change: 0 additions & 1 deletion cat/c11-orig.cat
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Rewritten by Luc Maranget for herd7

*)

include "basic.cat"
include "c11_cos.cat"
include "c11_los.cat"

Expand Down
1 change: 0 additions & 1 deletion cat/c11.cat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Rewritten by Luc Maranget for herd7
may be missing. As a consequence, reads may have no rf-edge if they read from initial memory.
*)

include "basic.cat"
include "c11_cos.cat"
include "c11_los.cat"

Expand Down
5 changes: 0 additions & 5 deletions cat/cos.cat

This file was deleted.

2 changes: 0 additions & 2 deletions cat/imm.cat
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
* following GenMC's implementation
*)

include "basic.cat"

(* coherence *)
let rs = [W];po-loc;[W] | [W];(po-loc?;rf;rmw)* (* release sequence *)
(* GenMC uses the same sw definition as RC11 *)
Expand Down
2 changes: 0 additions & 2 deletions cat/ptx-v6.0.cat
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ PTX
// GPU: Graphics processing unit. The GPU scope is the set of all threads executing in the same cluster as the current thread.
// SYS: System. The SYS scope is the set of all threads in the current program.

include "basic.cat"

(*******************)
(* Auxiliaries *)
(*******************)
Expand Down
2 changes: 0 additions & 2 deletions cat/ptx-v7.5.cat
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ PTX
// The ASPLOS'19 paper and the documentation refer to "rf | fr" (non-optional).
// We follow the later.

include "basic.cat"

(*******************)
(* Auxiliaries *)
(*******************)
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions cat/vmm.cat
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
let ext = ext & ((~IW) * M)
let int = int | (IW * M)

include "basic.cat"

(** Atomicity **)
empty rmw & (fre;coe)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.dat3m.dartagnan.parsers.cat;

import com.dat3m.dartagnan.GlobalSettings;
import com.dat3m.dartagnan.exception.AbortErrorListener;
import com.dat3m.dartagnan.exception.MalformedMemoryModelException;
import com.dat3m.dartagnan.exception.ParsingException;
Expand Down Expand Up @@ -62,6 +63,13 @@ public String toString() {
VisitorCat(Path includePath) {
this.includePath = includePath;
this.wmm = new Wmm();
try {
// The standard library is a cat file stdlib.cat which all models include by default
final CatParser parser = getParser(CharStreams.fromPath(Path.of(GlobalSettings.getCatDirectory() + "/stdlib.cat")));
parser.mcm().accept(this);
} catch (IOException e) {
throw new ParsingException("Error parsing stdlib.cat file", e);
}
}

@Override
Expand Down

0 comments on commit a4d1226

Please sign in to comment.