181 resultados para Prolog
Resumo:
Generic programming is likely to become a new challenge for a critical mass of developers. Therefore, it is crucial to refine the support for generic programming in mainstream Object-Oriented languages — both at the design and at the implementation level — as well as to suggest novel ways to exploit the additional degree of expressiveness made available by genericity. This study is meant to provide a contribution towards bringing Java genericity to a more mature stage with respect to mainstream programming practice, by increasing the effectiveness of its implementation, and by revealing its full expressive power in real world scenario. With respect to the current research setting, the main contribution of the thesis is twofold. First, we propose a revised implementation for Java generics that greatly increases the expressiveness of the Java platform by adding reification support for generic types. Secondly, we show how Java genericity can be leveraged in a real world case-study in the context of the multi-paradigm language integration. Several approaches have been proposed in order to overcome the lack of reification of generic types in the Java programming language. Existing approaches tackle the problem of reification of generic types by defining new translation techniques which would allow for a runtime representation of generics and wildcards. Unfortunately most approaches suffer from several problems: heterogeneous translations are known to be problematic when considering reification of generic methods and wildcards. On the other hand, more sophisticated techniques requiring changes in the Java runtime, supports reified generics through a true language extension (where clauses) so that backward compatibility is compromised. In this thesis we develop a sophisticated type-passing technique for addressing the problem of reification of generic types in the Java programming language; this approach — first pioneered by the so called EGO translator — is here turned into a full-blown solution which reifies generic types inside the Java Virtual Machine (JVM) itself, thus overcoming both performance penalties and compatibility issues of the original EGO translator. Java-Prolog integration Integrating Object-Oriented and declarative programming has been the subject of several researches and corresponding technologies. Such proposals come in two flavours, either attempting at joining the two paradigms, or simply providing an interface library for accessing Prolog declarative features from a mainstream Object-Oriented languages such as Java. Both solutions have however drawbacks: in the case of hybrid languages featuring both Object-Oriented and logic traits, such resulting language is typically too complex, thus making mainstream application development an harder task; in the case of library-based integration approaches there is no true language integration, and some “boilerplate code” has to be implemented to fix the paradigm mismatch. In this thesis we develop a framework called PatJ which promotes seamless exploitation of Prolog programming in Java. A sophisticated usage of generics/wildcards allows to define a precise mapping between Object-Oriented and declarative features. PatJ defines a hierarchy of classes where the bidirectional semantics of Prolog terms is modelled directly at the level of the Java generic type-system.
Resumo:
Il lavoro svolto in questa tesi verte sullo sviluppo e l'integrazione del modello teorico conosciuto come Biochemical Tuple Spaces for Self-Organizing Coordination, in breve BTSSOC, in una piattaforma completa, chiamata BTSSOC-Cellulat, per la simulazione di sistemi biochimici, sviluppata utilizzando i linguaggi Java, Prolog, TuCSoN e ReSpecT.
Resumo:
L’obiettivo di questa tesi è quello di estendere l’interfaccia grafica di tuProlog nella versione per Android, il più diffuso sistema operativo per tablet e smartphone. TuProlog è un’ interprete Prolog interamente scritto in java, leggero e open–source. L’applicazione è disponibile sotto forma di archivio JAR eseguibile e può essere utilizzato tramite un’interfaccia a riga di comando, nella versione Java, o per mezzo di interfacce grafiche negli ambienti Java, .NET e Android. La versione per Android supporta pienamente Java e la maggior parte delle librerie dell’applicativo per JVM. Lo sviluppo di applicazioni per dispositivi mobile, però, limita lo sviluppatore in termini di complessità delle elaborazioni effettuabili dal programma e comprensibilità dell’interfaccia grafica; per questi e altri motivi, la struttura dell’applicativo in versione Android, fatta eccezione per il core Prolog, è diversa dalle versioni per altri ambienti. L’applicazione, giunta ora alla versione 2.7.2, manca della possibilità di input da console in tutte le versioni ad interfaccia grafica. Scopo di questa tesi è quindi integrare tale funzionalità, inserendola all’interno del contesto applicativo senza modificare il normale flusso delle operazioni, intervenendo in modo mirato, il meno invasivo possibile e garantendo l’espandibilità della modifica ad estensioni future.
Resumo:
Das von der Laureus Stiftung Schweiz geförderte Programm Girls in Sport beinhaltet die gleichnamige Studie zum Sportverhalten und zu den Sportbedürfnissen von Mädchen ab 10 Jahren in der Schweiz. Prinzipiell sind Mädchen an Bewegung und am Sport interessiert. Im historischen Vergleich haben sie inzwischen einen sportiven Lebensstil entwickelt, zeigen vielfältige Sport- und Bewegungsinteressen sowie ein Bedürfnis, sich sportlich zu bewegen (Gramespacher & Feltz 2009; Hartmann-Tews 2009). Allerdings verdeutlichen die Daten des ersten umfassenden Sportberichts Sport Schweiz 2008 (Lamprecht et al. 2008), dass sich für Mädchen in der Schweiz Barrieren auf dem Weg in den (organisierten) Sport ergeben. Die Hindernisse sind teilweise in den Strukturen des Sports selbst verortet, zum Teil aber entstehen sie auch aufgrund sozialer und kultureller Ungleichheiten. So zeigt sich etwa, dass Mädchen bildungsferner Milieus und Mädchen mit Migrationshintergrund in Schweizer Sportvereinen unterrepräsentiert sind. Die zentralen Forschungsfragen der Studie Girls in Sport lauten: Welche sportbezogenen Interessen haben Mädchen in der Schweiz? Welche Hindernisse erfahren sie auf ihrem Weg in den Sport? Wie können Mädchen besser in den (organisierten) Sport integriert werden? Zuerst ist eine Re-Analyse der auf die Mädchen bezogenen Daten von Sport Schweiz 2008 erfolgt (Fischer et al. 2012). Eine zentrale Erkenntnis dieser Teilstudie ist, dass Mädchen in den drei Sprachregionen der Schweiz (deutsch, französisch und italienisch) signifikant unterschiedliches Interesse am Verhalten im Sport zeigen. Im zweiten Teil der Studie werden im Sommer 2012 mittels qualitativer Methoden zu erhebende Daten von Mädchen in den drei Sprachregionen der Schweiz gewonnen. Die Daten werden in einer Aufsatzstudie (vgl. Faulstich-Wieland & Horstkemper 1995, S. 17f.) sowie anhand einiger Gruppeninterviews gewonnen. Sie sollen Aufschluss darüber geben, wie Mädchen ihre Situation in den Sportvereinen deuten, und welche Interessen Mädchen an Sportvereinen oder anderen organisierten Sportinstanzen haben. Diese Teilstudie bildet insofern eine Herausforderung, da die meist vielgestaltigen Interessenlagen von Mädchen (Gramespacher & Feltz 2009) zu erfassen und zugleich mit Blick auf deren kulturelle Einbindungen – sowohl in der Schweiz als auch in Bezug auf ihren möglichen Migrationshintergrund – zu reflektieren sind. Sie bietet allerdings zugleich die Chance, die Mädchen selbst zu Wort kommen zu lassen. Damit folgt diese Teilstudie einem Grundsatz der Kindheitsforschung (Alanen 1997), dessen Beachtung es ermöglicht, dass die Mädchen die Chance erhalten, ihre eigenen Vorstellungen, Wünsche und Visionen über einen „idealen“ Sportverein differenziert darzulegen. Der Abgleich zwischen der Vorstellung der Mädchen und der in Studien dargelegten Situation der Sportvereine in der Schweiz (Lamprecht et al. 2011) wird schließlich dazu beitragen, die oben genannten Forschungsfragen aufzuklären. Literatur Alanen, L. (1997). Soziologie der Kindheit als Projekt: Perspektiven für die Forschung. Zeitschrift für Soziologie, der Erziehung und Sozialisation 17(1), 162-177. Faulstich-Wieland, H. & Horstkemper, M. (1995). „Trennt uns bitte, bitte nicht!“ Koedukation aus Mädchen und Jungensicht. Opladen: Leske + Budrich. Fischer, A., Lamprecht, M. & Stamm, H. P. (2012). Sportaktivitäten von Mädchen und jungen Frauen in der Schweiz. Die wichtigsten Fakten. Zürich. Gramespacher, E. & Feltz, N. (Hrsg.). (2009). Bewegungskulturen von Mädchen – Bewegungsarbeit mit Mädchen. Immenhausen: Prolog-Verlag. Hartmann-Tews, I. (2009). Sportentwicklung und Inklusion aus Geschlechterperspektive. In: E. Balz & D. Kuhlmann (Hrsg.), Sportentwicklung. Grundlagen und Facetten (S. 65-75). Aachen: Meyer & Meyer. Lamprecht, M., Fischer, A. & Stamm, H. P. (2011). Sportvereine in der Schweiz. Magglingen: BASPO. Lamprecht, M., Fischer, A. & Stamm, H. P. (2008). Sport Schweiz 2008. Das Sportverhalten der Schweizer Bevölkerung. Magglingen: BASPO.
Resumo:
The paper presents a comparative study of the personal and geographic names in the two complete Slavic translations of the Byzantine Versified Synaxarion, namely the Bulgarian and Serbian Prolog Stišnoj, which appeared around the first half of the 14 th century. On the basis of the March texts in seven South Slavic manuscripts, the differences in the rendering of the personal names are analysed on the level of phonetics, orthography, morphology and word formation. The data allow the following conclusions: 1) The differences in the forms of these names in the Bulgarian and Serbian Prolog Stišnoj give further arguments supporting their independent origin; 2) Several specific tendencies are noted which more or less differentiate them. The Bulgarian translation reproduces more accurately the graphics of the original names, allows dativus possessivus, often replaces the Greek anthroponyms and toponyms with adjectives, presents many local names in the plural, and sometimes retains Greek nominative endings in masculine personal names. The Serbian translation, on the other hand, follows more often the Byzantine pronunciation of the names, complies more strictly with their grammatical characteristics (case, number), separates more often the ending -ς from the stem, and incorporates the accusative ending -ν into the stem of certain anthroponyms several times. 3) The tendency towards Slavicisation of the personal names is nearly the same in both translations and cannot be viewed as peculiar of either of them.
Resumo:
Prolog für das Stadttheater (Mainkanalisation), Kostüm der Schauspielerin, Inhalt
Resumo:
El cálculo de relaciones binarias fue creado por De Morgan en 1860 para ser posteriormente desarrollado en gran medida por Peirce y Schröder. Tarski, Givant, Freyd y Scedrov demostraron que las álgebras relacionales son capaces de formalizar la lógica de primer orden, la lógica de orden superior así como la teoría de conjuntos. A partir de los resultados matemáticos de Tarski y Freyd, esta tesis desarrolla semánticas denotacionales y operacionales para la programación lógica con restricciones usando el álgebra relacional como base. La idea principal es la utilización del concepto de semántica ejecutable, semánticas cuya característica principal es el que la ejecución es posible utilizando el razonamiento estándar del universo semántico, este caso, razonamiento ecuacional. En el caso de este trabajo, se muestra que las álgebras relacionales distributivas con un operador de punto fijo capturan toda la teoría y metateoría estándar de la programación lógica con restricciones incluyendo los árboles utilizados en la búsqueda de demostraciones. La mayor parte de técnicas de optimización de programas, evaluación parcial e interpretación abstracta pueden ser llevadas a cabo utilizando las semánticas aquí presentadas. La demostración de la corrección de la implementación resulta extremadamente sencilla. En la primera parte de la tesis, un programa lógico con restricciones es traducido a un conjunto de términos relacionales. La interpretación estándar en la teoría de conjuntos de dichas relaciones coincide con la semántica estándar para CLP. Las consultas contra el programa traducido son llevadas a cabo mediante la reescritura de relaciones. Para concluir la primera parte, se demuestra la corrección y equivalencia operacional de esta nueva semántica, así como se define un algoritmo de unificación mediante la reescritura de relaciones. La segunda parte de la tesis desarrolla una semántica para la programación lógica con restricciones usando la teoría de alegorías—versión categórica del álgebra de relaciones—de Freyd. Para ello, se definen dos nuevos conceptos de Categoría Regular de Lawvere y _-Alegoría, en las cuales es posible interpretar un programa lógico. La ventaja fundamental que el enfoque categórico aporta es la definición de una máquina categórica que mejora e sistema de reescritura presentado en la primera parte. Gracias al uso de relaciones tabulares, la máquina modela la ejecución eficiente sin salir de un marco estrictamente formal. Utilizando la reescritura de diagramas, se define un algoritmo para el cálculo de pullbacks en Categorías Regulares de Lawvere. Los dominios de las tabulaciones aportan información sobre la utilización de memoria y variable libres, mientras que el estado compartido queda capturado por los diagramas. La especificación de la máquina induce la derivación formal de un juego de instrucciones eficiente. El marco categórico aporta otras importantes ventajas, como la posibilidad de incorporar tipos de datos algebraicos, funciones y otras extensiones a Prolog, a la vez que se conserva el carácter 100% declarativo de nuestra semántica. ABSTRACT The calculus of binary relations was introduced by De Morgan in 1860, to be greatly developed by Peirce and Schröder, as well as many others in the twentieth century. Using different formulations of relational structures, Tarski, Givant, Freyd, and Scedrov have shown how relation algebras can provide a variable-free way of formalizing first order logic, higher order logic and set theory, among other formal systems. Building on those mathematical results, we develop denotational and operational semantics for Constraint Logic Programming using relation algebra. The idea of executable semantics plays a fundamental role in this work, both as a philosophical and technical foundation. We call a semantics executable when program execution can be carried out using the regular theory and tools that define the semantic universe. Throughout this work, the use of pure algebraic reasoning is the basis of denotational and operational results, eliminating all the classical non-equational meta-theory associated to traditional semantics for Logic Programming. All algebraic reasoning, including execution, is performed in an algebraic way, to the point we could state that the denotational semantics of a CLP program is directly executable. Techniques like optimization, partial evaluation and abstract interpretation find a natural place in our algebraic models. Other properties, like correctness of the implementation or program transformation are easy to check, as they are carried out using instances of the general equational theory. In the first part of the work, we translate Constraint Logic Programs to binary relations in a modified version of the distributive relation algebras used by Tarski. Execution is carried out by a rewriting system. We prove adequacy and operational equivalence of the semantics. In the second part of the work, the relation algebraic approach is improved by using allegory theory, a categorical version of the algebra of relations developed by Freyd and Scedrov. The use of allegories lifts the semantics to typed relations, which capture the number of logical variables used by a predicate or program state in a declarative way. A logic program is interpreted in a _-allegory, which is in turn generated from a new notion of Regular Lawvere Category. As in the untyped case, program translation coincides with program interpretation. Thus, we develop a categorical machine directly from the semantics. The machine is based on relation composition, with a pullback calculation algorithm at its core. The algorithm is defined with the help of a notion of diagram rewriting. In this operational interpretation, types represent information about memory allocation and the execution mechanism is more efficient, thanks to the faithful representation of shared state by categorical projections. We finish the work by illustrating how the categorical semantics allows the incorporation into Prolog of constructs typical of Functional Programming, like abstract data types, and strict and lazy functions.
Resumo:
This article presents and illustrates a practical approach to the dataow analysis of constraint logic programming languages using abstract interpretation. It is rst argued that from the framework point of view it suces to propose relatively simple extensions of traditional analysis methods which have already been proved useful and practical and for exist. This is shown by proposing a simple extension of Bruynooghes traditional framework which allows it to analyze constraint logic programs. Then and using this generalized framework two abstract domains and their required abstract functions are presented the rst abstract domain approximates deniteness information and the second one freeness. Finally an approach for cobining those domains is proposed The two domains and their combination have been implemented and used in the analysis of CLP and Prolog III applications. Results from this implementation showing its performance and accuracy are also presented