{"id":579283,"date":"2019-04-15T20:20:29","date_gmt":"2019-04-16T03:20:29","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/research\/?post_type=msr-project&#038;p=579283"},"modified":"2020-11-12T13:46:33","modified_gmt":"2020-11-12T21:46:33","slug":"bosque-programming-language","status":"publish","type":"msr-project","link":"https:\/\/www.microsoft.com\/en-us\/research\/project\/bosque-programming-language\/","title":{"rendered":"Bosque Programming Language"},"content":{"rendered":"<h2>The Bosque Project<\/h2>\n<p>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:<\/p>\n<ol>\n<li>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.<\/li>\n<li>Leveraging the power of the intermediate representation to provide a programming language that is both easily accessible to modern developers <em>and<\/em> that provides a rich set of useful language features for developing high reliability & high performance applications.<\/li>\n<li>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.<\/li>\n<\/ol>\n<h3>The Role of Intermediate Representations<\/h3>\n<p>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.<\/p>\n<p>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 <a class=\"msr-external-link glyph-append glyph-append-open-in-new-tab glyph-append-xsmall\" rel=\"noopener noreferrer\" target=\"_blank\" href=\"https:\/\/github.com\/microsoft\/BosqueLanguage#tooling\">symbolic-testing<span class=\"sr-only\"> (opens in new tab)<\/span><\/a>, enhanced fuzzing, soft-realtime <a class=\"msr-external-link glyph-append glyph-append-open-in-new-tab glyph-append-xsmall\" rel=\"noopener noreferrer\" target=\"_blank\" href=\"https:\/\/github.com\/microsoft\/BosqueLanguage#tooling\">compilation with stable GC support<span class=\"sr-only\"> (opens in new tab)<\/span><\/a>, API auto-marshaling, and more!<\/p>\n<h3>Regularized Programming<\/h3>\n<p>Many features that make the Bosque IR amenable for automated reasoning involve simplifying and removing sources of irregularity in the semantics. These <em>regularizations<\/em> also simplify the task of understanding and writing code for the human developer. Inspired by this idea the Bosque project is building a new <a href=\"https:\/\/www.microsoft.com\/en-us\/research\/publication\/regularized-programming-with-the-bosque-language\/\"><em>regularized programming language<\/em><\/a> that takes advantage of the features of the IR.<\/p>\n<div id=\"attachment_654156\" style=\"width: 522px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-654156\" class=\"wp-image-654156\" src=\"https:\/\/www.microsoft.com\/en-us\/research\/wp-content\/uploads\/2019\/04\/bosque_code_sample.png\" alt=\"Bosque Calculator Sample Code\" width=\"512\" height=\"359\" srcset=\"https:\/\/www.microsoft.com\/en-us\/research\/wp-content\/uploads\/2019\/04\/bosque_code_sample.png 1022w, https:\/\/www.microsoft.com\/en-us\/research\/wp-content\/uploads\/2019\/04\/bosque_code_sample-300x210.png 300w, https:\/\/www.microsoft.com\/en-us\/research\/wp-content\/uploads\/2019\/04\/bosque_code_sample-768x538.png 768w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><p id=\"caption-attachment-654156\" class=\"wp-caption-text\">Bosque Calculator Sample Code<\/p><\/div>\n<p>The Bosque Programming Language builds on the strengths of classical Functional Programming,\u00a0 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 <a class=\"msr-external-link glyph-append glyph-append-open-in-new-tab glyph-append-xsmall\" rel=\"noopener noreferrer\" target=\"_blank\" href=\"https:\/\/github.com\/microsoft\/BosqueLanguage\/blob\/master\/docs\/language\/overview.md#0.5-Typed-Strings\"><em>Typed Strings<\/em><span class=\"sr-only\"> (opens in new tab)<\/span><\/a> and <a class=\"msr-external-link glyph-append glyph-append-open-in-new-tab glyph-append-xsmall\" rel=\"noopener noreferrer\" target=\"_blank\" href=\"https:\/\/github.com\/microsoft\/BosqueLanguage\/blob\/master\/docs\/language\/overview.md#0.15-API-Types\"><em>API Types<\/em><span class=\"sr-only\"> (opens in new tab)<\/span><\/a>, that directly address challenges faced by developers working in a distributed cloud based world.<\/p>\n<h3>Cloud First Development<\/h3>\n<p>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.<\/p>\n<p>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 <a class=\"msr-external-link glyph-append glyph-append-open-in-new-tab glyph-append-xsmall\" rel=\"noopener noreferrer\" target=\"_blank\" href=\"https:\/\/github.com\/microsoft\/BosqueLanguage\/blob\/master\/docs\/language\/overview.md#0.10-Determinacy\">fully determinized<span class=\"sr-only\"> (opens in new tab)<\/span><\/a> language semantics, <a class=\"msr-external-link glyph-append glyph-append-open-in-new-tab glyph-append-xsmall\" rel=\"noopener noreferrer\" target=\"_blank\" href=\"https:\/\/github.com\/microsoft\/BosqueLanguage\/blob\/master\/docs\/language\/overview.md#0.11-Equality-and-Representation\">keys and ordering<span class=\"sr-only\"> (opens in new tab)<\/span><\/a>, and memory behavior result in a runtime with minimal performance variability and enable ultra-low overhead tracing.<\/p>\n<h3>Powering Programming 2.0<\/h3>\n<p>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 <a href=\"https:\/\/www.microsoft.com\/en-us\/research\/publication\/program-verification-program-synthesis\/\">synthesizing<\/a> novel and useful code components using examples or conditions. Bosque&#8217;s fully determinized and loop free design can also help facilitate the development and application\u00a0of <a href=\"https:\/\/www.microsoft.com\/en-us\/research\/publication\/the-d-symbolic-differentiation-algorithm\/\">automated program differentiation<\/a>. 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.<\/p>\n<h2>Get Involved<\/h2>\n<p>To simplify collaboration with other researchers and the wider developer community this project is setup around an open-source (MIT) licensed GitHub <a class=\"msr-external-link glyph-append glyph-append-open-in-new-tab glyph-append-xsmall\" href=\"https:\/\/github.com\/Microsoft\/BosqueLanguage\" target=\"_blank\" rel=\"noopener noreferrer\">repository<span class=\"sr-only\"> (opens in new tab)<\/span><\/a>. This project welcomes community contributions including, issues, comments, pull requests and research based on or enhancing the Bosque language.<\/p>\n<p><a class=\"msr-external-link glyph-append glyph-append-open-in-new-tab glyph-append-xsmall\" href=\"https:\/\/note.microsoft.com\/MSR-Webinar-Programming-Languages-Bosque-Registration-Live.html?wt.mc_id=twitter_MSR-WBNR_post_v2\" target=\"_blank\" rel=\"noopener noreferrer\">Register for the upcoming webinar ><span class=\"sr-only\"> (opens in new tab)<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Bosque Programming Language project is investigating the implications of explicitly designing a program intermediate representation with the goal of supporting automated reasoning tools while simultaneously providing an accessible and agile surface programming language for developers.<\/p>\n","protected":false},"featured_media":655026,"template":"","meta":{"msr-url-field":"","msr-podcast-episode":"","msrModifiedDate":"","msrModifiedDateEnabled":false,"ep_exclude_from_search":false,"_classifai_error":"","footnotes":""},"research-area":[13560],"msr-locale":[268875],"msr-impact-theme":[],"msr-pillar":[],"class_list":["post-579283","msr-project","type-msr-project","status-publish","has-post-thumbnail","hentry","msr-research-area-programming-languages-software-engineering","msr-locale-en_us","msr-archive-status-active"],"msr_project_start":"2019-04-15","related-publications":[579268,764872,794180],"related-downloads":[],"related-videos":[748912],"related-groups":[144812],"related-events":[655146],"related-opportunities":[],"related-posts":[],"related-articles":[],"tab-content":[],"slides":[],"related-researchers":[],"msr_research_lab":[],"msr_impact_theme":[],"_links":{"self":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-project\/579283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-project"}],"about":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/types\/msr-project"}],"version-history":[{"count":14,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-project\/579283\/revisions"}],"predecessor-version":[{"id":656691,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-project\/579283\/revisions\/656691"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/media\/655026"}],"wp:attachment":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/media?parent=579283"}],"wp:term":[{"taxonomy":"msr-research-area","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/research-area?post=579283"},{"taxonomy":"msr-locale","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-locale?post=579283"},{"taxonomy":"msr-impact-theme","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-impact-theme?post=579283"},{"taxonomy":"msr-pillar","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-pillar?post=579283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}