David Menendez
· Assistant ProfessorUniversity of California, Santa Cruz · Psychology
Active 2012–2024
About
Professor David Menendez is an assistant professor of Psychology at the University of California-Santa Cruz, where he also directs the CRECE lab. His research interests lie at the intersection of cognition, education, and child development. He is an interdisciplinary scholar exploring how children learn scientific and social concepts, how visual representations influence learning and generalization, and how culture and socialization practices impact cognitive development. His work includes examining how participation in cultural rituals like Dia de los Muertos shapes children’s understanding of death, how teachers discuss the pandemic with children in different countries, and how various communities within the United States perceive illness. Professor Menendez’s research aims to understand the processes underlying conceptual development and the influence of cultural and social factors on children's learning.
Research topics
- Computer Science
- Programming language
- Mathematics
- Mathematics education
Selected publications
Do the Details of Diagrams Influence How Far Students Generalize? (Poster 20)
Proceedings of the 2019 AERA Annual Meeting · 2024
1st authorCorresponding- Computer Science
- Computer Science
- Programming language
Do the Details of Diagrams Influence How Far Students Generalize? (Poster 20)
Aera · 2024
1st authorCorresponding- Computer Science
- Computer Science
- Mathematics education
Practical verification of peephole optimizations with Alive
Communications of the ACM · 2018-01-23 · 24 citations
articleCompilers should not miscompile. Peephole optimizations, which perform local rewriting of the input program to improve the efficiency of generated code, are a persistent source of compiler bugs. We created Alive, a domain-specific language for writing optimizations and for automatically either proving them correct or else generating counterexamples. Furthermore, Alive can be automatically translated into C++ code that is suitable for inclusion in an LLVM optimization pass. Alive is based on an attempt to balance usability and formal methods; for example, it captures---but largely hides---the detailed semantics of the various kinds of undefined behavior. Alive has found numerous bugs in the LLVM compiler and is being used by LLVM developers.
Practical formal techniques and tools for developing LLVM’s peephole optimizations
2018-01-01 · 4 citations
articleOpen access1st authorCorrespondingModern compilers perform extensive transformation of code in order to optimize run- ning time and binary code size. These occur in multiple passes, including translations between representations at different levels of abstraction and transformations which re- structure code within a particular representation. Of particular interest are optimiza- tions that operate on a compiler’s intermediate representation (IR), as these can be shared across programming languages and hardware architectures. One such optimiza- tion pass is LLVM’s peephole optimizer, which is a suite of hundreds of small algebraic transformations which simplify code and perform canonicalization. Performing these transformations not only results in faster software, but simplifies other optimization passes by reducing the number of equivalent forms they must consider. It is essential that these optimizations preserve the semantics of input programs. Even a small transformation which changes the value computed by a code fragment or introduces undefined behavior can result in executable programs with incorrect or unpredictable behavior. Optimizations, and analysis of optimizations, must be partic- ularly careful when treating undefined behavior, as modern compilers increasingly use the knowledge that certain operations are undefined in order to streamline or eliminate ii code—occasionally in ways that are surprising to compiler users. Unfortunately, com- piler developers can also overlook undefined behavior or fail to consider rare edge cases, resulting in incorrect transformations. In particular, LLVM’s peephole optimizer has historically been one of the buggier parts of LLVM. To aid the development of correct peephole transformations in LLVM, we introduce Alive, a domain-specific language for specifying such transformations. Selecting a small yet expressive subset of LLVM IR allows for automated verification of Alive transforma- tions, and the Alive toolkit can generate an implementation of a correct transformation suitable for inclusion in LLVM. The correctness checks for Alive consider the various forms of undefined behavior defined by LLVM and ensure that transformations do not change the meaning of a program. Alive specifications can include a mixture of inte- ger and floating-point operations, and transformations can be generalized over different types. Some transformations require a precondition in order to be correct. These precon- ditions may be simple, but occasionally it is challenging to find a precondition that is sufficiently strong while remaining widely applicable. To assist in this process, the Alive toolkit includes Alive-Infer, a data-driven method for synthesizing preconditions. Depending on the complexity of the transformation, the weakest precondition sufficient to make a transformation correct may not be desirable, so Alive-Infer can provide a choice of concise but stronger preconditions. The Alive-Infer method automatically finds positive and negative examples to guide inference and finds useful predicates through enumeration. Finally, specifying transformations in Alive enables analyses of multiple transfor- mations and their interaction. It is possible to have transformations or sequences of transformations which can be applied indefinitely to a finite input. This dissertation presents a method for testing whether such a sequence can be applied indefinitely to some input. Alive demonstrates that a properly chosen abstraction can provide the benefits of formal code verification without the need for manually written proofs, and can enable new techniques and analyses to assist development.
Alive-Infer: data-driven precondition inference for peephole optimizations in LLVM
2017-06-14 · 15 citations
articleOpen access1st authorCorrespondingPeephole optimizations are a common source of compiler bugs. Compiler developers typically transform an incorrect peephole optimization into a valid one by strengthening the precondition. This process is challenging and tedious. This paper proposes ALIVE-INFER, a data-driven approach that infers preconditions for peephole optimizations expressed in Alive. ALIVE-INFER generates positive and negative examples for an optimization, enumerates predicates ondemand, and learns a set of predicates that separate the positive and negative examples. ALIVE-INFER repeats this process until it finds a precondition that ensures the validity of the optimization. ALIVE-INFER reports both a weakest precondition and a set of succinct partial preconditions to the developer. Our prototype generates preconditions that are weaker than LLVM's preconditions for 73 optimizations in the Alive suite. We also demonstrate the applicability of this technique to generalize 54 optimization patterns generated by Souper, an LLVM IR-based superoptimizer.
Alive-Infer: data-driven precondition inference for peephole optimizations in LLVM
ACM SIGPLAN Notices · 2017-06-14 · 6 citations
article1st authorCorrespondingPeephole optimizations are a common source of compiler bugs. Compiler developers typically transform an incorrect peephole optimization into a valid one by strengthening the precondition. This process is challenging and tedious. This paper proposes Alive-Infer, a data-driven approach that infers preconditions for peephole optimizations expressed in Alive. Alive-Infer generates positive and negative examples for an optimization, enumerates predicates on-demand, and learns a set of predicates that separate the positive and negative examples. Alive-Infer repeats this process until it finds a precondition that ensures the validity of the optimization. Alive-Infer reports both a weakest precondition and a set of succinct partial preconditions to the developer. Our prototype generates preconditions that are weaker than LLVM’s preconditions for 73 optimizations in the Alive suite. We also demonstrate the applicability of this technique to generalize 54 optimization patterns generated by Souper, an LLVM IR–based superoptimizer.
Alive-FP: Automated Verification of Floating Point Based Peephole Optimizations in LLVM
Lecture notes in computer science · 2016-01-01 · 25 citations
book-chapter1st authorCorrespondingPrecondition Inference for Peephole Optimizations in LLVM
arXiv (Cornell University) · 2016-11-18 · 1 citations
preprintOpen access1st authorCorrespondingPeephole optimizations are a common source of compiler bugs. Compiler developers typically transform an incorrect peephole optimization into a valid one by strengthening the precondition. This process is challenging and tedious. This paper proposes ALIVE-INFER, a data-driven approach that infers preconditions for peephole optimizations expressed in Alive. ALIVE-INFER generates positive and negative examples for an optimization, enumerates predicates on-demand, and learns a set of predicates that separate the positive and negative examples. ALIVE-INFER repeats this process until it finds a precondition that ensures the validity of the optimization. ALIVE-INFER reports both a weakest precondition and a set of succinct partial preconditions to the developer. Our prototype generates preconditions that are weaker than LLVM's preconditions for 73 optimizations in the Alive suite. We also demonstrate the applicability of this technique to generalize 54 optimization patterns generated by Souper, an LLVM~IR--based superoptimizer.
Termination-checking for LLVM peephole optimizations
2016-05-13 · 12 citations
articleOpen access1st authorCorrespondingMainstream compilers contain a large number of peephole optimizations, which perform algebraic simplification of the input program with local rewriting of the code. These optimizations are a persistent source of bugs. Our recent research on Alive, a domain-specific language for expressing peephole optimizations in LLVM, addresses a part of the problem by automatically verifying the correctness of these optimizations and generating C++ code for use with LLVM.
Provably correct peephole optimizations with alive
ACM SIGPLAN Notices · 2015-06-03 · 19 citations
articleCompilers should not miscompile. Our work addresses problems in developing peephole optimizations that perform local rewriting to improve the efficiency of LLVM code. These optimizations are individually difficult to get right, particularly in the presence of undefined behavior; taken together they represent a persistent source of bugs. This paper presents Alive, a domain-specific language for writing optimizations and for automatically either proving them correct or else generating counterexamples. Furthermore, Alive can be automatically translated into C++ code that is suitable for inclusion in an LLVM optimization pass. Alive is based on an attempt to balance usability and formal methods; for example, it captures---but largely hides---the detailed semantics of three different kinds of undefined behavior in LLVM. We have translated more than 300 LLVM optimizations into Alive and, in the process, found that eight of them were wrong.
Frequent coauthors
- 8 shared
Santosh Nagarakatte
Rutgers, The State University of New Jersey
- 3 shared
Nuno P. Lopes
Instituto de Engenharia de Sistemas e Computadores Investigação e Desenvolvimento
- 3 shared
John Regehr
University of Utah
- 2 shared
Iraj Kalantari
Western Illinois University
- 2 shared
Bahman Kalantari
Rutgers, The State University of New Jersey
- 2 shared
Ross S. Berkowitz
Harvard University
- 1 shared
Aarti Gupta
- Resume-aware match score
- Save to shortlist
- AI-drafted outreach
See your match with David Menendez
PhdFit ranks faculty by your research interests, methods, and publications — grounded in their actual work, not templates.
- Free to start
- No credit card
- 30-second signup