programming language technology for niche platforms
play

Programming Language Technology for Niche Platforms Tero Hasu BLDL - PowerPoint PPT Presentation

Programming Language Technology for Niche Platforms Tero Hasu BLDL and University of Bergen Bergen, 3 March 2017 Tero Hasu (BLDL) Programming Language Technology for Niche Platforms more markets, more opportunities Tero Hasu (BLDL)


  1. Programming Language Technology for Niche Platforms Tero Hasu BLDL and University of Bergen Bergen, 3 March 2017 Tero Hasu (BLDL) Programming Language Technology for Niche Platforms

  2. more markets, more opportunities Tero Hasu (BLDL) Programming Language Technology for Niche Platforms

  3. motivation chosen strategy built around an adaptable programming language capable of existing in variations of itself thesis’ contributions Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ readiness to pursue niche platform opportunities ▶ have multi-platform software production tooling ▶ technologies ▶ and suggestions for applying them

  4. overview 2. strategy 3. technologies / papers (chapters 2–5) Tero Hasu (BLDL) Programming Language Technology for Niche Platforms 1. niche platforms ▶ Source-to-Source Compilation via Submodules ▶ Illusionary Abstract Syntax ▶ Inferring Required Permissions for Statically Composed Programs ▶ Declarative Propagation of Errors as Data Values

  5. part 1: niche platforms Tero Hasu (BLDL) Programming Language Technology for Niche Platforms

  6. niche platform, defined Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ a platform : ▶ software can be written for it, and run on it ▶ a niche platform : one without a large developer ecosystem ▶ e.g., Symbian, BB10, Harmattan

  7. niche platforms problems advantages Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ few developers → socially limiting ▶ few libraries, tools → poor dev experience ▶ not established → discontinuation risk ▶ little competition → app discoverability, unit price, ”bribery”

  8. … tools for packaging, installation, localization, file formats software development tools (executables, resource files, help files, bitmaps, certificates, printer drivers, …), … Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ compiler ▶ IDE ▶ emulator ▶ on-target debugger ▶ build manager ▶ toolchain ▶ …

  9. unfamiliar tools Symbian toolchain abld , bldmake , bmconv , elf2e32 , makedef , makmake , rcomp , … Tero Hasu (BLDL) Programming Language Technology for Niche Platforms

  10. languages programming languages little languages Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ C, C++, JavaScript, … ▶ project description languages ▶ qmake , MMP, ”tizen-manifest.xml”, …

  11. custom and standard languages makmake project (MMP) TARGETTYPE exe TARGET bldl_anyxporter.exe UID 0x100039ce 0xeb1d1001 EPOCSTACKSIZE 0x10000 EPOCHEAPSIZE 0x020000 0x800000 CAPABILITY ReadUserData ”Symbian C++” _LIT(KConsoleTitle, "Anyxporter"); CConsoleBase* console = Console::NewL(KConsoleTitle, TSize(KConsFullScreen, KConsFullScreen)); CleanupStack::PushL(console); Tero Hasu (BLDL) Programming Language Technology for Niche Platforms

  12. APIs / vocabulary Symbian CBase , CActive , User , CleanupStack , … Qt QObject , QString , QList , QMap , QVariant , … Tizen 2.3 tizen_error_e , event_cb , event_handler_h , … Tero Hasu (BLDL) Programming Language Technology for Niche Platforms

  13. platform lifespans Psion Series 5 Pebble ”Burning Platform” by Micky Aldridge (CC BY 2.0) Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ 2013–2016 ▶ Pebble OS ▶ at Fitbit? ▶ 1997–2001 ▶ EPOC release 5 ▶ became Symbian OS

  14. part 2: strategy Tero Hasu (BLDL) Programming Language Technology for Niche Platforms

  15. constraint Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ play nice with platforms (APIs, languages, tools) ▶ coexist, do not fight

  16. product families Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ multiple product configurations ▶ to suit different platforms

  17. product lines Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ systematically manage multiple product configurations ▶ to suit different platforms

  18. wanted: ”containment” 1. languages 2. APIs 3. tools Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ knowledge about platform → limit the extent to which one must acquire and remember it

  19. managing platform specifics: languages Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ program in a familiar translatable language ▶ one to shield us from target languages ▶ one that we control ▶ can customize to capture idioms, etc.

  20. single target language scenario Tero Hasu (BLDL) Programming Language Technology for Niche Platforms physical state units machines reduce reduce mbeddr C ▶ specific mbeddr C ▶ C-like language translate C OpenEmbedded-Core compile compile build build program program fi rmware fi rmware BeagleBoard MinnowBoard

  21. multiple target language scenario language Tero Hasu (BLDL) language Programming Language Technology for Niche Platforms physical state units machines reduce reduce reduce OneLang OneLang-C ▶ agnostic OneLang ▶ unoriented translate translate translate ▶ specific OneLang C Swift C ▶ C-oriented compile compile program program iPhone 7 Samsung Z2 (with iOS) (with Tizen 3.0)

  22. one language technology base Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ ”one” language to rule all them platforms—through variation ▶ same look and feel ▶ same programming environment

  23. managing platform specifics: APIs typedef struct _Engine* Engine; // abstract data type Engine Engine_new(MyError* error); boolean Engine_export_all_contacts( Engine obj, const char* filename, MyError* error); void Engine_destroy(Engine obj); Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ hide specifics under abstract APIs ▶ wanted: API parameterization for purposes of code composition ▶ e.g., code to use for reading contacts ▶ e.g., code to use for writing to a file

  24. agnostic API management language Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ e.g., Magnolia

  25. program composition program TizenContactsExporter = { Tero Hasu (BLDL) }; use CFileSys; use TizenContacts; use Engine; Programming Language Technology for Niche Platforms TizenContacts CFileSys (Tizen speci fi c) (C language speci fi c) parameterize parameterize with a with a Contacts FileSys Engine compose program compile program Samsung Z2 (with Tizen 3.0)

  26. managing platform specifics: tools PLATFORM := symbian PERMISSIONS := NetworkServices ReadUserData Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ write makefiles or scripts to drive vendor tools ▶ use tools to source build configuration information ▶ e.g., from API annotations (§4)

  27. part 3: technologies Tero Hasu (BLDL) Programming Language Technology for Niche Platforms Inferring Required Permissions for Statically Composed Programs Tero Hasu, Anya Helene Bagge, and Magne Haveraaen Source-to-Source Compilation via Submodules Bergen Language Design Laboratory Department of Informatics Tero Hasu Matthew Flatt University of Bergen, Norway BLDL and University of Bergen PLT and University of Utah http://www.ii.uib.no/~{tero,anya,magne} tero@ii.uib.no mflatt@cs.utah.edu Errors as Data Values Managing Language Variability in Source-to-Source Compilers by Transforming Illusionary Syntax Tero Hasu Magne Haveraaen Tero Hasu ∗ Bergen Language Design Laboratory Department of Informatics Bergen Language Design Laboratory Department of Informatics University of Bergen, Norway University of Bergen, Norway http://www.ii.uib.no/~{tero,magne} tero@ii.uib.no

  28. §2–5 technologies Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ for adaptable, translatable programming languages

  29. §2–3 language processing Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ for implementing adaptable, translatable programming languages

  30. Tero Hasu (BLDL) §2 Programming Language Technology for Niche Platforms Source-to-Source Compilation via Submodules Tero Hasu Matthew Flatt BLDL and University of Bergen PLT and University of Utah tero@ii.uib.no mflatt@cs.utah.edu ▶ European Lisp Symposium (ELS 2016) ▶ Kraków

  31. §2 Source-to-Source Compilation via Submodules presents A technique for arranging for further compilation of Racket languages, post macroexpansion and other desired processing. achieves Tero Hasu (BLDL) Programming Language Technology for Niche Platforms ▶ allows extensive reuse of Racket mechanisms ▶ retains support for separate compilation

  32. §2 Magnolisp MGL_PROTO int f1_g( int const& x ); Tero Hasu (BLDL) } return x; MGL_FUNC int f1_g( int const& x ) { } return f1_g(x); MGL_API_FUNC int f1( int const& x ) { (g)) (define (g) x) ^(-> int int)) #:: (export (define (f1 x) #:: (foreign)) (typedef int #lang magnolisp Programming Language Technology for Niche Platforms ▶ proof-of-concept software ▶ transcompiled, with a C++ back end

Recommend


More recommend