78 resultados para Psychology of logic
Resumo:
We informally discuss several issues related to the parallel execution of logic programming systems and concurrent logic programming systems, and their generalization to constraint programming. We propose a new view of these systems, based on a particular definition of parallelism. We argüe that, under this view, a large number of the actual systems and models can be explained through the application, at different levéis of granularity, of only a few basic principies: determinism, non-failure, independence (also referred to as stability), granularity, etc. Also, and based on the convergence of concepts that this view brings, we sketch a model for the implementation of several parallel constraint logic programming source languages and models based on a common, generic abstract machine and an intermedíate kernel language.
Resumo:
We present and evaluate a compiler from Prolog (and extensions) to JavaScript which makes it possible to use (constraint) logic programming to develop the client side of web applications while being compliant with current industry standards. Targeting JavaScript makes (C)LP programs executable in virtually every modern computing device with no additional software requirements from the point of view of the user. In turn, the use of a very high-level language facilitates the development of high-quality, complex software. The compiler is a back end of the Ciao system and supports most of its features, including its module system and its rich language extension mechanism based on packages. We present an overview of the compilation process and a detailed description of the run-time system, including the support for modular compilation into separate JavaScript code. We demonstrate the maturity of the compiler by testing it with complex code such as a CLP(FD) library written in Prolog with attributed variables. Finally, we validate our proposal by measuring the performance of some LP and CLP(FD) benchmarks running on top of major JavaScript engines.
Resumo:
Abstract interpretation-based data-flow analysis of logic programs is at this point relatively well understood from the point of view of general frameworks and abstract domains. On the other hand, comparatively little attention has been given to the problems which arise when analysis of a full, practical dialect of the Prolog language is attempted, and only few solutions to these problems have been proposed to date. Such problems relate to dealing correctly with all builtins, including meta-logical and extra-logical predicates, with dynamic predicates (where the program is modified during execution), and with the absence of certain program text during compilation. Existing proposals for dealing with such issues generally restrict in one way or another the classes of programs which can be analyzed if the information from analysis is to be used for program optimization. This paper attempts to fill this gap by considering a full dialect of Prolog, essentially following the recently proposed ISO standard, pointing out the problems that may arise in the analysis of such a dialect, and proposing a combination of known and novel solutions that together allow the correct analysis of arbitrary programs using the full power of the language.
Resumo:
The optical bistability occurring in laser diode amplifiers is used to design an all-optical logic gate capable to provide the whole set of logic functions. The structure of the reported logic gate is based on two connected 1550nm laser amplifiers (Fabry-Perot and distributed feedback laser amplifiers).
Resumo:
Output bits from an optical logic cell present noise due to the type of technique used to obtain the Boolean functions of two input data bits. We have simulated the behavior of an optically programmable logic cell working with Fabry Perot-laser diodes of the same type employed in optical communications (1550nm) but working here as amplifiers. We will report in this paper a study of the bit noise generated from the optical non-linearity process allowing the Boolean function operation of two optical input data signals. Two types of optical logic cells will be analyzed. Firstly, a classical "on-off" behavior, with transmission operation of LD amplifier and, secondly, a more complicated configuration with two LD amplifiers, one working on transmission and the other one in reflection mode. This last configuration has nonlinear behavior emulating SEED-like properties. In both cases, depending on the value of a "1" input data signals to be processed, a different logic function can be obtained. Also a CW signal, known as control signal, may be apply to fix the type of logic function. The signal to noise ratio will be analyzed for different parameters, as wavelength signals and the hysteresis cycles regions associated to the device, in relation with the signals power level applied. With this study we will try to obtain a better understanding of the possible effects present on an optical logic gate with Laser Diodes.
Resumo:
We present a novel analysis for relating the sizes of terms and subterms occurring at diferent argument positions in logic predicates. We extend and enrich the concept of sized type as a representation that incorporates structural (shape) information and allows expressing both lower and upper bounds on the size of a set of terms and their subterms at any position and depth. For example, expressing bounds on the length of lists of numbers, together with bounds on the values of all of their elements. The analysis is developed using abstract interpretation and the novel abstract operations are based on setting up and solving recurrence relations between sized types. It has been integrated, together with novel resource usage and cardinality analyses, in the abstract interpretation framework in the Ciao preprocessor, CiaoPP, in order to assess both the accuracy of the new size analysis and its usefulness in the resource usage estimation application. We show that the proposed sized types are a substantial improvement over the previous size analyses present in CiaoPP, and also benefit the resource analysis considerably, allowing the inference of equal or better bounds than comparable state of the art systems.
Resumo:
La investigación trata de mostrar cuatro acciones habitualmente empleadas al proyectar arquitectura. La tesis narra el discurso que construyen cuatro acciones como mecanismos optimizadores, fundamentales, activos y necesarios cuando creamos nuevos proyectos. En este trabajo se estudian en profundidad cuatro acciones optimizadoras a través de numerosos casos de estudio. Se estudia también la presencia de estas acciones en otros campos creativos, como la biología, el arte, la literatura, la filosofía, la matemática o la psicología de la creatividad. Se busca qué tienen en común estas cuatro acciones y se indaga sobre la posible narración que construyen entre ellas. La mayor parte de los textos que constituyen este trabajo se escriben en un formato próximo al del ensayo, empleando tiempos verbales presentes evitando los tiempos verbales pretéritos o imperfectos para potenciar la acción a través el estilo narrativo. La investigación se ha realizado a partir de fuentes bibliográficas existentes en numerosas bibliotecas. Se han llevado a cabo estudios de campo realizados a través de entrevistas personales a interlocutores expertos, no sólo de teoría arquitectónica sino también de prácticas constructivas, así como visitas a lugares íntimamente relacionados con el tema de investigación. Se ha completado el estudio de casos con ejercicios prácticos realizados por el autor de esta tesis, para profundizar con la propia investigación por empatía con los autores estudiados. La investigación bibliográfica principal se ha desarrollado en las bibliotecas de la Universidad Politécnica de Madrid, de la Universidad de Alicante, de la Universidad Autónoma de Madrid, de la Universidad Europea de Madrid, de la Universidad Camilo José Cela, de la Universidad Complutense de Madrid, de la Columbia University, de la Harvard University, de la Delft University, de Heidelberg University, de la Biblioteca Central de Madrid y de la Regional de Murcia, así como de la del COAMU. También se ha utilizado recursos bibliográficos propios. La metodología utilizada muestra desde diferentes perspectivas el problema de las acciones optimizadoras, desde obras artísticas, pasando por ejemplos de arquitectura construida hasta ejercicios puramente intelectuales. La acumulación ha sido el método de obtención de conocimiento de esta tesis. Se han acumulado conocimientos y posteriormente se ha profundizado, reflexionando sobre los datos que se han ido obteniendo. Al profundizar se enlazan unas pruebas con otras, hilando y ensamblándolas en un discurso que hace continuo y coherente la aparición de cada caso estudiado. Estas entidades probatorias son acciones que han sido aplicadas frecuentemente por distintas generaciones de autores que proyectan utilizando alguna de estas cuatro acciones. Partimos de una extensa bibliografía general y de otra específica. A través de citas e imágenes se muestra el repertorio de objetos y textos estudiados. Los casos de estudio seleccionados exponen los efectos que produce cada acción en el ejercicio del proyectar. Se ha estudiado la necesidad de cada acción en todas y cada una de las partes del ciclo creativo del proyecto, tanto en prácticas imaginadas como en construidas, de los autores que proyectan. Se citan y se interpretan las descripciones de biólogos, sociólogos, antropólogos, psicólogos, escritores, artistas, arquitectos, matemáticos, ingenieros, físicos, médicos y filósofos en los cuales estas acciones se encuentran conscientemente incorporadas en su procedimiento de proyectar y de pensar. Por último, hemos obtenido unos resultados adecuados a la metodología empleada y a los objetivos planteados gracias a la acumulación y clasificación de pruebas. Los resultados se exponen a modo de discursos conclusivos con un intencionado carácter abierto que despliega nuevas posibles nuevas vías de investigación entorno a los temas estudiados. ABSTRACT. The research seeks to show four commonly used actions in designing architecture. Thesis recounts the speech that built four actions like optimizer, fundamental, active and necessary mechanisms when we create new projects. In this work it studies in depth four optimizer actions through numerous case studies. Also, it considers the presence of these actions in other creative fields, such as biology, art, literature, philosophy, mathematics or psychology of creativity. It is intended what these four actions have in common and it explores the possible narrative constructed among them. Most of the texts that constitute this work are written in a format close to the essay, using present tenses avoiding past or imperfect tenses of enhancing the action through the narrative style. Research has been done from literature sources available in numerous libraries. Field studies have been carried out through personal interviews with expert speakers, not just of architectonic theory but also from constructive practices, as well as visits to sites closely related to the research topic. case studies with practical exercises conducted by the author of this thesis has been completed, to deepen with the own research by empathy with the studied authors. Main bibliographical investigation has been developed in the libraries of UPM, UA, UAM, UEM, the CJC, the UCM, Columbia University, Harvard University Delft University, Heidelberg University, Madrid Central Library, Regional Murcia Library and COAMU Library. Also it has been used own bibliographical resources. Methodology shows from different perspectives the problem of optimizers actions, from art, passing through examples of architecture built up to puré intellectual exercise. Accumulation has been the method of obtaining knowledge of this thesis. it has been accumulated knowledge and later it has been deepened, reflecting on the data that have been obtained. By deepening tests are linked with other, spinning and locking into a discourse that makes continuous and consistent the development of each case study. These evidentiary entities are actions that have been frequently applied by different generations of authors who project using some of these four stocks. We leave from an extensive general bibliography and another specific one. Through quotes and pictures it shows the repertoire of objects and texts studied. The selected study cases set out the effects that each action produces in the exercise of projecting. It has studied the need of each action in every parts of creative cycle of the project, both imagined as constructed practices, by the authors who project. It is quoted and interpreted the descriptions of biologists, sociologists, anthropologists, psychologists, writers, artists, architects, mathematicians, engineers, physicists, physicians and philosophers in which these actions are consciously incorporated into his projecting and thinking procedure. Finally, we have obtained adequate results to the used methodology and to the stated objectives through the accumulation and classification of evidence. The results are presented as conclusive speeches with an intentional open character that unfolds new possible research routes around the studied topics.
Resumo:
Studying independence of goals has proven very useful in the context of logic programming. In particular, it has provided a formal basis for powerful automatic parallelization tools, since independence ensures that two goals may be evaluated in parallel while preserving correctness and eciency. We extend the concept of independence to constraint logic programs (CLP) and prove that it also ensures the correctness and eciency of the parallel evaluation of independent goals. Independence for CLP languages is more complex than for logic programming as search space preservation is necessary but no longer sucient for ensuring correctness and eciency. Two additional issues arise. The rst is that the cost of constraint solving may depend upon the order constraints are encountered. The second is the need to handle dynamic scheduling. We clarify these issues by proposing various types of search independence and constraint solver independence, and show how they can be combined to allow dierent optimizations, from parallelism to intelligent backtracking. Sucient conditions for independence which can be evaluated \a priori" at run-time are also proposed. Our study also yields new insights into independence in logic programming languages. In particular, we show that search space preservation is not only a sucient but also a necessary condition for ensuring correctness and eciency of parallel execution.
Resumo:
This article considers static analysis based on abstract interpretation of logic programs over combined domains. It is known that analyses over combined domains provide more information potentially than obtained by the independent analyses. However, the construction of a combined analysis often requires redefining the basic operations for the combined domain. A practical approach to maintain precision in combined analyses of logic programs which reuses the individual analyses and does not redefine the basic operations is illustrated. The advantages of the approach are that proofs of correctness for the new domains are not required and implementations can be reused. The approach is demonstrated by showing that a combined sharing analysis — constructed from "old" proposals — compares well with other "new" proposals suggested in recent literature both from the point of view of efficiency and accuracy.
Resumo:
Active learning is one of the most efficient mechanisms for learning, according to the psychology of learning. When students act as teachers for other students, the communication is more fluent and knowledge is transferred easier than in a traditional classroom. This teaching method is referred to in the literature as reciprocal peer teaching. In this study, the method is applied to laboratory sessions of a higher education institution course, and the students who act as teachers are referred to as ‘‘laboratory monitors.’’ A particular way to select the monitors and its impact in the final marks is proposed. A total of 181 students participated in the experiment, experiences with laboratory monitors are discussed, and methods for motivating and training laboratory monitors and regular students are proposed. The types of laboratory sessions that can be led by classmates are discussed. This work is related to the changes in teaching methods in the Spanish higher education system, prompted by the Bologna Process for the construction of the European Higher Education Area
Resumo:
The most successful unfolding rules used nowadays in the partial evaluation of logic programs are based on well quasi orders (wqo) applied over (covering) ancestors, i.e., a subsequence of the atoms selected during a derivation. Ancestor (sub)sequences are used to increase the specialization power of unfolding while still guaranteeing termination and also to reduce the number of atoms for which the wqo has to be checked. Unfortunately, maintaining the structure of the ancestor relation during unfolding introduces significant overhead. We propose an efficient, practical local unfolding rule based on the notion of covering ancestors which can be used in combination with a wqo and allows a stack-based implementation without losing any opportunities for specialization. Using our technique, certain non-leftmost unfoldings are allowed as long as local unfolding is performed, i.e., we cover depth-first strategies. To deal with practical programs, we propose assertion-based techniques which allow our approach to treat programs that include (Prolog) built-ins and external predicates in a very extensible manner, for the case of leftmost unfolding. Finally, we report on our mplementation of these techniques embedded in a practical partial evaluator, which shows that our techniques, in addition to dealing with practical programs, are also significantly more efficient in time and somewhat more efficient in memory than traditional tree-based implementations. To appear in Theory and Practice of Logic Programming (TPLP).
Resumo:
We discuss from a practical point of view a number of ssues involved in writing distributed Internet and WWW applications using LP/CLP systems. We describe PiLLoW, a publicdomain Internet and WWW programming library for LP/CLP systems that we have designed in order to simplify the process of writing such applications. PiLLoW provides facilities for accessing documents and code on the WWW; parsing, manipulating and generating HTML and XML structured documents and data; producing HTML forms; writing form handlers and CGI-scripts; and processing HTML/XML templates. An important contribution of PÍ'LLOW is to model HTML/XML code (and, thus, the content of WWW pages) as terms. The PÍ'LLOW library has been developed in the context of the Ciao Prolog system, but it has been adapted to a number of popular LP/CLP systems, supporting most of its functionality. We also describe the use of concurrency and a highlevel model of client-server interaction, Ciao Prolog's active modules, in the context of WWW programming. We propose a solution for client-side downloading and execution of Prolog code, using generic browsers. Finally, we also provide an overview of related work on the topic.
Resumo:
Program specialization optimizes programs for known valúes of the input. It is often the case that the set of possible input valúes is unknown, or this set is infinite. However, a form of specialization can still be performed in such cases by means of abstract interpretation, specialization then being with respect to abstract valúes (substitutions), rather than concrete ones. We study the múltiple specialization of logic programs based on abstract interpretation. This involves in principie, and based on information from global analysis, generating several versions of a program predicate for different uses of such predicate, optimizing these versions, and, finally, producing a new, "multiply specialized" program. While múltiple specialization has received theoretical attention, little previous evidence exists on its practicality. In this paper we report on the incorporation of múltiple specialization in a parallelizing compiler and quantify its effects. A novel approach to the design and implementation of the specialization system is proposed. The resulting implementation techniques result in identical specializations to those of the best previously proposed techniques but require little or no modification of some existing abstract interpreters. Our results show that, using the proposed techniques, the resulting "abstract múltiple specialization" is indeed a relevant technique in practice. In particular, in the parallelizing compiler application, a good number of run-time tests are eliminated and invariants extracted automatically from loops, resulting generally in lower overheads and in several cases in increased speedups.
Resumo:
This paper addresses the issue of the practicality of global flow analysis in logic program compilation, in terms of speed of the analysis, precisión, and usefulness of the information obtained. To this end, design and implementation aspects are discussed for two practical abstract interpretation-based flow analysis systems: MA , the MCC And-parallel Analyzer and Annotator; and Ms, an experimental mode inference system developed for SB-Prolog. The paper also provides performance data obtained (rom these implementations and, as an example of an application, a study of the usefulness of the mode information obtained in reducing run-time checks in independent and-parallelism.Based on the results obtained, it is concluded that the overhead of global flow analysis is not prohibitive, while the results of analysis can be quite precise and useful.