Bosque Programming Language

Bosque Programming Language

Established: April 15, 2019


News & features

The Bosque Project is intended as a open and inclusive endeavor. Our  goals are  producing intellectual research impact and open-source artifacts that are useful both standalone and that bring value to the wider community. Thus, Bosque is run as an open project, with both code and papers, hosted on GitHub.

We also want to highlight a number of projects that we are actively working (or planning) on integration with:

  • The Morphir framework from Morgan Stanley is a multi-language system for building high-reliability services with and emphasis turning business logic into well structured and reliable systems. We are starting work to add Bosque as a language to support their vision and enable the development of web services in Bosque.
  •  Ambrosia is a Microsoft Research project into building high resiliency applications using novel ultra-low overhead serialization, logging, and recovery protocols. Many of the features of Bosque, such a full determinization and limited native I/O, make it an ideal language for integration with Ambrosia.
  • F* and HACL* are projects from Microsoft Research into verified programming and high assurance cryptography. In the longer term we believe implementing our trusted core libraries in F* is possible (and have done some prototype work) and in the short term we are working to use verified implementations, from HACL*, for Bosque’s cryptographic functionality.

This project welcomes contributions including, issues, comments, pull requests and research based on or enhancing the Bosque language.

News & features

News & features


The Bosque Project

The Bosque Programming Language project is a ground up language & tooling co-design effort focused on is investigating the theoretical and the practical implications of:

  1. Explicitly designing a code intermediate representation language (or bytecode) that enables deep automated code reasoning and the deployment of next-generation development tools, compilers, and runtime systems.
  2. Leveraging the power of the intermediate representation to provide a programming language that is both easily accessible to modern developers and that provides a rich set of useful language features for developing high reliability & high performance applications.
  3. Taking a cloud-development first perspective on programming to address emerging challenges as we move into a distributed cloud development model based around microservices, serverless, and RESTful architectures.

The Role of Intermediate Representations

Compiler intermediate representations (IRs) are traditionally thought of, and designed with, a specific source language (or languages) in mind. Their historical use has primarily been as an intermediate step in the process of lowering a source language program, with all of the associated syntactic sugar, into a final executable binary. However, over time they have become increasingly important in supporting program analysis and IDE tooling tasks. In these scenarios choices which were did not matter in the context of the compilation workflow can have major negative impacts.

In the Bosque project we ask the question of what happens if the IR is designed explicitly to support the rich needs of automated code reasoning, IDE tooling, etc. With this novel IR first perspective we are exploring a new way to think about and build a language intermediate representation and tools that utilize it. Our initial experiments show that this empowers a range of next-generation experiences including symbolic-testing, enhanced fuzzing, soft-realtime compilation with stable GC support, API auto-marshaling, and more!

Regularized Programming

Many features that make the Bosque IR amenable for automated reasoning involve simplifying and removing sources of irregularity in the semantics. These regularizations also simplify the task of understanding and writing code for the human developer. Inspired by this idea the Bosque project is building a new regularized programming language that takes advantage of the features of the IR.

Bosque Calculator Sample Code

Bosque Calculator Sample Code

The Bosque Programming Language builds on the strengths of classical Functional Programming,  modern TypeScript/Node.js, and the power of the new IR. The result is a language that simultaneously supports the kind of high productivity development experience available to modern developers while also providing a resource efficient and predictable runtime, scaling from small IoT up to heavily loaded cloud services. In addition to bringing all the expressive power expected from a modern language, the Bosque language also introduces several novel features like Typed Strings and API Types, that directly address challenges faced by developers working in a distributed cloud based world.

Cloud First Development

The move into cloud based development, with architectures based around microservices, serverless functions, and RESTful APIs, brings new challenges for development. In this environment an program may interoperate with many other (remote) services which are maintained by different teams (and maybe implemented in different languages). This forces APIs to use least-common denominator types for interop and creates the need for extensive serialize/deserialize/validate logic. Further, issues like cold-service startups, 95% response times, resiliency and diagnostics, all become critical but have not been design considerations in most traditional languages.

The Bosque project takes a cloud and IoT first view of programming languages. Thus, it includes features like API Types to simplify the construction and deployment of REST style APIs. Application initialization design provides 0-cost loading for lighting fast (cold) startup. Choices like fully determinized language semantics, keys and ordering, and memory behavior result in a runtime with minimal performance variability and enable ultra-low overhead tracing.

Powering Programming 2.0

An overarching theme of the Bosque project is increasing the ability of automated tools to reason about and transform code. This mechanization is a foundational part of unlocking the future of using AI and Synthesis in the development pipeline. The ability to mechanically reason about the semantics of a program via symbolic means is a key enabler to synthesizing novel and useful code components using examples or conditions. Bosque’s fully determinized and loop free design can also help facilitate the development and application of automated program differentiation. These are open problems but, just as we saw how Bosque unlocks value in classical tooling/compilation scenarios, we are excited to see what it can do to power the AI and Synthesis programming revolution.

Get Involved

To simplify collaboration with other researchers and the wider developer community this project is setup around an open-source (MIT) licensed GitHub repository. This project welcomes community contributions including, issues, comments, pull requests and research based on or enhancing the Bosque language.

Register for the upcoming webinar >