12 research outputs found
Especificación e implementación de un lenguaje de programación lógica con tipos
Se presenta la especificación de un lenguaje de programación en lógica con tipos polimorfos, junto con el desarrollo de un intérprete para el mismo en PROLOG. El polimorfismo permite, entre otras cosas, programar procedimientos genéricos, con argumentos que no tienen un tipo declarado estáticamente.
La incorporación de un sistema de tipos mejora el soporte de abstracción provisto por los lenguajes de programación lógica. Los tipos proveen un lenguaje claro para la especificación de interfases y herramientas para la depuración algorítmica Esta información puede utilizarse para la optimización de código y es de una ayuda inestimable para detectar errores de programación en tiempo de compilación.Eje: Lenguaje de programaciónRed de Universidades con Carreras en Informática (RedUNCI
Especificación e implementación de un lenguaje de programación lógica con tipos
Se presenta la especificación de un lenguaje de programación en lógica con tipos polimorfos, junto con el desarrollo de un intérprete para el mismo en PROLOG. El polimorfismo permite, entre otras cosas, programar procedimientos genéricos, con argumentos que no tienen un tipo declarado estáticamente.
La incorporación de un sistema de tipos mejora el soporte de abstracción provisto por los lenguajes de programación lógica. Los tipos proveen un lenguaje claro para la especificación de interfases y herramientas para la depuración algorítmica Esta información puede utilizarse para la optimización de código y es de una ayuda inestimable para detectar errores de programación en tiempo de compilación.Eje: Lenguaje de programaciónRed de Universidades con Carreras en Informática (RedUNCI
Inference of Well-Typings for Logic Programs with Application to Termination Analysis
This paper develops a method to infer a polymorphic well-typing for a logic program. One of the main motivations is to contribute to a better automation of termination analysis in logic programs, by deriving types from which norms can automatically be constructed. Previous work on type-based termination analysis used either types declared by the user, or automatically generated monomorphic types describing the success set of predicates. Declared types are typically more precise and result in stronger termination conditions than those obtained with inferred types. Our type inference procedure involves solving set constraints generated from the program and derives a well-typing in contrast to a success-set approximation. Experiments show that our automatically inferred well-typings are close to the declared types and thus result in termination conditions that are as good as those obtained with declared types for all our experiments to date. We describe the method, its implementation and experiments with termination analysis based on the inferred types
Logical Foundations of Object-Oriented and Frame-Based Languages
We propose a novel logic, called Frame Logic (abbr., F-logic), that accounts in a clean, declarative fashion for most of the structural aspects of object-oriented and frame-based languages. These features include object identity, complex objects, inheritance, polymorphic types, methods, encapsulation, and others. In a sense, F-logic stands in the same relationship to the object-oriented paradigm as classical predicate calculus stands to relational programming. The syntax of F-logic is higher-order, which, among other things, allows the user to explore data and schema using the same declarative language. F-logic has a model-theoretic semantics and a sound and complete resolution-based proof procedure. This paper also discusses various aspects of programming in declarative object-oriented languages based on F-logic
A Statically Typed Logic Context Query Language With Parametric Polymorphism and Subtyping
The objective of this thesis is programming language support for context-sensitive program adaptations. Driven by the requirements for context-aware adaptation languages, a statically typed Object-oriented logic Context Query Language (OCQL) was developed, which is suitable for integration with adaptation languages based on the Java type system. The ambient information considered in context-aware applications often originates from several, potentially distributed sources. OCQL employs the Semantic Web-language RDF Schema to structure and combine distributed context information. OCQL offers parametric polymorphism, subtyping, and a fixed set of meta-predicates. Its type system is based on mode analysis and a subset of Java Generics. For this reason a mode-inference approach for normal logic programs that considers variable aliasing and sharing was extended to cover all-solution predicates. OCQL is complemented by a service-oriented context-management infrastructure that supports the integration of OCQL with runtime adaptation approaches. The applicability of the language and its infrastructure were demonstrated with the context-aware aspect language CSLogicAJ. CSLogicAJ aspects encapsulate context-aware behavior and define in which contextual situation and program execution state the behavior is woven into the running program. The thesis concludes with a case study analyzing how runtime adaptation of mobile applications can be supported by pure object-, service- and context-aware aspect-orientation. Our study has shown that CSLogicAJ can improve the modularization of context-aware applications and reduce anticipation of runtime adaptations when compared to other approaches
Recognising the design decisions in Prolog programs as a prelude to critiquing
This thesis presents an approach by which an automated teaching system can
analyse the design of novices' Prolog programs for tutorial critiquing. Existing
methodologies for tutorial analysis of programs focus on the kind of small pro¬
gramming examples that are used only in the early stages of teaching. If an
automated teaching system is to be widely useful, it must cover a substantial
amount of the teaching syllabus, and a critiquing system must be able to analyse
and critique programs written during the later stages of the syllabus.The work is motivated by a study of students' Prolog programs which were
written as assessed exercises towards the end of their course. These programs
all work (in some sense), yet they reveal a wide range of design (laws (bodges)
for which some form of tutoring would be useful. They present problems for any
automated analysis in terms of the size of the programs, the number of individual
decisions that must be made to create each program and the range of correct
and incorrect decisions that may be made in each case.This study identifies two areas in the analysis of students' program in which
further work is needed. Existing work has focussed only on the design and
implementation decisions that relate closely to the programming language. That
is not sufficient for these slightly more advanced programs, for which decisions in
the problem domain must also be recognised. Existing work has focussed on the
different ways to implement code, but in these programs the students also make
decisions about which data structures are to be used. These decisions must also
be part of an analysis.The thesis provides an approach which represents both decisions in the domain
of the problem being solved and decisions about how to implement them in
Prolog. Decisions in the problem domain are represented by tasks (for code)
and by domain objects (for data structures). Decisions that are specific to the
Prolog implementation are represented by prototypes which encapsulate standard
programming techniques (for code) and by a polymorphic data type language (for
data structures). Issues in devising these representations are discussed.An analysis-by synthesis approach is used for code recognition. This is aug¬
mented by a procedure called "clausal split" which isolates novel or poorly de¬
signed parts of an implementation. Following an incomplete analysis of the
program by synthesis, the results of this analysis provide the basis for making
inferences about the parts of the program that have not been understood. For
analysing data structures, a type inference mechanism is combined with inference
about the parts of domain objects. Inferred data type information is also used
to limit search, both for synthesis and analysis.An architecture using this approach has been implemented. The success of the
architecture is assessed on student's programs. From this assessment it is clear
that much further work remains to be done, but the results are hopeful