scholarly journals Algoritmo eficiente en la generación de una tabla de primalidad de números usando Programación Funcional [An application of a simple and efficient algorithm to generate a prime number table using Functional Programming]

Author(s):  
Omar Iván TREJOS BURITICÁ

Resumen En el presente artículo se acude a la Programación Funcional para generar una tabla de análisis de primalidad de números en un rango dado a partir del uso de un algoritmo que, por las necesidades del mismo objetivo, tiene características de ser eficiente. Se plantea la fundamentación de dicho algoritmo y además se aprovecha su estructura lógica para resolver el problema propuesto. El propósito de este artículo es mostrar una arista útil de la eficiencia algorítmica teniendo en cuenta las características tecnológicas modernas y los problemas que la matemática provee. Se hace uso del lenguaje de programación Scheme y se aprovechan sus potencialidades para manejo, tamaño y cálculo de datos. Se demuestra que, acudiendo a algoritmos eficientes y a una lógica muy simple, la tecnología computacional moderna puede ser de una inmensa utilidad para resolver problemas matemáticos. Palabras Clave: Algoritmo, eficiencia, matemáticas, números primos, programación funcional   Abstract In this article, we use Functional Programming to generate an analytic table of prime numbers in a specific range using an efficient algorithm. You can find the foundation and we use its logical structure to solve the problem. The proposal of this article is to show the useful face of the applied efficient algorithmic knowing the modern technologies y the math problems. We use Scheme as a programming language and we use its potentialities to manage, to storage and calculate data. We demonstrate that, using efficient algorithms and a simple logic, the computational technologies are very useful solving math problems. Keywords: Algorithm, efficiency, maths, prime numbers, Functional programming

2007 ◽  
Vol 17 (1) ◽  
pp. 131-143 ◽  
Author(s):  
DAVID WAKELING

AbstractThe functional programming community has shown some interest in spreadsheets, but surprisingly no one seems to have considered making a standard spreadsheet, such as Excel, work with a standard functional programming language, such as Haskell. In this paper, we show one way that this can be done. Our hope is that by doing so, we might get spreadsheet programmers to give functional programming a try.


2020 ◽  
Vol 18 (2) ◽  
pp. 15-30
Author(s):  
Sergey S. Bogolepov

Kotlin is a statically typed programming language that supports object-oriented and functional programming. It supports JVM, JS and native platforms via LLVM (Kotlin / Native). The first two targets are backed with well-developed virtual machines that can perform advanced program optimizations at runtime. However, for native platforms, all optimizations must be performed at compile time. Currently Kotlin / Native lacks many optimizations, which is why the performance of the generated code is poor in many cases. This paper describes a way to solve this problem by introducing an additional SSA-based intermediate representation and implementing escape analysis using it. Experimental results have shown that this approach can significantly improve performance.


Author(s):  
Juan Guti´errez-C´ardenas ◽  
Hernan Quintana-Cruz ◽  
Diego Mego-Fernandez ◽  
Serguei Diaz-Baskakov

2004 ◽  
Vol 11 (2) ◽  
pp. 21-32
Author(s):  
Carlos A. R. Andrade ◽  
André L. M. Santos ◽  
Paulo H. M. Borba

This paper presents an extension of the Haskell programming language with the objective of improving modularization of functional programs. This extension, AspectH, extends Haskell with aspect oriented concepts. AspectH implements Aspect-Oriented Programming (AOP) through pointcuts and advice, like in AspectJ, and was designed to be used in Haskell programs that use monads. Keywords: Aspect-oriented programming, functional programming, Haskell, monads


2003 ◽  
Vol 10 (25) ◽  
Author(s):  
Dariusz Biernacki ◽  
Olivier Danvy

Starting from a continuation-based interpreter for a simple logic programming language, propositional Prolog with cut, we derive the corresponding logic engine in the form of an abstract machine. The derivation originates in previous work (our article at PPDP 2003) where it was applied to the lambda-calculus. The key transformation here is Reynolds's defunctionalization that transforms a tail-recursive, continuation-passing interpreter into a transition system, i.e., an abstract machine. Similar denotational and operational semantics were studied by de Bruin and de Vink in previous work (their article at TAPSOFT 1989), and we compare their study with our derivation. Additionally, we present a direct-style interpreter of propositional Prolog expressed with control operators for delimited continuations.<br /><br />Superseded by BRICS-RS-04-5.


Author(s):  
Igor Oblomov ◽  
Vyacheslav Rzhavin ◽  
Natalia Pervova ◽  
Alina Gerasimova

В статье рассматривается модель синтаксически управляемого перевода простых арифметических выражений и ее использование в процессе обучения. Атрибутно-транслируемая грамматика предполагает перевод последовательности актов в последовательность действий, которые, в свою очередь, будут являться исходными данными для следующих этапов трансляции. Раскрываются основные моменты обучения студентов декларативному языку программирования Пролог, делается упор на обработку множества символов действия. Дальнейшие исследования предполагают разработку моделей синтаксического анализа с помощью средств императивных и функциональных языков программирования с целью получения и анализа объективных оценок эффективности полученных моделей в процессе обучения будущих специалистов.This article discusses the model of syntactically controlled translation of simple arithmetic expressions and its use in the learning process. The attribute-translated grammar involves the translation of a sequence of acts into a sequence of actions, which will be the source data for the next stages of translation. The article reveals the main points of teaching students the Prolog programming language, focuses on the processing of many action symbols. Further research involves the development of models of syntactic analysis by means of imperative and functional programming languages in order to obtain and analyze the objective estimates of the effectiveness of the obtained models in the training of future specialists.


2010 ◽  
Vol 21 (1) ◽  
pp. 1-19 ◽  
Author(s):  
PETER ACHTEN

AbstractIn the Soccer-Fun, students program the brains of football players in a functional language. Soccer-Fun has been developed for an introductory course in functional programming at the Radboud University Nijmegen, The Netherlands. We have used Soccer-Fun in teaching during the past four years. We have also experience in using Soccer-Fun for pupils in secondary education. Soccer-Fun is stimulating because it is about a well-known problem domain. It engages students to problem solving with functional programming because it allows them to compete at several disciplines: the best performing football team becomes the champion of a tournament; the best written code is awarded with a prize; students are judged on the algorithms used. This enables every student to participate and perform at her favorite skill. Soccer-Fun is implemented in Clean and uses its GUI toolkit Object I/O for rendering. It can be implemented in any functional programming language that supports some kind of windowing toolkit.


Sign in / Sign up

Export Citation Format

Share Document