nsomani 16 hours ago

Hi all, this is a small research prototype I built that connects Rust's MIR (Mid-level IR) to Coq, the proof assistant used for formal verification.

cuq takes the MIR dump of a Rust CUDA kernel and translates it into a minimal Coq semantics that emits memory events, which are then lined up with the PTX memory model formalized by Lustig et al., ASPLOS 2019.

Right now it supports:

* a simple saxpy kernel (no atomics)

* an atomic flag kernel using acquire/release semantics

* a "negative" kernel that fails type/order checking

The goal isn't a full verified compiler yet. It's a first step toward formally checking the safety of GPU kernels written in Rust (e.g. correct use of atomics, barriers, and memory scopes).

Happy to hear thoughts from folks working in Rust verification, GPU compilers, or Coq tooling.

  • gaogao 14 hours ago

    Do you think it might be easier to target cuTile instead of PTX? (Probably not, since it has a less formalized model?)

    • nsomani 13 hours ago

      That instinct is right. cuTile would be easier to parse but harder to reason about formally.

      • jroesch 3 hours ago

        We also have a formal memory model and the program semantics are simpler so if anything reasoning about it should be easier.

        • nsomani 2 hours ago

          Oh really? I can't find anything about the memory model online. I'm not sure what's the best way to do this, but if there's a way for us to get in contact, I'd be interested in adjusting the project so it's developed in the most ergonomic way possible. I'm chatting with a couple of universities and I might issue a research grant for this project to be further fleshed out, so would be keen to hear your insights prior to kicking this off. My email is neel[at]berkeley.edu.

skrrtww 14 hours ago

This might be the worst named project of all time. Not funny and demonstrates an absolutely terrible impulse on the part of the author. Probably the worst way possible to advertise your project.

edit: According to the author in a reply, the double entendre was in fact not intentional.

  • lacker 13 hours ago

    They're renaming Coq, too, for the obvious reason.

    Just go ahead and rename this project to "Rocuda", save everyone a lot of time arguing about what names are appropriate or not.

    • thefz 3 hours ago

      > They're renaming Coq, too, for the obvious reason.

      Which is a perfectly legitimate name in French and the whole "issue" can be worked around by spelling cee-oh-queue.

      • zorobo an hour ago

        It is legitimate indeed, and a nod to its creator T. Coquand, but better avoid recurring, useless discussions so better change the name. The funny (for some), quirky jokes get quickly old anyway.

        They also renamed NIPS -> NeurIPS conference, even though the name sounds less subject to jokes.

      • 7bit an hour ago

        Then keep it and deal with the backlash without complaining.

      • 3836293648 an hour ago

        Except for the transcripts where they chose the name because they thought it was funny to offend the English

  • OneDeuxTriSeiGo 13 hours ago

    That's not what the name is based on. The name is cu- (as in CUDA kernels) -q (as in coq/rocq). Pronounced Cuke like cucumber.

    • ironmagma 12 hours ago

      There is a reason they renamed Coq to Rocq.

      • bigstrat2003 8 hours ago

        Yeah, because people are overly sensitive and can't bear the thought that someone might make some harmless naughty jokes. It's a completely ridiculous name change.

        • ironmagma 8 hours ago

          No. Conversions about it were being avoided due to being in a work context and in general. The same goes for coc (vim plugin) by the way.

          • CaptainOfCoit an hour ago

            That's exactly what parent said, people are overly sensitive and that's why the name had to change.

            • matt_kantor 22 minutes ago

              bistrat2003 said:

              > people are overly sensitive and can't bear the thought that someone might make some harmless naughty jokes

              ironmagma could have said:

              > people are overly sensitive and avoid talking about Coq at work and in general

              Both can be motivating factors, but not necessarily. It's possible that the Coq development team doesn't care about the jokes, but they do care about people being comfortable saying the name aloud at work.

        • nickpsecurity 8 hours ago

          One of my coworkers uses Siri to say what they want to search for. I'm definitely not saying: "Hey, Siri, show me examples of using Coq."

          Then, users of search engines will add "training," "in the workplace," "visual guide," "positions," "freelance work with," etc. Everything people use with programming languages or book titles becomes inappropriate with that name.

          Maybe if I worked on a chicken farm it would be OK. I'm in the hotel and retail industries doing a mix of hands-on work and customer service. You'll never hear me tell my bosses I was using that on the job. Or spending hours alone with Isabelle for that matter. HOL4 & HOL Light it is!

          • Dilettante_ 4 hours ago

            God help you if you ever need to talk about some children playing with balls in the lobby, or if maintenance asks you to order more nuts.

      • auggierose 5 hours ago

        Yeah, and look how well that went: https://rocq-prover.org/platform

        When you go to the downloads, it is actually Coq again. It was a ridiculous name, yes, but that name change is even more ridiculous. Most people are still calling it Coq, past research papers are calling it Coq, and Prince is still Prince and not the symbol.

    • Aloisius 11 hours ago

      I think I must pronounce cucumber differently than you.

      I'd expect cuke, if pronounced like cucumber would be queueck or cuck depending on which cu in cucumber you're using.

      However I pronounce CUDA koo-da so cuq would be pronounced perhaps like kook.

  • Dilettante_ 14 hours ago

    Maybe this surprises you, but some people have different sensibilities than you do.

  • thefz 3 hours ago

    Not the whole world speaks English. "Chicago" speaks funny in Italian, rename the city because I am offended. See how ridiculous it sounds?

  • nsomani 13 hours ago

    Oh wow, honestly this caught me off guard - I've been pronouncing it "kook" in my head the whole time.

    • skrrtww 13 hours ago

      If this was genuinely unintentional on your part, then bless your heart and I'm sorry for assuming the worst. You might be the least morally corrupted internet user alive today.

      • nsomani 13 hours ago

        I think I've just spent too much time reading the word "CUDA" that I read "cu" as "koo", lol.

    • skavi 11 hours ago

      It's your project, but with the current name I'd expect this thread to be duplicated any time the project is discussed.

  • 7bit an hour ago

    Yeah, coq is already bad, but cuq is the cherry on top of it. I don't like both.

  • antonvs 12 hours ago

    You know you're spending too much time on dubious sites when ...

    • 7bit an hour ago

      And your low-key judging people for porn consumption in 2025.

    • nvader 11 hours ago

      Not really, unfortunately the word hovers in the comment sections of mainstream American political discourse.

      • antonvs 9 hours ago

        I suppose it depends on one's definition of "dubious sites".

  • webdevver 14 hours ago

    not at all - its perfectly logical

    you are cucking the betabuxxed bugs in your kernels with your BFV (Big Formal Verifier)

Hexigonz 15 hours ago

This is pretty cool! Are you sure about the name...

  • NitpickLawyer 14 hours ago

    It's a system where a 3rd party library (aptly named Coq) gets to throughly verify your kernel, and you get to watch it do its thing? I think the name is fitting.

    • bitwize 14 hours ago

      It's called Rocq now—for this reason.

      • sayrer 13 hours ago

        Yeah, "coq" is a grade school joke in French class. It just means "rooster" or something in French, but it sounds ridiculous in English. This one has the same problem.

        A company with that in the name made the French national team jersey for a while.

        https://en.wikipedia.org/wiki/Le_Coq_Sportif

        It's Nike now, but it still has a rooster on it.

        • OneDeuxTriSeiGo 11 hours ago

          To be entirely fair cock (which surprisingly isn't actually derived from french but from english's germanic roots) also means rooster in english as well.

  • ahallock 8 hours ago

    Aren't we more mature than this? Granted, it's the first thing I thought of as well

    • 7bit an hour ago

      Can we instead please be mature about choosing a adequate sounding name?

orliesaurus 7 hours ago

Reading through this thread, it seems the naming debate is taking up most of the oxygen, but the underlying technical goal behind the project is worth highlighting. Formal verification for GPU kernels could make massively parallel Rust code safer and more reliable as more workloads move onto GPUs. Race conditions and undefined behaviors in GPU programming are notoriously tricky to reason about;

HOWEVER, I'm curious whether a proof‑driven approach like this can scale beyond toy examples or specific hardware assumptions. If so, it might set a precedent for bringing formal methods to other low‑level domains too......

ModernMech 11 hours ago

Two step guide to naming programming languages.

Step 1: Make sure no other programming language has the name you want.

Step 2: Make sure the name you want isn't a slur or rude word in all the languages your audience will write in. Be sure to check misspellings and homophones.

Optional 3rd step is to make sure the name lends itself to a cute animal mascot. For this project, I dunno maybe a corner chair is the mascot.