Skip to main content

Showing 1–28 of 28 results for author: Jhala, R

.
  1. arXiv:2405.16792  [pdf, other

    cs.LO cs.AI

    Laurel: Generating Dafny Assertions Using Large Language Models

    Authors: Eric Mugnier, Emmanuel Anaya Gonzalez, Ranjit Jhala, Nadia Polikarpova, Yuanyuan Zhou

    Abstract: Dafny is a popular verification language, which automates proofs by outsourcing them to an SMT solver. This automation is not perfect, however, and the solver often requires guidance in the form of helper assertions creating a burden for the proof engineer. In this paper, we propose Laurel, a tool that uses large language models (LLMs) to automatically generate helper assertions for Dafny programs… ▽ More

    Submitted 26 May, 2024; originally announced May 2024.

    Comments: 10 pages, under review

  2. arXiv:2311.05831  [pdf, other

    cs.CR

    Robust Constant-Time Cryptography

    Authors: Matthew Kolosick, Basavesh Ammanaghatta Shivakumar, Sunjay Cauligi, Marco Patrignani, Marco Vassena, Ranjit Jhala, Deian Stefan

    Abstract: The constant-time property is considered the security standard for cryptographic code. Code following the constant-time discipline is free from secret-dependent branches and memory accesses, and thus avoids leaking secrets through cache and timing side-channels. The constant-time property makes a number of implicit assumptions that are fundamentally at odds with the reality of cryptographic code.… ▽ More

    Submitted 9 November, 2023; originally announced November 2023.

  3. arXiv:2207.05617  [pdf, ps, other

    cs.PL

    Mechanizing Refinement Types (extended)

    Authors: Michael Borkowski, Niki Vazou, Ranjit Jhala

    Abstract: Practical checkers based on refinement types use the combination of implicit semantic sub-ty** and parametric polymorphism to simplify the specification and automate the verification of sophisticated properties of programs. However, a formal meta-theoretic accounting of the soundness of refinement type systems using this combination has proved elusive. We present λ_RF a core refinement calculus… ▽ More

    Submitted 12 July, 2022; originally announced July 2022.

    Comments: 32 pages, under review

    ACM Class: F.3.1; D.3.1

  4. arXiv:2207.04034  [pdf, ps, other

    cs.PL

    Flux: Liquid Types for Rust

    Authors: Nico Lehmann, Adam Geller, Niki Vazou, Ranjit Jhala

    Abstract: We introduce Flux, which shows how logical refinements can work hand in glove with Rust's ownership mechanisms to yield ergonomic type-based verification of low-level pointer manipulating programs. First, we design a novel refined type system for Rust that indexes mutable locations, with pure (immutable) values that can appear in refinements, and then exploits Rust's ownership mechanisms to abstra… ▽ More

    Submitted 14 November, 2022; v1 submitted 8 July, 2022; originally announced July 2022.

    ACM Class: F.3.1; D.2.4

  5. arXiv:2105.01954  [pdf, other

    cs.PL

    Refinements of Futures Past: Higher-Order Specification with Implicit Refinement Types (Extended Version)

    Authors: Anish Tondwalkar, Matthew Kolosick, Ranjit Jhala

    Abstract: Refinement types decorate types with assertions that enable automatic verification. Like assertions, refinements are limited to binders that are in scope, and hence, cannot express higher-order specifications. Ghost variables circumvent this limitation but are prohibitively tedious to use as the programmer must divine and explicate their values at all call-sites. We introduce Implicit Refinement T… ▽ More

    Submitted 5 May, 2021; originally announced May 2021.

    Comments: To appear at the 35th European Conference on Object-Oriented Programming (ECOOP 2021) Artifact available at: https://github.com/ucsd-progsys/mist/tree/ecoop21

    ACM Class: F.3.1; F.3.3

  6. Isolation Without Taxation: Near Zero Cost Transitions for SFI

    Authors: Matthew Kolosick, Shravan Narayan, Evan Johnson, Conrad Watt, Michael LeMay, Deepak Garg, Ranjit Jhala, Deian Stefan

    Abstract: Software sandboxing or software-based fault isolation (SFI) is a lightweight approach to building secure systems out of untrusted components. Mozilla, for example, uses SFI to harden the Firefox browser by sandboxing third-party libraries, and companies like Fastly and Cloudflare use SFI to safely co-locate untrusted tenants on their edge clouds. While there have been significant efforts to optimi… ▽ More

    Submitted 18 November, 2021; v1 submitted 30 April, 2021; originally announced May 2021.

  7. arXiv:2104.00461  [pdf, ps, other

    cs.CR cs.PL

    Solver-Aided Constant-Time Circuit Verification

    Authors: Rami Gokhan Kici, Klaus v. Gleissenthall, Deian Stefan, Ranjit Jhala

    Abstract: We present Xenon, a solver-aided method for formally verifying that Verilog hardware executes in constant-time. Xenon scales to realistic hardware designs by drastically reducing the effort needed to localize the root cause of verification failures via a new notion of constant-time counterexamples, which Xenon uses to automatically synthesize a minimal set of secrecy assumptions. Xenon further exp… ▽ More

    Submitted 1 April, 2021; originally announced April 2021.

  8. arXiv:2010.07763  [pdf, ps, other

    cs.PL cs.LO cs.SE

    Refinement Types: A Tutorial

    Authors: Ranjit Jhala, Niki Vazou

    Abstract: Refinement types enrich a language's type system with logical predicates that circumscribe the set of values described by the type, thereby providing software developers a tunable knob with which to inform the type system about what invariants and correctness properties should be checked on their code. In this article, we distill the ideas developed in the substantial literature on refinement type… ▽ More

    Submitted 15 October, 2020; originally announced October 2020.

  9. Automatically Eliminating Speculative Leaks from Cryptographic Code with Blade

    Authors: Marco Vassena, Craig Disselkoen, Klaus V. Gleissenthall, Sunjay Cauligi, Rami Gökhan Kici, Ranjit Jhala, Dean Tullsen, Deian Stefan

    Abstract: We introduce BLADE, a new approach to automatically and efficiently eliminate speculative leaks from cryptographic code. BLADE is built on the insight that to stop leaks via speculation, it suffices to $\textit{cut}$ the dataflow from expressions that speculatively introduce secrets ($\textit{sources}$) to those that leak them through the cache ($\textit{sinks}$), rather than prohibit speculation… ▽ More

    Submitted 7 December, 2020; v1 submitted 1 May, 2020; originally announced May 2020.

  10. Program Synthesis by Type-Guided Abstraction Refinement

    Authors: Zheng Guo, Michael James, David Justo, Jiaxiao Zhou, Ziteng Wang, Ranjit Jhala, Nadia Polikarpova

    Abstract: We consider the problem of type-directed component based synthesis where, given a set of (typed) components and a query type, the goal is to synthesize a term that inhabits the query. Classical approaches based on proof search in intuitionistic logics do not scale up to the standard libraries of modern languages, which span hundreds or thousands of components. Recent graph reachability based metho… ▽ More

    Submitted 11 November, 2019; originally announced November 2019.

  11. arXiv:1910.03111  [pdf, other

    cs.CR

    Iodine: Verifying Constant-Time Execution of Hardware

    Authors: Klaus v. Gleissenthall, Rami Gökhan Kıcı, Deian Stefan, Ranjit Jhala

    Abstract: To be secure, cryptographic algorithms crucially rely on the underlying hardware to avoid inadvertent leakage of secrets through timing side channels. Unfortunately, such timing channels are ubiquitous in modern hardware, due to its labyrinthine fast-paths and optimizations. A promising way to avoid timing vulnerabilities is to devise --- and verify --- conditions under which a hardware design is… ▽ More

    Submitted 7 October, 2019; originally announced October 2019.

    Journal ref: USENIX Security Symposium 2019: 1411-1428

  12. arXiv:1711.03842  [pdf, other

    cs.PL cs.LO

    Refinement Reflection: Complete Verification with SMT

    Authors: Niki Vazou, Anish Tondwalkar, Vikraman Choudhury, Ryan G. Scott, Ryan R. Newton, Philip Wadler, Ranjit Jhala

    Abstract: We introduce Refinement Reflection, a new framework for building SMT-based deductive verifiers. The key idea is to reflect the code implementing a user-defined function into the function's (output) refinement type. As a consequence, at uses of the function, the function definition is instantiated in the SMT logic in a precise fashion that permits decidable verification. Reflection allows the user… ▽ More

    Submitted 9 November, 2017; originally announced November 2017.

    Comments: 29 pages plus appendices, to appear in POPL 2018. arXiv admin note: text overlap with arXiv:1610.04641

  13. Learning to Blame: Localizing Novice Type Errors with Data-Driven Diagnosis

    Authors: Eric L. Seidel, Huma Sibghat, Kamalika Chaudhuri, Westley Weimer, Ranjit Jhala

    Abstract: Localizing type errors is challenging in languages with global type inference, as the type checker must make assumptions about what the programmer intended to do. We introduce Nate, a data-driven approach to error localization based on supervised learning. Nate analyzes a large corpus of training data -- pairs of ill-typed programs and their "fixed" versions -- to automatically learn a model of wh… ▽ More

    Submitted 17 September, 2017; v1 submitted 24 August, 2017; originally announced August 2017.

    Comments: OOPSLA '17

  14. arXiv:1708.02328  [pdf, ps, other

    cs.PL cs.LO

    Deriving Law-Abiding Instances

    Authors: Ryan Scott, Vikraman Choudhury, Ryan Newton, Niki Vazou, Ranjit Jhala

    Abstract: Liquid Haskell's refinement-reflection feature augments the Haskell language with theorem proving capabilities, allowing programmers to retrofit their existing code with proofs. But many of these proofs require routine, boilerplate code that is tedious to write. Moreover, many such proofs do not scale well, as the size of proof terms can grow superlinearly with the size of the datatypes involved i… ▽ More

    Submitted 7 August, 2017; originally announced August 2017.

    ACM Class: D.3.2; D.1.1

  15. arXiv:1706.08007  [pdf, other

    cs.PL

    Local Refinement Ty**

    Authors: Benjamin Cosman, Ranjit Jhala

    Abstract: We introduce the Fusion algorithm for local refinement type inference, yielding a new SMT-based method for verifying programs with polymorphic data types and higher-order functions. Fusion is concise as the programmer need only write signatures for (externally exported) top-level functions and places with cyclic (recursive) dependencies, after which Fusion can predictably synthesize the most preci… ▽ More

    Submitted 24 June, 2017; originally announced June 2017.

  16. arXiv:1610.04641  [pdf, ps, other

    cs.PL cs.LO

    Refinement Reflection (or, how to turn your favorite language into a proof assistant using SMT)

    Authors: Niki Vazou, Ranjit Jhala

    Abstract: Refinement Reflection turns your favorite programming language into a proof assistant by reflecting the code implementing a user-defined function into the function's (output) refinement type. As a consequence, at uses of the function, the function definition is unfolded into the refinement logic in a precise, predictable and most importantly, programmer controllable way. In the logic, we encode fu… ▽ More

    Submitted 14 October, 2016; originally announced October 2016.

  17. arXiv:1606.07557  [pdf, other

    cs.PL

    Dynamic Witnesses for Static Type Errors (or, Ill-Typed Programs Usually Go Wrong)

    Authors: Eric L Seidel, Ranjit Jhala, Westley Weimer

    Abstract: Static type errors are a common stumbling block for newcomers to typed functional languages. We present a dynamic approach to explaining type errors by generating counterexample witness inputs that illustrate how an ill-typed program goes wrong. First, given an ill-typed function, we symbolically execute the body to synthesize witness values that make the program go wrong. We prove that our proced… ▽ More

    Submitted 18 March, 2018; v1 submitted 23 June, 2016; originally announced June 2016.

    Comments: to appear in JFP

    ACM Class: D.3.2; D.3.4; F.3.3

  18. arXiv:1604.02480  [pdf, ps, other

    cs.PL

    Refinement Types for TypeScript

    Authors: Panagiotis Vekris, Benjamin Cosman, Ranjit Jhala

    Abstract: We present Refined TypeScript (RSC), a lightweight refinement type system for TypeScript, that enables static verification of higher-order, imperative programs. We develop a formal core of RSC that delineates the interaction between refinement types and mutability. Next, we extend the core to account for the imperative and dynamic features of TypeScript. Finally, we evaluate RSC on a set of real w… ▽ More

    Submitted 8 April, 2016; originally announced April 2016.

  19. arXiv:1507.00385  [pdf, ps, other

    cs.PL cs.SE

    Bounded Refinement Types

    Authors: Niki Vazou, Alexander Bakst, Ranjit Jhala

    Abstract: We present a notion of bounded quantification for refinement types and show how it expands the expressiveness of refinement ty** by using it to develop typed combinators for: (1) relational algebra and safe database access, (2) Floyd-Hoare logic within a state transformer monad equipped with combinators for branching and loo**, and (3) using the above to implement a refined IO monad that track… ▽ More

    Submitted 1 July, 2015; originally announced July 2015.

    Comments: 14 pages, International Conference on Functional Programming, ICFP 2015

    ACM Class: D.2.4; D.3.3; F.3.1

  20. arXiv:1505.02298  [pdf, ps, other

    cs.PL

    Predicate Abstraction for Linked Data Structures

    Authors: Alexander Bakst, Ranjit Jhala

    Abstract: We present Alias Refinement Types (ART), a new approach to the verification of correctness properties of linked data structures. While there are many techniques for checking that a heap-manipulating program adheres to its specification, they often require that the programmer annotate the behavior of each procedure, for example, in the form of loop invariants and pre- and post-conditions. Predicate… ▽ More

    Submitted 31 October, 2015; v1 submitted 9 May, 2015; originally announced May 2015.

  21. arXiv:1504.08039  [pdf, other

    cs.PL

    Trust, but Verify: Two-Phase Ty** for Dynamic Languages

    Authors: Panagiotis Vekris, Benjamin Cosman, Ranjit Jhala

    Abstract: A key challenge when statically ty** so-called dynamic languages is the ubiquity of value-based overloading, where a given function can dynamically reflect upon and behave according to the types of its arguments. Thus, to establish basic types, the analysis must reason precisely about values, but in the presence of higher-order functions and polymorphism, this reasoning itself can require basic… ▽ More

    Submitted 29 April, 2015; originally announced April 2015.

  22. Type Targeted Testing

    Authors: Eric L. Seidel, Niki Vazou, Ranjit Jhala

    Abstract: We present a new technique called type targeted testing, which translates precise refinement types into comprehensive test-suites. The key insight behind our approach is that through the lens of SMT solvers, refinement types can also be viewed as a high-level, declarative, test generation technique, wherein types are converted to SMT queries whose models can be decoded into concrete program inputs… ▽ More

    Submitted 15 January, 2015; v1 submitted 20 October, 2014; originally announced October 2014.

  23. arXiv:1401.6227  [pdf, ps, other

    cs.PL

    From Safety To Termination And Back: SMT-Based Verification For Lazy Languages

    Authors: Niki Vazou, Eric L. Seidel, Ranjit Jhala

    Abstract: SMT-based verifiers have long been an effective means of ensuring safety properties of programs. While these techniques are well understood, we show that they implicitly require eager semantics; directly applying them to a lazy language is unsound due to the presence of divergent sub-computations. We recover soundness by composing the safety analysis with a termination analysis. Of course, termina… ▽ More

    Submitted 23 January, 2014; originally announced January 2014.

  24. arXiv:1207.1373  [pdf

    cs.AI cs.GT

    Counterexample-guided Planning

    Authors: Krishnendu Chatterjee, Thomas A. Henzinger, Ranjit Jhala, Rupak Majumdar

    Abstract: Planning in adversarial and uncertain environments can be modeled as the problem of devising strategies in stochastic perfect information games. These games are generalizations of Markov decision processes (MDPs): there are two (adversarial) players, and a source of randomness. The main practical obstacle to computing winning strategies in such games is the size of the state space. In practice the… ▽ More

    Submitted 4 July, 2012; originally announced July 2012.

    Comments: Appears in Proceedings of the Twenty-First Conference on Uncertainty in Artificial Intelligence (UAI2005)

    Report number: UAI-P-2005-PG-104-111

  25. arXiv:1112.4106  [pdf, ps, other

    cs.PL

    Dependent Types for JavaScript

    Authors: Ravi Chugh, David Herman, Ranjit Jhala

    Abstract: We present Dependent JavaScript (DJS), a statically-typed dialect of the imperative, object-oriented, dynamic language. DJS supports the particularly challenging features such as run-time type-tests, higher-order functions, extensible objects, prototype inheritance, and arrays through a combination of nested refinement types, strong updates to the heap, and heap unrolling to precisely track protot… ▽ More

    Submitted 1 August, 2012; v1 submitted 17 December, 2011; originally announced December 2011.

  26. arXiv:1103.5055  [pdf, ps, other

    cs.PL

    Nested Refinements for Dynamic Languages

    Authors: Ravi Chugh, Patrick M. Rondon, Ranjit Jhala

    Abstract: Programs written in dynamic languages make heavy use of features --- run-time type tests, value-indexed dictionaries, polymorphism, and higher-order functions --- that are beyond the reach of type systems that employ either purely syntactic or purely semantic reasoning. We present a core calculus, System D, that merges these two modes of reasoning into a single powerful mechanism of nested refinem… ▽ More

    Submitted 15 September, 2011; v1 submitted 25 March, 2011; originally announced March 2011.

  27. arXiv:1004.2884  [pdf, ps, other

    cs.PL cs.LO

    HMC: Verifying Functional Programs Using Abstract Interpreters

    Authors: Ranjit Jhala, Rupak Majumdar, Andrey Rybalchenko

    Abstract: We present Hindley-Milner-Cousots (HMC), an algorithm that allows any interprocedural analysis for first-order imperative programs to be used to verify safety properties of typed higher-order functional programs. HMC works as follows. First, it uses the type structure of the functional program to generate a set of logical refinement constraints whose satisfaction implies the safety of the source p… ▽ More

    Submitted 30 December, 2010; v1 submitted 16 April, 2010; originally announced April 2010.

    Comments: 12 pages

  28. arXiv:0706.0523  [pdf, ps, other

    cs.LO cs.PL cs.SE

    Interpolant-Based Transition Relation Approximation

    Authors: Ranjit Jhala, Kenneth L. McMillan

    Abstract: In predicate abstraction, exact image computation is problematic, requiring in the worst case an exponential number of calls to a decision procedure. For this reason, software model checkers typically use a weak approximation of the image. This can result in a failure to prove a property, even given an adequate set of predicates. We present an interpolant-based method for strengthening the abstr… ▽ More

    Submitted 1 November, 2007; v1 submitted 4 June, 2007; originally announced June 2007.

    Comments: Conference Version at CAV 2005. 17 Pages, 9 Figures

    ACM Class: D.2.4; F.3.1

    Journal ref: Logical Methods in Computer Science, Volume 3, Issue 4 (November 1, 2007) lmcs:1152