Alberto de la Encina
Complutense University of Madrid
Network
Latest external collaboration on country level. Dive into details by clicking on the dots.
Publication
Featured researches published by Alberto de la Encina.
Journal of Functional Programming | 2009
Alberto de la Encina; Ricardo Peña
The Spineless Tag-less G-machine (STG machine) was defined as the target abstract machine for compiling the lazy functional language Haskell. It is at the heart of the Glasgow Haskell Compiler (GHC) which is claimed to be the Haskell compiler that generates the most efficient code. A high-level description of the STG machine can be found in Peyton Jones (In Journal of Functional programming, 2(2), 127–202, 1992), Marlow & Peyton Jones (In Sigplan Not., 39(9), 4–5, 2004), and Marlow & Peyton Jones (In Journal of Functional Programming, 16(4–5), 415–449, 2006). Should the reader be interested in a more detailed view, then the only additional information available is the Haskell code of GHC and the C code of its runtime system. It is hard to prove that this machine correctly implements the lazy semantics of Haskell. Part of the problem lies in the fact that the STG machine executes a bare-bones functional language, called STGL, much lower level than Haskell. Therefore, part of the correctness should be—and it is—established by showing that the translation from Haskell to STGL preserves Haskells semantics. The other part involves showing that the STG machine correctly implements the lazy semantics of STGL. In this paper we provide a step-by-step formal derivation of the STG machine and of its compilation to C, starting from a natural semantics of STGL. Thus, our starting point is higher level than the descriptions found Peyton Jones (In Journal of Functional programming, 2(2), 127–202, 1992) and Marlow & Peyton Jones (In Sigplan Not., 39(9), 4–5, 2004), and our arrival point is lower level than those works. Additionally, there has been substantial changes between the so-called push/enter model of the STG machine described in Peyton Jones (In Journal of Functional programming, 2(2), 127–202, 1992), and the eval/apply model of the STG machine described in Marlow & Peyton Jones (In Sigplan Not., 39(9), 4–5, 2004). So, in fact, we derive two machines instead of one, starting from the same initial semantics. At each step we provide enough intuitions and explanations in order to understand the refinement, and then the formal definitions and statements proving that the derivation step is sound and complete. The main contribution of the paper is to show that an efficient machine such as the STG can be presented, understood, and formally reasoned about at different levels of abstraction.
principles and practice of declarative programming | 2003
Alberto de la Encina; Ricardo Peña
Starting from P. Sestoft semantics for lazy evaluation, we define a new semantics in which normal forms consist of variables pointing to lambdas or constructions. This is in accordance with the more recent changes in the Spineless Tagless G-machine (STG) machine, where constructions only appear in closures (lambdas only appeared in closures already in previous versions). We prove the equivalence between the new semantics and Sestofts. Then, a sequence of STG machines are derived, formally proving the correctness of each derivation. The last machine consists of a few imperative instructions and its distance to a conventional language is minimal.The paper also discusses the differences between the final machine and the actual STG machine implemented in the Glasgow Haskell Compiler.
international conference on artificial neural networks | 2011
Alberto de la Encina; Mercedes Hidalgo-Herrero; Pablo Rabanal; Fernando Rubio
Nowadays, most users own multicore computers, but it is not simple to take advantage of them to speedup the execution of programs. In particular, it is not easy to provide a parallel implementation of a concrete genetic algorithm. In this paper we introduce a parallel skeleton that given a sequential implementation automatically provides a corresponding parallel implementation of it. In order to do it, we use a parallel functional language where skeletons can be defined as higherorder functions. Thus, the parallelizing machinery is defined only once, and it is reused for any concrete application of the skeleton to a concrete problem.
formal methods for open object based distributed systems | 2010
F. Javier Crespo; Alberto de la Encina; Luis Llana
Timed automata theory is well developed in literature. This theory provides a formal framework to model and test real-time systems. This formal framework supplies a way to describe transitions among states with timing constrains. These constraints are usually expressed with logic formulas involving the system clocks. The time domain of these clocks usually is considered dense, that is, the clocks take values in the real or rational numbers. Dealing with a domain like this can be hard, specially if we consider end points of intervals. In this paper, we present a modification of the model that allows to use real time in an easier, more powerful and reliable approach for computing systems. Our proposed model exploits the concepts of fuzzy set theory and related mathematical frameworks to get a more flexible approach.
International Journal of Cognitive Informatics and Natural Intelligence | 2009
Alberto de la Encina; Mercedes Hidalgo-Herrero; Natalia López
An important aspect in multi-agent cognitive systems is being able to provide negotiation facilities to agents. In this article we deal with this problem by presenting a formal environment allowing to specify preferences. Moreover, our framework describes how to perform exchanges among the entities involved in the system. The exchanges are not restricted to material goods, as we introduce capabilities to deal with intangible goods. The description of the system is formalized by using a simple process algebra that allows dealing with entities organized in a hierarchical way.
ieee international conference on cognitive informatics | 2006
Alberto de la Encina; Mercedes Hidalgo-Herrero; Pablo Rabanal; Ismael Rodríguez; Fernando Rubio
We present a programming environment to help studying the behavior of cognitive models. The core of the environment is a programming language based on high-level constructions that allow the easy development of general schemes that can be used (and even modified) without requiring knowledge about the underlying language. In addition, we have introduced observation facilities to the language to help analyzing how each process takes its own decisions. Thus, we can analyze not only the external behavior of each entity, but also how it constructs its knowledge. Moreover, our framework also provides visualizing facilities
international colloquium on theoretical aspects of computing | 2005
Alberto de la Encina; Luis Llana; Fernando Rubio
Due to its absence of side effects, it is usually claimed that reasoning about functional programs is simpler than reasoning about their imperative counterparts. Unfortunately, due to the absence of practical debuggers, finding bugs in lazy functional languages has been much more complex until quite recently. One of the easiest to use Haskell debuggers is Hood, whose behavior is based on the concept of observation of intermediate data structures. However, it can be hard to understand how it works when dealing with complex situations. In this paper, we introduce debugging facilities in the STG abstract machine. Our goal is to obtain debugging information as close to the one obtained by the Hood debugger as possible. By extending the STG abstract machine, we do not only provide a formal framework to the debugging process, but also an alternative method to implement debuggers.
international andrei ershov memorial conference on perspectives of system informatics | 2006
Alberto de la Encina; Luis Llana; Fernando Rubio
Reasoning about functional programs is simpler than reasoning about their imperative counterparts. However, finding bugs in lazy functional languages has been more complex until quite recently. The reason was that not much work was done on developing practical debuggers. Fortunately, several debuggers exist nowadays. One of the easiest to use Haskell debuggers is Hood, whose behavior is based on the concept of observation of intermediate data structures. However, although using Hood can be simple when observing some structures, it is known that it can be hard to understand how it works when dealing with complex situations. In this paper, we formalize the behavior of the Hood debugger by extending Sestofts natural semantics. Moreover, we also indicate how to derive an abstract machine including such debugging information. By doing so, we do not only provide a formal foundation, but we also provide an alternative method to implement debuggers. In fact, we have already implemented a prototype of the abstract machine commented in this paper.
international conference on conceptual structures | 2013
Fernando Rubio; Alberto de la Encina; Pablo Rabanal; Ismael Rodríguez
Abstract Due to the proliferation of multicore computers, most users own hardware that allows to speedup the execution of programs by running them in parallel. However, in practice it is not trivial to take advantage of such parallel architectures, because the programmer needs to take care of too many low level details. This is also true in problems with a high degree of inherent parallelism, like many bioinspired metaheuristics. In this paper we simplify the parallelization of one of such metaheuristics, namely Artificial Bee Colony, by using a functional language, Eden, to implement a parallel skeleton to deal with it. Once the skeleton is defined, the user only needs to provide a concrete fitness function, while all the low level parallel details are done automatically by the skeleton.
ambient intelligence | 2009
Alberto de la Encina; Mercedes Hidalgo-Herrero; Pablo Rabanal; Fernando Rubio
Selecting an appropriate test suite to detect faults in a program is a difficult task. In the case of functional languages, altough there are some additional difficulties (due to the lack of state, laziness and its higher-order nature), we can also take advantage of higher-order programming to allow defining generic ways of obtaining tests. In this paper we present a genetic algorithm to automatically select appropriate criteria to generate tests for Haskell programs. As a case study, we apply the algorithm to deal with a program using red-black trees.