共查询到20条相似文献,搜索用时 15 毫秒
1.
2.
Ken Slonneger 《Software》1993,23(12):1379-1397
Several authors have suggested translating denotational semantics into prototype interpreters written in high-level programming languages to provide evaluation tools for language designers. These implementations have generally been understandable when restricted to direct denotational semantics. This paper considers using two declarative programming languages, Prolog and Standard ML, to implement an interpreter that follows the continuation semantics of a small imperative programming language, called Gull. Each of the two declarative languages presents certain difficulties related to evaluation strategies and expressiveness. The implementations are compared in terms of their ease of use for prototyping, their resemblance to the denotational definitions, and their efficiency. 相似文献
3.
Huibiao Zhu Jifeng He Jonathan P. Bowen 《Innovations in Systems and Software Engineering》2008,4(4):341-360
This paper considers how the algebraic semantics for Verilog relates with its denotational semantics. Our approach is to derive
the denotational semantics from the algebraic semantics. We first present the algebraic laws for Verilog. Every program can
be expressed as a guarded choice that can model the execution of a program. In order to investigate the parallel expansion
laws, a sequence is introduced, indicating which instantaneous action is due to which exact parallel component. A head normal
form is defined for each program by using a locality sequence. We provide a strategy for deriving the denotational semantics
based on head normal form. Using this strategy, the denotational semantics for every program can be calculated. Program equivalence
can also be explored by using the derived denotational semantics.
A short version of this paper appeared in Proc. ICECCS 2006: 11th IEEE International Conference on Engineering of Complex Computer Systems [48]. This work is partially supported by the National Basic Research Program of China (No. 2005CB321904), the National High
Technology Research and Development Program of China (No. 2007AA010302) and the National Natural Science Foundation of China
(No. 90718004). Jonathan Bowen is a visiting professor at King’s College London and an emeritus professor at London South
Bank University. 相似文献
4.
This paper proposes to specify semantic definitions for logic programming languages such as Prolog in terms of an oracle which specifies the control strategy and identifies which clauses are to be applied to resolve a given goal. The approach is quite general. It can be applied to Prolog to specify both operational and declarative semantics as well as other logic programming languages. Previous semantic definitions for Prolog typically encode the sequential depth-first search of the language into various mathematical frameworks. Such semantics mimic a Prolog interpreter in the sense that following the "leftmost" infinite path in the computation tree excludes computation to the right of this path from being considered by the semantics. The basic idea in this paper is to abstract away from the sequential control of Prolog and to provide a declarative characterization of the clauses to apply to a given goal. The decision whether or not to apply a clause is viewed as a query to an oracle which is specified from within the semantics and reasoned about from outside. This approach results in simple and concise semantic definitions which are more useful for arguing the correctness of program transformations and providing the basis for abstract interpretations than previous proposals. 相似文献
5.
使用扩展的持续时间演算(EDC)模型,给出了时间化的RAISE描述语言(RSL)的一个子集的指称语义.在扩展的持续时间演算模型中加入了一些新的特征,并探究了它们的代数定律.这些定律在形式化实时程序和验证实时性质中起着重要作用.最后还给出了时间化RSL的一些代数定律.这些定律可以从其指称语义证明,并用于程序的转化和优化. 相似文献
6.
Ravi Sethi 《Science of Computer Programming》1982,1(3):203-222
Consider the connection between denotational semantics for a language with goto statements and flow diagrams for programs in such a language. The main point of interest is that the denotational semantics uses a recursively defined environment to give the meaning of labels, while a flow diagram merely has a jump to the appropriate program point. A simple reduction called “indirection elimination” strips away the environment from the denotational semantics and extracts an expression with cycles that is very close to the flow diagram of a program. The same idea applies to associating bodies with recursive procedures, or to any construct whose semantics is not wedded to the syntax. In addition to being a useful data structure and conceptual device, expressions with cycles are well defined mathematical objects—their semantics can be given by unfolding them into infinite structures that have been well studied. The practicality of the elimination of environments has been tested by constructing a trial implementation, which serves as the front end of a semantics directed compiler generator. The implementation takes a denotational semantics of a language and constructs a “black box” that maps programs in the language into an intermediate representation. The intermediate representation is a circular expression. 相似文献
7.
Huibiao Zhu Jifeng He Jing Li Geguang Pu Jonathan P. Bowen 《Innovations in Systems and Software Engineering》2010,6(4):283-298
Web Services have become more and more important in these years, and BPEL4WS (BPEL) is a de facto standard for the web service
composition and orchestration. It contains several distinct features, including the scope-based compensation and fault handling
mechanism. The denotational semantics and operational semantics have been explored for BPEL. The two semantic models should
be consistent. This paper considers the linking of these two semantics. Our approach is to derive the denotational semantics
from operational semantics for BPEL, which aims for the consistency of the two models. Moreover, the derivation can be applied
in exploring the program equivalence easily, especially for parallel programs. 相似文献
8.
9.
Huibiao Zhu Jifeng He Jing Li Jonathan P. Bowen 《Innovations in Systems and Software Engineering》2011,7(3):209-224
Web services have become more and more important in these years, and BPEL4WS (BPEL) is a de facto standard for the web service
composition and orchestration. It contains several distinct features, including the scope-based compensation and fault handling
mechanism. We have considered the operational semantics and denotational semantics for BPEL, where a set of algebraic laws
can be achieved via these two models, respectively. In this paper, we consider the inverse work, deriving the operational
semantics and denotational semantics from algebraic semantics for BPEL. In our model, we introduce four types of typical programs,
by which every program can be expressed as the summation of these four types. Based on the algebraic semantics, the strategy
for deriving the operational semantics is provided and a transition system is derived by strict proof. This can be considered
as the soundness exploration for the operational semantics based on the algebraic semantics. Further, the equivalence between
the derivation strategy and the derived transition system is explored, which can be considered as the completeness of the
operational semantics. Finally, the derivation of the denotational semantics from algebraic semantics is explored, which can
support to reason about more program properties easily. 相似文献
10.
In this paper we generalize the notion of compositional semantics to cope with transfinite reductions of a transition system. Standard denotational and predicate transformer semantics, even though compositional, provide inadequate models for some known program manipulation techniques. We are interested in the systematic design of extended compositional semantics, observing possible transfinite computations, i.e. computations that may occur after a given number of infinite loops. This generalization is necessary to deal with program manipulation techniques modifying the termination status of programs, such as program slicing. We include the transfinite generalization of semantics in the hierarchy developed in 1997 by P. Cousot, where semantics at different levels of abstraction are related with each other by abstract interpretation. We prove that a specular hierarchy of non-standard semantics modeling transfinite computations of programs can be specifiedin such a way that the standard hierarchy can be derived by abstract interpretation. We prove that non-standard transfinite denotational and predicate transformer semantics can be both systematically derived as solutions of simple abstract domain equations involving the basic operation of reduced power of abstract domains. This allows us to prove the optimality of these semantics, i.e. they are the most abstract semantics in the hierarchy which are compositional and observe respectively the terminating and initial states of transfinite computations, providing an adequate mathematical model for program manipulation. 相似文献
11.
Sebastian Danicic Mark Harman John Howroyd Lahcen Ouarbya 《The Journal of Logic and Algebraic Programming》2007,72(2):191
We introduce a new non-strict semantics for a simple while language. We demonstrate that this semantics allows us to give a denotational definition of variable dependence and neededness, which is consistent with program slicing. Unlike other semantics used in variable dependence, our semantics is substitutive. We prove that our semantics is preserved by traditional slicing algorithms. 相似文献
12.
A specification of the OR-parallel execution of Prolog programs, using CHOCS (calculus of higher order communicating systems)
[24], is presented in the paper. A translation is defined from Prolog programs and goals to CHOCS processes: the execution
of the CHOCS process corresponding to a goal mimics the OR-parallel execution of the original Prolog goal. In the translation,
clauses and predicate definitions of a Prolog program correspond to processes. To model OR-parallelism, the processes , corresponding to clauses (having the same head predicate ) start their execution concurrently, but, in order to respect the depth-first search rule, each is guarded by the termination of the executions of processes 's, . The computational model is proved correct with respect to the semantics of Prolog, as given in [4, 5]. Our model, because
of its algebraic specification, can be easily used to prove properties of the parallel execution of Prolog programs. Moreover,
the model exploits the maximum degree of parallelism, by giving the Prolog solutions in parallel, without any order among
them. However, this model, being close to the Prolog semantics definition, contains sources of inefficiency which make it
unpractical as a guide for the implementation. To overcome these problems, a new computational model is defined. This model
is obtained by modifications of the basic one and thus its correctness can be easily proved. Finally, we show how to obtain
models of different real implementations of OR-parallel Prolog by slight modification of the new model. The relations among
all these models, in terms of parallelism degree, are studied by using the concepts of bisimulation and simulation, developed
for concurrent calculi.
Received: 5 May 1995 / 28 May 1996 相似文献
13.
14.
Yanhong HUANG Jifeng HE Huibiao ZHU Yongxin ZHAO Jianqi SHI Shengchao QIN 《Frontiers of Computer Science》2015,9(3):331
In the design of dependable software for embedded and real-time operating systems, time analysis is a crucial but extremely difficult issue, the challenge of which is exacerbated due to the randomness and nondeterminism of interrupt handling behaviors. Thus research into a theory that integrates interrupt behaviors and time analysis seems to be important and challenging. In this paper, we present a programming language to describe programs with interrupts that is comprised of two essential parts: main program and interrupt handling programs. We also explore a timed operational semantics and a denotational semantics to specify the meanings of our language. Furthermore, a strategy of deriving denotational semantics from the timed operational semantics is provided to demonstrate the soundness of our operational semantics by showing the consistency between the derived denotational semantics and the original denotational semantics. 相似文献
15.
A timed semantics of Orc 总被引:2,自引:0,他引:2
Ian Wehrman David Kitchin William R. Cook Jayadev Misra 《Theoretical computer science》2008,402(2-3):234
Orc is a kernel language for structured concurrent programming. Orc provides three powerful combinators that define the structure of a concurrent computation. These combinators support sequential and concurrent execution, and concurrent execution with blocking and termination.Orc is particularly well-suited for task orchestration, a form of concurrent programming with applications in workflow, business process management, and web service orchestration. Orc provides constructs to orchestrate the concurrent invocation of services while managing time-outs, priorities, and failures of services or communication.Our previous work on the semantics of Orc focused on its asynchronous behavior. The inclusion of time or the effect of delay on a computation had not been modeled. In this paper, we define an operational semantics of Orc that allows reasoning about delays, which are introduced explicitly by time-based constructs or implicitly by network delays. We develop a number of identities among Orc expressions and define an equality relation that is a congruence. We also present a denotational semantics in which the meaning of an Orc program is a set of traces, and show that the two semantics are equivalent. 相似文献
16.
动态模糊逻辑程序设计语言的指称语义 总被引:1,自引:0,他引:1
文献[8]借鉴Dijkstra的监督命令程序结构,给出了动态模糊逻辑程序设计语言的基本框架结构.在此基础上,进一步扩充和完善,并根据指称语义的原理和方法,用结构归纳法给出动态模糊逻辑程序设计语言的指称语义,主要包括:动态模糊程序设计语言的语义域、语义函数及其指称语义.最后给出了一个动态模糊程序设计语言的例子以观察程序的运行过程. 相似文献
17.
Full Abstraction for a Shared-Variable Parallel Language 总被引:1,自引:0,他引:1
Stephen Brookes 《Information and Computation》1996,127(2):145
We give a new denotational semantics for a shared-variable parallel programming language and prove full abstraction: the semantics gives identical meanings to commands if and only if they induce the same behavior in all program contexts. The meaning of a command is a set of “transition traces,” which record the ways in which a command may interact with and be affected by its environment. We show how to modify the semantics to incorporate new program constructs, to allow for different levels of granularity or atomicity, and to model fair infinite computation, in each case achieving full abstraction with respect to an appropriate notion of program behavior. 相似文献
18.
In this paper, we show how refinement calculus provides a basis for translation validation of optimized programs written in high level languages. Towards such a direction, we shall provide a generalized proof rule for establishing refinement of source and target programs for which one need not have to know the underlying program transformations. Our method is supported by a semi-automatic tool that uses a theorem prover for validating the verification conditions. We further show that the translation validation infrastructure provides an effective basis for deriving semantic debuggers and illustrate the development of a simple debugger for optimized programs using this approach using Prolog. A distinct advantage of semantic debugging is that it permits the user to change values at run-time only when the values are consistent with the underlying semantics. 相似文献
19.
The well-founded semantics and the stable model semantics capture intuitions of the skeptical and credulous semantics in nonmonotonic reasoning, respectively. They represent the two dominant proposals for the declarative semantics of deductive databases and logic programs. However, neither semantics seems to be suitable for all applications. We have developed an efficient implementation of goal-oriented effective query evaluation under the well-founded semantics. It produces a residual program for subgoals that are relevant to a query, which contains facts for true instances and clauses with body literals for undefined instances. We present a simple method of stable model computation that can be applied to the residual program of a query to derive answers with respect to stable models. The method incorporates both forward and backward chaining to propagate the assumed truth values of ground atoms, and derives multiple stable models through backtracking. Users are able to request that only stable models satisfying certain conditions be computed. A prototype has been developed that provides integrated query evaluation under the well-founded semantics, the stable models, and ordinary Prolog execution. We describe the user interface of the prototype and present some experimental results 相似文献
20.
G.D. Plotkin 《Theoretical computer science》1977,5(3):223-255
The paper studies connections between denotational and operational semantics for a simple programming language based on LCF. It begins with the connection between the behaviour of a program and its denotation. It turns out that a program denotes ⊥ in any of several possible semantics if it does not terminate. From this it follows that if two terms have the same denotation in one of these semantics, they have the same behaviour in all contexts. The converse fails for all the semantics. If, however, the language is extended to allow certain parallel facilities behavioural equivalence does coincide with denotational equivalence in one of the semantics considered, which may therefore be called “fully abstract”. Next a connection is given which actually determines the semantics up to isomorphism from the behaviour alone. Conversely, by allowing further parallel facilities, every r.e. element of the fully abstract semantics becomes definable, thus characterising the programming language, up to interdefinability, from the set of r.e. elements of the domains of the semantics. 相似文献