L Fu - Dao: a novel programming language for bioinformatics
Upcoming SlideShare
Loading in...5
×
 

L Fu - Dao: a novel programming language for bioinformatics

on

  • 1,633 views

Presentation at BOSC2012 by L Fu - Dao: a novel programming language for bioinformatics

Presentation at BOSC2012 by L Fu - Dao: a novel programming language for bioinformatics

Statistics

Views

Total Views
1,633
Views on SlideShare
1,633
Embed Views
0

Actions

Likes
0
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    L Fu - Dao: a novel programming language for bioinformatics L Fu - Dao: a novel programming language for bioinformatics Presentation Transcript

    • Motivation Example Features Concurrent Programming JIT ClangDao Future Dao: a novel programming language for bioinformatics Limin Fu UC San Diego BOSC 2012 July 14, 2012
    • Motivation Example Features Concurrent Programming JIT ClangDao FutureWhy a new language for bioinformatics? A simple fact: Programming languages commonly used in bioinformatics are designed before: multi-core machines started to become common; some important programming paradigms are widely accepted. Once a language has got a lot of backward compatibility to maintain, it becomes very hard to add new features or support new programming paradigms without introducing inconsistency!
    • Motivation Example Features Concurrent Programming JIT ClangDao FutureDao programming language (http://daovm.net) Key Features Optional typing with type inference and static type checking; Native support for concurrent programming; LLVM-based Just-In-Time (JIT) compiling; Simple C interfaces for easy embedding and extending; Clang-based tool for automatic wrapping of C/C++ libraries;
    • Motivation Example Features Concurrent Programming JIT ClangDao FutureA simple example Use thread task to compute the sum of squares: # Start a thread task and return a future value: fut = mt.start( $now )::{ sum2 = 0 for( i = 1 : 1000 ) sum2 += i * i return sum2 }
    • Motivation Example Features Concurrent Programming JIT ClangDao FutureA simple example Use thread task to compute the sum of squares: # Start a thread task and return a future value: fut = mt.start( $now )::{ sum2 = 0 for( i = 1 : 1000 ) sum2 += i * i return sum2 } Due to type inference, variable fut will be a future value with type, future<int> It is optional to write the type explicitly as the following, fut : future<int> = mt.start( $now )::{ ...
    • Motivation Example Features Concurrent Programming JIT ClangDao FutureA simple example Use thread task to compute the sum of squares: # Start a thread task and return a future value: fut = mt.start( $now )::{ sum2 = 0 for( i = 1 : 1000 ) sum2 += i * i return sum2 } mt built-in module for multi-threading; mt.start()::{} a code section method to start a thread task; The thread task will be executed in a different thread.
    • Motivation Example Features Concurrent Programming JIT ClangDao FutureA simple example Use thread task to compute the sum of squares: # Start a thread task and return a future value: fut = mt.start( $now )::{ sum2 = 0 for( i = 1 : 1000 ) sum2 += i * i return sum2 } An enum symbol to request immediate start of the thread task. (More or less a combination of C++ enum and Ruby symbol.)
    • Motivation Example Features Concurrent Programming JIT ClangDao FutureConcurrent programming: parallelized code section methods Parallelized code section methods The multi-threading module mt provides a number of parallelized code section methods: mt.iterate(): iterate on array, list, map, or a number of iteration; mt.map(): map items of array, list or map to produce new array or list; mt.apply(): apply new values to the items of array, list or map; mt.find(): find the first item that satisfy a condition; Example, ls = {1,2,3,4,5,6} # Parallel iteration: mt.iterate( times => 10 )::{ [index] io.writeln( index ) } mt.iterate( ls, threads => 2 )::{ [item] io.writeln( item ) } # Parallel mapping and value application: ls2 = mt.map( ls, 2 )::{ [it] it*it } # ls2 = {1,4,9,16,25,36} mt.apply( ls, 2 )::{ [it] it*it } # ls = {1,4,9,16,25,36}
    • Motivation Example Features Concurrent Programming JIT ClangDao FutureConcurrent programming: asynchronous classes Asynchronous classes Asynchronous classes produce asynchronous instances; Calling a method will automatically create a thread task; Thread tasks on the same instance are queued for execution. Example, class @Clustering { routine Run(){ DoKmeansClustering() } } cls = Clustering() job = cls.Run() while( 1 ){ DoSomethingElse(); if( job.wait( 0.1 ) ) break; # wait for 0.1 second }
    • Motivation Example Features Concurrent Programming JIT ClangDao FutureLLVM-based Just-In-Time (JIT) compiler Based on the Low Level Virtual Machine (LLVM); Emphasis on numeric computation; Compiles a subset of Dao virtual machine instructions;
    • Motivation Example Features Concurrent Programming JIT ClangDao FutureLLVM-based Just-In-Time (JIT) compiler Based on the Low Level Virtual Machine (LLVM); Emphasis on numeric computation; Compiles a subset of Dao virtual machine instructions; JIT Performance Test (time in seconds) Program Argument Dao Dao+JIT Speedup Python C (-O2) fannkuch 11 100.5 22.8 4.4X 339.3 4.8 mandelbrot 4000 40.0 5.1 7.8X 158.8 3.8 nbody 10000000 63.5 19.2 3.4X 333.4 2.4 spectral-norm 5000 98.0 7.6 12.8X 985.5 7.7 binary-trees 16 64.4 64.4 1.0X 22.3 5.5 Note: benchmark programs are taken from Computer Language Benchmarks Game http://shootout.alioth.debian.org
    • Motivation Example Features Concurrent Programming JIT ClangDao FutureClangDao: bringing C/C++ libraries to your finger tips Based on Clang (C Language Family Frontend for LLVM); Generate bindings directly from C/C++ header files; Support C/C++ functions, C structs, C callbacks, C++ classes and inheritance, C++ virtual functions, C++ templates (to some extent) etc.;
    • Motivation Example Features Concurrent Programming JIT ClangDao FutureClangDao: bringing C/C++ libraries to your finger tips List of bindings generated by ClangDao Scientific: DaoGSL GNU Science Library (GSL) DaoBamTools BamTools DaoGenomeTools GenomeTools DaoSVM LibSVM (Support Vector Machine) Visualization: DaoVTK Visualization Toolkit DaoMathGL MathGL 2D Graphics: DaoGraphicsMagick GraphicsMagick 3D Graphics: DaoOpenGL OpenGL DaoHorde3D Horde3D Engine DaoIrrlicht Irrlicht 3D Engine Multimedia: DaoSDL Simple DirectMedia Layer (SDL) DaoSFML Simple and Fast Multimedia Library GUI: DaoFLTK Fast Light Toolkit (FLTK) Miscellaneous: DaoXML libxml2 DaoBullet Bullet Physics Engine DaoGameKit GameKit Game Engine DaoGamePlay GamePlay Game Engine
    • Motivation Example Features Concurrent Programming JIT ClangDao FutureFuture development The development of Dao in the context of bioinformatics BioDao : future<Dao::Bioinformatics> = mt.start::{ DevelopDaoPackages( field => Bioinformatics ) } It should lead to an open source project named BioDao; This project will provide a large number of modules and packages for bioinformatics; It may start from screening candidate C/C++ bioinformatics libraries for automatic or semi-automatic binding; Suggestions for such libraries are highly welcome.
    • Motivation Example Features Concurrent Programming JIT ClangDao Future Thank you! Links and Contacts http://daovm.net https://github.com/daokoder daokoder@gmail.com l2fu@ucsd.edu