34,418 research outputs found
Polymorphic Type Inference for the JNI
We present a multi-lingual type inference system for checking type safety of programs that use the Java Native Interface (JNI). The JNI uses specially-formatted strings to represent class and field
names as well as method signatures, and so our type system tracks
the flow of string constants through the program. Our system embeds
string variables in types, and as those variables are resolved to
string constants during inference they are replaced with the
structured types the constants represent. This restricted form of
dependent types allows us to directly assign type signatures to each
of the more than 200 functions in the JNI. Moreover, it allows us
to infer types for user-defined functions that are parameterized by
Java type strings, which we have found to be common practice. Our
inference system allows such functions to be treated polymorphically by using instantiation constraints, solved with semi-unification, at function calls. Finally, we have implemented our system and applied it to a small set of benchmarks. Although semi-unification is undecidable, we found our system to be scalable and effective in practice. We discovered 155 errors 36 cases of suspicious programming practices in our benchmarks
Carnap: an Open Framework for Formal Reasoning in the Browser
This paper presents an overview of Carnap, a free and open framework for the development of formal reasoning applications. Carnap’s design emphasizes flexibility, extensibility, and rapid prototyping. Carnap-based applications are written in Haskell, but can be compiled to JavaScript to run in standard web browsers. This combination of features makes Carnap ideally suited for educational applications, where ease-of-use is crucial for students and adaptability to different teaching strategies and classroom needs is crucial for instructors. The paper describes Carnap’s implementation, along with its current and projected pedagogical applications
IUPC: Identification and Unification of Process Constraints
Business Process Compliance (BPC) has gained significant momentum in research
and practice during the last years. Although many approaches address BPC, they
mostly assume the existence of some kind of unified base of process constraints
and focus on their verification over the business processes. However, it
remains unclear how such an inte- grated process constraint base can be built
up, even though this con- stitutes the essential prerequisite for all further
compliance checks. In addition, the heterogeneity of process constraints has
been neglected so far. Without identification and separation of process
constraints from domain rules as well as unification of process constraints,
the success- ful IT support of BPC will not be possible. In this technical
report we introduce a unified representation framework that enables the
identifica- tion of process constraints from domain rules and their later
unification within a process constraint base. Separating process constraints
from domain rules can lead to significant reduction of compliance checking
effort. Unification enables consistency checks and optimizations as well as
maintenance and evolution of the constraint base on the other side.Comment: 13 pages, 4 figures, technical repor
Consistency and Completeness of Rewriting in the Calculus of Constructions
Adding rewriting to a proof assistant based on the Curry-Howard isomorphism,
such as Coq, may greatly improve usability of the tool. Unfortunately adding an
arbitrary set of rewrite rules may render the underlying formal system
undecidable and inconsistent. While ways to ensure termination and confluence,
and hence decidability of type-checking, have already been studied to some
extent, logical consistency has got little attention so far. In this paper we
show that consistency is a consequence of canonicity, which in turn follows
from the assumption that all functions defined by rewrite rules are complete.
We provide a sound and terminating, but necessarily incomplete algorithm to
verify this property. The algorithm accepts all definitions that follow
dependent pattern matching schemes presented by Coquand and studied by McBride
in his PhD thesis. It also accepts many definitions by rewriting, containing
rules which depart from standard pattern matching.Comment: 20 page
Compositional Explanation of Types and Algorithmic Debugging of Type Errors
The type systems of most typed functional programming languages are based on the Hindley-Milner type system. A practical problem with these type systems is that it is often hard to understand why a program is not type correct or a function does not have the intended type. We suggest that at the core of this problem is the difficulty of explaining why a given expression has a certain type. The type system is not defined compositionally. We propose to explain types using a variant of the Hindley-Milner type system that defines a compositional type explanation graph of principal typings. We describe how the programmer understands types by interactive navigation through the explanation graph. Furthermore, the explanation graph can be the foundation for algorithmic debugging of type errors, that is, semi-automatic localisation of the source of a type error without even having to understand the type inference steps. We implemented a prototype of a tool to explore the usefulness of the proposed methods
XRound : A reversible template language and its application in model-based security analysis
Successful analysis of the models used in Model-Driven Development requires the ability to synthesise the results of analysis and automatically integrate these results with the models themselves. This paper presents a reversible template language called XRound which supports round-trip transformations between models and the logic used to encode system properties. A template processor that supports the language is described, and the use of the template language is illustrated by its application in an analysis workbench, designed to support analysis of security properties of UML and MOF-based models. As a result of using reversible templates, it is possible to seamlessly and automatically integrate the results of a security analysis with a model. (C) 2008 Elsevier B.V. All rights reserved
- …