Primrose: Selecting Container Data Types by their Properties

05/19/2022
by   Xueying Qin, et al.
0

Container data types are ubiquitous in computer programming, enabling developers to efficiently store and process collections of data with an easy-to-use programming interface. Many programming languages offer a variety of container implementations in their standard libraries based on data structures offering different capabilities and performance characteristics. Choosing the best container for an application is not straightforward, as performance characteristics can change drastically in different scenarios, and real-world performance is not always correlated to theoretical complexity. In this paper, we present Primrose, a language-agnostic tool for selecting the best performing valid container implementation from a set of container data types that satisfy the given properties. Semantic properties allow application developers to specify the expected behaviour of a container as a type refinement, e.g., if the container should only contain unique values (such as a set) or should satisfy the LIFO property of a stack. Semantic properties nicely complement syntactic properties (i.e., traits, interfaces, or type classes), allowing developers to specify a container's programming interface and behaviour without committing to a concrete implementation. Primrose automatically select the set of valid container implementations for which the library specifications, written by the developers of container libraries, satisfies the specified properties. Finally, Primrose ranks the valid library implementations based on their runtime performance. We present our prototype implementation of Primrose that preprocesses annotated Rust code, selecting the best performing container implementation. Primrose is easy to integrate in other programming languages. We encode properties and library specifications into verification conditions in a SMT solver to determine the set of valid container implementations.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/28/2023

Cesno: Possibility of Creating a New Programming Language

Programming languages are incredibly versatile, enabling developers to c...
research
07/24/2018

Racets: Faceted Execution in Racket

Faceted Execution is a linguistic paradigm for dynamic information-flow ...
research
10/30/2018

BCL: A Cross-Platform Distributed Container Library

One-sided communication is a useful paradigm for irregular parallel appl...
research
05/20/2022

Tower: Data Structures in Quantum Superposition

Emerging quantum algorithms for problems such as element distinctness, s...
research
03/22/2022

Quickstrom: Property Based Acceptance Testing with LTL Specifications

We present Quickstrom, a property-based testing system for acceptance te...
research
09/14/2022

Non-Functional Testing of Runtime Enforcers in Android

Runtime enforcers can be used to ensure that running applications satisf...
research
07/16/2016

Knowledge Representation on the Web revisited: Tools for Prototype Based Ontologies

In recent years RDF and OWL have become the most common knowledge repres...

Please sign up or login with your details

Forgot password? Click here to reset