首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 328 毫秒
1.
Recently, encodings in interaction nets of the call-by-name and call-by-value strategies of the λ-calculus have been proposed. The purpose of these encodings was to bridge the gap between interaction nets and traditional abstract machines, which are both used to provide lower-level specifications of strategies of the λ-calculus, but in radically different ways. The strength of these encodings is their simplicity, which comes from the simple idea of introducing an explicit syntactic object to represent the flow of evaluation. In particular, no artifact to represent boxes is needed. However, these encodings purposefully follow as closely as possible the implemented strategies, call-by-name and call-by-value, hence do not benefit from the ability of interaction nets to easily represent sharing. The aim of this note is to show that sharing can indeed be achieved without adding any structure. We thus present the call-by-need strategy following the same philosophy, which is indeed not any more complicated than call-by-name. This continues the task of bridging the gap between interaction nets and abstract machines, thus pushing forward a more uniform framework for implementations of the λ-calculus.  相似文献   

2.
We present a simple implementation of weak head reduction in the λ-calculus with interaction nets using package duplication.  相似文献   

3.
The ρ-calculus generalises term rewriting and the λ-calculus by defining abstractions on arbitrary patterns and by using a pattern-matching algorithm which is a parameter of the calculus. In particular, equational theories that do not have unique principal solutions may be used. In the latter case, all the principal solutions of a matching problem are stored in a “structure” that can also be seen as a collection of terms.Motivated by the fact that there are various approaches to the definition of structures in the ρ-calculus, we study in this paper a version of the λ-calculus with term collections.The contributions of this work include a new syntax and operational semantics for a λ-calculus with term collections, which is related to the λ-calculi with strict parallel functions studied by Boudol and Dezani et al. and a proof of the confluence of the β-reduction relation defined for the calculus (which is a suitable extension of the standard rule of β-reduction in the λ-calculus).  相似文献   

4.
Interaction nets are graphical rewrite systems which have been successfully used to implement various efficient evaluation strategies in the λ-calculus (including optimal reduction). However, they are intrinsically deterministic and this prevents from applying these techniques to concurrent languages where non-determinism plays a key rôle. In this paper we show that a minimal extension —the addition of one agent in the spirit of McCarthy's amb operator —allows us to define non-deterministic processes such as angelic and infinity merge, and more generally, to encode process calculi and wide classes of term rewriting systems (including systems defining parallel functions). We also show that Alexiev's INMPP (interaction nets with multiple principal ports) can be encoded, for which we give a textual calculus and a type system that ensures the absence of deadlock.  相似文献   

5.
In this paper we treat various aspects of a notion that is central in term rewriting, namely that of descendants or residuals. We address both first-order term rewriting and λ-calculus, their finitary as well as their infinitary variants. A recurrent theme is the parallel moves lemma. Next to the classical notion of descendant, we introduce an extended version, known as origin tracking. Origin tracking has many applications. Here it is employed to give new proofs of three classical theorems: the genericity lemma in λ-calculus, the theorem of Huet and Lévy on needed reductions in first-order term rewriting, and Berry's sequentiality theorem in (infinitary) λ-calculus.  相似文献   

6.
The last few years have seen the development of the rewriting calculus (or rho-calculus, ρCal) that extends first order term rewriting and λ-calculus. The integration of these two latter formalisms has been already handled either by enriching first-order rewriting with higher-order capabilities, like in the Combinatory Reduction Systems, or by adding to λ-calculus algebraic features. The different higher-order rewriting systems and the rewriting calculus share similar concepts and have similar applications, and thus, it seems natural to compare these formalisms. We analyze in this paper the relationship between the Rewriting Calculus and the Combinatory Reduction Systems and we present a translation of CRS-terms and rewrite rules into rho-terms and we show that for any CRS-reduction we have a corresponding rho-reduction.  相似文献   

7.
We use the ρ-calculus as an intermediate language to compile functional languages with pattern-matching features, and give an interaction net encoding of the ρ-terms arising from the compilation. This encoding gives rise to new strategies of evaluation, where pattern-matching and 'traditional' β-reduction can proceed in parallel without overheads.  相似文献   

8.
The purpose of this paper is to demonstrate how Lafont's interaction combinators, a system of three symbols and six interaction rules, can be used to encode linear logic. Specifically, we give a translation of the multiplicative, exponential, and additive fragments of linear logic together with a strategy for cut-elimination which can be faithfully simulated. Finally, we show briefly how this encoding can be used for evaluating λ-terms. In addition to offering a very simple, perhaps the simplest, system of rewriting for linear logic and the λ-calculus, the interaction net implementation that we present has been shown by experimental testing to offer a good level of sharing in terms of the number of cut-elimination steps (resp. β-reduction steps). In particular it performs better than all extant finite systems of interaction nets.  相似文献   

9.
Interaction nets were introduced almost 15 years ago. Since then they have been put forward as both a graphical programming paradigm and as an intermediate language into which we can compile other languages. Whichever way we use interaction nets, a problem remains in that the language is very primitive. Drawing an analogy with functional programming, we have the λ-calculus but we are missing the functional programming language: syntactic sugar, language constructs, data-structures, etc. The purpose of this paper is to make a first step towards defining such a programming language for interaction nets.  相似文献   

10.
We define an observational equivalence for Lafont's interaction combinators, which we prove to be the least discriminating non-trivial congruence on total nets (nets admitting a deadlock-free normal form) respecting reduction. More interestingly, this equivalence enjoys an internal separation property similar to that of Böhm's Theorem for the λ-calculus.  相似文献   

11.
Higher-order logical frameworks provide a powerful technology to reason about object languages with binders. This will be demonstrated for the case of the λμ-calculus with two different binders which can most elegantly be represented using a third-order constant. Since cases of third- and higher-order encodings are very rare in comparison with those of second order, a second-order representation is given as well and equivalence to the third-order representation is proven formally.  相似文献   

12.
We extend the π-calculus with polyadic synchronisation, a generalisation of the communication mechanism which allows channel names to be composite. We show that this operator embeds nicely in the theory of π-calculus, and makes it possible to derive divergence-free encodings of distributed calculi. We give a separation result between the π-calculus with polyadic synchronisation (eπ) and the original calculus, in the style of an analogous result given by Palamidessi for mixed choice. We encode Local Area π showing how to control the local use of resources in eπ.  相似文献   

13.
14.
This paper has the purpose of reviewing some of the established relationships between logic and concurrency, and of exploring new ones.Concurrent and distributed systems are notoriously hard to get right. Therefore, following an approach that has proved highly beneficial for sequential programs, much effort has been invested in tracing the foundations of concurrency in logic. The starting points of such investigations have been various idealized languages of concurrent and distributed programming, in particular the well established state-transformation model inspired by Petri nets and multiset rewriting, and the prolific process-based models such as the π-calculus and other process algebras. In nearly all cases, the target of these investigations has been linear logic, a formal language that supports a view of formulas as consumable resources. In the first part of this paper, we review some of these interpretations of concurrent languages into linear logic and observe that, possibly modulo duality, they invariably target a small semantic fragment of linear logic that we call LVobs.In the second part of the paper, we propose a new approach to understanding concurrent and distributed programming as a manifestation of logic, which yields a language that merges those two main paradigms of concurrency. Specifically, we present a new semantics for multiset rewriting founded on an alternative view of linear logic and specifically LVobs. The resulting interpretation is extended with a majority of linear connectives into the language of ω-multisets. This interpretation drops the distinction between multiset elements and rewrite rules, and considerably enriches the expressive power of standard multiset rewriting with embedded rules, choice, replication, and more. Derivations are now primarily viewed as open objects, and are closed only to examine intermediate rewriting states. The resulting language can also be interpreted as a process algebra. For example, a simple translation maps process constructors of the asynchronous π-calculus to rewrite operators. The language of ω-multisets forms the basis for the security protocol specification language MSR 3. With relations to both multiset rewriting and process algebra, it supports specifications that are process-based, state-based, or of a mixed nature, with the potential of combining verification techniques from both worlds. Additionally, its logical underpinning makes it an ideal common ground for systematically comparing protocol specification languages.  相似文献   

15.
We study the encoding of , the call-by-name λ-calculus enriched with McCarthy's amb operator, into the π-calculus. Semantically, amb is a challenging operator, for the fairness constraints that it expresses. We prove that, under a certain interpretation of divergence in the λ-calculus (weak divergence), a faithful encoding is impossible. However, with a different interpretation of divergence (strong divergence), the encoding is possible, and for this case we derive results and coinductive proof methods to reason about that are similar to those for the encoding of pure λ-calculi. We then use these methods to derive the most important laws concerning amb. We take bisimilarity as behavioural equivalence on the π-calculus, which sheds some light on the relationship between fairness and bisimilarity.  相似文献   

16.
One of the early results about the asynchronous π-calculus which significantly contributed to its popularity is the capability of encoding the output prefix of the (choiceless) π-calculus in a natural and elegant way. Encodings of this kind were proposed by Honda and Tokoro, by Nestmann and (independently) by Boudol. We investigate whether the above encodings preserve De Nicola and Hennessy's testing semantics. In this sense, it turns out that, under some general conditions, no encoding of output prefix is able to preserve the must testing. This negative result is due to (a) the non atomicity of the sequences of steps which are necessary in the asynchronous π-calculus to mimic synchronous communication, and (b) testing semantics's sensitivity to divergence.  相似文献   

17.
We investigate the expressive power of the typedλ-calculus when expressing computations over finite structures, i.e., databases. We show that the simply typedλ-calculus can express various database query languages such as the relational algebra, fixpoint logic, and the complex object algebra. In our embeddings, inputs and outputs areλ-terms encoding databases, and a program expressing a query is aλ-term which types when applied to an input and reduces to an output. Our embeddings have the additional property that PTIME computable queries are expressible by programs that, when applied to an input, reduce to an output in a PTIME sequence of reduction steps. Under our database input-output conventions, all elementary queries are expressible in the typedλ-calculus and the PTIME queries are expressible in the order-5 (order-4) fragment of the typedλ-calculus (with equality).  相似文献   

18.
This paper surveys a part of the theory ofβ-reduction inλ-calculus which might aptly be calledperpetual reductions. The theory is concerned withperpetual reduction strategies, i.e., reduction strategies that compute infinite reduction paths fromλ-terms (when possible), and withperpetual redexes, i.e., redexes whose contraction inλ-terms preserves the possibility (when present) of infinite reduction paths. The survey not only recasts classical theorems in a unified setting, but also offers new results, proofs, and techniques, as well as a number of applications to problems inλ-calculus and type theory.  相似文献   

19.
Kamareddine and Nederpelt[9], resp. Kamareddine and Ríos [11] gave two calculi of explicit of substitutions highly influenced by de Bruijn's notation of the λ-calculus. These calculi added to the explosive pool of work on explicit substitution in the past 15 years. As far as we know, calculi of explicit substitutions: a) are unable to handle local substitutions, and b) have answered (positively or negatively) the question of the termination of the underlying calculus of substitutions. The exception to a) is the calculus of [9] where substitution is handled both locally and globally. However, the calculus of [9] does not satisfy properties like confluence and termination. The exception to b) is the λse-calculus of [11] for which termination of the se-calculus, the underlying calculus of substitutions, remains unsolved. This paper has two aims:
(i) To provide a calculus à la de Bruijn which deals with local substitution and whose underlying calculus of substitutions is terminating and confluent.
(ii) To pose the problem of the termination of the substitution calculus of [11] in the hope that it can generate interest as a termination problem which at least for curiosity, needs to be settled. The answer here can go either way. On the one hand, although the λσ-calculus [1] does not preserve termination, the σ-calculus itself terminates. On the other hand, could the non-preservation of termination in the λse-calculus imply the non-termination of the se-calculus?

References

M. Abadi, L. Cardelli, P.-L. Curien and J.-J. Lévy, Explicit Substitutions, Journal of Functional Programming 1 (4) (1991), pp. 375–416. MathSciNet | Full Text via CrossRef
Z. Benaissa, D. Briaud, P. Lescanne and J. Rouyer-Degli, λυ, a calculus of explicit substitutions which preserves strong normalisation, Functional Programming 6 (5) (1996).
P.-L. Curien, Categorical Combinators, Sequential Algorithms and Functional Programming, Pitman (1986) Revised edition: Birkhäuser (1993).
Curien P-L, T. Hardin and A. Ríos, Strong normalisation of substitutions, Logic and Computation 6 (1996), pp. 799–817.
N.G. de Bruijn, Lambda-Calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser Theorem, Indag. Mat 34 (5) (1972), pp. 381–392. Abstract | Article | PDF (718 K) | MathSciNet | View Record in Scopus | Cited By in Scopus (164)
B. Guillaume. Un calcul des substitutions avec etiquettes. PhD thesis, Université de Savoie, Chambéry, France, 1999.
T. Hardin and A. Laville, Proof of Termination of the Rewriting System SUBST on CCL, Theoretical Computer Science 46 (1986), pp. 305–312. Abstract | PDF (407 K) | MathSciNet | View Record in Scopus | Cited By in Scopus (10)
F. Kamareddine and R. Nederpelt, A useful λ-notation, Theoretical Computer Science 155 (1996), pp. 85–109. Abstract | PDF (1169 K) | MathSciNet | View Record in Scopus | Cited By in Scopus (15)
F. Kamareddine and R.P. Nederpelt, On stepwise explicit substitution, International Journal of Foundations of Computer Science 4 (3) (1993), pp. 197–240. MathSciNet | Full Text via CrossRef
F. Kamareddine, and A. Ríos. A λ-calculus à la de Bruijn with explicit substitutions. Proceedings of PLILP'95. LNCS, 982:45–62, 1995.
F. Kamareddine and A. Ríos, Extending a λ-calculus with explicit substitution which preserves strong normalisation into a confluent calculus on open terms, Journal of Functional Programming 7 (4) (1997), pp. 420–495.
F. Kamareddine and A. Ríos, Bridging de Bruijn indices and variable names in explicit substitutions calculi, Logic Journal of the IGPL 6 (6) (1998), pp. 843–874. MathSciNet | Full Text via CrossRef
F. Kamareddine and A. Ríos, Relating the λσ- and λs-styles of explicit substitutions, Logic and Computation 10 (3) (2000), pp. 349–380. Full Text via CrossRef | View Record in Scopus | Cited By in Scopus (11)
J.-W. Klop, Term rewriting systems, Handbook of Logic in Computer Science, II (1992).
S.L. Peyton-Jones, The Implementation of Functional Programming Languages, Prentice-Hall (1987).
A. Ríos. Contribution à l'étude des λ-calculs avec substitutions explicites. PhD thesis, Université de Paris 7, 1993.
H. Zantema, Termination of term rewriting: interpretation and type elimination, J. Symbolic Computation 17 (1) (1994), pp. 23–50. Abstract | PDF (885 K) | MathSciNet | View Record in Scopus | Cited By in Scopus (48)
H. Zantema, Termination of term rewriting by semantic labelling, Fundamenta Informaticae 24 (1995), pp. 89–105. MathSciNet
  相似文献   

20.
We introduce a typed π-calculus where strong normalisation is ensured by typability. Strong normalisation is a useful property in many computational contexts, including distributed systems. In spite of its simplicity, our type discipline captures a wide class of converging name-passing interactive behaviour. The proof of strong normalisability combines methods from typed λ-calculi and linear logic with process-theoretic reasoning. It is adaptable to systems involving state, non-determinism, polymorphism, control and other extensions. Strong normalisation is shown to have significant consequences, including finite axiomatisation of weak bisimilarity, a fully abstract embedding of the simply typed λ-calculus with products and sums and basic liveness in interaction. Strong normalisability has been extensively studied as a fundamental property in functional calculi, term rewriting and logical systems. This work is one of the first steps to extend theories and proof methods for strong normalisability to the context of name-passing processes.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号