首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 46 毫秒
1.
Part 1 of this paper is an analysis of problems concerning type systems and static semantics relevant to designing and implementing new programming languages. Part 2 proposes and exemplifies a way to derive a static semantics from a language's dynamic semantics, using a technique known as binding time analysis known from partial evaluation (Ershov's “mixed computation”) [20, 21]. The goal is to analyze the language's type structure during the design process without the need for hand construction of a type system. Ideally, one might automate the construction of a type checker, given only the dynamic semantics as input. In particular, binding time analysis of the interpreter program can be used to distinguish statically detectable errors from dynamic ones, and a static semantics is seen as a mechanism for deciding whether the program to be interpreted can give rise to any of the static errors. Our basic viewpoint is operational: to see how and where in the interpreter immediately observable type errors manifest themselves; to classify them as static or dynamic; and to design the static semantics to detect all static errors in a given program.  相似文献   

2.
3.
SIGNAL is a part of the synchronous languages family, which are broadly used in the design of safety-critical real-time systems such as avionics, space systems, and nuclear power plants. There exist several semantics for SIGNAL, such as denotational semantics based on traces (called trace semantics), denotational semantics based on tags (called tagged model semantics), operational semantics presented by structural style through an inductive definition of the set of possible transitions, operational semantics defined by synchronous transition systems (STS), etc. However, there is little research about the equivalence between these semantics. In this work, we would like to prove the equivalence between the trace semantics and the tagged model semantics, to get a determined and precise semantics of the SIGNAL language. These two semantics have several different definitions respectively, we select appropriate ones and mechanize them in the Coq platform, the Coq expressions of the abstract syntax of SIGNAL and the two semantics domains, i.e., the trace model and the tagged model, are also given. The distance between these two semantics discourages a direct proof of equivalence. Instead, we transformthem to an intermediate model, which mixes the features of both the trace semantics and the tagged model semantics. Finally, we get a determined and precise semantics of SIGNAL.  相似文献   

4.
This paper shows how rewriting logic semantics (RLS) can be used as a computational logic framework for operational semantic definitions of programming languages. Several operational semantics styles are addressed: big-step and small-step structural operational semantics (SOS), modular SOS, reduction semantics with evaluation contexts, and continuation-based semantics. Each of these language definitional styles can be faithfully captured as an RLS theory, in the sense that there is a one-to-one correspondence between computational steps in the original language definition and computational steps in the corresponding RLS theory. A major goal of this paper is to show that RLS does not force or pre-impose any given language definitional style, and that its flexibility and ease of use makes RLS an appealing framework for exploring new definitional styles.  相似文献   

5.
This paper shows how rewriting logic semantics (RLS) can be used as a computational logic framework for operational semantic definitions of programming languages. Several operational semantics styles are addressed: big-step and small-step structural operational semantics (SOS), modular SOS, reduction semantics with evaluation contexts, continuation-based semantics, and the chemical abstract machine. Each of these language definitional styles can be faithfully captured as an RLS theory, in the sense that there is a one-to-one correspondence between computational steps in the original language definition and computational steps in the corresponding RLS theory. A major goal of this paper is to show that RLS does not force or pre-impose any given language definitional style, and that its flexibility and ease of use makes RLS an appealing framework for exploring new definitional styles.  相似文献   

6.
In this paper the approach to structural operational semantics (SOS) using transition system specifications (TSSs) is extended to deal with variable binding operators and many-sortedness. Bisimulation and Verhoef's transition rule format, known as the panth format, generalize naturally to the new TSSs. It is shown that in this setting bisimulation is still a congruence for meaningful TSSs in panth format. Formats guaranteeing that bisimulation is a congruence are important for the application of TSSs to provide process calculi, and programming and specification languages, with an operational semantics. The new congruence result is relevant because in many of these applications, variable binding operators and many-sortedness are involved. It is also sketched how the presented approach can be further extended to deal with given sorts and parametrized transition relations. Given sorts are useful if the semantics of the terms of certain sorts has been given beforehand. This happens frequently in practice, as does the often related need of parametrized transition relations.  相似文献   

7.
A semantic framework for metamodel-based languages   总被引:1,自引:0,他引:1  
In the model-based development context, metamodel-based languages are increasingly being defined and adopted either for general purposes or for specific domains of interest. However, meta-languages such as the MOF (Meta Object Facility)—combined with the OCL (Object Constraint Language) for expressing constraints—used to specify metamodels focus on structural and static semantics but have no built-in support for specifying behavioral semantics. This paper introduces a formal semantic framework for the definition of the semantics of metamodel-based languages. Using metamodelling principles, we propose several techniques, some based on the translational approach while others based on the weaving approach, all showing how the Abstract State Machine formal method can be integrated with current metamodel engineering environments to endow language metamodels with precise and executable semantics. We exemplify the use of our semantic framework by applying the proposed techniques to the OMG metamodelling framework for the behaviour specification of the Finite State Machines provided in terms of a metamodel.  相似文献   

8.
In this paper, we present a general way of giving denotational semantics to a class of languages equipped with an operational semantics that fits the GSOS format of Bloom, Istrail, and Meyer. The canonical model used for this purpose will be Abramsky's domain of synchronization trees, and the denotational semantics automatically generated by our methods will be guaranteed to be fully abstract with respect to the finitely observable part of the bisimulation preorder. In the process of establishing the full abstraction result, we also obtain several general results on the bisimulation preorder (including a complete axiomatization for it), and give a novel operational interpretation of GSOS languages.  相似文献   

9.
As UML 2.0 is evolving into a family of languages with individually specified semantics, there is an increasing need for automated and provenly correct model transformations that (i) assure the integration of local views (different diagrams) of the system into a consistent global view, and, (ii) provide a well-founded mapping from UML models to different semantic domains (Petri nets, Kripke automaton, process algebras, etc.) for formal analysis purposes as foreseen, for instance, in submissions for the OMG RFP for Schedulability, Performance and Time. However, such transformations into different semantic domains typically require the deep understanding of the underlying mathematics, which hinders the use of formal specification techniques in industrial applications. In the paper, we propose a multilevel metamodeling technique with precise static and dynamic semantics (based on a refinement calculus and graph transformation) where the structure and operational semantics of mathematical models can be defined in a UML notation without cumbersome mathematical formulae.  相似文献   

10.
型构兼容的继承及其语义   总被引:1,自引:0,他引:1  
本文揭示了在面向对象程序设计语言中,若劲旅子类重定义其继承的分类方法以发迹这些方法的规约,并且采用类似于Smaltalk-80中的继承机制的语义,将导致封将与继承之间的一个新总是为此,本文提出了一种新的继承机制-型构兼容的继承,以代替传统的增量继承。型构兼容的继承是一种灵活的代码复用机制,并且能够充分支持封装。  相似文献   

11.
12.
Summary SEMANOL is a practical programming system for writing readable formal specifications of the syntax and semantics of programming languages. SEMANOL is based on a theory of semantics which embraces algorithmic (operational) and extensional (input/output) semantics. Specifications for large contemporary languages have been constructed in the formal language, SEMANOL (73), which is a readable high-level notation. A SEMANOL (73) specification can be executed (by an existing interpreter program); when given a program from the specified language, and its input, the execution of the SEMANOL (73) specification produces the program's output. The demonstrated executability of SEMANOL (73) provides important practical advantages. This paper includes discussions of the theory of semantics underlying SEMANOL, the syntax and semantics of the SEMANOL (73) language, the use of the SEMANOL (73) language in the SEMANOL method for describing programming languages, and the contrast between the Vienna definition method (VDL) and SEMANOL.  相似文献   

13.
14.
In 1981 Structural Operational Semantics (SOS) was introduced as a systematic way to define operational semantics of programming languages by a set of rules of a certain shape [G.D. Plotkin, A structural approach to operational semantics, Technical Report DAIMI FN-19, Computer Science Department, Aarhus University, Aarhus, Denmark, September 1981]. Subsequently, the format of SOS rules became the object of study. Using so-called Transition System Specifications (TSS’s) several authors syntactically restricted the format of rules and showed several useful properties about the semantics induced by any TSS adhering to the format. This has resulted in a line of research proposing several syntactical rule formats and associated meta-theorems. Properties that are guaranteed by such rule formats range from well-definedness of the operational semantics and compositionality of behavioral equivalences to security-, time- and probability-related issues. In this paper, we provide an overview of SOS rule formats and meta-theorems formulated around them.  相似文献   

15.
In this paper, we propose a semantic framework to debug synchronous message passing-based con- current programs, which are increasingly useful as parallel computing and distributed systems become more and more pervasive. We first design a concurrent programming language model to uniformly represent exist- ing concurrent programming languages. Compared to sequential programming languages, this model contains communication statements, i.e., sending and receiving statements, and a concurrent structure to represent com- munication and concurrency. We then propose a debugging process consisting of a tracing and a locating procedure. The tracing procedure re-executes a program with a failed test case and uses specially designed data structures to collect useful execution information for locating bugs. We provide for the tracing procedure a struc- tural operational semantics to represent synchronous communication and concurrency. The locating procedure backward locates the ill-designed statement by using information obtained in the tracing procedure, generates a fix equation, and tries to fix the bug by solving the fix equation. We also propose a structural operational semantics for the locating procedure. We supply two examples to test our proposed operational semantics.  相似文献   

16.
Garment中的归约语义   总被引:1,自引:0,他引:1  
文中用代数方法研究了Garment中程序设计语言的归约语义,首先给出了归约语义在形式语言理论中的含义,然后提出了Garment中语言的代数模型。在此代数模型下讨论了归约语义及其性质,并给出了语言可归的充分条件。  相似文献   

17.
The development of the dynamic semantics of natural languagehas put issues of variable control on the agenda of formal semantics. Inthis paper we regard variables as names for stacks of values and makeexplicit several control actions as push and pop actions on stacks. Weapply this idea both to static and dynamic languages and compare theirfinite variable hierarchies, i.e., the relation between the number ofvariable stacks that is available and the expressivity of the language.This can be compared in natural languages with relating the number ofpronouns available to the expressivity of the language.The results are obtained using techniques from static and dynamic modeltheory: model theoretic games, transition systems and bisimulation.  相似文献   

18.
基于轨迹的程序语义之一:轨迹与语义对象   总被引:2,自引:0,他引:2  
王岩冰  陆汝占 《软件学报》1998,9(5):366-370
本文提出一种基于轨迹的指称语义框架,该框架结合了操作语义和代数语义的特征,避免使用专门的数学理论,将静态语义和动态语义结合在一起统一处理.本文及其续篇将通过一个中等规模的过程式模型语言来说明上述语义框架更适合描述真正的程序设计语言.本文首先引入轨迹概念和模型语言,然后讨论该语言的各句法成分所对应的语义论域,其中没有使用含有函数空间构造运算的递归论域方程.  相似文献   

19.
An instruction set is given for an abstract machine which uses a pushdown stack as its principal memory. The proposed instructions serve the similar purposes of (1) defining the dynamic semantics of programming languages by describing the operations of programs on the abstract machine and (2) describing an intermediate language to be used in compiling programming languages into machine language. It is shown how the intermediate language can be used in the translation of the programming languages ADA, FORTRAN and PASCAL into IBM 360 assembly language and advantages over other intermediate languages such as three-address code and P-code.  相似文献   

20.
Plain CHOCS A second generation calculus for higher order processes   总被引:2,自引:0,他引:2  
  相似文献   

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

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