首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 718 毫秒
1.
MOHAMEDHamada 《软件学报》2001,12(9):1279-1286
函数式语言和逻辑语言在下列意义上是互补的,基于归约的函数式程序设计语言具有确定和懒惰求解等性质.但同时它又缺少诸如存在量化的变量以及部分数据结构等所希望的性质.相反,基于HORN子句逻辑和消解原理的逻辑程序设计语言允许存在量化的变量和部分数据结构但又缺少确定和懒惰求解的性质.从这个角度出发,把函数和逻辑程序设计语言结合成一种范型是很自然的,这种结合提供了一种比逻辑和函数语言表达能力更强的合一语言.提出了函数式逻辑语言的操作语义,同时表明这种操作语义在实践中是可见的.  相似文献   

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

3.
We describe Gammalog, a logic language whose semantics is based on the chemical metaphor. The language combines the ability of describing coordination by transformation rules on a shared-dataspace, as in Gamma, with the execution model of logic programming. The main feature of Gammalog is that the declarative reading of programs is not restricted to the pure logic language but it also includes the coordination mechanisms. This feature makes Gammalog a promising alternative to other coordination models which can be embedded in logic programming. We present the language syntax, its formal semantics, and a prototype implementation based on Gödel, which inherits its strongly typed framework. As an example of the expressive power of the language we provide the specification of a simple operating system.  相似文献   

4.
Programming frameworks are an accepted fixture in the object‐oriented world, motivated by the need for code reuse, developer guidance and restriction. A new trend is emerging where frameworks require domain experts to provide declarations using a domain‐specific language, influencing the structure and behaviour of the resulting application. These mechanisms address concerns such as user privacy. Although many popular open platforms such as Android are based on declaration‐driven frameworks, current implementations provide ad hoc and narrow solutions to concerns raised by their openness to non‐certified developers. Most widely used frameworks fail to address serious privacy leaks and provide the user with little insight into application behaviour. To address these shortcomings, we show that declaration‐driven frameworks can limit privacy leaks, as well as guide developers, independently from the underlying programming paradigm. To do so, we identify concepts that underlie declaration‐driven frameworks and apply them systematically to an object‐oriented language, Java and a dynamic functional language, Racket. The resulting programming framework generators are used to develop a prototype mobile application, illustrating how we mitigate a common class of privacy leaks. Finally, we explore the possible design choices and propose development principles for developing domain‐specific language compilers to produce frameworks, applicable across a spectrum of programming paradigms. Copyright © 2016 John Wiley & Sons, Ltd.  相似文献   

5.
The aim of this note is to point out and correct some errors in the definitions, notations operations and possibilistic programming model introduced by Sadi-Nezhad and Akhtari (2008) and hereby develop two correct possibilistic programming models for fuzzy multidimensional analysis of preference in the fuzzy multiattribute group decision making problems with both the fuzzy weight vector and the fuzzy positive ideal solution (PIS) unknown a priori.  相似文献   

6.
Atomic blocks, a high-level language construct that allows programmers to explicitly specify the atomicity of operations without worrying about the implementations, are a promising approach that simplifies concurrent programming. On the other hand, temporal logic is a successful model in logic programming and concurrency verification, but none of existing temporal programming models supports concurrent programming with atomic blocks yet. In this paper, we propose a temporal programming model (αPTL) which extends the projection temporal logic (PTL) to support concurrent programming with atomic blocks. The novel construct that formulates atomic execution of code blocks, which we call atomic interval formulas, is always interpreted over two consecutive states, with the internal states of the block being abstracted away. We show that the framing mechanism in projection temporal logic also works in the new model, which consequently supports our development of an executive language. The language supports concurrency by introducing a loose interleaving semantics which tracks only the mutual exclusion between atomic blocks. We demonstrate the usage of αPTL by modeling and verifying both the fine-grained and coarse-grained concurrency.  相似文献   

7.
Many‐core hardware is targeted specifically at obtaining high performance, but reaching high performance is often challenging because hardware‐specific details have to be taken into account. Although there are many programming systems that try to alleviate many‐core programming, some providing a high‐level language, others providing a low‐level language for control, none of these systems have a clear and systematic methodology as a foundation. In this article, we propose stepwise‐refinement for performance: a novel, clear, and structured methodology for obtaining high performance on many‐cores. We present a system that supports this methodology, offers multiple levels of abstraction to provide programmers a trade‐off between high‐level and low‐level programming, and provides programmers detailed performance feedback. We evaluate our methodology with several widely varying compute kernels on two different many‐core architectures: a Graphical Processing Unit (GPU) and the Xeon Phi. We show that our methodology gives insight in the performance, and that in almost all cases, we gain a substantial performance improvement using our methodology. Copyright © 2015 John Wiley & Sons, Ltd.  相似文献   

8.
近年来,随着人工智能技术的发展,许多编程人员期望计算机代替他们自动完成程序代码或者代码注释的编写等任务。跨自然语言与程序语言(Natural languages and programming languages,NL-PL)生成即为此类任务,指自然语言和程序语言之间的相互转换任务,包括自然语言到程序语言的生成和程序语言到自然语言的生成两类任务。最近几年,跨NL-PL生成在研究与应用方面呈现出爆发式的增长,尤其是随着深度学习(Deep learning,DL)技术的发展,越来越多研究人员开始利用DL技术来提升跨NL-PL生成任务效果。他们通过优化程序表示方式、改进神经网络模型以及设计大型预训练模型等方法,在该领域取得了众多突破性的进展。在基于DL的跨NL-PL生成技术获得迅猛发展的同时,大型互联网公司逐渐将该领域的研究成果付诸商用,因此,模型应用安全性也受到了学术界和业界的紧密关注。为了进一步系统地研究跨NL-PL生成技术,对这些已有的成果进行梳理非常必要。本文以程序生成和注释生成这两类典型跨NL-PL生成任务为切入点,对该领域具有代表性的最新文献进行归纳总结。我们从众多已有参考文献中抽象出一个基于DL的跨NL-PL生成通用实现模型,并将该模型划分为程序表示、语言处理和语言生成三大组件。在我们提出的通用实现模型的基础上,我们进一步从程序代码表示方法、网络模型结构、模型在业界的应用、应用过程中存在的安全问题与安全研究现状、该领域常用数据集和模型效果等方面详细梳理分析已有研究成果及进展脉络。最后,我们总结了该领域现阶段存在的研究问题,并展望了未来的发展方向。  相似文献   

9.
C. K. Yip 《Software》1984,14(2):101-118
A two dimensional high level graphics programming system based on the CORE standard graphics system1 has been implemented. The graphics programming language used in the system is an extension of the programming language Pascal. In this paper the graphics programming features in this system are presented and the implementation issues are discussed.  相似文献   

10.
Programming for large‐scale, multicore‐based architectures requires adequate tools that offer ease of programming and do not hinder application performance. StarSs is a family of parallel programming models based on automatic function‐level parallelism that targets productivity. StarSs deploys a data‐flow model: it analyzes dependencies between tasks and manages their execution, exploiting their concurrency as much as possible. This paper introduces Cluster Superscalar (ClusterSs), a new StarSs member designed to execute on clusters of SMPs (Symmetric Multiprocessors). ClusterSs tasks are asynchronously created and assigned to the available resources with the support of the IBM APGAS runtime, which provides an efficient and portable communication layer based on one‐sided communication. We present the design of ClusterSs on top of APGAS, as well as the programming model and execution runtime for Java applications. Finally, we evaluate the productivity of ClusterSs, both in terms of programmability and performance and compare it to that of the IBM X10 language. Copyright © 2012 John Wiley & Sons, Ltd.  相似文献   

11.
The array programming paradigm adopts multidimensional arrays as the fundamental data structures of computation. Array operations process entire arrays instead of just single elements. This makes array programs highly expressive and introduces data parallelism in a natural way. Array programming imposes non-trivial structural constraints on ranks, shapes, and element values of arrays. A prominent example where such constraints are violated are out-of-bound array accesses. Usually, such constraints are enforced by means of run time checks. Both the run time overhead inflicted by dynamic constraint checking and the uncertainty of proper program evaluation are undesirable.We propose a novel type system for array programs based on dependent types. Our type system makes dynamic constraint checks obsolete and guarantees orderly evaluation of well-typed programs. We employ integer vectors of statically unknown length to index array types. We also show how constraints on these vectors are resolved using a suitable reduction to integer scalars. Our presentation is based on a functional array calculus that captures the essence of the paradigm without the legacy and obfuscation of a fully-fledged array programming language.  相似文献   

12.
The aim of this article is to consider a new linear programming and two goal programming models for two-group classification problems. When these approaches are applied to the data of real life or of simulation, our proposed new models perform well both in separating the groups and the group–membership predictions of new objects. In discriminant analysis some linear programming models determine the attribute weights and the cut-off value in two steps, but our models determine simultaneously all of these values in one step. Moreover, the results of simulation experiments show that our proposed models outperform significantly than existing linear programming and statistical approaches in attaining higher average hit-ratios.  相似文献   

13.
It was observed that school children in Arab countries find difficulty in learning programming in a language other than their native language. There are only few Arabic programming languages in the literature; most of which are never or partially implemented. In this paper, we present the design of a new Arabic programming language (ARABLAN) which is planned to be implemented for use in teaching programming for school children in Arab countries.  相似文献   

14.
LMNtal (pronounced “elemental”) is a simple language model based on hierarchical graph rewriting that uses logical variables to represent connectivity and membranes to represent hierarchy. LMNtal is an outcome of the attempt to unify constraint-based concurrency and Constraint Handling Rules (CHR), the two notable extensions to concurrent logic programming. LMNtal is intended to be a substrate language of various computational models, especially those addressing concurrency, mobility and multiset rewriting. Although the principal objective of LMNtal was to provide a unifying computational model, it is of interest to equip the formalism with a precise logical interpretation. In this paper, we show that it is possible to give LMNtal a simple logical interpretation based on intuitionistic linear logic and a flattening technique. This enables us to call LMNtal a hierarchical, concurrent linear logic language.  相似文献   

15.
The programming of SIMD machines that strongly support data parallelism, such as the Connection Machine, 1 presents new challenges for language, compiler, and algorithm designers. We propose an array language that captures many of the abstractions that are necessary for the effective programming of such machines, thereby liberating the user from having to specify low-level details. Consequently, this new language, ALP, allows for efficient compilation using state-of-the-art techniques, achieving hand-code quality. We demonstrate the effectiveness of our approach by two examples which show that despite being an array language, ALP does not restrict expressiveness to rigidly regular computational structures.Work supported in part by ONR grant number N00014-89-J-1906 while on sabbatical leave at the Department of Computer Science, Yale University.Work supported in part by NSF grant number DCR-8405478 while on sabbatical leave at the Department of Computer Science, Yale University.  相似文献   

16.
Membrane systems are biologically motivated theoretical models of distributed and parallel computing. In this paper, we present a membrane algorithm to solve multidimensional 0–1 knapsack problem in linear time by recognizer P systems with input and with active membranes using 2-division. This algorithm can also be modified to solve general 0–1 integer programming problem.  相似文献   

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

19.
Most of the recent research on programming languages for education has been centered around the language Logo. In this paper we introduce another candidate language for learning environments, Nial, the nested interactive array language.
Nial is a general-purpose programming language based on a formal theory of mathematics called array theory. This paper introduces Nial as a language for learning programming and developing and using computer-aided instruction tools. A comparison with Logo is provided to evaluate these two languages in terms of their strengths and weaknesses as programming environments for novice programmers. We also demonstrate that a programming environment can be both simple to leam at the novice level and extendible to a powerful and sophisticated language.  相似文献   

20.
At a fundamental level, functional and object-oriented programming languages are all ‘higher-order’, in the sense that they support computing with values that are themselves pieces of program code encapsulated with a local environment. In functional languages these ‘active’ values are functions, while in object-oriented languages they are objects. Both styles of higher-order language claim to provide good support for writing adaptable programs, but functional and object-oriented languages achieve this adaptability in different ways: functional programs rely on parameterisation at the value, type and module level, while object-oriented languages rely primarily on subtyping and implementation inheritance. Here we compare these two approaches, mainly in terms of the features and properties of their type systems, and consider the benefits and disadvantages of unifying (or merging) the two paradigms by adding object-oriented features to ML as a base language. We argue that while some of the simpler aspects of object-oriented languages are compatible with ML, adding a full- edged class-based object system to ML leads to an excessively complex type system and relatively little expressive gain, especially if we aim to preserve that mostly functional style of programming that is a major advantage of ML. Received March 2002 / Accepted in revised form April 2002  相似文献   

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

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