The Synchronous Blog

A blog about reactive programming languages.

Posts Tagged ‘lifting

Paper accepted.

leave a comment »

Good news received last week:

Dear Mr. Francisco Sant’Anna,

I am pleased to confirm that your paper “LuaGravity, a Reactive Language
Based on Implicit Invocation” has been accepted for presentation and
publication at SBLP 2009.

All papers went through a rigorous reviewing process by the program
committee. Out of 30 research papers and 3 tutorials submitted, 12
papers and 1 tutorial were accepted.

Please make sure that in the preparation of the final paper you
carefully address the reviewers’ comments. Additionally, at least one
author is required to register in the conference for your paper to
appear in the proceedings.

Congratulations again on having your paper accepted. We look forward to
seeing you in Gramado!

Reviewer’s comments already addressed and final version submitted! One reviewer in particular pointed several constructive observations, which we took very seriously in the final version.

Follows the abstract for the paper:

The reactive programming paradigm covers a wide range of applications, such as
games and multimedia systems.
Mainstream languages do not offer proper support for reactive programming,
lacking language-level primitives that focus on synchronism and interactions
within application parts.
We propose an imperative reactive language, called
LuaGravity, based on
unconventional implicit invocation mechanisms.
LuaGravity allows dataflow programming, sequential imperative execution, and
deterministic use of shared-memory.
With this work, we intend to unite the essential features of reactive languages
while keeping a convenient imperative style of programming.

SBLP [1] is the main Brazilian congress on programming languages. This year it will be held in Gramado on August 18-21.

[1] http://sblp2009.ucpel.tche.br/

A first glance at LuaGravity

with 8 comments

As a pragmatic programmer, I’ll try to mix the academic bla,bla,bla with practice, so…

LuaGravity is the name of my toy language that implements the synchronous approach for concurrency (I’ll dig into it sometime).
(Actually, it’s a *serious* toy language as a I’m very concerned to it and keep adding features and tweaking it all the time.)

When running it without a filename, you’ll see a prompt just like in the Lua Language [1].
As you type the statements and expressions you’ll attest that it’s just normal Lua…

Except, it’s reactive!

The video above shows that the variables a and b reacts to the current time, a – b to a and to b, and so on.

The INT function integrates its argument over dt (remember it from Calculus?).
It’s used here only to create a time reference for the application.
The L function states to its arguments that they should behave reactively (the name comes from “function Lifting”).

The result of the expression a – b shows the perfect synchronism between its arguments: no need for locks, no milliseconds difference, no text blinking, just zero as it is expected.

LuaGravity is roughly based on Esterel [2] and FrTime [3], two synchronous languages, the former having an imperative style, the latter being functional.
The example above shows only some functional features.

Here are some LuaGravity Implementation Facts:

  • It’s implemented over the Lua language runtime (there’s no need to parse source code).
  • The engine running the system is “just” an event handler.
  • The elapsed time during an event handling determines the dt value used by INT and varies over the time.
  • The prompt you see is a collection of graphical objects (no, it’s not a magical raw terminal).
  • It’s single threaded, of course.
  • The engine’s whole source has about 300 lines of Lua code.

In the next examples we’ll escape from the dry command line and see a lot of graphics, where LuaGravity really rocks.

[1] http://www.lua.org
[2] http://www-sop.inria.fr/meije/esterel/esterel-eng.html
[3] http://www.cs.brown.edu/research/pubs/techreports/reports/CS-03-20.html

Written by francisco

August 17, 2008 at 9:05 pm

Posted in Concepts, Examples

Tagged with , ,

Follow

Get every new post delivered to your Inbox.