-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About how herd models RISC-V memory model primitives #570
Comments
All those bindings are parts of the "initial environment" that OCaml code defines before calling the CAT interpreter. The sets Some bindings, such as
You'll find the definition of
This case is very specific: some variants of the C model express read-modify-writes action as an event that is both a read and an write. No hardware model is similar: their read-modify-write constructs generate a read and a write event.
You are welcome |
Dear Prof. Maranget @maranget , Thank you so much for the detailed guidance. These comments are extremely useful in presenting a comprehensive view of Herd's modeling process. Thank you! I would also like to apologize for my late reply. These days I have tried to debug Herd and further encountered some problems. I find there are two ways to debug Herd project:
I currently used the second debugging approach as it is more user-friendly (with an interface) and sometimes use the first approach as the breakpoint in VSCode debugging sometimes does not work (e.g., breakpoint at
Following your advice in the above comment, I have got a bit more familiar with Herd code logic. But there are still many questions ahead for me to overcome due to the large size of Herd project in terms of source code. The whole project of Herdtools suite has reached 100,335 OCaml lines and the herd folder has reached 21,913 OCaml lines. As a fan of Herd, I would sincerely appreciate it if any guidance could be provided about the above questions or a smooth workflow to learn Herd source code could be recommended. I am sorry for my lengthy questions... Thank you very much for your great help. Yours sincerely, |
Dear Authors,
Sorry for interrupting you here. I am a newcomer to Herd, and when I am reading the source code of Herd for formally modeling memory consistency of ISAs (e.g., RISC-V) via CAT language. I am confused about some parts of the source code, which I would like to present for your help:
herd/libdir/riscv-defs.cat
: I understand that the RISC-V fences consists of ten fences, but for the following code:I fail to find any definition of
Fence
orFence.r.r
within the project. Also, I fail to find the corresponding definition of[R]
,[W]
, or[M]
. Where can we find the definition of these variables? Thank you!for
let RCsc = (Acq|Rel|AcqRel) & (AMO|X)
andlet fencerel(B) = (po & (_ * B)) ; po
Where can we find the definition of theX
,B
, and_
variable? I checkedstdlib.cat
but there is no related definition...for
let AMO = try AMO with (R & W) (* Compat *)
, I have read your paper "Syntax and semantics of the weak consistency model specification language cat" and noticed that&
meansintersection
. But it seems the intersection of R (i.e., Read events) and W (i.e., Write events) should be an empty set. How should we interpret this code?It would be sincerely appreciated if any comments or guidance could be provided. Thank you in advance for your time and great patience!
Yours sincerely,
Deheng
The text was updated successfully, but these errors were encountered: