首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
Bounded operator abstraction is a language construct relevant to object oriented programming languages and to ML2000, the successor to Standard ML. In this paper, we introduce , a variant of F<:ω with this feature and with Cardelli and Wegner’s kernel Fun rule for quantifiers. We define a typed-operational semantics with subtyping and prove that it is equivalent with , using logical relations to prove soundness. The typed-operational semantics provides a powerful and uniform technique to study metatheoretic properties of , such as Church–Rosser, subject reduction, the admissibility of structural rules, and the equivalence with the algorithmic presentation of the system that performs weak-head reductions.Furthermore, we can show decidability of subtyping using the typed-operational semantics and its equivalence with the usual presentation. Hence, this paper demonstrates for the first time that logical relations can be used to show decidability of subtyping.  相似文献   

2.
System F-bounded is a second-order typed lambda calculus, where the basic features of object-oriented languages can be naturally modelled. F-bounded extends the better known system F, in a way that provides an immediate solution for the treatment of the so-called “binary methods.” Although more powerful than F and also quite natural, system F-bounded has only been superficially studied from a foundational perspective and many of its essential properties have been conjectured but never proved in the literature. The aim of this paper is to give a solid foundation to F-bounded, by addressing and proving the key properties of the system. In particular, transitivity elimination, completeness of the type checking semi-algorithm, the subject reduction property for βη reduction, conservativity with respect to system F, and antisymmetry of a “full” subsystem are considered, and various possible formulations for system F-bounded are compared. Finally, a semantic interpretation of system F-bounded is presented, based on partial equivalence relations.  相似文献   

3.
We study how the type theory Fω can be adequately represented in the meta-logical framework Twelf [16]. This development puts special emphasis on the way how terms, types, and kinds are represented in that it uses higher-order abstract syntax to model variable binding and dependent types to model typing constraints. Furthermore our design ensures that only well-typed terms and well-kinded types can be constructed. A possible application of this work lies in the development of safe intermediate languages for compilation.  相似文献   

4.
M. Abadi and L. Cardelli have recently investigated a calculus of objects (1994). The calculus supports a key feature of object-oriented languages: an object can be emulated by another object that has more refined methods. Abadi and Cardelli presented four first-order type systems for the calculus. The simplest one is based on finite types and no subtyping, and the most powerful one has both recursive types and subtyping. Open until now is the question of type inference, and in the presence of subtyping "the absence of minimum typings poses practical problems for type inference." In this paper, we give an O(n3) algorithm for each of the four type inference problems and we prove that all the problems are P-complete. We also indicate how to modify the algorithms to handle functions and records.  相似文献   

5.
In this paper we investigate on the existence of the stabilizing solution of the algebraic Riccati equation (ARE) related to the filtering problem with a prescribed attenuation level γ. It is well known that such a solution exists and is positive definite for γ larger than a certain γF and it does not exist for γ smaller than a certain γ0. We consider the intermediate case γ(γ0F] and show that in this interval the stabilizing solution does exist, except for a finite number of values of γ. We show how the solution of the ARE may be employed to obtain a minimum-phase J-spectral factor of the J-spectrum associated with the filtering problem.  相似文献   

6.
In this paper, we attempt to characterize the class of recursively enumerable languages with much smaller language classes than that of linear languages. Language classes, and , of (i,j) linear languages and (i,j) minimal linear languages are defined by posing restrictions on the form of production rules and the number of nonterminals. Then the homomorphic characterizations of the class of recursively enumerable languages are obtained using these classes and a class, , of minimal linear languages. That is, for any recursively enumerable language L over Σ, an alphabet Δ, a homomorphism h : Δ*→Σ* and two languages L1 and L2 over Δ in some classes mentioned above can be found such that L = h(L1L2). The membership relations of L1 and L2 of the main results are as follows:(I) For posing restrictions on the forms of production rules, the following result is obtained:(1) and .This result is the best one and cannot be improved using . However, with posing more restriction on L2, this result can be improved and the follwing statement is obtained.(2) and .(II) For posing restrictions on the numbers of nonterminals, the follwing result is obtained.(3) and .We believe this result is also the best.  相似文献   

7.
Category theory has proved a useful tool in the study of type systems for sequential programming languages. Various approaches have been proposed to use categorical models to examine the type structures appropriate to concurrent systems. In this paper, we outline some of these approaches, such as interaction categories, and argue that they are not appropriate to model the handshake communication mechanism as used e.g. in CCS or the π-calculus. We propose an alternative general categorical framework for examining the type structure of such systems, and exhibit its categorical structure, which is similar to that of existing approaches. We then examine in detail an instance of this framework, based on a simple fragment of CCS. We prove that it is isomorphic to a syntactic category constructed from a process algebra similar to CCS, with a fusion operator, as in the fusion calculus. Thus, we make explicit some of the type structure implicitly present in such a process algebra.  相似文献   

8.
The extensions of first-order logic with a least fixed point operator (FO + LFP) and with a partial fixed point operator (FO + PFP) are known to capture the complexity classes P and PSPACE respectively in the presence of an ordering relation over finite structures. Recently, Abiteboul and Vianu (in "Proceedings of the 23rd ACM Symposium on the Theory of Computing," 1991) investigated the relationship of these two logics in the absence of an ordering, using a machine model of generic computation. In particular, they showed that the two languages have equivalent expressive power if and only if P = PSPACE. These languages can also be seen as fragments of an infinitary logic where each formula has a bounded number of variables, Lω∞ω, (see, for instance, Kolaitis and Vardi, in "Proceedings of the 5th IEEE Symposium on Logic in Computer Science," pp. 156-167, 1990). We investigate this logic on finite structures and provide a normal form for it. We also present a treatment of Abiteboul and Vianu′s results from this point of view. In particular, we show that we can write a formula of FO + LFP that defines an ordering of the Lk∞ω, types uniformly over all finite structures. One consequence of this is a generalization of the equivalence of FO + LFP and P from ordered structures to classes of structures where every element is definable. We also settle a conjecture mentioned by Abiteboul and Vianu by showing that FO + LFP is properly contained in the polynomial time computable fragment of Lω∞ω, raising the question of whether the latter fragment is a recursively enumerable class.  相似文献   

9.
We investigate the infinitary logic L∞ωω, in which sentences may have arbitrary disjunctions and conjunctions, but they involve only finite numbers of distinct variables. We show that various fixpoint logics can be viewed as fragments of L∞ωω, and we describe a game-theoretic characterization of the expressive power of the logic. Finally, we study asymptotic probabilities of properties expressible in L∞ωω on finite structures. We show that the 0–1 law holds for L∞ωω, i.e., the asymptotic probability of every sentence in this logic exists and is equal to either 0 or 1. This result subsumes earlier work on asymptotic probabilities for various fixpoint logics and reveals the boundary of 0–1 laws for infinitary logics.  相似文献   

10.
We give an algorithm for the determination of the finitely many primes such that the image of the modular Galois representations attached to a weight 2 newform on Γ0(N) without complex multiplication or inner twists may not be “as large as possible". We apply the algorithm to suitable newforms and we obtain the realization of the groups PSL(2,F2),PGL (2,F3) andPSL (2,F4) as Galois groups overQfor high density sets of primes.  相似文献   

11.
A chip algorithm is called r-multilective if it reads its input bits r times. In this paper we relate the r-bound communication complexity of a language L and the area requirement for an r-multilective chip algorithm of a related language . More specifically Improving known lower bounds on the r-bound communication complexity of certain languages, we obtain several hierarchies of r-multilective languages depending on the parameter r. For example, if 0 < r < s, then there are constants 0 < c, c′ such that for infinitely many n there is a language Ln {0, 1}n such that there is an s-multilective algorithm recognizing Ln using area at most c log n and any r-multilective algoerithm recognizing Ln requires area at least cn/log n. Similar results have been known only for s = 2 and r = 1 and have been open in other cases.  相似文献   

12.
We prove that a regular language defined by a boolean combination of generalized Σ1-sentences built using modular counting quantifiers can be defined by a boolean combination of Σ1-sentences in which only regular numerical predicates appear. The same statement, with “Σ1” replaced by “first-order,” is equivalent to the conjecture that the nonuniform circuit complexity class ACC is strictly contained in NC1. The argument introduces some new techniques, based on a combination of semigroup theory and Ramsey theory, which may shed some light on the general case.  相似文献   

13.
Type Destructors     
We study a variant of System F that integrates and generalizes several existing proposals for calculi with “structural typing rules.” To the usual type constructors (→, ×, All, Some, Rec) we add a number of type destructors, each internalizing a useful fact about the subtyping relation. For example, in F with products every closed subtype of a product S×T must itself be a product S′×T′ with S′<:S and T′<:T. We internalise this observation by introducing type destructors .1 and .2 and postulating an equivalence T=ηT.1×T.2 whenever T<:U×V (including, for example, when T is a variable). In other words, every subtype of a product type literally is a product type, modulo η-conversion. Adding type destructors provides a clean solution to the problem of polymorphic update without introducing new term formers, new forms of polymorphism, or quantification over type operators. We illustrate this by giving elementary presentations of two well-known encodings of objects, one based on recursive record types and the other based on existential packages. The formulation of type destructors poses some tricky meta-theoretic problems. We discuss two different variants: an “ideal” system where both constructors and destructors appear in general forms, and a more modest system, FTD, which imposes some restrictions in order to achieve a tractable metatheory. The properties of the latter system are developed in detail.  相似文献   

14.
In current class-based Object-Oriented Programming Languages (OOPLs), object types include only static features. How to add object dynamic behaviors modeled by Harel's statecharts into object types is a challenging task. We propose adding states and state transitions, which are largely unstated in object type theory, into object type definitions and typing rules. We argue that dynamic behaviors of objects should be part of object type definitions. We propose our type theory, the τ-calculus, which refines Abadi and Cardelli's ζ-calculus, in modeling objects with their dynamic behaviors. In our proposed type theory, we also explain that a subtyping relation between object types should imply the inclusion of their dynamic behaviors. By adding states and state transitions into object types, we propose modifying programming language constructs for state tracking.  相似文献   

15.
We present an evaluation technique for proving strong normalization (SN). We use the technique to give SN proofs for F2, F-bounded quantification, subtypes, and Fω. The evaluation technique derives SN as a corollary of the soundness of the typing rules under an appropriate evaluation semantics. The evaluation semantics yields simpler type sets than those used in the earlier SN proofs. The type sets discussed here form a complete lattice under classical union and intersection. The simplified type sets allow a simplified treatment of a variety of type constructors.  相似文献   

16.
We propose a set of transformation rules for first order formulae whose atoms are either equations between terms or "membership constraints" tζ. ζ can be interpreted as a regular tree language (ζ is called a sort in the algebraic specification community) or as a tree language in any class of languages which satisfies some adequate closure and decidability properties. This set of rules is proved to be correct, terminating, and complete. This provides a quantifier elimination procedure: for every regular tree language , the first order theory of some structure defining is decidable. This extends the results of several previously published results. We also show how to apply our results to automatic inductive proofs in equational theories.  相似文献   

17.
A grammar formF defines via a so-calledinterpretation mechanism, a family of languages(F). In this paper we establish that for many grammar formsF, (the family of context-free languages) implies(F)= RE (the family of recursively enumerable sets). We conjecture that this is also true in general. Because of this, it seems necessary to use restricted interpretations for non context-free grammar forms, a form giving then rise to a family We compare the obvious alternatives for restricting interpretations and focus attention on two promising alternatives, Q (F) and st(F) and their combination Q, st(F). Using st-interpretations, surprising families can be generated and strong normal form results can be obtained. Closure results and decidability results are also given. UnderQ, st-interpretation, it is possible to characterize a number of well-known families of languages between CF and RE, including the families of EOL, ETOL, matrix and scattered context languages.Part of this work was carried out while the third and fourth authors were visiting the University of Karlsruhe. Part of this work was supported by the Natural Sciences and Engineering Research Council of Canada Grant No. A-7700.  相似文献   

18.
In this paper we define an extension ofF [CUG92] to which we add functions that dispatch on different terms according to the type they receive as argument. In other words, we enrich the explicit parametric polymorphism ofF by an explicit ad hoc polymorphism (according the classification of [Str67]). We prove that the calculus we obtain, calledF & , enjoys the properties of Church-Rosser and Subject Reduction and that its proof system is coherent. We also define a significant subcalculus for which the subtyping is decidable. This extension has not only a logical interest but it is strongly motivated by the foundation of a broadly used programming style: object-oriented programming. The connections betweenF & and object-oriented languages are widely stressed, and the modelling byF & of some features of the object-oriented style is described, continuing the work of [CGL96].Part of this work has appeared under the title F & : integrating parametric and ad hoc second order polymorphism in the 4th International Workshop on Database Programming Languages. New York City, August 1993.The author was supported by grant n. 203.01.56 of the Consiglio Nazionale delle Ricerche-Comitato Nazionale delle Scienze Matematiche to work at LIENS.  相似文献   

19.
Programmable rewriting strategies provide a valuable tool for implementing traversal functionality in grammar-driven (or schema-driven) tools. The working Haskell programmer has access to programmable rewriting strategies via two similar options: (i) the Strafunski bundle for generic functional programming and language processing, and (ii) the “Scrap Your Boilerplate” approach to generic functional programming. Basic rewrite steps are encoded as monomorphic functions on datatypes. Rewriting strategies are polymorphic functions composed from appropriate basic strategy combinators.We will briefly review programmable rewriting strategies in Haskell. We will address the following questions:
• What are the merits of Haskellish strategies?
• What is the relation between strategic programming and generic programming?
• What are the challenges for future work on functional strategies?
Keywords: Rewrite startegies; programming languages; Haskell; functional programming  相似文献   

20.
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.  相似文献   

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

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