Ideas List - Google Summer of Code 2018



Interrupt-based drivers in Céu-Arduino for Cortex-M0 microcontrollers

Background

Currently, most operations in Arduino libraries freeze the rest of the application until they complete, e.g.:

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:

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:

Céu supports interrupts as a primitive construct, reducing programming efforts considerably.

Céu-Arduino already provides some interrupt-based drivers for AVR microcontrollers, such as for external pins, timers, ADC, SPI, and the USART.

The Project

The project consists of developing new interrupt-based drivers for Cortex-M0 microcontrollers, e.g.:

Tools

Prerequisites

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 microcontrollers.

We ask applicants to complete the following activities before the application period:

  1. Install Céu and Céu-Arduino and compile and test some existing examples.
  2. Create a simple example in Céu-Arduino using some sensors and actuators (not necessarily using interrupts).
  3. Create a simple example in C that uses interrupt-driven analog reads.
  4. Fork our Céu-Arduino project on github and commit the new examples.

Skill level

Hard

Mentor

Francisco Sant'Anna



A Parser Generator with Semi-Automatic Error Recovery based on LPeg(Label)

Brief explanation

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 the new version of LPegLabel. This new tool should make easier the description of a parser for a programming language and should also implement an algorithm to automatically annotate a PEG with labels, in order to provide a quasi-automatic error recovery mechanism.

Tools

Expected results

Prerequisites

We expect the applicants to have a solid 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 will ask the applicants to perform some activities before the application period.

Skill level

Advanced

Mentor

Sérgio Medeiros



Titan Fiber-Based Coroutines

Brief Explanation

Titan is a new programming language, designed to be a statically-typed, ahead-of-time compiled sister language to Lua. Titan is in active development and, by the time of GSoC 2018, will already have had its first public release. The main goal of Titan is predictable performance, getting close to or surpassing what is possible with LuaJIT while being easy for Lua programmers. Several important use cases of Lua and LuaJIT, such as OpenResty, rely on Lua coroutines for exposing a blocking, synchronous API to Lua scripts while working on top of an asynchronous, non-blocking native API. The goal of this GSoC project is to add coroutine support to Titan, using the fiber APIs of the major operating systems, so similar APIs can be built in Titan. This should be done without changes to the Lua virtual machine and runtime system, although custom versions of the Lua standard library functions that create and manage coroutines should be necessary.

Expected Results

Knowledge Prerequisites

C, Lua, OS APIs for cooperative multithreading (fibers)

Skill Level

Advanced

Mentor

Fabio Mascarenhas


Develop I/O API for Lunatik

Brief explanation

Lunatik is a kernel-level Lua interpreter version for scripting the Linux kernel. For example, it allows users to filter packets using Lua scripts.

The main difference between Lunatik and regular user-level Lua is that Lunatik 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 a Lunatik library to provide I/O functionality to kernel scripts. This API should provide access to the file system internals and be implemented as a Linux loadable kernel module, binding the kernel internal implementation for the file user-level API.

Expected results

Knowledge prerequisites

C, Lua, OS (and some courage :) )

Skill level

Advanced

Mentor

Lourival Vieira Neto



Develop Socket API for Lunatik

Brief explanation

Lunatik is a kernel-level Lua interpreter version for scripting the Linux kernel. For example, it allows users to filter packets using Lua scripts.

The main difference between Lunatik and regular user-level Lua is that Lunatik 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 a Lunatik library to provide network functionality to kernel scripts. This API should provide access to the network internals and be implemented as a Linux loadable kernel module, binding the kernel internal implementation for the socket user-level API.

Expected results

Knowledge prerequisites

C, Lua, OS (and some courage :) )

Skill level

Advanced

Mentors

Lourival Vieira Neto
Pedro Tammela



Update the Lua Binding to libgit2

Brief explanation

libgit2 is a portable, pure C89 implementation of the Git core methods provided as a linkable library with a solid API with zero dependencies. It is currently used in a variety of git-based applications such as GitHub, GitLab and BitBucket. libgit2 has bindings with multiple programming languages such Ruby, Python, Erlang, Go, Lua and many others.

The project consists in updating (or rewriting) the Lua binding to libgit2 (luagit2)

Expected results

Prerequisites

Skill level

Medium

Mentors

Etiene Dalcol
Edward Thomson