486 research outputs found
A theory of type polymorphism in programming
AbstractThe aim of this work is largely a practical one. A widely employed style of programming, particularly in structure-processing languages which impose no discipline of types, entails defining procedures which work well on objects of a wide variety. We present a formal type discipline for such polymorphic procedures in the context of a simple programming language, and a compile time type-checking algorithm W which enforces the discipline. A Semantic Soundness Theorem (based on a formal semantics for the language) states that well-type programs cannot âgo wrongâ and a Syntactic Soundness Theorem states that if W accepts a program then it is well typed. We also discuss extending these results to richer languages; a type-checking algorithm based on W is in fact already implemented and working, for the metalanguage ML in the Edinburgh LCF system
Data Structures and Data Types in Object-Oriented Databases
The possibility of finding a static type system for object-oriented programming languages was initiated by Cardelli [Car88, CW85] who showed that it is possible to express the polymorphic nature of functions such a
A hybrid approach to software repository retrieval: Blending faceted classification and type signatures
We present a user interface for software reuse repository that relies both on the informal semantics of faceted classification and the formal semantics of type signatures for abstract data types. The result is an interface providing both structural and qualitative feedback to a software reuser
Several types of types in programming languages
Types are an important part of any modern programming language, but we often
forget that the concept of type we understand nowadays is not the same it was
perceived in the sixties. Moreover, we conflate the concept of "type" in
programming languages with the concept of the same name in mathematical logic,
an identification that is only the result of the convergence of two different
paths, which started apart with different aims. The paper will present several
remarks (some historical, some of more conceptual character) on the subject, as
a basis for a further investigation. The thesis we will argue is that there are
three different characters at play in programming languages, all of them now
called types: the technical concept used in language design to guide
implementation; the general abstraction mechanism used as a modelling tool; the
classifying tool inherited from mathematical logic. We will suggest three
possible dates ad quem for their presence in the programming language
literature, suggesting that the emergence of the concept of type in computer
science is relatively independent from the logical tradition, until the
Curry-Howard isomorphism will make an explicit bridge between them.Comment: History and Philosophy of Computing, HAPOC 2015. To appear in LNC
Type-Based Termination, Inflationary Fixed-Points, and Mixed Inductive-Coinductive Types
Type systems certify program properties in a compositional way. From a bigger
program one can abstract out a part and certify the properties of the resulting
abstract program by just using the type of the part that was abstracted away.
Termination and productivity are non-trivial yet desired program properties,
and several type systems have been put forward that guarantee termination,
compositionally. These type systems are intimately connected to the definition
of least and greatest fixed-points by ordinal iteration. While most type
systems use conventional iteration, we consider inflationary iteration in this
article. We demonstrate how this leads to a more principled type system, with
recursion based on well-founded induction. The type system has a prototypical
implementation, MiniAgda, and we show in particular how it certifies
productivity of corecursive and mixed recursive-corecursive functions.Comment: In Proceedings FICS 2012, arXiv:1202.317
Typing rule-based transformations over topological collections
Pattern-matching programming is an example of a rule-based programming style
developed in functional languages. This programming style is intensively used
in dialects of ML but is restricted to algebraic data-types. This restriction
limits the field of application. However, as shown by Giavitto and Michel at
RULE'02, case-based function definitions can be extended to more general data
structures called topological collections. We show in this paper that this
extension retains the benefits of the typed discipline of the functional
languages. More precisely, we show that topological collections and the
rule-based definition of functions associated with them fit in a polytypic
extension of mini-ML where type inference is still possible
Towards the Formal Reliability Analysis of Oil and Gas Pipelines
It is customary to assess the reliability of underground oil and gas
pipelines in the presence of excessive loading and corrosion effects to ensure
a leak-free transport of hazardous materials. The main idea behind this
reliability analysis is to model the given pipeline system as a Reliability
Block Diagram (RBD) of segments such that the reliability of an individual
pipeline segment can be represented by a random variable. Traditionally,
computer simulation is used to perform this reliability analysis but it
provides approximate results and requires an enormous amount of CPU time for
attaining reasonable estimates. Due to its approximate nature, simulation is
not very suitable for analyzing safety-critical systems like oil and gas
pipelines, where even minor analysis flaws may result in catastrophic
consequences. As an accurate alternative, we propose to use a
higher-order-logic theorem prover (HOL) for the reliability analysis of
pipelines. As a first step towards this idea, this paper provides a
higher-order-logic formalization of reliability and the series RBD using the
HOL theorem prover. For illustration, we present the formal analysis of a
simple pipeline that can be modeled as a series RBD of segments with
exponentially distributed failure times.Comment: 15 page
A Type System for Tom
Extending a given language with new dedicated features is a general and quite
used approach to make the programming language more adapted to problems. Being
closer to the application, this leads to less programming flaws and easier
maintenance. But of course one would still like to perform program analysis on
these kinds of extended languages, in particular type checking and inference.
In this case one has to make the typing of the extended features compatible
with the ones in the starting language.
The Tom programming language is a typical example of such a situation as it
consists of an extension of Java that adds pattern matching, more particularly
associative pattern matching, and reduction strategies.
This paper presents a type system with subtyping for Tom, that is compatible
with Java's type system, and that performs both type checking and type
inference. We propose an algorithm that checks if all patterns of a Tom program
are well-typed. In addition, we propose an algorithm based on equality and
subtyping constraints that infers types of variables occurring in a pattern.
Both algorithms are exemplified and the proposed type system is showed to be
sound and complete
Combining Static and Dynamic Contract Checking for Curry
Static type systems are usually not sufficient to express all requirements on
function calls. Hence, contracts with pre- and postconditions can be used to
express more complex constraints on operations. Contracts can be checked at run
time to ensure that operations are only invoked with reasonable arguments and
return intended results. Although such dynamic contract checking provides more
reliable program execution, it requires execution time and could lead to
program crashes that might be detected with more advanced methods at compile
time. To improve this situation for declarative languages, we present an
approach to combine static and dynamic contract checking for the functional
logic language Curry. Based on a formal model of contract checking for
functional logic programming, we propose an automatic method to verify
contracts at compile time. If a contract is successfully verified, dynamic
checking of it can be omitted. This method decreases execution time without
degrading reliable program execution. In the best case, when all contracts are
statically verified, it provides trust in the software since crashes due to
contract violations cannot occur during program execution.Comment: Pre-proceedings paper presented at the 27th International Symposium
on Logic-Based Program Synthesis and Transformation (LOPSTR 2017), Namur,
Belgium, 10-12 October 2017 (arXiv:1708.07854
- âŠ