prolog program
Recently Published Documents


TOTAL DOCUMENTS

35
(FIVE YEARS 2)

H-INDEX

6
(FIVE YEARS 0)

Author(s):  
WŁODZIMIERZ DRABENT

Abstract Thom Frühwirth presented a short, elegant, and efficient Prolog program for the n queens problem. However, the program may be seen as rather tricky and one may not be convinced about its correctness. This paper explains the program in a declarative way and provides proofs of its correctness and completeness. The specification and the proofs are declarative, that is they abstract from any operational semantics. The specification is approximate, it is unnecessary to describe the program’s semantics exactly. Despite the program works on non-ground terms, this work employs the standard semantics, based on logical consequence and Herbrand interpretations. Another purpose of the paper is to present an example of precise declarative reasoning about the semantics of a logic program.


2021 ◽  
Vol 21 (2) ◽  
pp. 200-206
Author(s):  
D. V. Zdor

Introduction. The organization of branches and repetitions in the context of logical programming is considered by an example of the Prolog language. The fundamental feature of the program in a logical programming language is the fact that a computer must solve a problem by reasoning like a human. Such a program contains a description of objects and relations between them in the language of mathematical logic. At the same time, the software implementation of branching and repetition remains a challenge in the absence of special operators for the indicated constructions in the logical language. The objectives of the study are to identify the most effective ways to solve problems using branching and repetition by means of the logic programming language Prolog, as well as to demonstrate the results obtained by examples of computational problems.  Materials and Methods. An analysis of the literature on the subject of the study was carried out. Methods of generalization and systematization of knowledge, of the program testing, and analysis of the program execution were used.  Results. Constructions of branching and repetition organization in a Prolog program are proposed. To organize repetitions, various options for completing a recursive cycle when solving problems are given.  Discussion and Conclusions. The methods of organizing branches and repetitions in the logic programming language Prolog are considered. All these methods are illustrated by examples of solving computational problems. The results obtained can be used in the further development of the recursive predicates in logical programming languages, as well as in the educational process when studying logical programming in the Prolog language. The examples of programs given in the paper provide using them as a technological basis for programming branches and repetitions in the logic programming language Prolog.


2017 ◽  
Vol 18 (1) ◽  
pp. 1-29
Author(s):  
WŁODZIMIERZ DRABENT

AbstractThis paper presents an example of formal reasoning about the semantics of a Prolog program of practical importance (the SAT solver of Howe and King). The program is treated as a definite clause logic program with added control. The logic program is constructed by means of stepwise refinement, hand in hand with its correctness and completeness proofs. The proofs are declarative – they do not refer to any operational semantics. Each step of the logic program construction follows a systematic approach to constructing programs which are provably correct and complete. We also prove that correctness and completeness of the logic program is preserved in the final Prolog program. Additionally, we prove termination, occur-check freedom and non-floundering.Our example shows how dealing with “logic” and with “control” can be separated. Most of the proofs can be done at the “logic” level, abstracting from any operational semantics.The example employs approximate specifications; they are crucial in simplifying reasoning about logic programs. It also shows that the paradigm of semantics-preserving program transformations may be not sufficient. We suggest considering transformations which preserve correctness and completeness with respect to an approximate specification.


2014 ◽  
Vol 14 (2) ◽  
pp. 5464-5478
Author(s):  
Mahesh K ◽  
Dr M V Vijayakumar ◽  
Gangadharaiah. Y.H .

The wind power industry has seen an unprecedented growth in last few years. The surge in orders for wind turbines has resulted in a producers market. This market imbalance, the relative immaturity of the wind industry, and rapid developments in data processing technology have created an opportunity to improve the performance of wind farms and change misconceptions surrounding their operations. This research offers a new paradigm for the wind power industry, data-driven modeling. Each wind Mast generates extensive data for many parameters, registered as frequently as every minute. As the predictive performance approach is novel to wind industry, it is essential to establish a viable research road map. This paper proposes a data-mining-based methodology for long term wind forecasting (ANN), which is suitable to deal with large real databases. The paper includes a case study based on a real database of five years of wind speed data for a site and discusses results of wind power density was determined by using the Weibull and Rayleigh probability density functions. Wind speed predicted using wind speed data with Datamining methodology using intelligent technology as Artificial Neural Networks (ANN) and a PROLOG program designed to calculate the monthly mean wind speed.


2014 ◽  
Vol 14 (4-5) ◽  
pp. 539-552 ◽  
Author(s):  
TORBJÖRN LAGER ◽  
JAN WIELEMAKER

AbstractWhen developing a (web) interface for a deductive database, functionality required by the client is provided by means of HTTP handlers that wrap the logical data access predicates. These handlers are responsible for converting between client and server data representations and typically include options for paginating results. Designing the web accessible API is difficult because it is hard to predict the exact requirements of clients. Pengines changes this picture. The client provides a Prolog program that selects the required data by accessing the logical API of the server. The pengine infrastructure provides general mechanisms for converting Prolog data and handling Prolog non-determinism. The Pengines library is small (2000 lines Prolog, 150 lines JavaScript). It greatly simplifies defining an AJAX based client for a Prolog program and provides non-deterministic RPC between Prolog processes as well as interaction with Prolog engines similar to Paul Tarau's engines. Pengines are available as a standard package for SWI-Prolog 7.1


2013 ◽  
Vol 124 (4) ◽  
pp. 561-575 ◽  
Author(s):  
Neng-Fa Zhou ◽  
Agostino Dovier
Keyword(s):  

2009 ◽  
Vol 9 (3) ◽  
pp. 343-414 ◽  
Author(s):  
GERGELY LUKÁCSY ◽  
PÉTER SZEREDI

AbstractTraditional algorithms for description logic (DL) instance retrieval are inefficient for large amounts of underlying data. As DL is becoming more and more popular in areas such as the Semantic Web and information integration, it is very important to have systems which can reason efficiently over large data sets. In this paper we present an approach to transform DL axioms, formalised in the $\mathcal{SHIQ}$ DL language, into a Prolog program under the unique name assumption. This transformation is performed with no knowledge about particular individuals: they are accessed dynamically during the normal Prolog execution of the generated program. This technique, together with the top-down Prolog execution, implies that only those pieces of data are accessed that are indeed important for answering the query. This makes it possible to store the individuals in a database instead of memory, which results in better scalability and helps in using DL ontologies directly on top of existing information sources. The transformation process consists of two steps: (1) the DL axioms are converted to first-order clauses of a restricted form, and (2) a Prolog program is generated from these clauses. Step (2), which is the focus of the present paper, actually works on more general clauses than those obtainable by applying step (1) to a $\mathcal{SHIQ}$ knowledge base. We first present a base transformation, the output of which can be either executed using a simple interpreter or further extended to executable Prolog code. We then discuss several optimisation techniques, applicable to the output of the base transformation. Some of these techniques are specific to our approach, while others are general enough to be interesting for DL reasoner implementors not using Prolog. We give an overview of DLog, a DL reasoner in Prolog, which is an implementation of the techniques outlined above. We evaluate the performance of DLog and compare it to some widely used DL reasoners, such as RacerPro, Pellet and KAON2.


Sign in / Sign up

Export Citation Format

Share Document