MétaCan
Menu
Back to cohort
Record W6931295785 · doi:10.5281/zenodo.4026639

Software Artefact for the OOPSLA'20 Paper Titled "How Do Programmers Use Unsafe Rust?"

2020· other· en· W6931295785 on OpenAlexaff

Bibliographic record

VenueZenodo (CERN European Organization for Nuclear Research) · 2020
Typeother
Languageen
FieldMedicine
TopicPrenatal Screening and Diagnostics
Canadian institutionsUniversity of British Columbia
FundersSchweizerischer Nationalfonds zur Förderung der Wissenschaftlichen Forschung
KeywordsRust (programming language)Memory safetyCode (set theory)CompilerSource codeAbstractionAliasingCode smell

Abstract

fetched live from OpenAlex

Abstract Rust’s ownership type system enforces a strict discipline on how memory locations are accessed and shared. This discipline allows the compiler to statically prevent memory errors, data races, inadvertent side effects through aliasing, and other errors that frequently occur in conventional imperative programs. However, the restrictions imposed by Rust’s type system make it difficult or impossible to implement certain designs, such as data structures that require aliasing (e.g., doubly-linked lists and shared caches). To work around this limitation, Rust allows code blocks to be declared as unsafe and thereby exempted from certain restrictions of the type system, for instance, to manipulate C-style raw pointers. Ensuring the safety of unsafe code is the responsibility of the programmer. However, an important assumption of the Rust language, which we dub the Rust hypothesis, is that programmers use Rust by following three main principles: use unsafe code sparingly, make it easy to review, and hide it behind a safe abstraction such that client code can be written in safe Rust. Understanding how Rust programmers use unsafe code and, in particular, whether the Rust hypothesis holds is essential for Rust developers and testers, language and library designers, as well as tool developers. This paper studies empirically how unsafe code is used in practice by analysing a large corpus of Rust projects to assess the validity of the Rust hypothesis and to classify the purpose of unsafe code. We identify queries that can be answered by automatically inspecting the program’s source code, its intermediate representation MIR, as well as type information provided by the Rust compiler; we complement the results by manual code inspection. Our study supports the Rust hypothesis partially: While most unsafe code is simple and well-encapsulated, unsafe features are used extensively, especially for interoperability with other languages. Artefact This artefact contains both a virtual machine with a framework we used to do the analysis called Qrates and the data itself. You can find the instructions in the README.md file. If you are interested in building on top of our research results, you can find the latest version of Qrates in our GitHub repository: https://github.com/rust-corpus/qrates/.

Fetched live from OpenAlex and de-inverted. Abstracts are not stored in this database: the inverted indexes are 8.6 GB of the frame’s 9.3 GB of text, and the host has 13 GB free.

How this classification was reachedexpand

Full frame machine prediction

Teacher imitation

Not calibrated prevalence, not ground truth. Human validation pending. The Gemma side is a direct model label for every work in the frame, read from the title-only record. The Codex side is a classifier learned from the 10,348 direct Codex labels and calibrated to design-weighted sample rates; fields without enough sample support carry no Codex call. Candidate is the union of the two sides; consensus is their intersection. These outputs are machine_predicted_unvalidated and are not human labels.

metaresearch head score (Codex)0.008
metaresearch head score (Gemma)0.033
Version: metacan-v3-hybrid-931329e0061cValidation status: machine_predicted_unvalidated
Candidate categoriesnone
Consensus categoriesnone
DomainCandidate signal: none · Consensus signal: none
Study designCandidate signal: Not applicable · Consensus signal: none
GenreCandidate signal: Software · Consensus signal: none
Teacher disagreement score0.008
Threshold uncertainty score0.043

Distilled classifier scores by category (both heads)

CategoryCodexGemma
Metaresearch0.0080.033
Meta-epidemiology (narrow)0.0010.001
Meta-epidemiology (broad)0.0000.001
Bibliometrics0.0020.001
Science and technology studies0.0020.004
Scholarly communication0.0040.004
Open science0.0010.004
Research integrity0.0030.003
Insufficient payload (model declined to judge)0.0080.003

Machine scores (provisional)

The two teacher heads of the student model, read on this work. A score orders the frame for review; it never asserts a category, and the validation status ships verbatim with every row.

Baseline scores from an immature model (maturity gate not passed, 7 training rounds). Scores rank; they never assert a category.

Opus teacher head0.050
GPT teacher head0.259
Teacher spread0.209 · how far apart the two teachers sit on this one work
Validation statusscore_only:v0-immature-baseline · verbatim from the scoring run: score_only means the number may rank works, and no category label ships from it

Classification

machine, unvalidated

Machine predicted; a candidate call from one source (direct Gemma or distilled Codex), not a consensus.

The models applied no category: nothing in the taxonomy fit this work.
Study designNot applicable
Domainnot available
GenreSoftware

How this classification was reached, model by model and score by score, is at the end of the page under "How this classification was reached".

Quick stats

Citations0
Published2020
Admission routes1
Has abstractyes

Explore more

Same venueZenodo (CERN European Organization for Nuclear Research)Same topicPrenatal Screening and DiagnosticsFrench-language works237,207