Rich Text Programming : a Tool for Code Comprehension

Total Page:16

File Type:pdf, Size:1020Kb

Rich Text Programming : a Tool for Code Comprehension Rich Text Programming : A Tool for Code Comprehension Jayanta Majumder, Shikha Sarkar, Sambuddha Majumder Abstract This article presents the idea of using rich text for programming. Here weex- plore some new avenues opened up by a programming environment that allows developers to use rich text formatting options (eg. fonts, colours, highlighting, embedded images, notes, audio, video etc.) in their program text. We argue that this can be very useful towards enhancing program comprehension, especially in the context of maintaining large long-lived legacy systems. Computer programs are arguably the most complex creations of mankind. Having started only afew decades ago, we have already produced billions of lines of code worth trillions of dollars, and trillions of man-hours of cognitive work would be required to main- tain them. A tool that improves maintainability of such valuable assets can be a useful addition to the development toolset. The proposed rich text program- ming environment helps us take greater advantage of our sensory faculties for meaning extraction and annotation of programs. Programmer-driven semantic colouring facilitated by this approach reduces chances of programming errors and rich multimedia features enable heavily annotated code that keeps expla- nations right where they help most with code comprehension. 1 Contents 1 Introduction 1 2 The Rich Text File Format 8 3 A Richer Programming Environment 11 3.1 Richer Program Text . 11 3.2 Richer Search . 13 3.2.1 Multiple always-present search widgets and commands . 14 3.2.2 Support for multi-attribute search indexes . 15 3.2.3 Search by proximity . 15 3.2.4 Search patterns with additional constraints . 16 3.2.5 Searching notes . 16 3.3 Richer Text Replace . 16 3.4 Richer Tracing . 17 3.5 Richer Selection and Insertion . 19 3.6 Commands and Scripting . 20 3.7 Compatibility with Other Systems . 20 3.8 Richer Static Assertions and Macro Expansion . 21 4 Conclusion and Future Work 22 List of Figures 1 Guy L Steele showing highlighted code . 3 2 Cartoon depiction of the program comprehension process . 4 3 Wire Marker - a browser plug-in for annotating web-pages . 5 4 iAnnotate - a program for annotating PDF and other formats . 5 5 Sample of Spectral rich text file . 8 6 Visual rendering of the rich text given in Figure 5 . 8 7 Annotated version of the text in Figure 5 . 9 8 Merge conflict markers displayed on Spectral . 10 9 Spectral editor views with highlighted salient symbols . 13 10 Source code annotated with hit counts . 19 Rich Text Programming : A Tool for Code Comprehension 1 Introduction Let us start by noting the following quotes from famous programmers: Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do. The practitioner of literate programming can be regarded as an essayist, whose main concern is with exposition and excellence of style. - Donald E Knuth, in Literate Programming [6] In the last 40 years we have written billions of lines of code that will keep programmers employed for trillions of man hours in the next few thou- sand years to clean up the mess we have made. All that stuff we wrote years ago, you know, these poor sods will be scratching their heads and going ”What the hell does this stuff do?” right? And it’s terrible - Joe Armstrong, in his talk titled ”The Mess We’re In” [3] Programs are written for people to read, and only incidentally for ma- chines to execute. - Harold Abelson, in Structure and Interpretation of Computer Programs [1] Management and mitigation of code complexity is crucial to the sustenance oflarge long-lived software products. This goal is approached from many directions, someof which are listed below: • Separation of concerns (e.g. modularisation, layering, abstraction, etc.) • Language imposed constraints (e.g. type safety, functional programming, vari- able immutability etc.) • Documentation formalisms (e.g. UML) • Shared vocabulary of design patterns, algorithms, and idioms • Coding standards • Code reviews Page 1 of 24 Copyright (C) 2015 Jayanta Majumder, Shikha Sarkar, Sambuddha Majumder Rich Text Programming : A Tool for Code Comprehension However diverse these directions and approaches might seem on the surface, deep down they have a central theme - that of making the code easier to understand. Ease of modification, maintenance, and extension follows as a result of ease of understand- ing. Programmers often talk about the notion of beautiful code, but any such subjec- tive beauty when not strongly correlated to the objective notionof cognitive ease ends up making the code hard to maintain. Knuth’s literate programming [6] idea approaches this objective by documenting the progression of the development in an order that is most conducive to human under- standing. A literate program is a combination of code and documentation that com- piles into machine executable code as well into a richly formatted text that may be published as a book or used as a reference. Many notable programs and books have been written using this approach (e.g [5], in which the authors note that the booknot only describes the implementation of lcc (a C compiler), it is the implementation. Literate programming, for all its beautiful outcomes, did not really catch on, perhaps due to short-term commercial pressures taking priority over long term maintainability in the software industry. Here we introduce an alternative approach that hassome aspects in common with literate programming, but can potentially be a better fit with mainstream programming practice because of its incremental approach - in that its adoption doesn’t need a big change in the practice, and the adoption level canvary continuously from zero to full-blown adoption. The approach iscalled rich program- ming (RP) - i.e. programming with rich-text. Here we use the term rich text in a broad sense in that it allows beautiful text formatting (using fonts, colours, underlines, high- lighting, hyper-links, etc.) along with multimedia (images, audio, video etc.). Rich text is more conducive to human perusal due to the availability of additional vi- sual cues and options of interactivity. So it is a common practice to have additional richer material describing the code - in which parts of the code is excerpted and pre- sented along with diagrams and multimedia. For example, the photo in figure 1is taken from a google tech-talk video, in which Guy L Steele is presenting some code, and note how he uses highlighting to emphasize some salient lines. Having made these observations, we did what any wannabe inventor would do- we asked ourselves a question. The question was - wouldn’t it be nice if the coding itself could generally be done in a rich text environment, where one could highlight, annotate, hyperlink, and so on to make the code easier to understand? or something on those lines. In exploring that question, we came up with a new kind of text editor that can make programming more fun and programs easier to read. We named it the Spec- tral Editor. It is a WYSWYG tool that allows you to edit rich text while automatically Page 2 of 24 Copyright (C) 2015 Jayanta Majumder, Shikha Sarkar, Sambuddha Majumder Rich Text Programming : A Tool for Code Comprehension Figure 1: Guy L Steele showing highlighted code maintaining the underlying plain-text representation. The central idea of this editor is a marriage between rich text and plain text formats which brings about the best of both worlds. It begets the maintainability merits of plain text (e.g. simplicity of auto- matic merging, concatenation, and version management) alongside the visual appeal of rich text (e.g. fonts, color, graphics, etc.). The editor is built around a file format that represents rich text in a way that preserves line-to-line correspondence with the plain text content. The rich text view would incorporate pictures, notes, audio, video etc. to enrich the programming and program comprehension experience, while the corresponding plain text source code is preserved all along with an intuitive mapping between the plain and the rich text. The video in [8] gives a quick tour of the basic features of spectral. This work arguably belongs in the body of literature on program comprehension. Readers looking for a broader survey on precursor work are advised to consult pub- lications made in the annual International Conference on Program Comprehension - ICPC. The papers published in that conference are behind pay-walls, but some pre- cursor works that could be found on public-access sites are [4], [2], [12] and [11]. Despite the substantial literature on program comprehension, its toolkit continues to be the (i) debugger, (ii) the profiler, and (iii) log files, driven by deep and preferably uninterrupted thinking, assisted by a pencil and scratchpad. Figure 2 illustrates this Page 3 of 24 Copyright (C) 2015 Jayanta Majumder, Shikha Sarkar, Sambuddha Majumder Rich Text Programming : A Tool for Code Comprehension Figure 2: Cartoon depiction of the program comprehension process activity in a light vein. The proposed rich text editor aims at augmenting thistoolkit, by allowing programmers to accumulate explanations, annotations, and diagrams on the code text to keep the additional information in context. Annotating digital documents is not new. In fact there are dozens of editors that allow annotation of popular document formats like Adobe PDF, MS Word Doc,Web pages etc. Figure 3 and 4 are two examples. Table 1 lists many more. However, none of the available annotation tools target program text. The proposed tool aims to ad- dress this gap, as elaborated in the following sections.
Recommended publications
  • Knuthweb.Pdf
    Literate Programming Donald E. Knuth Computer Science Department, Stanford University, Stanford, CA 94305, USA The author and his associates have been experimenting for the past several years with a program- ming language and documentation system called WEB. This paper presents WEB by example, and discusses why the new system appears to be an improvement over previous ones. I would ordinarily have assigned to student research A. INTRODUCTION assistants; and why? Because it seems to me that at last I’m able to write programs as they should be written. The past ten years have witnessed substantial improve- My programs are not only explained better than ever ments in programming methodology. This advance, before; they also are better programs, because the new carried out under the banner of “structured program- methodology encourages me to do a better job. For ming,” has led to programs that are more reliable and these reasons I am compelled to write this paper, in easier to comprehend; yet the results are not entirely hopes that my experiences will prove to be relevant to satisfactory. My purpose in the present paper is to others. propose another motto that may be appropriate for the I must confess that there may also be a bit of mal- next decade, as we attempt to make further progress ice in my choice of a title. During the 1970s I was in the state of the art. I believe that the time is ripe coerced like everybody else into adopting the ideas of for significantly better documentation of programs, and structured programming, because I couldn’t bear to be that we can best achieve this by considering programs found guilty of writing unstructured programs.
    [Show full text]
  • Programming Pearls: a Literate Program
    by jot1 Be~~tley programming with Special Guest Oysters Don Knuth and Doug McIlroy pearls A LITERATE PROGRAM Last month‘s column introduced Don Knuth’s style of frequency; or there might not even be as many as k “Literate Programming” and his WEB system for building words. Let’s be more precise: The most common programs that are works of literature. This column pre- words are to be printed in order of decreasing fre- sents a literate program by Knuth (its origins are sketched quency, with words of equal frequency listed in al- in last month‘s column) and, as befits literature, a review. phabetic order. Printing should stop after k words So without further ado, here is Knuth’s program, have been output, if more than k words are present. retypeset in Communications style. -Jon Bentley 2. The input file is assumed to contain the given Common Words Section text. If it begins with a positive decimal number Introduction.. , . , , . , . , . , , . 1 (preceded by optional blanks), that number will be Strategic considerations . , a the value of k; otherwise we shall assume that Basic input routines . , , . 9 k = 100. Answers will be sent to the output file. Dictionary lookup . , . , . , .17 define default-k = 100 (use this value if k isn’t The frequency counts . .32 otherwise specified) Sortingatrie . ...36 Theendgame................................41 3. Besides solving the given problem, this program is Index . ...42 supposed to be an example of the WEB system, for people who know some Pascal but who have never 1. Introduction. The purpose of this program is to seen WEB before.
    [Show full text]
  • SORTIR DU BUREAU .De La Bure À La Métaphore Du Bureau .De La Bure À La Métaphore Du Bureau
    SORTIR DU BUREAU .De la bure à la métaphore du bureau .De la bure à la métaphore du bureau BUREAUBUREAU, ,subst. subst. masc. masc. I.I. Vx Vx. .Étoffe Étoffe grossièregrossière dede laine laine brunebrune : : 1. 1. Je Je ne ne changerais changerais pas pas ma ma veste veste de de bureau bureau pour pour votre votre queue queue de de pie pie en en drap drap noir. noir. G.G. SAND, SAND, Péché Péché de de M. M. Antoine Antoine, ,p. p. 310 310 dans dans L. L. VINCENT, VINCENT, La La Lang. Lang. et et le le style style rustiques rustiques de de George George Sand Sand dans dans les les « « romans romans champêtres champêtres » », ,1916, 1916, p. p. 196.196. II.II. Usuel Usuel A.A. Table, Table, souvent souvent couverte couverte d’un d’un tissu tissu de de bure, bure, ou ou d’une d’une autre autre matière matière protectrice, protectrice, généralement généralement munie munie de de tiroirs tiroirs ou ou de de casiers, casiers, entourée entourée d’une d’une ouou plusieurs plusieurs chaises chaises ou ou fauteuils, fauteuils, où où l’on l’on écrit, écrit, manie manie des des papiers papiers classés classés ou ou à à classer, classer, etc. etc. Bureau Bureau d’acajou; d’acajou; bureau bureau ministre; ministre; bureau bureau Empire Empire : : 2.2. Je Je compris compris qu’on qu’on m’offrait m’offrait uneune chancechance d’êtred’être merveilleuxmerveilleux : :je je tins tins à àrépondre répondre sur sur l’heure, l’heure, je je m’assism’assis auau bureaubureau dede monmon grand-père,grand-père, posaiposai le le carnetcarnet sur sur le le buvard buvard de de son son sous-main, sous-main, pris pris son son porte-plume porte-plume à à manche manche de de galalithe, galalithe, le le plongeai plongeai dans dans la la bouteille bouteille d’encre d’encre rouge rouge et et me me mis mis à à écrire écrire pendantpendant que que les les grandes grandes personnes personnes échangeaient échangeaient des des regards regards amusés.
    [Show full text]
  • Teaching Foundations of Computation and Deduction Through Literate Functional Programming and Type Theory Formalization
    Teaching Foundations of Computation and Deduction Through Literate Functional Programming and Type Theory Formalization Gérard Huet Inria Paris Laboratory, France Abstract We describe experiments in teaching fundamental informatics notions around mathematical struc- tures for formal concepts, and effective algorithms to manipulate them. The major themes of lambda-calculus and type theory served as guides for the effective implementation of functional programming languages and higher-order proof assistants, appropriate for reflecting the theor- etical material into effective tools to represent constructively the concepts and formally certify the proofs of their properties. Progressively, a literate programming and proving style replaced informal mathematics in the presentation of the material as executable course notes. The talk will evoke the various stages of (in)completion of the corresponding set of notes along the years (see [1, 2, 14, 5, 6, 10, 12, 16, 7, 15, 17, 9, 3, 13, 11, 4, 8]), and tell how their elaboration proved to be essential to the discovery of fundamental results. 1998 ACM Subject Classification F.3.1 Specifying and Verifying Programs, F.4.1 Mathematical Logic and G.4 Mathematical Software Keywords and phrases Foundations, Computation, Deduction, Programming, Proofs Digital Object Identifier 10.4230/LIPIcs.FSCD.2016.3 Category Invited Talk References 1 Gérard Huet. Initiation à la logique mathématique. Notes de cours du DEA d’Informatique, Université Paris-Sud, 1977. 2 Gérard Huet. Démonstration automatique en logique de premier ordre et programmation en clauses de horn. Notes de cours du DEA d’Informatique, Université Paris-Sud, 1978. 3 Gérard Huet. Confluent reductions: Abstract properties and applications to term rewriting systems.
    [Show full text]
  • Typeset MMIX Programs with TEX Udo Wermuth Abstract a TEX Macro
    TUGboat, Volume 35 (2014), No. 3 297 Typeset MMIX programs with TEX Example: In section 9 the lines \See also sec- tion 10." and \This code is used in section 24." are given. Udo Wermuth No such line appears in section 10 as it only ex- tends the replacement code of section 9. (Note that Abstract section 10 has in its headline the number 9.) In section 24 the reference to section 9 stands for all of ATEX macro package is presented as a literate pro- the eight code lines stated in sections 9 and 10. gram. It can be included in programs written in the If a section is not used in any other section then languages MMIX or MMIXAL without affecting the it is a root and during the extraction of the code a assembler. Such an instrumented file can be pro- file is created that has the name of the root. This file cessed by TEX to get nicely formatted output. Only collects all the code in the sequence of the referenced a new first line and a new last line must be entered. sections from the code part. The collection process And for each end-of-line comment a flag is set to for all root sections is called tangle. A second pro- indicate that the comment is written in TEX. cess is called weave. It outputs the documentation and the code parts as a TEX document. How to read the following program Example: The following program has only one The text that starts in the next chapter is a literate root that is defined in section 4 with the headline program [2, 1] written in a style similar to noweb [7].
    [Show full text]
  • Openbsd Gaming Resource
    OPENBSD GAMING RESOURCE A continually updated resource for playing video games on OpenBSD. Mr. Satterly Updated August 7, 2021 P11U17A3B8 III Title: OpenBSD Gaming Resource Author: Mr. Satterly Publisher: Mr. Satterly Date: Updated August 7, 2021 Copyright: Creative Commons Zero 1.0 Universal Email: [email protected] Website: https://MrSatterly.com/ Contents 1 Introduction1 2 Ways to play the games2 2.1 Base system........................ 2 2.2 Ports/Editors........................ 3 2.3 Ports/Emulators...................... 3 Arcade emulation..................... 4 Computer emulation................... 4 Game console emulation................. 4 Operating system emulation .............. 7 2.4 Ports/Games........................ 8 Game engines....................... 8 Interactive fiction..................... 9 2.5 Ports/Math......................... 10 2.6 Ports/Net.......................... 10 2.7 Ports/Shells ........................ 12 2.8 Ports/WWW ........................ 12 3 Notable games 14 3.1 Free games ........................ 14 A-I.............................. 14 J-R.............................. 22 S-Z.............................. 26 3.2 Non-free games...................... 31 4 Getting the games 33 4.1 Games............................ 33 5 Former ways to play games 37 6 What next? 38 Appendices 39 A Clones, models, and variants 39 Index 51 IV 1 Introduction I use this document to help organize my thoughts, files, and links on how to play games on OpenBSD. It helps me to remember what I have gone through while finding new games. The biggest reason to read or at least skim this document is because how can you search for something you do not know exists? I will show you ways to play games, what free and non-free games are available, and give links to help you get started on downloading them.
    [Show full text]
  • Terry and His Temple: a New Boundary Case for the Study of Religion
    THEUNIVERSITY of EDINBURGH Terry and his Temple: a New Boundary Case for the Study of Religion David Mynors supervised by Dr. Steven Sutcliffe March 29, 2019 A dissertation submitted in partial fulfilment of the requirements for the degree of Religious Studies (MA Hons) Contents Introduction 1 I TempleOS and its Creator 3 II An Analysis of the Intention Behind and Reception of TempleOS 7 III Boundary Work 13 Final Thoughts 20 Bibliography 21 Introduction The development of the Temple Operating System1 is understood to have begun in 2003, but it was not until 2013 that it was released under that name. Its creator, Terry A. Davis, described it as “God’s official temple” and understood himself to be its high priest. He amassed a significant online following in the years prior to his death in 2018 who would interact with him during his live streams and formed online communities in which they continue to discuss his life and work. TempleOS — with its digital location and the ambiguity between Davis’ intention and its reception — constitutes interesting new data for the academic study of religion, and this dissertation aims to investigate how an examination of TempleOS might prove valuable in discourses surrounding the definition of religion and its relationship with computers and the internet. The first chapter aims to introduce readers to Davis and “the Temple Operating System”. It will begin with an exposition of the technical function and complexity of the Temple Operating System, explaining that it is an operating system rather than an application, and that it would typically be installed in a “virtual machine”.
    [Show full text]
  • Statistical Software
    Statistical Software A. Grant Schissler1;2;∗ Hung Nguyen1;3 Tin Nguyen1;3 Juli Petereit1;4 Vincent Gardeux5 Keywords: statistical software, open source, Big Data, visualization, parallel computing, machine learning, Bayesian modeling Abstract Abstract: This article discusses selected statistical software, aiming to help readers find the right tool for their needs. We categorize software into three classes: Statisti- cal Packages, Analysis Packages with Statistical Libraries, and General Programming Languages with Statistical Libraries. Statistical and analysis packages often provide interactive, easy-to-use workflows while general programming languages are built for speed and optimization. We emphasize each software's defining characteristics and discuss trends in popularity. The concluding sections muse on the future of statistical software including the impact of Big Data and the advantages of open-source languages. This article discusses selected statistical software, aiming to help readers find the right tool for their needs (not provide an exhaustive list). Also, we acknowledge our experiences bias the discussion towards software employed in scholarly work. Throughout, we emphasize the software's capacity to analyze large, complex data sets (\Big Data"). The concluding sections muse on the future of statistical software. To aid in the discussion, we classify software into three groups: (1) Statistical Packages, (2) Analysis Packages with Statistical Libraries, and (3) General Programming Languages with Statistical Libraries. This structure
    [Show full text]
  • Exploratory Data Science Using a Literate Programming Tool Mary Beth Kery1 Marissa Radensky2 Mahima Arya1 Bonnie E
    The Story in the Notebook: Exploratory Data Science using a Literate Programming Tool Mary Beth Kery1 Marissa Radensky2 Mahima Arya1 Bonnie E. John3 Brad A. Myers1 1Human-Computer Interaction Institute 2Amherst College 3Bloomberg L. P. Carnegie Mellon University Amherst, MA New York City, NY Pittsburgh, PA [email protected] [email protected] mkery, mahimaa, bam @cs.cmu.edu ABSTRACT engineers, many of whom never receive formal training in Literate programming tools are used by millions of software engineering [30]. programmers today, and are intended to facilitate presenting data analyses in the form of a narrative. We interviewed 21 As even more technical novices engage with code and data data scientists to study coding behaviors in a literate manipulations, it is key to have end-user programming programming environment and how data scientists kept track tools that address barriers to doing effective data science. For of variants they explored. For participants who tried to keep instance, programming with data often requires heavy a detailed history of their experimentation, both informal and exploration with different ways to manipulate the data formal versioning attempts led to problems, such as reduced [14,23]. Currently even experts struggle to keep track of the notebook readability. During iteration, participants actively experimentation they do, leading to lost work, confusion curated their notebooks into narratives, although primarily over how a result was achieved, and difficulties effectively through cell structure rather than markdown explanations. ideating [11]. Literate programming has recently arisen as a Next, we surveyed 45 data scientists and asked them to promising direction to address some of these problems [17].
    [Show full text]
  • Templeos: an Educational Tool for Programming Experiments
    DEVELOPER TempleOS: an educational tool for programming experiments James Sanders explores what drives one man to write an operating system for x86_64, and what the programmer's finished product looks like. By James Sanders | in Software Engineer, January 20, 2014, 11:33 PM PST Creating an entire operating system from scratch is not a task that programmers bother with under normal circumstances. This isn't to say most programmers aren't capable of creating an OS — I think many could do it, given enough time. Linux was "just a hobby" of Linus Torvalds, who sat down and, over the span of several months, wrote the Linux kernel in August 1991. Another project that started as one programmer's hobby in 1993 has, through brief periods of development and longer periods of being shelved, culminated in a new, stable operating system called TempleOS (http://www.templeos.org/Wb/Accts/TS/Wb2/TempleOS.html). According to the author, Terry Davis, it's "an x86_64, multi- tasking, multi-cored, public domain, open source, (http://en.wikipedia.org/wiki/Ring_%28computer_security%29)ring-0-only (http://en.wikipedia.org/wiki/Ring_%28computer_security%29), single-address-map (identity-mapped (http://en.wikipedia.org/wiki/Identity_(mathematics))), non-networked, PC operating system for recreational programming." It ships with its own complier, and modified version of C++ ("more than C, less than C++") called "HolyC," and file system "Red Sea," along with FAT32 support. It also has 8-bit ASCII support and a 2D and 3D graphics library, all of which run at 640x480 (VGA) with 16 colors, and outputs all sound through one-voice PC speaker.
    [Show full text]
  • Trisycl Open Source C++17 & Openmp-Based Opencl SYCL Prototype
    triSYCL Open Source C++17 & OpenMP-based OpenCL SYCL prototype Ronan Keryell Khronos OpenCL SYCL committee 05/12/2015 — IWOCL 2015 SYCL Tutorial • I OpenCL SYCL committee work... • Weekly telephone meeting • Define new ways for modern heterogeneous computing with C++ I Single source host + kernel I Replace specific syntax by pure C++ abstractions • Write SYCL specifications • Write SYCL conformance test • Communication & evangelism triSYCL — Open Source C++17 & OpenMP-based OpenCL SYCL prototype IWOCL 2015 2 / 23 • I SYCL relies on advanced C++ • Latest C++11, C++14... • Metaprogramming • Implicit type conversion • ... Difficult to know what is feasible or even correct... ;• Need a prototype to experiment with the concepts • Double-check the specification • Test the examples Same issue with C++ standard and GCC or Clang/LLVM triSYCL — Open Source C++17 & OpenMP-based OpenCL SYCL prototype IWOCL 2015 3 / 23 • I Solving the meta-problem • SYCL specification I Includes header files descriptions I Beautified .hpp I Tables describing the semantics of classes and methods • Generate Doxygen-like web pages Generate parts of specification and documentation from a reference implementation ; triSYCL — Open Source C++17 & OpenMP-based OpenCL SYCL prototype IWOCL 2015 4 / 23 • I triSYCL (I) • Started in April 2014 as a side project • Open Source for community purpose & dissemination • Pure C++ implementation I DSEL (Domain Specific Embedded Language) I Rely on STL & Boost for zen style I Use OpenMP 3.1 to leverage CPU parallelism I No compiler cannot generate kernels on GPU yet • Use Doxygen to generate I Documentation; of triSYCL implementation itself with implementation details I SYCL API by hiding implementation details with macros & Doxygen configuration • Python script to generate parts of LaTeX specification from Doxygen LaTeX output triSYCL — Open Source C++17 & OpenMP-based OpenCL SYCL prototype IWOCL 2015 5 / 23 • I Automatic generation of SYCL specification is a failure..
    [Show full text]
  • Ambiguous, Informal, and Unsound: Metaprogramming for Naturalness
    Ambiguous, Informal, and Unsound: Metaprogramming for Naturalness Toni Mattis Patrick Rein Robert Hirschfeld Hasso Plattner Institute Hasso Plattner Institute Hasso Plattner Institute University of Potsdam University of Potsdam University of Potsdam Potsdam, Germany Potsdam, Germany Potsdam, Germany [email protected] [email protected] [email protected] Abstract ACM Reference Format: Program code needs to be understood by both machines Toni Mattis, Patrick Rein, and Robert Hirschfeld. 2019. Ambigu- and programmers. While the goal of executing programs ous, Informal, and Unsound: Metaprogramming for Naturalness. In Proceedings of the 4th ACM SIGPLAN International Workshop requires the unambiguity of a formal language, program- on Meta-Programming Techniques and Reflection (META ’19), Octo- mers use natural language within these formal constraints to ber 20, 2019, Athens, Greece. ACM, New York, NY, USA, 10 pages. explain implemented concepts to each other. This so called https://doi.org/10.1145/3358502.3361270 naturalness – the property of programs to resemble human communication – motivated many statistical and machine learning (ML) approaches with the goal to improve software engineering activities. 1 Introduction The metaprogramming facilities of most programming en- The complexity of modern software systems requires col- vironments model the formal elements of a program (meta- laboration among multiple programmers. Hence, the source objects). If ML is used to support engineering or analysis code itself becomes an artifact of communication and per- tasks, complex infrastructure needs to bridge the gap be- sisted domain knowledge. The idea that programmers should tween meta-objects and ML models, changes are not reflected “concentrate rather on explaining to human beings what we in the ML model, and the mapping from an ML output back want a computer to do” has been a prominent hypothesis in into the program’s meta-object domain is laborious.
    [Show full text]