Chemoinformatics and Structural Bioinformatics in Ocaml Francois Berenger1* , Kam Y

Total Page:16

File Type:pdf, Size:1020Kb

Chemoinformatics and Structural Bioinformatics in Ocaml Francois Berenger1* , Kam Y Berenger et al. J Cheminform (2019) 11:10 https://doi.org/10.1186/s13321-019-0332-0 Journal of Cheminformatics RESEARCH ARTICLE Open Access Chemoinformatics and structural bioinformatics in OCaml Francois Berenger1* , Kam Y. J. Zhang2 and Yoshihiro Yamanishi1,3 Abstract Background: OCaml is a functional programming language with strong static types, Hindley–Milner type inference and garbage collection. In this article, we share our experience in prototyping chemoinformatics and structural bioin- formatics software in OCaml. Results: First, we introduce the language, list entry points for chemoinformaticians who would be interested in OCaml and give code examples. Then, we list some scientifc open source software written in OCaml. We also present recent open source libraries useful in chemoinformatics. The parallelization of OCaml programs and their performance is also shown. Finally, tools and methods useful when prototyping scientifc software in OCaml are given. Conclusions: In our experience, OCaml is a programming language of choice for method development in chemoin- formatics and structural bioinformatics. Keywords: Chemoinformatics, Structural bioinformatics, Bisector tree, Scientifc software, Software prototyping, Open source, Functional programming, OCaml Introduction inherited so that generic code can be reused between Tere are several schools of thought in computer software components. C++, Java, Eifel, Ruby and programming. Each school is represented by sev- Python are famous members of this family of languages. eral programming languages and some languages are Most Object-Oriented languages use the imperative style multi-paradigm. of programming. In declarative languages (like SQL), a programmer In functional programming, a program is a collection writes a kind of mathematical specifcation of what to of functions. State passing is done explicitly via function compute, and the compiler will automatically derive a parameters. Functional programming has a mathematical program implementing this specifcation. Prolog [1], is taste and dates back to Lisp. Lisp, Scheme, OCaml, F#, also such a programming language where the specifca- Haskell, Scala, Racket and Clojure are representatives of tion is given as a collection of logic predicates. the functional style of programming. Tere are several On the contrary, in imperative programming, the pro- advantages to using functional programming [2]. Since grammer writes in extensive details how to compute the state passing is explicit, functional programs are easy to result he wants. Ada, C, Fortran and Pascal are famous reason about. Tey easily ft in the head of the program- representatives of this style of programming. mer. Some functional programming languages are pure In Object-Oriented programming, data structures and (e.g. Haskell); they guarantee referential transparency, the the allowed operations on them are grouped into classes. fact that an expression can be replaced by its correspond- Classes can be hierarchically organized, and behavior ing value without changing the program behavior. Tere are some articles about the productivity boost associated with functional programming [3, 4]. *Correspondence: [email protected] While there are not many, some functional program- 1 Department of Bioscience and Bioinformatics, Faculty of Computer Science and Systems Engineering, Kyushu Institute of Technology, Iizuka, ming libraries for chemoinformatics do exist. In Haskell, Fukuoka, Japan the ‘smiles’ library [5] provides full support for the Full list of author information is available at the end of the article OpenSMILES specifcation [6]. While the ‘radium’ library © The Author(s) 2019. This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creat iveco mmons .org/licen ses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The Creative Commons Public Domain Dedication waiver (http://creat iveco mmons .org/ publi cdoma in/zero/1.0/) applies to the data made available in this article, unless otherwise stated. Berenger et al. J Cheminform (2019) 11:10 Page 2 of 13 [7] provides the periodic table plus readers and writ- a function, from modules to module is called a functor ers forf SMILES and condensed formulas. In Scala, the and allows high level generic programming. ‘chem ’ library [8] provides a purely functional chemin- OCaml’s evaluation strategy is strict. All parameters formatics toolkit [9]. to a function are evaluated prior to entering the func- In this article, we concentrate on Objective Caml tion’s body. Te compilation of OCaml programs is fast. 3000 (OCaml [10]), in the context of scientifc software pro- For example, the ∼ OCaml lines (without com- totyping for chemoinformatics and structural bio- ments) of the consent software [14] and its four executa- 3.8 1.1 informatics. OCaml is a general purpose functional bles compile from scratch and link in ∼ s (resp ∼ ) programming language developed at INRIA, the French using dune (version 1.6.2) and a single core (resp. up to national research institute for computer science, robot- all cores) of our desktop computer (16 cores, Intel Xeon ics and applied mathematics. OCaml focuses on expres- 2.1GHz, 64GB RAM, Linux Ubuntu 18.04.1 LTS). siveness and safety. Some of the language’s strengths Strong static types are types which are enforced by the include its type system, with parametric polymorphism compiler. Due to the use of types and garbage collection, (called generics in Java, templates in C++) and type several run-time errors which plague other programming inference. Tanks to Hindley–Milner type inference languages are absent from OCaml programs: null pointer [11, 12], the OCaml programmer is freed from explic- exception, dereference after free, type cast exception, itly providing function parameters and result types. For segmentation fault, unhandled switch cases and most a course on programming languages and types, we refer memory leaks. In functional programming, more com- interested readers to Pierce [13]. OCaml supports user- plex properties can be encoded and statically enforced by defned algebraic data types, records, sums/enums and structuring code using monads [15], which are pervasive pattern matching. Pattern matching is a generalization of in Haskell [16], or by using dependent types (not avail- the switch statement present in other languages. When able in OCaml, but in Coq [17], Idris [18, 19] and Agda pattern matching, a program is driven by the type of the [20]). A function that is guaranteed to produce a result in parameter being matched upon. In OCaml, memory is a fnite time is called total. Functions for which there is managed automatically, by an incremental garbage col- no such guarantee are called partial. For some functions, lector, preventing memory corruption. Interactive use of Idris can check if they are total. However, such advanced OCaml is possible via a read-eval-print loop called the functional programming concepts are out of the scope of OCaml interpreter. Interacting with the interpreter is this article. a standard way to test a function or to check that some Despite not being very popular, OCaml is not a niche functionality provided by a library works the way one language. Most of its academic users work in computer understands it. In addition to its byte-code compiler and science, on compilers and formal methods. But, OCaml interpreter, OCaml ofers a compiler that produces ef- is also used in bioinformatics [21–23], structural bioin- cient executables. Tail-recursive functions are automati- formatics [24–27], chemoinformatics [14, 28], systems cally translated to efcient loops by the OCaml compiler. biology [29–32] and ecotoxicology [33]. OCaml also features an object-oriented layer, with mul- Tere are several industrial users of the language [34] tiple inheritance, parametric and virtual classes. While including Bloomberg, Citrix, Dassault Systèmes, Face- OCaml was initially used to develop symbolic computing book [35], Jane Street (a proprietary high frequency trad- applications, such as automatic theorem provers, compil- ing frm) and Microsoft. ers, interpreters and static program analyzers, it is now OCaml has some successes in the industrial world: used to develop software in many other areas. Lexif’s Modeling Language for Finance [36], the ASTRÉE Functions are frst-class values in OCaml. A function Static Analyzer [37] used by Airbus to certify on-board can be passed as an argument to, or returned by, another software and Microsoft’s static driver verifer [38]. function. OCaml is a multi-paradigm language. For per- OCaml has several successes in the open-source world formance reasons, OCaml ofers many imperative fea- too: the Unison fle synchronizer [39], the MLdonkey tures (exceptions, modifable variables, records, arrays [40] multi-protocol peer-to-peer client, the Coq [17] and loop statements). OCaml built-in data types include proof assistant [41] and FFTW’s symbolic optimizer of not only integers, foating point numbers, booleans, char- fast Fourier transforms [42]. acters and strings but also more advanced data types In the remaining of this article, resources to learn such as tuples, records, arrays and lists. OCaml are listed in “Resources to learn OCaml” sec- Large programs are easy to structure due to modules,
Recommended publications
  • Latest Stable Copy and Install It With: Chmod+X Chimera- *.Bin&&./Chimera- *.Bin
    Tangram Suite Documentation Release 0.0.8 InsiliChem Mar 26, 2019 General instructions 1 What is Tangram Suite 3 2 How to install Tangram Suite5 3 General usage 7 4 FAQ & Known issues 9 5 List of Tans 11 6 Tangram BondOrder 13 7 Tangram QMSetup 15 8 Tangram DummyAtoms 17 9 Tangram GAUDIView 19 10 Tangram MMSetup 21 11 Tangram NCIPlot 23 12 Tangram NormalModes 25 13 Tangram OrbiTraj 27 14 Tangram PLIP 29 15 Tangram PoPMuSiCGUI 31 16 Tangram PropKaGUI 33 17 Tangram ReVina 35 18 Tangram SubAlign 37 19 Tangram TalaDraw 39 i ii Tangram Suite Documentation, Release 0.0.8 It’s composed of several independent graphical interfaces and commands for UCSF Chimera. General instructions 1 Tangram Suite Documentation, Release 0.0.8 2 General instructions CHAPTER 1 What is Tangram Suite In progress 3 Tangram Suite Documentation, Release 0.0.8 4 Chapter 1. What is Tangram Suite CHAPTER 2 How to install Tangram Suite 2.1 Install the full Tangram Suite (recommended) 1 - If you don’t have UCSF Chimera installed, download the latest stable copy and install it with: chmod+x chimera- *.bin&&./chimera- *.bin 2 - Download the latest installer from the releases page (Linux and MacOS only) and run it with: bash tangram-*.sh 2.2 Using the conda meta-package Instead of using the Bash installer, you can use conda (if you are already using it) to create a new environment with the tangram metapackage, which will handle all the dependencies. While in alpha, both insilichem channels are needed (the main one and also the dev label): conda create-n tangram-c insilichem/label/dev-c insilichem-c omnia-c rdkit-c ,!conda-forge tangram 2.3 Updating extensions Each extension will check if there’s a new release available every time you launch it.
    [Show full text]
  • Scala−−, a Type Inferred Language Project Report
    Scala−−, a type inferred language Project Report Da Liu [email protected] Contents 1 Background 2 2 Introduction 2 3 Type Inference 2 4 Language Prototype Features 3 5 Project Design 4 6 Implementation 4 6.1 Benchmarkingresults . 4 7 Discussion 9 7.1 About scalac ....................... 9 8 Lessons learned 10 9 Language Specifications 10 9.1 Introdution ......................... 10 9.2 Lexicalsyntax........................ 10 9.2.1 Identifiers ...................... 10 9.2.2 Keywords ...................... 10 9.2.3 Literals ....................... 11 9.2.4 Punctions ...................... 12 9.2.5 Commentsandwhitespace. 12 9.2.6 Operations ..................... 12 9.3 Syntax............................ 12 9.3.1 Programstructure . 12 9.3.2 Expressions ..................... 14 9.3.3 Statements ..................... 14 9.3.4 Blocksandcontrolflow . 14 9.4 Scopingrules ........................ 16 9.5 Standardlibraryandcollections. 16 9.5.1 println,mapandfilter . 16 9.5.2 Array ........................ 16 9.5.3 List ......................... 17 9.6 Codeexample........................ 17 9.6.1 HelloWorld..................... 17 9.6.2 QuickSort...................... 17 1 of 34 10 Reference 18 10.1Typeinference ....................... 18 10.2 Scalaprogramminglanguage . 18 10.3 Scala programming language development . 18 10.4 CompileScalatoLLVM . 18 10.5Benchmarking. .. .. .. .. .. .. .. .. .. .. 18 11 Source code listing 19 1 Background Scala is becoming drawing attentions in daily production among var- ious industries. Being as a general purpose programming language, it is influenced by many ancestors including, Erlang, Haskell, Java, Lisp, OCaml, Scheme, and Smalltalk. Scala has many attractive features, such as cross-platform taking advantage of JVM; as well as with higher level abstraction agnostic to the developer providing immutability with persistent data structures, pattern matching, type inference, higher or- der functions, lazy evaluation and many other functional programming features.
    [Show full text]
  • Open Babel Documentation Release 2.3.1
    Open Babel Documentation Release 2.3.1 Geoffrey R Hutchison Chris Morley Craig James Chris Swain Hans De Winter Tim Vandermeersch Noel M O’Boyle (Ed.) December 05, 2011 Contents 1 Introduction 3 1.1 Goals of the Open Babel project ..................................... 3 1.2 Frequently Asked Questions ....................................... 4 1.3 Thanks .................................................. 7 2 Install Open Babel 9 2.1 Install a binary package ......................................... 9 2.2 Compiling Open Babel .......................................... 9 3 obabel and babel - Convert, Filter and Manipulate Chemical Data 17 3.1 Synopsis ................................................. 17 3.2 Options .................................................. 17 3.3 Examples ................................................. 19 3.4 Differences between babel and obabel .................................. 21 3.5 Format Options .............................................. 22 3.6 Append property values to the title .................................... 22 3.7 Filtering molecules from a multimolecule file .............................. 22 3.8 Substructure and similarity searching .................................. 25 3.9 Sorting molecules ............................................ 25 3.10 Remove duplicate molecules ....................................... 25 3.11 Aliases for chemical groups ....................................... 26 4 The Open Babel GUI 29 4.1 Basic operation .............................................. 29 4.2 Options .................................................
    [Show full text]
  • Structural Insight Into Pichia Pastoris Fatty Acid Synthase Joseph S
    www.nature.com/scientificreports OPEN Structural insight into Pichia pastoris fatty acid synthase Joseph S. Snowden, Jehad Alzahrani, Lee Sherry, Martin Stacey, David J. Rowlands, Neil A. Ranson* & Nicola J. Stonehouse* Type I fatty acid synthases (FASs) are critical metabolic enzymes which are common targets for bioengineering in the production of biofuels and other products. Serendipitously, we identifed FAS as a contaminant in a cryoEM dataset of virus-like particles (VLPs) purifed from P. pastoris, an important model organism and common expression system used in protein production. From these data, we determined the structure of P. pastoris FAS to 3.1 Å resolution. While the overall organisation of the complex was typical of type I FASs, we identifed several diferences in both structural and enzymatic domains through comparison with the prototypical yeast FAS from S. cerevisiae. Using focussed classifcation, we were also able to resolve and model the mobile acyl-carrier protein (ACP) domain, which is key for function. Ultimately, the structure reported here will be a useful resource for further eforts to engineer yeast FAS for synthesis of alternate products. Fatty acid synthases (FASs) are critical metabolic enzymes for the endogenous biosynthesis of fatty acids in a diverse range of organisms. Trough iterative cycles of chain elongation, FASs catalyse the synthesis of long-chain fatty acids that can produce raw materials for membrane bilayer synthesis, lipid anchors of peripheral membrane proteins, metabolic energy stores, or precursors for various fatty acid-derived signalling compounds1. In addition to their key physiological importance, microbial FAS systems are also a common target of metabolic engineering approaches, usually with the aim of generating short chain fatty acids for an expanded repertoire of fatty acid- derived chemicals, including chemicals with key industrial signifcance such as α-olefns2–6.
    [Show full text]
  • The Scala Experience Safe Programming Can Be Fun!
    The Scala Programming Language Mooly Sagiv Slides taken from Martin Odersky (EPFL) Donna Malayeri (CMU) Hila Peleg (Technion) Modern Functional Programming • Higher order • Modules • Pattern matching • Statically typed with type inference • Two viable alternatives • Haskel • Pure lazy evaluation and higher order programming leads to Concise programming • Support for domain specific languages • I/O Monads • Type classes • ML/Ocaml/F# • Eager call by value evaluation • Encapsulated side-effects via references • [Object orientation] Then Why aren’t FP adapted? • Education • Lack of OO support • Subtyping increases the complexity of type inference • Programmers seeks control on the exact implementation • Imperative programming is natural in certain situations Why Scala? (Coming from OCaml) • Runs on the JVM/.NET • Can use any Java code in Scala • Combines functional and imperative programming in a smooth way • Effective libraries • Inheritance • General modularity mechanisms The Java Programming Language • Designed by Sun 1991-95 • Statically typed and type safe • Clean and Powerful libraries • Clean references and arrays • Object Oriented with single inheritance • Interfaces with multiple inheritance • Portable with JVM • Effective JIT compilers • Support for concurrency • Useful for Internet Java Critique • Downcasting reduces the effectiveness of static type checking • Many of the interesting errors caught at runtime • Still better than C, C++ • Huge code blowouts • Hard to define domain specific knowledge • A lot of boilerplate code •
    [Show full text]
  • Francisella Novicida Cas9 Interrogates Genomic DNA with Very High Specificity and Can Be Used for Mammalian Genome Editing
    Francisella novicida Cas9 interrogates genomic DNA with very high specificity and can be used for mammalian genome editing Sundaram Acharyaa,b,1, Arpit Mishraa,1,2, Deepanjan Paula,1, Asgar Hussain Ansaria,b, Mohd. Azhara,b, Manoj Kumara,b, Riya Rauthana,b, Namrata Sharmaa, Meghali Aicha,b, Dipanjali Sinhaa,b, Saumya Sharmaa,b, Shivani Jaina, Arjun Raya,3, Suman Jainc, Sivaprakash Ramalingama,b, Souvik Maitia,b,d, and Debojyoti Chakrabortya,b,4 aGenomics and Molecular Medicine Unit, Council of Scientific and Industrial Research—Institute of Genomics & Integrative Biology, New Delhi, 110025, India; bAcademy of Scientific & Innovative Research, Ghaziabad, 201002, India; cKamala Hospital and Research Centre, Thalassemia and Sickle Cell Society, Rajendra Nagar, Hyderabad, 500052, India; and dInstitute of Genomics and Integrative Biology (IGIB)-National Chemical Laboratory (NCL) Joint Center, Council of Scientific and Industrial Research—National Chemical Laboratory, Pune, 411008, India Edited by K. VijayRaghavan, Tata Institute of Fundamental Research, Bangalore, India, and approved September 6, 2019 (received for review October 27, 2018) Genome editing using the CRISPR/Cas9 system has been used to has shown variable levels of off targeting due to tolerance of make precise heritable changes in the DNA of organisms. Although mismatches predominantly in the “nonseed” region in the sgRNA, the widely used Streptococcus pyogenes Cas9 (SpCas9) and its wherever these are encountered in the genome (20). To what engineered variants have been efficiently harnessed for numerous extent FnCas9 mediates this high specificity of target interrogation gene-editing applications across different platforms, concerns re- is not known and whether these properties can be harnessed for main regarding their putative off-targeting at multiple loci across highly specific genome editing at a given DNA loci has not been the genome.
    [Show full text]
  • 1 Ocaml for the Masses
    PROGRAMMING LANGUAGES OCaml for the Masses Why the next language you learn should be functional Yaron Minsky, Jane Street Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function. - John Carmack Functional programming is an old idea with a distinguished history. Lisp, a functional language inspired by Alonzo Church’s lambda calculus, was one of the first programming languages developed at the dawn of the computing age. Statically typed functional languages such as OCaml and Haskell are newer, but their roots go deep—ML, from which they descend, dates back to work by Robin Milner in the early ’70s relating to the pioneering LCF (Logic for Computable Functions) theorem prover. Functional programming has also been enormously influential. Many fundamental advances in programming language design, from garbage collection to generics to type inference, came out of the functional world and were commonplace there decades before they made it to other languages. Yet functional languages never really made it to the mainstream. They came closest, perhaps, in the days of Symbolics and the Lisp machines, but those days seem quite remote now. Despite a resurgence of functional programming in the past few years, it remains a technology more talked about than used. It is tempting to conclude from this record that functional languages don’t have what it takes. They may make sense for certain limited applications, and contain useful concepts to be imported into other languages; but imperative and object-oriented languages are simply better suited to the vast majority of software engineering tasks.
    [Show full text]
  • UCSF Chimera Was Developed by the Computer Graphics Laboratory at the University of California, San Francisco, Under Support of NIH Grant P41-RR01081
    matrixcopy apply the transformation matrix of one model to another tcolor color using texture map colors UCSF Chimera matrixget write the current transformation matrices to a ®le texture de®ne texture maps and associated colors QUICK REFERENCE GUIDE June 2007 matrixset read and apply transformation matrices from a ®le thickness move the clipping planes in opposite directions minimize energy-minimize structures turn rotate about the X, Y, or Z axis mmaker (matchmaker) align models in sequence, then in 3D vdw* display van der Waals (VDW) surface modelcolor set color at the model level vdwde®ne* set VDW radii Commands modeldisplay* set display at the model level vdwdensity set VDW surface dot density *reverse function Äcommand available move translate along the X, Y, or Z axis version show copyright information and Chimera version movie capture image frames and assemble them into a movie viewdock start ViewDock and load docking results 2dlabels create arbitrary text labels and place them in 2D namesel name and save the current selection wait suspend command processing until motion has stopped ac enable accelerators (keyboard shortcuts) neon create a shadowed stick/tube image (not on Windows) window adjust the view to contain the speci®ed atoms addaa add an amino acid to a peptide C-terminus objdisplay* display graphical objects windowsize adjust the dimensions of the graphics window addcharge assign partial charges to atoms open* read structures and data, execute command ®les write save a molecule model as a PDB ®le addh add hydrogens pdbrun
    [Show full text]
  • 3D-Printing Models for Chemistry
    3D-Printing Models for Chemistry: A Step-by-Step Open-Source Guide for Hobbyists, Corporate ProfessionAls, and Educators and Student in K-12 and Higher Education Poster Elisabeth Grace Billman-Benveniste+, Jacob Franz++, Loredana Valenzano-Slough+* +Department of Chemistry, Michigan Technological University, ++Department of Mechanical Engineering, Michigan Technological University *Corresponding Author References 1. “LulzBot TAZ 5.” LulzBot, 14 Aug. 2018, www.lulzbot.com/store/printers/lulzbot-taz-5 2. Gaussian 16, Revision B.01, Frisch, M. J.; Trucks, G. W.; Schlegel, H. B.; Scuseria, G. E.; Robb, M. A.; Cheeseman, J. R.; Scalmani, G.; Barone, V.; Petersson, G. A.; Nakatsuji, H.; Li, X.; Caricato, M.; Marenich, A. V.; Bloino, J.; Janesko, B. G.; Gomperts, R.; Mennucci, B.; Hratchian, H. P.; Ortiz, J. V.; Izmaylov, A. F.; Sonnenberg, J. L.; Williams-Young, D.; Ding, F.; Lipparini, F.; Egidi, F.; Goings, J.; Peng, B.; Petrone, A.; Henderson, T.; Ranasinghe, D.; ZakrzeWski, V. G.; Gao, J.; Rega, N.; Zheng, G.; Liang, W.; Hada, M.; Ehara, M.; Toyota, K.; Fukuda, R.; HasegaWa, J.; Ishida, M.; NakaJima, T.; Honda, Y.; Kitao, O.; Nakai, H.; Vreven, T.; Throssell, K.; Montgomery, J. A., Jr.; Peralta, J. E.; Ogliaro, F.; Bearpark, M. J.; Heyd, J. J.; Brothers, E. N.; Kudin, K. N.; Staroverov, V. N.; Keith, T. A.; Kobayashi, R.; Normand, J.; Raghavachari, K.; Rendell, A. P.; Burant, J. C.; Iyengar, S. S.; Tomasi, J.; Cossi, M.; Millam, J. M.; Klene, M.; Adamo, C.; Cammi, R.; Ochterski, J. W.; Martin, R. L.; Morokuma, K.; Farkas, O.; Foresman, J. B.; Fox, D. J. Gaussian, Inc., Wallingford CT, 2016. 3.
    [Show full text]
  • An Overview of the Scala Programming Language
    An Overview of the Scala Programming Language Second Edition Martin Odersky, Philippe Altherr, Vincent Cremet, Iulian Dragos Gilles Dubochet, Burak Emir, Sean McDirmid, Stéphane Micheloud, Nikolay Mihaylov, Michel Schinz, Erik Stenman, Lex Spoon, Matthias Zenger École Polytechnique Fédérale de Lausanne (EPFL) 1015 Lausanne, Switzerland Technical Report LAMP-REPORT-2006-001 Abstract guage for component software needs to be scalable in the sense that the same concepts can describe small as well as Scala fuses object-oriented and functional programming in large parts. Therefore, we concentrate on mechanisms for a statically typed programming language. It is aimed at the abstraction, composition, and decomposition rather than construction of components and component systems. This adding a large set of primitives which might be useful for paper gives an overview of the Scala language for readers components at some level of scale, but not at other lev- who are familar with programming methods and program- els. Second, we postulate that scalable support for compo- ming language design. nents can be provided by a programming language which unies and generalizes object-oriented and functional pro- gramming. For statically typed languages, of which Scala 1 Introduction is an instance, these two paradigms were up to now largely separate. True component systems have been an elusive goal of the To validate our hypotheses, Scala needs to be applied software industry. Ideally, software should be assembled in the design of components and component systems. Only from libraries of pre-written components, just as hardware is serious application by a user community can tell whether the assembled from pre-fabricated chips.
    [Show full text]
  • How to Run Your Favorite Language on Web Browsers
    Benjamin Canou, Emmanuel Chailloux and Jérôme Vouillon Laboratoire d'Informatique de Paris 6 (LIP6) Laboratoire Preuves Programmes et Systèmes (PPS) How to Run your Favorite. Language on Browsers The Revenge of Virtual Machines WWW 2012, Lyon, France Introduction. Introduction . 3/20 What ? I You have a favorite language I You have just designed or extended one I You want to run it on a Web browser Why ? I To program a new Web app I To program your client with the same language than your server I To run an online demo of an existing app Introduction . 4/20 How ? I Use applets I Write an interpreter in JavaScript I Write a compiler to JavaScript Or as we present in this talk: I Reuse the language bytecode compiler I Write a bytecode interpreter in JavaScript I Write a bytecode to JavaScript expander Introduction . 5/20 An experiment report: I Project Ocsigen: use OCaml to code entire Web apps I OBrowser: an OCaml bytecode interpreter I js_of_ocaml: an OCaml bytecode expander Retrospectively, a good approach: I Reasonable time to obtain a first platform I Good performance achievable I Fidelity to language/concurrency models Core techniques. Bytecode interpretation (1/3). 7/20 Main method: 1. Make the bytecode file network compliant (ex. JSON array) 2. Choose/implement the representation of values 3. Write a minimal runtime and standard library 4. Write the main interpretation loop 5. Run tests and extend the library as needed Possible improvements: I Use core, well supported/optimized JavaScript control structures I Use simple, array based memory representation I Preliminary bytecode cleanup pass Bytecode interpretation (2/3).
    [Show full text]
  • Development and Application of a Computational Platform for Complex Molecular Design Jaime Rodríguez-Guerra Pedregal
    ADVERTIMENT. Lʼaccés als continguts dʼaquesta tesi queda condicionat a lʼacceptació de les condicions dʼús establertes per la següent llicència Creative Commons: http://cat.creativecommons.org/?page_id=184 ADVERTENCIA. El acceso a los contenidos de esta tesis queda condicionado a la aceptación de las condiciones de uso establecidas por la siguiente licencia Creative Commons: http://es.creativecommons.org/blog/licencias/ WARNING. The access to the contents of this doctoral thesis it is limited to the acceptance of the use conditions set by the following Creative Commons license: https://creativecommons.org/licenses/?lang=en Development and Application of a Computational Platform for Complex Molecular Design a dissertation submitted by Jaime Rodríguez-Guerra Pedregal & directed by Prof. Dr. Jean-Didier Maréchal in fulfillment of the requirements for the degree of Doctor of Biotechnology Tutor: Prof. Dr. Jordi Joan Cairó Badillo Department of Chemical, Biological and Environmental Engineering Universitat Autònoma de Barcelona July 2018 Development and Application of a Computational Platform for Complex Molecular Design a dissertation submitted by & recommended for acceptance by advisor Jaime Rodríguez-Guerra Pedregal Prof. Dr. Jean-Didier Maréchal Tutor: Prof. Dr. Jordi Joan Cairó Badillo Department of Chemical, Biological and Environmental Engineering Universitat Autònoma de Barcelona July 2018 ©2018 – Jaime Rodríguez-Guerra Pedregal Licensed as Creative Commons BY-NC-ND Attribution-NonCommercial-NoDerivs In the beginning, there was nothing. And God said «Let there be light». And there was light. There was still nothing, but you could see it a lot better. —WoodyAllen. Development and Application of a Computational Platform for Complex Molecular Design by Jaime Rodríguez-Guerra Pedregal Abstract In this dissertation, a series of novel computational modeling tools is reported.
    [Show full text]