Photo of Ivan Perez

Ivan Perez

Email:

I am a programmer and entrepreneur. I like Game Programming, GUIs, Multimedia, Reactivity and Functional Languages. As of 2017, I am a 4th-year PhD student. My supervisors are Henrik Nilsson and Graham Hutton.

Selected Publications

GALE: a functional Graphic Adventure Library and Engine


FARM 2017 - Colocated with ICFP 2017 (Accepted)
Authors: Ivan Perez
(last submission)
Functional Programming brings a promise of highly-declarative code, efficient, parallelisable execution, modularity and reusability. In spite of these advantages, the use of pure Functional Languages in commercial games is still rare. This is partially caused lack of backends for multimedia, lack of production tools, and the demon- stration that functional abstractions work for other than non-trivial examples. In this paper we present GALE, a Graphic Adventure Library and Engine implemented in Haskell. Our engine implements the basic common features available in similar commercial engines for graphic adventures. We show a high-level abstract definition of game descriptions that allows us not only to run them, but also to analyse them in compile time. We also demonstrate how this description allows us to provide novel features not available in traditional engines. Our system works on iOS, Android and desktop, and is accompanied by a development environment to compose the games with no prior programming skills.


Back to the Future: Time Travel in FRP


Haskell Symposium 2017 - Colocated with ICFP 2017
Authors: Ivan Perez
(last submission)
Functional Reactive Programming (FRP) allows interactive applications to be modelled in a declarative manner using time-varying values. For practical reasons, however, operational constraints are often imposed, such as having a fixed time domain, time always flowing forward, and limiting the exploration of the past. In this paper we show how these constraints can be overcome, giving local control over the time domain, the direction of time and the sampling step. We study the behaviour of FRP expressions when time flows backwards, and demonstrate how to synchronize subsystems running asynchronously and at different sampling rates. We have verified the practicality of our approach with two non-trivial games in which time control is central to the gameplay.


Testing and Debugging Functional Reactive Programming


ICFP 2017 (Oxford, UK)
Authors: Ivan Perez and Henrik Nilsson
(last submission)
Many types of interactive applications, including video games, raise particular challenges when it comes to testing and debugging. Reasons include de-facto lack of reproducibility and difficulties of automatically generating suitable test data. This paper demonstrates that certain variants of Functional Reactive Programming (FRP) implemented in pure functional languages can mitigate such difficulties by offering referential transparency at the level of whole programs. This opens up for a multi-pronged approach for assisting with testing and debugging that works across platforms, including assertions based on temporal logic, recording and replaying of runs (also from deployed code), and automated random testing using QuickCheck. The approach has been validated on real, non-trivial games implemented in the FRP system Yampa through a tool providing a convenient Graphical User Interface that allows the execution of the code under scrutiny to be controlled, moving along the execution time line, and pin-pointing of violations of assertions on PCs as well as mobile platforms.


Functional Reactive Programming, Refactored


Haskell Symposium 2016 - Colocated with ICFP 2016 (Nara, Japan)
Authors: Ivan Perez, Manuel Bärenz and Henrik Nilsson
(official) (corrected submission) (implementation)
Functional Reactive Programming (FRP) has come to mean many things. Yet, scratch the surface of the multitude of realisations, and there is great commonality between them. This paper investigates this commonality, turning it into a mathematically coherent and practical FRP realisation that allows us to express the functionality of many existing FRP systems and beyond by providing a minimal FRP core parametrised on a monad. We give proofs for our theoretical claims and we have verified the practical side by benchmarking a set of existing, non-trivial Yampa applications running on top of our new system with very good results.


On the Mathematical Properties of Monadic Stream Functions (draft)


Authors: Manuel Bärenz, Ivan Perez, and Henrik Nilsson
(paper)
Monadic Stream Functions are CPS functions parameterised over a monadic context. They form a suitable abstraction to describe reactive processes, but what properties do they fulfill? In this technical report we explore some of the properties of Monadic Stream Functions, in particular those related to Arrows and Causal Commutative Arrows.


Briding the GUI Gap with Reactive Values and Relations


Haskell Symposium 2015 - Colocated with ICFP 2015 (Vancouver, Canada)
Authors: Ivan Perez and Henrik Nilsson
(paper) (bibtex) (abstract)
Reactive Values are an abstraction for mutable elements with a change-propagation or notification mechanism. They enable abstract reactive programming by hiding details on how to access particular values, how to deal with concurrency, etc. They provide a uniform interface for GUI widget properties, application models (in MVC terminology), hardware, files, etc. Reactive Values can be connected to one another forming uni- or bi-directional Reactive Relations. For an implementation, see: Keera Hails


1st year PhD Report

University of Nottingham
(paper) (bibtex)

Includes an overview of GUI programming in Haskell and FRP, Reactive Values and Relations. Recommended for those who want to know more about the current state of FRP.

Declarative Game Programming: Distilled Tutorial


PPDP '14: International Symposium on Principles and Practice of Declarative Programming
Authors: Henrik Nilsson and Ivan Perez
(abstract) (bibtex) (exdended abstract)

Bridging the GUI Gap with Reactive Values and Relations (superceeded)

Trends in Functional Programming 2014 - The Netherlands
Authors: Ivan Perez and Henrik Nilsson
(paper) (bibtex)

Other Talks
  • Game Programming in Haskell - Baby steps. At University of Bamberg (as Keera Studios). February 2016.
  • Game Programming in Haskell. At Haskell eXchange (as Keera Studios). October 2015.
  • London Haskell Meetup Group. June 2015.
  • Game Programming made simple. At Technical University of Madrid. April 2015.
  • FP Days London (as Keera Studios). November 2014.
  • London Haskell Meetup Group. September 2014.
  • FPLAD 2014
  • University of Twente. March 2013.
  • Technical University of Madrid. December 2011.
Open Source Software

Haskanoid

(github) (video)

A Haskell game that uses the wiimote and the kinect.


Keera Hails

(github)

A reactive programming framework that scales well for GUIs.


Yampa

(maintainer) (github)

A Functional Reactive Programming Domain-Specific Language.


Hcwiid

(maintainer) (github)

Haskell bindings for a library to access wiimotes on Linux.


Awards

Finalist and winner

Hacknotts - 2014

MLH Finalist and winner of the best project award (to call it something; it was the only non-sponsored prize) at Nottingham Hackathon, together with Manuel Bärenz. We created a custom keyboard on a breadboard with 11 buttons to control a Parrot Drone. The signal was processed by a Haskell Yampa program that sent out commands to the parrot via wifi. The drone was recognised by a separate Haskell game using Kinect and became the player of a sideways Flappy-bird-like Haskell game in which the sizes of the pipes were determined by IBM's stock prize over the last six years (gathered in runtime using Bloomberg's API). We later demonstrated this by playing Breakout with the same drone (using Haskell to control it).

Teaching

Teaching Assistant

University of Nottingham - UK
Other activities

Founder of Keera Studios

Founder of Keera Studios Ltd. (Facebook page), a game programming company that uses Functional Languages to deliver games for Android, iOS and desktop.