10 research outputs found

    Applications of constraint logic programming to asset & liability management

    Get PDF

    Constraint Exploration and Envelope of Simulation Trajectories

    Get PDF
    The implicit theory that a simulation represents is precisely not in the individual choices but rather in the 'envelope' of possible trajectories - what is important is the shape of the whole envelope. Typically a huge amount of computation is required when experimenting with factors bearing on the dynamics of a simulation to tease out what affects the shape of this envelope. In this paper we present a methodology aimed at systematically exploring this envelope. We propose a method for searching for tendencies and proving their necessity relative to a range of parameterisations of the model and agents' choices, and to the logic of the simulation language. The exploration consists of a forward chaining generation of the trajectories associated to and constrained by such a range of parameterisations and choices. Additionally, we propose a computational procedure that helps implement this exploration by translating a Multi Agent System simulation into a constraint-based search over possible trajectories by 'compiling' the simulation rules into a more specific form, namely by partitioning the simulation rules using appropriate modularity in the simulation. An example of this procedure is exhibited. Keywords: Constraint Search, Constraint Logic Programming, Proof, Emergence, TendenciesComment: 15 pages, To be presented at the First Workshop on Rule-Based Constraint Reasoning and Programming at the First International Conference on Computational Logic, London, UK, 24th to 28th July, 200

    Optimizing prolog for small devices: A case study

    Get PDF
    In this paper we present the design and implementation of a wearable application in Prolog. The application program is a "sound spatializer." Given an audio signal and real time data from a head-mounted compass, a signal is generated for stereo headphones that will appear to come from a position in space. We describe high-level and low-level optimizations and transformations that have been applied in order to fit this application on the wearable device. The end application operates comfortably in real-time on a wearable computer, and has a memory foot print that remains constant over time enabling it to run on continuous audio streams. Comparison with a version hand-written in C shows that the C version is no more than 20-40% faster; a small price to pay for a high level description

    On the execution of high level formal specifications

    Get PDF
    Executable specifications can serve as prototypes of the specified system and as oracles for automated testing of implementations, and so are more useful than non-executable specifications. Executable specifications can also be debugged in much the same way as programs, allowing errors to be detected and corrected at the specification level rather than in later stages of software development. However, existing executable specification languages often force the specifier to work at a low level of abstraction, which negates many of the advantages of non-executable specifications. This dissertation shows how to execute specifications written at a level of abstraction comparable to that found in specifications written in non-executable specification languages. The key innovation is an algorithm for evaluating and satisfying first order predicate logic assertions written over abstract model types. This is important because many specification languages use such assertions. Some of the features of this algorithm were inspired by techniques from constraint logic programming

    A generic, collaborative framework for internal constraint solving

    Get PDF
    Esta tesis propone un esquema genérico y cooperativo para CLP(Interval(X)) donde X es cualquier dominio de computación con estructura de retículo. El esquema, que está basado en la teoría de retículos, es un enfoque general para la satisfacción y op-timización de restricciones de intervalo así como para la cooperación de resolutores de intervalo definidos sobre dominios de computación con estructura de retículos, independientemente de la cardinalidad de estos. Nuestra propuesta asegura un enfoque transparente sobre el cual las restricciones, los dominios de computación y los mecanismos de propagación y cooperación, definidos entre las variables restringidas, pueden ser fácilmente especificados a nivel del usuario. La parte principal de la tesis presenta una especificación formal de este esquema.Los principales resultados conseguidos en esta tesis son los siguientes:Una comparativa global de la eficiencia y algunos aspectos de la expresividad de ocho sistemas de restricciones. Esta comparativa, realizada sobre el dominio finito y el dominio Booleano, muestra diferencias principales entre los sistemas de restricciones existentes.Para formalizar el marco de satisfacción de restricciones para CLP(Interval(X))hemos descrito el proceso global de resolución de restricciones de intervalo sobre cualquier retículo, separando claramente los procesos de propagación y división (ramificación) de intervalos. Una de las ventajas de nuestra propuesta es que la monótona de las restricciones esta implícitamente definida en la teoría. Además, declaramos un conjunto de propiedades interesantes que, bajo ciertas condiciones, son satisfechas por cualquier instancia del esquema genérico. Mas aún, mostramos que muchos sistemas de restricciones actualmente existentes satisfacen estas condiciones y, además, proporcionamos indicaciones sobre como extender el sistema mediante la especificación de otras instancias interesantes y novedosas. Nuestro esquema para CLP(Interval(X)) permite la cooperación de resolutores de manera que la información puede ⁰uir entre diferentes dominios de computación.Además, es posible combinar distintas instancias del esquema: por ejemplo, instancias bien conocidas tales como CLP(Interval(<)), CLP(Interval(Integer)),CLP(Interval(Set)), CLP(Interval(Bool)), y otras novedosas que son el resultado de la generación de nuevos dominios de computación definidos por el usuario, o incluso que surgen de la combinación de dominios ya existentes como puede ser CLP(Interval(X1 £ : : : £ Xn)). Por lo tanto, X puede ser instanciado a cualquier conjunto de dominios de computación con estructura de retículo de forma que su correspondiente instancia CLP(Interval(X)) permite una amplia flexibilidad en la definición de dominios en X (probablemente definidos por el usuario) y en la interaccion entre estos dominios.Mediante la implementacion de un prototipo, demostramos que un unico sistema,que este basado en nuestro esquema para CLP(Interval(X)), puede proporcionarsoporte para la satisfaccion y la optimizacion de restricciones as como para la cooperacion de resolutores sobre un conjunto conteniendo multiples dominios decomputacion. Ademas, el sistema sigue un novedoso enfoque transparente sujeto a una doble perspectiva ya que el usuario puede definir no solo nuevas restricciones y su mecanismo de propagacion, sino tambien nuevos dominios sobre los cuales nuevas restricciones pueden ser resueltas as como el mecanismo de cooperacion entre todos los dominios de computación (ya sean definidos por el usuario o predefinidos por el sistema).En nuestra opinión, esta tesis apunta nuevas y potenciales direcciones de investigación dentro de la comunidad de las restricciones de intervalo.Para alcanzar los resultados expuestos, hemos seguido los siguientes pasos (1) la elección de un enfoque adecuado sobre el cual construir los fundamentos teóricos de nuestro esquema genérico; (2) la construcción de un marco teórico genérico (que llamaremos el marco básico) para la propagación de restricciones de intervalo sobre cualquier retículo; (3) la integración, en el marco básico, de una técnica novedosa que facilita la cooperación de resolutores y que surge de la definición, sobre múltiples dominios, de operadores de restricciones y (4) la extensión del marco resultante para la resolución y optimización completa de las restricciones de intervalo.Finalmente presentamos clp(L), un lenguaje de programación lógica de restricciones de intervalo que posibilita la resolución de restricciones sobre cualquier conjunto de retículos y que esta implementado a partir de las ideas formalizadas en el marco teórico. Describimos una primera implementación de este lenguaje y desarrollamos algunos ejemplos de como usarla. Este prototipo demuestra que nuestro esquema para CLP(Interval(X)) puede ser implementado en un sistema único que, como consecuencia, proporciona, bajo un enfoque transparente sobre dominios y restricciones, cooperación de resolutores así como satisfacción y optimización completa de restricciones sobre diferentes dominios de computación

    Algorithmic composition of music in real-time with soft constraints

    Get PDF
    Music has been the subject of formal approaches for a long time, ranging from Pythagoras’ elementary research on tonal systems to J. S. Bach’s elaborate formal composition techniques. Especially in the 20th century, much music was composed based on formal techniques: Algorithmic approaches for composing music were developed by composers like A. Schoenberg as well as in the scientific area. So far, a variety of mathematical techniques have been employed for composing music, e.g. probability models, artificial neural networks or constraint-based reasoning. In the recent time, interactive music systems have become popular: existing songs can be replayed with musical video games and original music can be interactively composed with easy-to-use applications running e.g. on mobile devices. However, applications which algorithmically generate music in real-time based on user interaction are mostly experimental and limited in either interactivity or musicality. There are many enjoyable applications but there are also many opportunities for improvements and novel approaches. The goal of this work is to provide a general and systematic approach for specifying and implementing interactive music systems. We introduce an algebraic framework for interactively composing music in real-time with a reasoning-technique called ‘soft constraints’: this technique allows modeling and solving a large range of problems and is suited particularly well for problems with soft and concurrent optimization goals. Our framework is based on well-known theories for music and soft constraints and allows specifying interactive music systems by declaratively defining ‘how the music should sound’ with respect to both user interaction and musical rules. Based on this core framework, we introduce an approach for interactively generating music similar to existing melodic material. With this approach, musical rules can be defined by playing notes (instead of writing code) in order to make interactively generated melodies comply with a certain musical style. We introduce an implementation of the algebraic framework in .NET and present several concrete applications: ‘The Planets’ is an application controlled by a table-based tangible interface where music can be interactively composed by arranging planet constellations. ‘Fluxus’ is an application geared towards musicians which allows training melodic material that can be used to define musical styles for applications geared towards non-musicians. Based on musical styles trained by the Fluxus sequencer, we introduce a general approach for transforming spatial movements to music and present two concrete applications: the first one is controlled by a touch display, the second one by a motion tracking system. At last, we investigate how interactive music systems can be used in the area of pervasive advertising in general and how our approach can be used to realize ‘interactive advertising jingles’.Musik ist seit langem Gegenstand formaler Untersuchungen, von Phytagoras‘ grundlegender Forschung zu tonalen Systemen bis hin zu J. S. Bachs aufwändigen formalen Kompositionstechniken. Vor allem im 20. Jahrhundert wurde vielfach Musik nach formalen Methoden komponiert: Algorithmische Ansätze zur Komposition von Musik wurden sowohl von Komponisten wie A. Schoenberg als auch im wissenschaftlichem Bereich entwickelt. Bislang wurde eine Vielzahl von mathematischen Methoden zur Komposition von Musik verwendet, z.B. statistische Modelle, künstliche neuronale Netze oder Constraint-Probleme. In der letzten Zeit sind interaktive Musiksysteme populär geworden: Bekannte Songs können mit Musikspielen nachgespielt werden, und mit einfach zu bedienenden Anwendungen kann man neue Musik interaktiv komponieren (z.B. auf mobilen Geräten). Allerdings sind die meisten Anwendungen, die basierend auf Benutzerinteraktion in Echtzeit algorithmisch Musik generieren, eher experimentell und in Interaktivität oder Musikalität limitiert. Es gibt viele unterhaltsame Anwendungen, aber ebenso viele Möglichkeiten für Verbesserungen und neue Ansätze. Das Ziel dieser Arbeit ist es, einen allgemeinen und systematischen Ansatz zur Spezifikation und Implementierung von interaktiven Musiksystemen zu entwickeln. Wir stellen ein algebraisches Framework zur interaktiven Komposition von Musik in Echtzeit vor welches auf sog. ‚Soft Constraints‘ basiert, einer Methode aus dem Bereich der künstlichen Intelligenz. Mit dieser Methode ist es möglich, eine große Anzahl von Problemen zu modellieren und zu lösen. Sie ist besonders gut geeignet für Probleme mit unklaren und widersprüchlichen Optimierungszielen. Unser Framework basiert auf gut erforschten Theorien zu Musik und Soft Constraints und ermöglicht es, interaktive Musiksysteme zu spezifizieren, indem man deklarativ angibt, ‚wie sich die Musik anhören soll‘ in Bezug auf sowohl Benutzerinteraktion als auch musikalische Regeln. Basierend auf diesem Framework stellen wir einen neuen Ansatz vor, um interaktiv Musik zu generieren, die ähnlich zu existierendem melodischen Material ist. Dieser Ansatz ermöglicht es, durch das Spielen von Noten (nicht durch das Schreiben von Programmcode) musikalische Regeln zu definieren, nach denen interaktiv generierte Melodien an einen bestimmten Musikstil angepasst werden. Wir präsentieren eine Implementierung des algebraischen Frameworks in .NET sowie mehrere konkrete Anwendungen: ‚The Planets‘ ist eine Anwendung für einen interaktiven Tisch mit der man Musik komponieren kann, indem man Planetenkonstellationen arrangiert. ‚Fluxus‘ ist eine Anwendung, die sich an Musiker richtet. Sie erlaubt es, melodisches Material zu trainieren, das wiederum als Musikstil in Anwendungen benutzt werden kann, die sich an Nicht-Musiker richten. Basierend auf diesen trainierten Musikstilen stellen wir einen generellen Ansatz vor, um räumliche Bewegungen in Musik umzusetzen und zwei konkrete Anwendungen basierend auf einem Touch-Display bzw. einem Motion-Tracking-System. Abschließend untersuchen wir, wie interaktive Musiksysteme im Bereich ‚Pervasive Advertising‘ eingesetzt werden können und wie unser Ansatz genutzt werden kann, um ‚interaktive Werbejingles‘ zu realisieren

    Applications of constraint logic programming to asset & liability management

    No full text
    corecore