Ideas List - Google Summer of Code 2017
- Improve the HTTPS module of LuaSec
- Develop I/O API for NetBSD Kernel Lua
- Lua Client for Strava V3 API
- Editor Support for Typed Lua
- Parser Generator Based on LPeg(Label)
- Adapt CGILua SAPI launcher to explore all WSAPI features
- Interrupt-based drivers and libraries for Céu-Arduino
- Porting Terra, a tiny IoT Virtual Machine, to Android Devices.
Improve the HTTPS module of LuaSec
The aim of this project is to improve the HTTPS module, fixing the issues and adding some new features.
- Make the HTTPS module more self-contained, fixing the dependency problem.
- New features: proxy and SNI (Server Name Indication).
- Support to HTTP/2 is a plus.
- C, Lua, Git, HTTP protocol.
Easy / Medium
Develop I/O API for NetBSD Kernel Lua
The main difference between kernel Lua and regular user-level Lua is that kernel Lua has no support for standard libraries that depend on the 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 NetBSD loadable kernel modules, binding the kernel internal implementation for files and sockets user-level API.
- Kernel Lua File Library
- Kernel Lua Socket Library
- Documentation and Benchmarks
C, Lua, OS (and some courage :) )
Lua Client for Strava V3 API
Strava is a popular social network for athletes that we can use to track cycling, running or swimming activities and share them with our connections. The Strava V3 API is publicly available and developers can use it to access Strava's dataset for creating custom applications. As an example, RELIVE.cc gets your latest Strava ride and creates a movie of your ride that is played with Google Earth 3D. Although Strava allows developers to create their own applications, its library support is still limited and there is no support for Lua.
The aim of this project is to create a Strava library for Lua, so we can use it to create Strava applications with Lua. We also expect that at least one application example should be developed using the new library. We would like to use Typed Lua to define our interfaces, as we might want to move to Typed Lua when it is released.
- A Lua Client for Strava V3 API.
- An example application that uses the Lua library.
- RESTful WebServices.
- Running, Cycling or Swimming.
Editor Support for Typed Lua
Typed Lua is a statically typed extension of the Lua language. Currently, Typed Lua's user interface is just a command-line compiler that compiles a file at a time. The goal of this project is threefold: first to turn the command-line compiler into a daemon that watches a file tree for changes, recompiling the files whenever they change, and keeping as its internal state all the errors and types extracted from these files. This daemon, or analysis server, can then answer to HTTP queries about the files in the tree, with the answers in JSON format. Finally, editor plugins can interface with the server to display error and autocomplete information about the files that the programmer is currently editing.
- An analysis server for Typed Lua that watches a directory tree and compiles any Typed Lua source files that change
- Webservices in the analysis server that serve information (in JSON format) on the source files in the tree about parse/type errors and type information for autocomplete purposes
- Editor plugins for Atom, VS Code, and Zerobrane Studio that connect to the analysis server
Parser Generator Based on LPeg(Label)
Parsing Expression Grammars (PEGs) are an expressive formalism for the design and implementation of top-down parsers with local backtracking. LPeg is a tool that provides an implementation of PEGs for Lua, while LPegLabel is an extension of LPeg with some facilities for error reporting and recovery.
The goal of this project is to build a parser generator on top of LPegLabel. This new tool should make easier the description of commom idioms and should make error reporting more automatic.
The new parse generator will be used to (re)write parsers, such as the lua-parser.
- A parser generator tool
- The (re)writing of at least 2 parsers, including lua-parser, with the new tool. The description of the parsers using the new tool should be easier than using plain LPeg(Label).
- A proper documentation
A marginal result would be the improvement of the LPegLabel tool based on the difficulties perceived during the project.
We expect the applicants to have a good knowledge of parsing and to develop familiarity with LPeg and LPegLabel before the project starts. The applicant should have used at least one parser generator tool, such as yacc/bison, ANTLR, JavaCC, PEG.js, etc.
For this reason, we may ask the applicants to perform some activities before the application period.
Medium / Advanced
Adapt CGILua SAPI launcher to explore all WSAPI features.
CGILua is a tool for creating dynamic Web pages and manipulating input data from Web forms. One of advantages of CGILua is its abstraction of the underlying Web server. CGILua can be used with a variety of Web servers and, for each server, with different launchers. A launcher is responsible for the interaction of CGILua and the Web server, for example mod_lua on Apache. The reference implementation of CGILua launchers is Kepler.
WSAPI is an API that abstracts the web server from Lua web applications. WSAPI provides a set of helper libraries that help with request processing and output buffering.
Currently, CGILua has an implementation of an abstract underlying server which is almost the same of WSAPI itself. This project proposes a reimplementation of this layer (called SAPI) to explore WSAPI fully. This should improve the performance and simplify maintenance.
- Rewrite CGILua library to dispense SAPI module and use WSAPI directly.
Advanced Lua programming is mandatory, since both tools (CGILua and WSAPI) are not naive software. A good understanding of the Lua environment concept is particularly necessary in this project.
Web programming experience can be very helpful especially to understand the context of use of these tools.
Interrupt-based drivers and libraries for Céu-Arduino
Currently, most operations in Arduino libraries freeze the rest of the application until they complete:
- Reading an analog pin with analogRead takes about 100 microseconds to complete.
- Measuring distance with an ultrasonic sensor takes about 30 milliseconds.
The use of interrupts allows programs to remain executing while the operation progresses and completes. However, programming with interrupts is hard and error prone.
Céu-Arduino supports the development of Arduino applications in the programming language Céu:
- Source Code: https://github.com/fsantanna/ceu-arduino/
- Documentation: http://fsantanna.github.io/ceu-arduino/
- Chat: https://gitter.im/fsantanna/ceu
Céu is a reactive language that aims to offer a higher-level and safer alternative to C:
Céu-Arduino empowers the development of Arduino applications with the following extensions:
- Awaiting events in direct/sequential style.
- Parallel lines of execution with
- safe abortion;
- deterministic behavior (in contrast with threads).
- Asynchronous loops for heavy computations.
- Interrupt-driven operation mode.
- Seamless integration with standard Arduino (e.g.,
Céu supports interrupts as a primitive construct, reducing programming efforts considerably.
Céu-Arduino already provides interrupt-based drivers for pins, internal timers, and the USART.
The ProjectThe project consists of developing new interrupt-based drivers and libraries for chips and peripherals, e.g.:
- Arduino's internal analog-to-digital converter.
- Arduino's internal SPI and I2C buses.
- Arduino's internal EEPROM.
- An external real-time clock.
- Some sensor libraries built on top of these drivers, e.g.: ultrasonic, accelerometer, etc.
- Céu is the programming language used in Céu-Arduino.
- Céu-Arduino is the Céu binding for Arduino.
- Arduino UNO is an Arduino development board.
- A sort of Arduino peripherals.
We expect the student to own an Arduino board and peripherals.We also expect the student to know C and interrupt services routines in Arduino or AVR microcontrollers.
We ask applicants to complete the following activities before the application period:
- Install Céu and Céu-Arduino and compile and test some existing examples.
- Create a simple example in Céu-Arduino using some sensors and actuators (not necessarily using interrupts).
- Create a simple example in C that uses interrupt-driven analog reads.
- Fork our Céu-Arduino project on github and commit the new examples.
Porting Terra, a tiny IoT Virtual Machine, to Android Devices.
Terra is a system based on a tiny virtual machine and combines a reactive scripting language with a set of customized components. Originally, Terra was designed to run in WSN/IoT nodes with limited resources. These nodes, typically, have small microcontrolers and communicate using specific radio standards like IEEE 802.15.4 (based on ZigBee). Terra uses Céu-T as its scripting language and implements a component-based virtual machine VM-T to be customized for different application domains. We built VM-T using the nesC programming language and the TinyOS operating system.
We have already started some initiatives to port Terra to different devices to enable interoperability in heterogeneous IoT network. These initiatives include ports to different operating systems and devices with different levels of resources. These initiatives include the use of radio technologies like IEEE 802.11 standards and the use of Linux on a RaspberryPI device.
The aim of this project is to port Terra Virtual Machine VM-T to Android devices. This port will enable interoperability of Android devices with others devices running Terra, allowing experiments with more powerful mobile devices interacting with a heterogeneous IoT network.
We plan two main development activities. One will be the development of an integration layer between the VM engine and the Android system. The other will be the customization to access some sensors and actuators of the device.
- A functional port of Terra VM to Android devices.
- A set of Terra application examples, including a gateway between different radio standards.
- Android - programming in C. (Timer and UDP/IP library)
- nesC - Desirable basic knowledge.