Skip to content

Commit

Permalink
Added support for includes and functions in cat (#736)
Browse files Browse the repository at this point in the history
Co-authored-by: Hernan Ponce de Leon <[email protected]>
  • Loading branch information
ThomasHaas and hernan-poncedeleon committed Sep 16, 2024
1 parent cdc9529 commit e04d77d
Show file tree
Hide file tree
Showing 50 changed files with 451 additions and 1,271 deletions.
24 changes: 0 additions & 24 deletions cat/aarch64fences.cat

This file was deleted.

12 changes: 12 additions & 0 deletions cat/basic.cat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
let fr = rf^-1;co | ([R] \ [range(rf)]);loc;[W]

let po-loc = po & loc

let rfe = rf & ext
let coe = co & ext
let fre = fr & ext
let rfi = rf & int
let coi = co & int
let fri = fr & int

let fencerel(F) = po;[F];po
1 change: 1 addition & 0 deletions cat/c11-orig.cat
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Rewritten by Luc Maranget for herd7

*)

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

Expand Down
1 change: 1 addition & 0 deletions cat/c11.cat
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ 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: 5 additions & 0 deletions cat/cos.cat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Herd7 uses cos.cat for generating coherence.
// It usually also defines some derived relations used in many memory models.
// Dartagnan does not need the former; the later is handled by basic.cat below.

include "basic.cat"
2 changes: 2 additions & 0 deletions cat/imm.cat
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* 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
3 changes: 2 additions & 1 deletion cat/linux-kernel.cat
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ let to-r = (addr ; [R]) | (dep ; [Marked] ; rfi)
let ppo = to-r | to-w | (fence & int) | (po-unlock-lock-po & int)

(* Propagation: Ordering from release operations and strong fences. *)
let A-cumul(r) = (rfe ; [Marked])? ; r
let rmw-sequence = (rf ; rmw)*
let cumul-fence = [Marked] ; ((rfe ; [Marked])? ; (strong-fence | po-rel) | wmb |
let cumul-fence = [Marked] ; (A-cumul(strong-fence | po-rel) | wmb |
po-unlock-lock-po) ; [Marked] ; rmw-sequence
let prop = [Marked] ; (overwrite & ext)? ; cumul-fence* ;
[Marked] ; rfe? ; [Marked]
Expand Down
154 changes: 0 additions & 154 deletions cat/lkmm-no-data-race.cat

This file was deleted.

8 changes: 0 additions & 8 deletions cat/lkmm/README.md

This file was deleted.

Loading

0 comments on commit e04d77d

Please sign in to comment.