1 / 56

Integrating Haskell with Visual Studio Assignment Manager

Integrating Haskell with Visual Studio Assignment Manager. André Santos & VHS/VHS-AM Team alms@cin.ufpe.br. Haskell. Pure functional programming language Strenghts... High level of abstraction Concise code (4x to 10x smaller) Strong Mathematical foundation Modules, Abstract Data Types

ataret
Télécharger la présentation

Integrating Haskell with Visual Studio Assignment Manager

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Integrating Haskell with Visual Studio Assignment Manager André Santos & VHS/VHS-AM Team alms@cin.ufpe.br

  2. Haskell • Pure functional programming language • Strenghts... • High level of abstraction • Concise code (4x to 10x smaller) • Strong Mathematical foundation • Modules, Abstract Data Types • Polymorphism, high order functions, Strong typing •  higher productivity, easier maintenance, higher code reuse • Lazy Semantics  infinite data structures • But weaknesses too... • Limited Integration with other technologies • No powerful IDEs

  3. Project History • Haskell + VS.NET Integration  VHS Project • Personal initiative/interest: André and Simon Marlow (MSR) • started by mid-2003 Assignment Manager extensions RFP • RFP for extending Assignment Manager (end of 2003) • MS Shared Source tool for submitting and evaluating student assignments •  The VHS-AM Project

  4. VHS-AM Project VHS Project Combined Objectives • Allow the use of Assignment Manager for teaching Haskell by extending Assignment Manager and/or Visual Studio .NET • Have a full IDE for Haskell

  5. This presentation • MS Assignment Manager • VHS (Visual Haskell) and VSIP program • Demo • Conclusions and Future Work

  6. Assignment Manager • Faculty (teaching) Tools • Student Tools • Assignment Manager

  7. Faculty Tools • Set of tools for managing the publishing of courses and course tasks • Two main parts: • Assignment Publishing Tools • Code Extraction

  8. Assignment Publishing Tools • Allows the publishing of courses and tasks • Students access the course site/materials therough: • webserver (http:// ...) • network share (\\Server\folder) • ftp server (ftp:// ...)

  9. Adding a new course

  10. Submitting a new task

  11. Disponibilizando uma tarefa ...

  12. Code Extractor • Allows teacher to hide parts of the source code of a project • Tells the students where to write their own code • “Template” projects

  13. Hiding code...

  14. Student perspective...

  15. Student Tools • Allow the students to see the courses’ sites

  16. After joining a course the student can see what tasks are available...

  17. Assignment Manager • Improved version of the Assignment Publishing Tools • Web application, that requires: • ASP.NET • SQLServer or Microsoft Data Engine • Internet Information Services (IIS) • Microsoft Message Queuing (MSMQ)

  18. Access to available tasks Creation of a course Solution submission Publishes tasks and marks Access to marks Assignment Manager Server Faculty Clients Student Clients A.M. Architecture

  19. A.M. – Communication • Lecturers can contact students through: • E-mail • Internal message system

  20. A.M. – Publishing tasks • Auto-build and auto-check • Extra files (e.g. I/O) • Messages: • Send Reminder, Send Past Due Notice, New Project Notice, Updated Project Notice

  21. A.M. – publishing tasks • After student submissions teacher can assign marks • Marks are available to students

  22. Project History & Objectives • MS Assignment Manager • VHS (Visual Haskell) and VSIP program • Demo • Conclusions and Future Work

  23. Existing Haskell IDEs • Some tools have some Haskell support: • syntax colouring • indentation (hard in Haskell!) • jump to errors • menu of top-level declarations • jump to definition • interactive compilation/evaluation • display type of an identifier • Some tools: emacs, vi(m), WinHugs, Eclipse plugin

  24. Problems • Language support tends to be unreliable, because these environments are not using a real Haskell front-end. eg. Colouring support in Emacs is really bad • Different language flavours: Haskell98+FFI, hierarchical modules, CPP, literate • Jumping to an error often misses (compilers don’t have good source loc info) • No real compilation support • Many, many, many more things an IDE can do…

  25. VHS Project Objectives • Integrate GHC with Visual Studio to make a decent Haskell IDE • Specify a programatic interface to GHC so that it can be re-used in other IDE-like contexts.

  26. Background: Visual Studio • Development shell, with several language plugins: VC++, VC#, VJ#, VB • Very rich feature set • Lots of support for language integration • Projects: multi-file applications/libraries • Solutions: multiple projects • Debugging • Integrated documentation, context-sensitive help etc. • Lots of support for automation/extension/customisation • “free” access to the integration APIs: VSIP • Windows only

  27. VSIP • Visual Studio Industry Partners • set of COM APIs for integrating new functionality into VS: • Language support in the editor • Project • Tools • “freely available” SDK • APIs are highly detailed, flexible & HUGE • Babel (Daan Leijen) provides a simpler abstraction layer for integrating simple language support • http://www.vsipdev.com

  28. Extending VS.NET • VS.NET Extension Mechanisms: • VS.NET IDE Itself • Basic level of automation/extension • customization of the IDE and creation of new components for VS.NET programming. • VS.NET Macros • Widely supported by the IDE: Macros Explorer, VSMacros IDE, supports recording, debugging, etc. • Can’t create GUIs, tool windows, etc. • VS.NET Add-Ins • Higher integration: creation of new applications embeddded in VS.NET, including GUI • Ideal for medium complexity extensions • can’t be used to define new languages • VS.NET Wizards • Takes the programmer step-by-step on the execution of a task • VSIP • More powerful and much more complex • The only way of supporting new programming languages and new project types • Current version supports using managed code • Used to implement most of our use cases

  29. Compiler Using VSIP Lex/Yacc parser or Implementation of Babel Interfaces VSIP COM interfaces Babel COM interfaces Visual Studio Babel Parser, typechecker,etc. Direct to VSIP for project support C/C++

  30. GHC VHS Project VSIP COM interfaces Babel COM interfaces Visual Studio Babel Haskell Service Direct to VSIP for project support C/C++ Haskell

  31. Status of the VHS Project • We have: • Syntax colouring • accurate indication of erroneous subexpressions • Parsing/renaming/type-checking as you type (in a separate thread) • Brace matching • (Partial) Project support including A.M. support • Prototype of quick info support • Prototype of method tips support • Prototype of autocompletion

  32. Screenshots

  33. Screenshots

  34. Screenshots

  35. Screenshots

  36. Demos Method tip Quick info + pop-up list Taskbar errors Brace Matching

  37. Features we want • Extend Brace matching (e.g. let/in) • Drop-down menu of top-level decls • Outlining • Jump to definition (or docs for library fns) • Easy access to documentation • Code model (programatic access to the source code) • Inferred types tooltips • Type of subexpression • Further Project support: • Multi-module support (automatically discover dependencies, etc.) • Library-infrastructure support (import/export library infrastructure metadata gives a nice way to package & ship a project)

  38. More ambitious features • Integrated FFI tools • .NET integration • Debugging • GUI Builder

More Related