Projects - Google Summer of Code 2016
- Typed Lua Core Typechecker
- Add class-based object-oriented programming to Typed Lua
- Next Generation of the LuaRocks test suite
- I/O API for NetBSD Kernel Lua
- Improve elasticsearch-lua tests and build
- Admin Center, Elasticsearch integration for Sailor and Luagoogle
- Extending the online tutorial of Céu with Emscripten and SDL
- Improving the Quality of Error Messages in PEG Parsers
- An automatic generator of WSDL documents for LuaSOAP
Typed Lua Core Typechecker
Student
Tomek Dyczek - MsC Student, AGH University of Science and Technology, Poland.
Mentor
Brief explanation
Typed Lua is an optional type system for Lua, and its main goal is to provide static type checking for Lua. To do that, Typed Lua extends the syntax of Lua 5.3 to introduce optional type annotations, and performs local type inference to detect more precise types for unannotated expressions.
The aim of this project is to implement core Typed Lua in Haskell, as a tool to test new features and reason about new typing rules for Typed Lua. Core Typed Lua limits control flow to if and while statements; it has explicit type annotations, explicit scope for variables, explicit method declarations, and explicit method calls. We also expect that a Haskell implementation can help us improve our test suite in the future, as we it will allow us creating an environment where changes in the Typed Lua compiler can be verified along with the Haskell implementation.
Expected results
- A type checker written in Haskell that analyses code written in core Typed Lua.
Add class-based object-oriented programming to Typed Lua
Student
Kevin Clancy - PhD Student, Northeastern University, USA.
Mentor
Brief explanation
Typed Lua intended use is as an application language, and policies for organizing a program in modules and writing object-oriented programs should be part of the language and enforced by its optional type system. An application language is a programming language that helps programmers develop applications from scratch until these applications evolve to complex systems rather than just scripts. This project aims to add class-based object-oriented programming to Typed Lua through the definition of classes and interfaces, as a way to help Lua programmers better structure their code. The backend code generator should be a plugin, so the programmers can choose which OO style or library they want to use.
Expected results
- A formal specification of the syntax and typing judgements of the new class system.
- An extended version of the Typed Lua compiler that parses and type checks this class system.
Next Generation of the LuaRocks test suite
Student
Robert Karasek - MsC Student, Faculty of Informatics and Information Technologies (FIIT), Slovakia.
Mentor
Brief explanation
LuaRocks is the package manager for Lua modules. It has a test suite with about 80% coverage. However, the test suite is implemented as a big shell script that only does black-box testing: it calls luarocks as an external application. Further, it only checks for success and failure of the process, and not if it executed the expected actions, and it runs only on Linux.
The idea of this project is to port the test suite to Lua, using Busted. This will allow us to extend the test suite by writing smarter tests that check its behavior, write white-box tests of the internals, and also port the test suite to other platforms.
Expected results
- A new test suite, written in Lua.
- Improved code coverage, by adding white-box tests for parts that are hard-to reach via black-box testing.
- Initial results running the test suite on Windows (even if we can't run all tests at first).
- Integrated code coverage results, merging the Linux and Windows runs.
I/O API for NetBSD Kernel Lua
Student
Guilherme Salazar - Instituto de Informática, Universidade Federal de Goias, Brazil.
Mentor
Brief explanation
The NetBSD Operating System has a kernel-level Lua interpreter version for scripting its kernel. For example, it allows users to filter packets using Lua scripts.
The main difference between kernel Lua and regular user-level Lua is that kernel Lua doesn't have support for standard libraries that depend on an operating system (e.g., io and os) and for floating-point numbers. The purpose of this project is to develop kernel Lua libraries to provide I/O functionality to kernel scripts. This API should provide access both for file system and network. It should be implemented as a NetBSD loadable kernel module, binding the kernel internal implementation for files and sockets user-level API.
Expected results
- Kernel Lua File Library.
- Kernel Lua Socket Library.
- Documentation and Benchmarks.
Improve elasticsearch-lua tests and build
Student
Dhaval Kapil - Indian Institute of Technology Roorkee, India.
Mentor
Brief explanation
Elasticsearch is a distributed and scalable search engine. It is written in Java and, besides the transport protocol (Java to Java), it offers a very complete REST API accessed through JSON. elasticsearch-lua is a Lua library that allows Lua applications to easily comunicate with Elasticsearch clusters.
Currently, elasticsearch-lua has small build automation, only 19 library tests and no code coverage.
This project aims to implement more robust build automation.
Expected results
- An integration for code coverage, automated build tests (already working) and a large set of tests that cover most part of the code.
- Improved elasticsearch-lua documentation.
- Benchmarking code for elasticsearch-lua.
Admin Center, Elasticsearch integration for Sailor and Luagoogle
Student
R. Nikhil - Birla Institute of Technology and Science Pilane, India.
Mentor
Brief explanation
Elasticsearch is a distributed and scalable search engine. It is written in Java and, besides the transport protocol (Java to Java), it offers a very complete REST API accessed through JSON. elasticsearch-lua is a Lua library that allows Lua applications to easily communicate with Elasticsearch clusters.
Sailor is a web framework in the Lua programming language. Like Lua, it is open sourced under the MIT License, which is extremely permissive. Sailor applications are structured in a model-view-controller (MVC) architecture.The initial proposal for this project was the development of a search module to integrate elasticsearch-lua into Sailor. This proposal was extended by the student in order to include an Admin Center for Sailor and also a Lua module for getting Google search results programmatically in Lua.
Expected results
- Admin Center for the Sailor MVC framework.
- Integration or the elasticsearch-lua client into Sailor.
- A Lua module for getting Google search results programmatically (LuaGoogle).
Extending the online tutorial of Céu with Emscripten and SDL
Student
Margarit Vicentiu - Faculty of Computer Science, University Politehnica of Bucharest, Romania.
Mentor
Brief explanation
Céu is a programming language that targets system-level development of reactive systems. The language is under development at the LabLua since 2011, and was presented in Future Programming and Curry-On workshops.
Currently, the online tutorial of Céu executes a simulation at the server side (http://ceu-lang.org/try.php). This server-side approach does not provide a reactive and real-time experience, which are the ultimate objectives of the language. We want the online tutorial to offer a more interactive experience for learners of Céu.
SDL is a C-based and cross-platform development library that provides access to audio, keyboard, mouse, joystick, and graphics hardware. Given that Céu interacts well with C, combining Céu and SDL is a viable option for building a visually-appealing interactive tutorial. Emscripten is an LLVM-to-JavaScript compiler. SDL has already been ported to Emscripten.
Putting it all together, we can build an interactive tutorial for Céu that runs in the browser at the client side.
The bulk of the project is to implement this synergy between C, Céu, SDL, and Emscripten.
Expected results
- A working interactive online tutorial for Céu.
As an ultimate goal, we would like to build an incremental tutorial based on this video.
Improving the Quality of Error Messages in PEG Parsers
Student
Matthew Allen Go - De La Salle University, Philippines.
Mentor
Brief explanation
Parsing Expression Grammars (PEGs) are an expressive formalism for designing and implementing top-down parsers with local backtracking. An issue that users of PEG-based parsers face is poor reporting of syntax errors on the part of PEG-based parsers. Labeled failures are an extension to PEGs that aims to address this issue by annotating a PEG with labels corresponding to syntax errors, improving the quality of error messages generated by a PEG-based parser.
LPegLabel is an extension of the LPeg tool that provides an implementation of PEGs with labeled failures. Labels can be used to signal different kinds of errors and to specify which alternative in a labeled ordered choice should handle a given label.
The goal of this project is to rewrite the parsers of some Lua libraries, such as the module re from LPeg and lua-parser, by using LPegLabel. After this rewriting we should get parsers with better error messages.
Expected results
- The rewriting of at least 3 parsers by using LPegLabel.
- Proper documentation.
A marginal result would be the improvement of the LPegLabel tool based on the difficulties found during the project.
An automatic generator of WSDL documents for LuaSOAP.
Student
Victor Dias - Universidade Veiga de Almeida, Brazil.
Mentor
Tomas Guisasola
Brief explanation
LuaSOAP is a library to ease the use of SOAP, providing a very simple API that convert Lua tables to and from XML documents. It also offers a simple way to invoke remote Web Services without having to deal directly with SOAP messages. In fact, LuaSOAP also provides a simple way to offer Web Services -- the server side -- but it lacks support for WSDL generation of the offered services. WSDL is an XML format for describing network services. It is used to describe operations and messages -- with its types -- offered by Web Services.
The purpose of this project is to develop a fully automatic generator of WSDL documents for LuaSOAP, composed by a generation module and a parameter-based script. In order to guarantee type consistency without the need of explicit type declarations by LuaSOAP users, the use of Typed Lua will be investigated .
Expected results
- The automatic generator of WSDL documents for LuaSOAP.
- Proper documentation.