85 research outputs found
A Practical Type Analysis for Verification of Modular Prolog Programs
Regular types are a powerful tool for computing very precise descriptive types for logic programs. However, in the context of real life, modular Prolog programs, the accurate results obtained by regular types often come at the price of efficiency. In this paper we propose a combination of techniques aimed at improving analysis efficiency in this context. As a first technique we allow optionally reducing the accuracy of inferred types by using only the types defined by the user or present in the libraries. We claim that, for the purpose of verifying type signatures given in the form of assertions the precision obtained using this approach is sufficient, and show that analysis times can be reduced significantly. Our second technique is aimed at dealing with situations where we would like to limit the amount of reanalysis performed, especially for library modules. Borrowing some ideas from polymorphic type systems, we show how to solve the problem by admitting parameters in type specifications. This allows us to compose new call patterns with some pre computed analysis info without losing any information. We argue that together these two techniques contribute to the practical and scalable analysis and verification of types in Prolog programs
Testing and profiling of regular type operations
We performed an audit of the operations of the regular types library included with the Ciao pre-processor, CiaoPP, with the objective of exploring its correctness and efficiency. We centered our investigation on the operations relevant for performing type inference analysis via abstract interpretation, with special attention to the widening operators. We implemented tools to perform our white-box testing of the library, found the bottlenecks for analysis, and proposed some solutions to the main issues diagnosed in the investigation
Automatic Inference of Determinacy and Mutual Exclusion for Logic Programs Using Mode and Type Analyses
We propose an analysis for detecting procedures and goals
that are deterministic (i.e., that produce at most one solution at most once),or predicates whose clause tests are mutually exclusive (which implies that at most one of their clauses will succeed) even if they are not deterministic.
The analysis takes advantage of the pruning operator in order to improve the detection of mutual exclusion and determinacy. It also supports arithmetic equations and disequations, as well as equations and disequations on terms,for which we give a complete satisfiability testing algorithm, w.r.t. available type information. Information about determinacy can be used for program debugging and optimization, resource consumption and granularity control,
abstraction carrying code, etc. We have implemented the analysis and integrated it in the CiaoPP system, which also infers automatically the mode and type information that our analysis takes as input. Experiments performed on this implementation show that the analysis is fairly accurate and efficient
Inferring determinacy and mutual exclusion in logic programs using mode and type analysis.
We propose an analysis for detecting procedures and goals that are deterministic (i.e., that produce at most one solution at most once), or predicates whose clause tests are mutually exclusive (which implies that at most one of their clauses will succeed) even if they are not deterministic. The analysis takes advantage of the pruning operator in order to improve the detection of mutual exclusion and determinacy. It also supports arithmetic equations and disequations, as well as equations and disequations on terms, for which we give a complete satisfiability testing algorithm, w.r.t. available type information. We have implemented the analysis and integrated it in the CiaoPP system, which also infers automatically the mode and type information that our analysis takes as input. Experiments performed on this implementation show that the analysis is fairly accurate and efficient
A generic framework for the matching of similiar names.
Name matching is a common requirement in modern business systems, wherein fuzzy matching techniques are employed to overcome variations between names. The purpose of this dissertation was the development of a framework, which is capable of implementing various fuzzy matching algorithms, while abstracting the name matching process away from external business systems. Through a study of existing fuzzy matching algorithms and frameworks, several design requirements were identified; the maintaining of name relationships, non-algorithm specific logic, abstraction of the matching process, user configured matching logic, consistent external interface and performance considerations. The deployment to a production environment and a series of tests, demonstrated that the framework fulfilled all but one of its design requirements, as certain algorithm implementations yielded excessive search times. The cause and remedy of this shortcoming were identified. Finally, based on an evaluation of the design‟s strengths and weaknesses, recommendations for future developments were suggested
Interval-based Resource Usage Verification by Translation into Horn Clauses and an Application to Energy Consumption
Many applications require conformance with specifications that constrain the
use of resources, such as execution time, energy, bandwidth, etc. We have
presented a configurable framework for static resource usage verification where
specifications can include lower and upper bound, data size-dependent resource
usage functions. To statically check such specifications, our framework infers
the same type of resource usage functions, which safely approximate the actual
resource usage of the program, and compares them against the specification. We
review how this framework supports several languages and compilation output
formats by translating them to an intermediate representation based on Horn
clauses and using the configurability of the framework to describe the resource
semantics of the input language. We provide a more detailed formalization and
extend the framework so that both resource usage specification and
analysis/verification output can include preconditions expressing intervals for
the input data sizes for which assertions are applicable, proved, or disproved.
Most importantly, we also extend the classes of functions that can be checked.
We provide results from an implementation within the Ciao/CiaoPP framework, and
report on a tool built by instantiating this framework for the verification of
energy consumption specifications for imperative/embedded programs. This paper
is under consideration for publication in Theory and Practice of Logic
Programming (TPLP).Comment: Under consideration for publication in Theory and Practice of Logic
Programming (TPLP
- …