113 research outputs found
Semi-unification
Semi-unifiability is a generalization of both unification and matching. It is used to check nontermination of rewrite rules. In this paper an inference system is presented that decides semi-unifiability of two terms s and t and computes a semi-unifier. In contrast to an algorithm by Kapur, Musser et al, this inference system comes very close to the one for ordinary unification
Undecidability of Semi-Unification on a Napkin
Semi-unification (unification combined with matching) has been proven undecidable by Kfoury, Tiuryn, and Urzyczyn in the 1990s. The original argument reduces Turing machine immortality via Turing machine boundedness to semi-unification. The latter part is technically most challenging, involving several intermediate models of computation.
This work presents a novel, simpler reduction from Turing machine boundedness to semi-unification. In contrast to the original argument, we directly translate boundedness to solutions of semi-unification and vice versa. In addition, the reduction is mechanized in the Coq proof assistant, relying on a mechanization-friendly stack machine model that corresponds to space-bounded Turing machines. Taking advantage of the simpler proof, the mechanization is comparatively short and fully constructive
Algorithmic Structuring of Cut-free Proofs
The problem of algorithmic structuring of proofs in the sequent calculi LK and LKB ( LK where blocks of quantifiers can be introduced in one step) is investigated, where a distinction is made between linear proofs and proofs in tree form. In this framework, structuring coincides with the introduction of cuts into a proof. The algorithmic solvability of this problem can be reduced to the question of k-l-compressibility: "Given a proof of length k , and l ≤ k : Is there is a proof of length ≤ l ?" When restricted to proofs with universal or existential cuts, this problem is shown to be (1) undecidable for linear or tree-like LK-proofs (corresponds to the undecidability of second order unification), (2) undecidable for linear LKB-proofs (corresponds to the undecidability of semi-unification), and (3) decidable for tree-like LKB -proofs (corresponds to a decidable subprob-
lem of semi-unification)
Constructive Many-One Reduction from the Halting Problem to Semi-Unification
Semi-unification is the combination of first-order unification and
first-order matching. The undecidability of semi-unification has been proven by
Kfoury, Tiuryn, and Urzyczyn in the 1990s by Turing reduction from Turing
machine immortality (existence of a diverging configuration). The particular
Turing reduction is intricate, uses non-computational principles, and involves
various intermediate models of computation. The present work gives a
constructive many-one reduction from the Turing machine halting problem to
semi-unification. This establishes RE-completeness of semi-unification under
many-one reductions. Computability of the reduction function, constructivity of
the argument, and correctness of the argument is witnessed by an axiom-free
mechanization in the Coq proof assistant. Arguably, this serves as
comprehensive, precise, and surveyable evidence for the result at hand. The
mechanization is incorporated into the existing, well-maintained Coq library of
undecidability proofs. Notably, a variant of Hooper's argument for the
undecidability of Turing machine immortality is part of the mechanization.Comment: CSL 2022 - LMCS special issu
Type Inference for Bimorphic Recursion
This paper proposes bimorphic recursion, which is restricted polymorphic
recursion such that every recursive call in the body of a function definition
has the same type. Bimorphic recursion allows us to assign two different types
to a recursively defined function: one is for its recursive calls and the other
is for its calls outside its definition. Bimorphic recursion in this paper can
be nested. This paper shows bimorphic recursion has principal types and
decidable type inference. Hence bimorphic recursion gives us flexible typing
for recursion with decidable type inference. This paper also shows that its
typability becomes undecidable because of nesting of recursions when one
removes the instantiation property from the bimorphic recursion.Comment: In Proceedings GandALF 2011, arXiv:1106.081
Guided Unfoldings for Finding Loops in Standard Term Rewriting
In this paper, we reconsider the unfolding-based technique that we have
introduced previously for detecting loops in standard term rewriting. We
improve it by guiding the unfolding process, using distinguished positions in
the rewrite rules. This results in a depth-first computation of the unfoldings,
whereas the original technique was breadth-first. We have implemented this new
approach in our tool NTI and compared it to the previous one on a bunch of
rewrite systems. The results we get are promising (better times, more
successful proofs).Comment: Pre-proceedings paper presented at the 28th International Symposium
on Logic-Based Program Synthesis and Transformation (LOPSTR 2018), Frankfurt
am Main, Germany, 4-6 September 2018 (arXiv:1808.03326
Constructive Many-one Reduction from the Halting Problem to Semi-unification (Extended Version)
Semi-unification is the combination of first-order unification and
first-order matching. The undecidability of semi-unification has been proven by
Kfoury, Tiuryn, and Urzyczyn in the 1990s by Turing reduction from Turing
machine immortality (existence of a diverging configuration). The particular
Turing reduction is intricate, uses non-computational principles, and involves
various intermediate models of computation. The present work gives a
constructive many-one reduction from the Turing machine halting problem to
semi-unification. This establishes RE-completeness of semi-unification under
many-one reductions. Computability of the reduction function, constructivity of
the argument, and correctness of the argument is witnessed by an axiom-free
mechanization in the Coq proof assistant. Arguably, this serves as
comprehensive, precise, and surveyable evidence for the result at hand. The
mechanization is incorporated into the existing, well-maintained Coq library of
undecidability proofs. Notably, a variant of Hooper's argument for the
undecidability of Turing machine immortality is part of the mechanization
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
A framework for deadlock detection in core ABS
We present a framework for statically detecting deadlocks in a concurrent
object-oriented language with asynchronous method calls and cooperative
scheduling of method activations. Since this language features recursion and
dynamic resource creation, deadlock detection is extremely complex and
state-of-the-art solutions either give imprecise answers or do not scale. In
order to augment precision and scalability we propose a modular framework that
allows several techniques to be combined. The basic component of the framework
is a front-end inference algorithm that extracts abstract behavioural
descriptions of methods, called contracts, which retain resource dependency
information. This component is integrated with a number of possible different
back-ends that analyse contracts and derive deadlock information. As a
proof-of-concept, we discuss two such back-ends: (i) an evaluator that computes
a fixpoint semantics and (ii) an evaluator using abstract model checking.Comment: Software and Systems Modeling, Springer Verlag, 201
- …