Spelling suggestions: "subject:"prolog"" "subject:"urolog""
61 |
xpProlog : high performance extended pure prologLüdemann, Peter Gerald January 1988 (has links)
Adhering to the principles of logic programming results in greater expressiveness than is obtained by using the many non-logical features which have been grafted onto current logic programming languages such as Prolog. This report describes an alternative approach to high performance logic programming in which the language and its implementation were designed together. Prolog's non-logical features are discarded and new logical ones are added. Extended pure Prolog (xpProlog) is a superset of conventional Prolog; it is sufficient in itself, without any need for "impure" non-logical predicates. This gives both greater expressiveness and better performance than conventional Prologs.
XpProlog programs have the following advantages over conventional Prolog programs:
• They are often easier to understand because their meaning does not rely on the underlying computational mechanism. • Coroutining, automatic delaying and sound negation are available.
• As technology improves, better implementations and optimization techniques can be used without affecting existing programs.
This report covers:
• The proper use of logic programming.
• How Prolog must be changed to become a good logic programming language (xpProlog).
• Sound negation and coroutining.
• An efficient abstract machine (xpPAM) which can be efficiently emulated on conventional machines, translated to conventional machine code, or implemented in special purpose hardware.
• How to compile extended Prolog and functional (applicative) languages to the abstract machine or to conventional machine code.
• Discussion of alternative Prolog abstract machine designs.
The xpProlog Abstract Machine's design allows:
• Performance similar to the Warren Abstract Machine (WAM) for sequential programs.
• Tail recursion optimization (TRO).
• Parallelism and coroutining with full backtracking.
• Dynamic optimization of clause order.
• Efficient if-then-else ("shallow" backtracking).
• Simple, regular instruction set for easily optimized compilation.
• Efficient memory utilization. • Integrated object-oriented virtual memory.
• Predicates as first-class objects.
• Simple extension to functional programming.
C.R. categories: 1.2.5: Prolog; D.1.3: concurrent programming; D.3.2: very high level languages; D.3.3: language constructs: coroutines, backtracking; D.3.4: 1 interpreters.; 1.2.3: logic programming. / Science, Faculty of / Computer Science, Department of / Graduate
|
62 |
Sistema de manipulação de conjuntos e relações nebulosas e programação em logica nebulosa - PROLOG nebulosoGuilherme, Ivan Rizzo 21 August 1990 (has links)
Orientador: Marcio Luiz de Andrade Netto / Dissertação (mestrado) - Universidade Estadual de Campinas, Faculdade de Engenharia Eletrica / Made available in DSpace on 2018-07-13T21:53:33Z (GMT). No. of bitstreams: 1
Guilherme_IvanRizzo_M.pdf: 6763599 bytes, checksum: f5f8dc36b79c661e0593fc1328a26b21 (MD5)
Previous issue date: 1990 / Resumo: Este trabalho consiste da discussão e implementação de ferramentas de programação que operem Conjuntos Nebulosos e a Lógica Nebulosa. É demonstrado e discutido um sistema composto de um conjunto de rotinas voltadas para a Manipulação de Conjuntos e Relações Nebulosas. Alguns sistemas de programação baseados em 16glca nebulosa, denominados de PROLOG-nebulosos, são analisados. Finalmente descreve-se a implementação de um PROLOG-nebuloso que possui as mesmas características da linguagem PROLOG / Abstract: This work consists of a discussion and implementation of programming tools that operate the Fuzzy Sets Theory. A system composed of a set of routines specialized on manipulating of Fuzzy Sets and Fuzzy Relations is shown and discussed. Some system for Fuzzy Logic Programming, known as Fuzzy PROLOG, are analysed. Finally, an implementation of a Fuzzy PROLOG is describe that has the same characteristic of the PROLOG language / Mestrado / Mestre em Engenharia Elétrica
|
63 |
"Lambda" PROLOG : interpretador e unificação de ordem superiorLudwig, Artemio 30 October 1992 (has links)
Orientador : Wagner C. Amaral / Tese (doutorado) - Universidade Estadual de Campinas, Faculdade de Engenharia Eletrica / Made available in DSpace on 2018-07-16T01:51:41Z (GMT). No. of bitstreams: 1
Ludwig_Artemio_D.pdf: 9026847 bytes, checksum: bf0003b28c02857c43931feb4b9729d1 (MD5)
Previous issue date: 1992 / Resumo: A implementação de interpretadores para a linguagem da Lógica de Ordem Superior (LOS) constitui-se num desafio ainda não vencido. Pode-se dividi-Io em duas partes: (a) tornar a linguagem mais amigável permitindo estimular sua adoção e (b) dotar as implementações com um desempenho que não sacrifique sua usabilidade. A linguagem de programação para a LOS utiliza os conceitos do À-cálculo e os recursos de tipificação de Russel. Sua sintaxe é portanto mais complexa do que aquela da Lógica de Primeira Ordem (LPO). A técnica de derivação de algum conhecimento em uma base
de conhecimento, formalizada conforme suas regras, assemelha-se com aquela da LPO que é chamada de resolução. Qualquer sistema de provas em LOS deve atender a restrições de uma linguagem fortemente tipada e a unificação, que apresenta problemas de incompletude, pode gerar mais do que um unificador. Isto torna a pesquisa nâ.o-determinística e faz com que a derivação contenha mais uma fonte de retroencadeamento, quando comparada com modelo de programação em LPO. Este trabalho expõe e analisa a implementação de um interpretador para a LOS sujeita a sentenças definidas positivas as quais contêm propriedades adequadas à mecanização semelhantes àquelas das cláusulas de HORN da LPO. Problemas de indecidibilidade são contornados e os vários aspectos computacionais são descritos como a formação da base de
conhecimento, sua gramática e a P-derivação, que é o método de obtenção de provas sobre a base. Central a estes procedimentos encontra-se a unificação que apresenta complexidade elevada e cujo processamento é razão de depauperação na qualidade do sistema. Uma proposta de enfoque alternativa é oferecida com o propósito de atenuar os efeitos sobre a lentidão do sistema. O algoritmo resultante indica ganhos no desempenho e apresenta uma interpretação mais facilitada do mecanismo da unificação / Abstract: Efficient Interpreter implementations for Righer Order Logic (ROL) programming language still remain as a challenge that can be splitted into two classes: (a) to make the language friendlier in order to stimulate the user to adopt it, and (b) to provi de the interpreter with a performance that does not damage its usability. This paper resulted from an ROL interpreter prototypation, called À-PROLOG. Only the positive definite sentençes are used in the language. They are similar to those of the First Order Logic (FOL) programing language and present some apropriate mechanization properties.
One kind of implementation is discribed and its computational aspects are analysed. They include the knowledgernent base formation, the grarnrnar of the sentences and the P-derivation, which is the method of deriving proofs over the base.
The unification is the most important interpreter procedure and has high complexity. Its processing is one of the reazons for the depaupering of system quality. In this paper the analisies of the MATCR and SIMPL algorithms that were developed for this purpose are used to supply a new unification algorithm which, in contrast to MATCR, shows initial performance gains and an easier procedural interpretation oí the unification mechanism / Doutorado / Automação / Doutor em Engenharia Elétrica
|
64 |
The design of a virtual fact base for PrologHaugh, J. Steven 02 February 2010 (has links)
The fact and rule list internal to Prolog is capable of
handling as many facts as available memory resources permit.
A solution to this limitation is to store facts on disk,
retrieving them into a main memory database buffer only as
needed. Allocating a fixed portion of main memory to buffer
database facts frees up scarce main memory for more
frequently accessed rules and data structures internal to
Prolog. The Prolog Database System built in connection with
this project transparently stores and retrieves facts on
disk and evaluates them in the order they were asserted
allowing for the transfer of existing small scale prototypes
into large scale production systems.
<p>Since existing relational database techniques were not
designed to function in a Prolog environment where facts are
evaluated in
database facilities were designed, developed, and integrated
into Prolog. These database facilities include a unique
page replacement policy designed to minimize expensive page
faults during the execution of a Prolog program. The look
ahead page replacement policy looks ahead on database pages
while they are in main memory in order to determine whether
they are likely to be accessed again in the future. In this
way, a near optimal working set of database pages is
maintained in the database buffer, assisting with minimizing
expensive page faults. / Master of Science
|
65 |
Defining and Implementing Domain-Specific Languages with Prolog / Definition und Implementierung domänenspezifischer Sprachen mit PrologNogatz, Falco January 2023 (has links) (PDF)
The landscape of today’s programming languages is manifold. With the diversity of applications, the difficulty of adequately addressing and specifying the used programs increases. This often leads to newly designed and implemented domain-specific languages. They enable domain experts to express knowledge in their preferred format, resulting in more readable and concise programs. Due to its flexible and declarative syntax without reserved keywords, the logic programming language Prolog is particularly suitable for defining and embedding domain-specific languages.
This thesis addresses the questions and challenges that arise when integrating domain-specific languages into Prolog. We compare the two approaches to define them either externally or internally, and provide assisting tools for each. The grammar of a formal language is usually defined in the extended Backus–Naur form. In this work, we handle this formalism as a domain-specific language in Prolog, and define term expansions that allow to translate it into equivalent definite clause grammars. We present the package library(dcg4pt) for SWI-Prolog, which enriches them by an additional argument to automatically process the term’s corresponding parse tree. To simplify the work with definite clause grammars, we visualise their application by a web-based tracer.
The external integration of domain-specific languages requires the programmer to keep the grammar, parser, and interpreter in sync. In many cases, domain-specific languages can instead be directly embedded into Prolog by providing appropriate operator definitions. In addition, we propose syntactic extensions for Prolog to expand its expressiveness, for instance to state logic formulas with their connectives verbatim. This allows to use all tools that were originally written for Prolog, for instance code linters and editors with syntax highlighting. We present the package library(plammar), a standard-compliant parser for Prolog source code, written in Prolog. It is able to automatically infer from example sentences the required operator definitions with their classes and precedences as well as the required Prolog language extensions. As a result, we can automatically answer the question: Is it possible to model these example sentences as valid Prolog clauses, and how?
We discuss and apply the two approaches to internal and external integrations for several domain-specific languages, namely the extended Backus–Naur form, GraphQL, XPath, and a controlled natural language to represent expert rules in if-then form. The created toolchain with library(dcg4pt) and library(plammar) yields new application opportunities for static Prolog source code analysis, which we also present. / Die Landschaft der heutigen Programmiersprachen ist vielfältig. Mit ihren unterschiedlichen Anwendungsbereichen steigt zugleich die Schwierigkeit, die eingesetzten Programme adäquat anzusprechen und zu spezifizieren. Immer häufiger werden hierfür domänenspezifische Sprachen entworfen und implementiert. Sie ermöglichen Domänenexperten, Wissen in ihrem bevorzugten Format auszudrücken, was zu lesbareren Programmen führt. Durch ihre flexible und deklarative Syntax ohne vorbelegte Schlüsselwörter ist die logische Programmsprache Prolog besonders geeignet, um domänenspezifische Sprachen zu definieren und einzubetten.
Diese Arbeit befasst sich mit den Fragen und Herausforderungen, die sich bei der Integration von domänenspezifischen Sprachen in Prolog ergeben. Wir vergleichen die zwei Ansätze, sie entweder extern oder intern zu definieren, und stellen jeweils Hilfsmittel zur Verfügung. Die Grammatik einer formalen Sprache wird häufig in der erweiterten Backus–Naur–Form definiert. Diesen Formalismus behandeln wir in dieser Arbeit als eine domänenspezifische Sprache in Prolog und definieren Termexpansionen, die es erlauben, ihn in äquivalente Definite Clause Grammars für Prolog zu übersetzen. Durch das Modul library(dcg4pt) werden sie um ein zusätzliches Argument erweitert, das den Syntaxbaum eines Terms automatisch erzeugt. Um die Arbeit mit Definite Clause Grammars zu erleichtern, visualisieren wir ihre Anwendung in einem webbasierten Tracer.
Meist können domänenspezifische Sprachen jedoch auch mittels passender Operatordefinitionen direkt in Prolog eingebettet werden. Dies ermöglicht die Verwendung aller Werkzeuge, die ursprünglich für Prolog geschrieben wurden, z.B. zum Code-Linting und Syntax-Highlighting. In dieser Arbeit stellen wir den standardkonformen Prolog-Parser library(plammar) vor. Er ist in Prolog geschrieben und in der Lage, aus Beispielsätzen automatisch die erforderlichen Operatoren mit ihren Klassen und Präzedenzen abzuleiten. Um die Ausdruckskraft von Prolog noch zu erweitern, schlagen wir Ergänzungen zum ISO Standard vor. Sie erlauben es, weitere Sprachen direkt einzubinden, und werden ebenfalls von library(plammar) identifiziert. So ist es bspw. möglich, logische Formeln direkt mit den bekannten Symbolen für Konjunktion, Disjunktion, usw. als Prolog-Programme anzugeben.
Beide Ansätze der internen und externen Integration werden für mehrere domänen-spezifische Sprachen diskutiert und beispielhaft für GraphQL, XPath, die erweiterte Backus–Naur–Form sowie Expertenregeln in Wenn–Dann–Form umgesetzt. Die vorgestellten Werkzeuge um library(dcg4pt) und library(plammar) ergeben zudem neue Anwendungsmöglichkeiten auch für die statische Quellcodeanalyse von Prolog-Programmen.
|
66 |
A Microsequenced Prolog Inference EngineFerguson, Jeffrey J. 01 January 1986 (has links) (PDF)
Prolog is a symbolic logic language presently emerging among numerous expert system designs. The architecture for a microsequenced Prolog machine (UPM) capable of providing the basic language features to a host computer is proposed. The Prolog machine functions are portioned into three processor components – Input/Output, Memory, and Central (CPU), where the design of the Central Processor is emphasized. Detailed discussion outlines the CPU facilities used to implement the forward-chaining and backtracking functions for the UPM. The UPM features are compared to the PLM-1, a microsequenced Prolog inference engine under development at University of California, Berkley. An emulation of the entire algorithm is provided, as well as a proposed microengine and associated microstore.
|
67 |
Data Structure Implementation and Investigation for a Prolog Language InterpreterIurcovich, Hector 01 January 1986 (has links) (PDF)
A developmental Prolog language interpreter is constructed in the C programming language. The data type format is a subset of that of the Project Aquarius Prolog Engine proposed and under development at the University of California, Berkley. The design of the Prolog interpreter is part of an investigation at UCF in design of expert system architecture for real time applications. The interpreter facilities of data structure definition and manipulation are developed and applied. The list data structure is used as an example data structure. The scheme for representing structured data is based on the Lisp cons cell. Run-time generated lists are represented by car and cdr pairs and are maintained separately from data structures which are part of the prolog program. A data memory is used to augment the environment memory of the Prolog interpreter. The advantages and disadvantages of the proposed structure and implementation scheme are discussed.
|
68 |
Extending Prolog with type inheritance and arithmeticChitale, Chandan S. 10 June 2012 (has links)
Prolog is a logic programming language based on first order logic. It uses resolution as a rule of inference, and unification is the heart of resolution. The unification algorithm is a syntactic process and hence attaches no meaning to function and predicate symbols. We incorporate arithmetic into unification by simultaneously solving linear equations that are created during the unification of partially instantiated numeric expressions. Prolog operates on the Herbrand universe, which is a single unstructured domain. In case of large structured domains, the number of resolution steps required for inference is large. We have incorporated type inheritance into Prolog to exploit large structured domains. Types are subuniverses corresponding to sets of objects. The subset of relation between types induces a hierarchy on the universe. Using the property of inheritance it is possible to obtain shorter proofs in inference. We used the constraint satisfaction model and the hierarchical constraint satisfaction concept to incorporate these extensions to Prolog. Thus, we succeeded in obtaining a logic programming language with arithmetic and type inheritance. This implementation extends standard Prolog and can be directly added to the WAM concept. / Master of Science
|
69 |
Constraint satisfaction - an alternate approach to unification in PrologSundararajan, Renganathan January 1987 (has links)
Prolog is a linear resolution theorem prover with restrictions on the form of the clauses to prune the search space. Although Prolog has been widely used for implementing natural language systems, database systems, knowledge based expert systems and other A.I tasks, it has many limitations. The inferencing is symbolic and all the computations are performed in the Herbrand universe. Prolog has no notion of function evaluation. The uniform parameter passing mechanism, viz unification, is syntactic and too restrictive in nature. Moreover, Prolog uses a depth first search strategy combined with chronological backtracking which renders the SLD-Resolution incomplete. In this thesis, we study the incorporation of a constraints solver into Prolog. The generalization of unification into a constraints satisfaction algorithm allows the incorporation of function evaluation into unification. Constraint satisfaction is used to replace unification thus enhancing the power of Prolog. This idea could possibly be extended to other contexts where unification is used. Constraints can also appear as goals in the body of a rule. We discuss the enhancement in expressive power leading to an efficient solution of a larger class of problems. We also discuss ways of compiling the constraint solver and the modifications that are needed to be made in the Warren abstract machine for Prolog. An interpreter for the extended Prolog (written in Prolog) incorporating a constraint solver is presented along with examples illustrating its power. / Master of Science
|
70 |
Análisis semántico y transformación de programas lógico-funcionalesVidal Oriola, Germán Francisco 08 October 2015 (has links)
El problema de la integraci on de la programaci on l ogica y funcional est a considerado
como uno de los m as importantes en el area de investigaci on sobre programaci on
declarativa. Para que los lenguajes declarativos sean utiles y puedan utilizarse en
aplicaciones reales, es necesario que el grado de e ciencia de su ejecuci on se aproxime
al de los lenguajes imperativos, tal y como se ha conseguido con el lenguaje Prolog.
Para ello, es imprescindible el desarrollo de herramientas potentes para el an alisis y
transformaci on de los programas, capaces de optimizar las implementaciones realizadas.
En general, es deseable sustituir las aproximaciones ad-hoc por tratamientos
m as sistem aticos para los problemas de an alisis y transformaci on de programas. Puesto
que la sem antica de los lenguajes l ogico{funcionales ha sido objeto de numerosos
estudios y est a matem aticamente bien formalizada, surge el inter es por el desarrollo
de m etodos y t ecnicas formales para la formulaci on de optimizaciones, basadas en la
sem antica, que preserven las propiedades computacionales del programa. Esta tesis se
centra en el desarrollo de tales t ecnicas, adopt andose una aproximaci on formal basada
en la sem antica (operacional) del lenguaje para desarrollar y analizar, en un contexto
uni cado, las diferentes optimizaciones.
En la primera parte, desarrollamos un marco para el an alisis est atico de programas
l ogico{funcionales, basado en la idea de construir aproximaciones correctas de
la sem antica operacional del programa. Formalizamos un esquema de an alisis simple,
uniforme y
exible, que permite estudiar distintos tipos de propiedades (relacionadas
con el conjunto de respuestas computadas por el programa) de manera correcta y
f acilmente implementable. El esquema es independiente de la estrategia de narrowing
usada en la formulaci on del mecanismo operacional del lenguaje, lo que contribuye a
dar generalidad al mismo.
Las t ecnicas de evaluaci on parcial son, de entre la gran variedad de t ecnicas existentes
para la transformaci on de programas, las que mayor inter es han despertado
en las dos ultimas d ecadas. Su utilidad no reside unicamente en la posibilidad de especializar
programas, sino que sus aplicaciones se extienden tambi en a la generaci on
autom atica de compiladores o a la optimizaci on de c odigo, por citar s olo las m as importantes.
En la segunda parte de esta tesis mostramos que, en el contexto de los len-
i
guajes l ogico{funcionales, la especializaci on de programas se puede basar directamente
en el mecanismo operacional de narrowing que, debido a la propagaci on bidireccional
de par ametros realizada a trav es del procedimiento de uni caci on, es capaz de producir
optimizaciones apreciables. Esta visi on uni cada de ejecuci on y especializaci on nos
permite explotar las contribuciones de ambos campos, funcional y l ogico, y desarrollar
un esquema simple y potente para mejorar el programa original respecto a su capacidad
para computar respuestas. Tambi en mostramos que, debido a la componente
funcional, son posibles otras optimizaciones (como la inclusi on de pasos de simpli -
caci on deterministas) con el bene cio a~nadido de que, en nuestro esquema, todas las
optimizaciones quedan `compiladas' en el programa transformado. Formalizamos los
conceptos b asicos para la evaluaci on parcial de programas l ogico{funcionales y demostramos
la correcci on y completitud de la transformaci on. El esquema presentado
en este trabajo constituye la primera aproximaci on totalmente autom atica, correcta
y nita para la evaluaci on parcial de programas l ogico{funcionales. / Vidal Oriola, GF. (1996). Análisis semántico y transformación de programas lógico-funcionales [Tesis doctoral]. Universitat Politècnica de València. https://doi.org/10.4995/Thesis/10251/55796
|
Page generated in 0.0596 seconds