首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 234 毫秒
1.
针对命令式程序语言在计算机科学研究及数学思维能力培养等方面存在的不足,提出将函数式程序语言作为高校计算机专业本科生的程序教学语言,分析函数式程序语言与命令式程序语言间的区别并以Haskell为例介绍函数式程序语言的一些典型的编程风格及主要知识点,概括函数式程序语言的发展趋势。  相似文献   

2.
针对函数式程序模板元编程的通用性问题,以应用类型系统ATS(Applied Type System)为例,提出了一种基于元建模的模板元编程实现方法。基于ATS模板元编程给出从枚举类型Datatype到Function的生成实例;通过元建模构造了包含Datatype与Function定义的ATS元模型;详细描述了Datatype模型到Function模型的转换;最后以一个基于元建模的ATS模板元编程为例,讨论了该方法的使用效果。实验结果表明该方法可以提高ATS模板元编程的通用性。  相似文献   

3.
提出一种程序理解实现方案,通过将程序设计语言的词法规则和语法规则以产生式表示,设计基于产生式多语言程序处理算法,将产生式自动转化为对应的词法和语法规则函数,使得不同的程序设计语言规则可以采用统一的方式描述,从而可用一套程序理解系统实现对多种程序设计语言的程序理解,以后增加某种程序设计语言的程序理解,只要定义对应程序设计语言的词法和语法规则产生式即可实现,有效地解决了程序理解系统的共享性难题。  相似文献   

4.
管笑笑  葛宁  阮方 《微计算机信息》2006,22(34):248-250
介绍一种应用于数字系统设计中的基于函数式语言的代码解析方案,主要包括该函数式语言和解析工具的介绍,该语言的词法与语法分析程序的结构介绍,由语法树到语法规则到抽象语法树的生成过程,以及具体的应用实例。该解析方案已经成功应用于数字系统的设计中。  相似文献   

5.
程序信息流安全是信息安全的一个重要研究方向.基于类型的静态分析可以保证程序信息流安全与单进程系统相比.移动计算系统中数据通讯的存在使得程序信息流安全保护更加困难.Cornell大学的Zdancewic对函数式语言λsec的单进程程序信息流安全进行了研究.本文在其工作的基础上,根据移动计算系统的结构特征,通过对函数式语言λsec进行扩充,加入通讯原语,将其扩展成移动计算语言MobileML,并针对一个简单的移动计算模型,给出了描述程序信息流安全的无干扰性定义,设计了相应的信息流类型系统,用以静态检查保证MobileML语言程序信息流安全.  相似文献   

6.
Linux操作系统运用广泛,C语言是最基础的程序设计语言,最接近人类思维的语言,探讨Linux系统下的计算机C语言编程技巧非常必要.论述了Linux系统和C语言编程的概念、特点,重点介绍了Linux系统和C语言编程的优点.从4个方面提出Linux系统下C语言编程的技巧.  相似文献   

7.
从三个不同侧面透视了C高级程序设计语言:"结构化"的程序设计语言;"函数式"的程序设计语言;"面向过程"的程序设计语言。论述了C程序设计语言面向过程的模块化编程思想、用其编程解决实际问题的一般思路和具体程序中的实现形式,同时,总结了上述三个方面的内在联系和它们的统一性。得出了C高级程序设计语言的优点和其强大的生命力,具有较高的概括性和理论意义,对于学习和研究C程序设计语言提供了一个很好的典型案例。  相似文献   

8.
蔡学镛 《Internet》2008,(7):96-98
函数式语言的编程是近来的热点,本期因此选登了两篇这方面的文章,可以促使我们对这方面的技术有一理解。FP的历史典故什么是面向对象编程(OOP)?只要你写过几年程序,如果你没太混的话,一定说得出封装、继承、多态这三个术语。什么是函数式编程(Functional Programming,FP)?即使你写了很多年的程序,应该也是答不出来,大家对它相当陌生,很少有人能正确地叙述出函数式编程是什么,  相似文献   

9.
蔡学镛 《程序员》2008,(7):96-98
函数式语言的编程是近来的热点,本期因此选登了两篇这方面的文章,可以促使我们对这方面的技术有一理解。FP的历史典故什么是面向对象编程(OOP)?只要你写过几年程序,如果你没太混的话,一定说得出封装、继承、多态这三个术语。什么是函数式编程(Functional Programming,FP)?即使你写了很多年的程序,应该也是答不出来,大家对它相当陌生,很少有人能正确地叙述出函数式编程是什么,  相似文献   

10.
透视C程序设计语言   总被引:2,自引:1,他引:1  
从三个不同侧面透视了C高级程序设计语言:"结构化"的程序设计语言;"函数式"的程序设计语言;"面向过程"的程序设计语言.论述了C程序设计语言面向过程的模块化编程思想、用其编程解决实际问题的一般思路和具体程序中的实现形式,同时,总结了上述三个方面的内在联系和它们的统一性.得出了C高级程序设计语言的优点和其强大的生命力,具有较高的概括性和理论意义,对于学习和研究C程序设计语言提供了一个很好的典型案例.  相似文献   

11.
Existing meta-programming languages operate on encodings of programs as data. This paper presents a new meta-programming language, based on an untyped lambda calculus, in which structurally reflective programming is supported directly, without any encoding. The language features call-by-value and call-by-name lambda abstractions, as well as novel reflective features enabling the intensional manipulation of arbitrary program terms. The language is scope safe, in the sense that variables can neither be captured nor escape their scopes. The expressiveness of the language is demonstrated by showing how to implement quotation and evaluation operations, as proposed by Wand. The language’s utility for meta-programming is further demonstrated through additional representative examples. A prototype implementation is described and evaluated.  相似文献   

12.
Abstract

This paper presents an enhancement of the CARESS system—A Constraint Approximative Reasoning System Support—introduced in (Popescu and Roventa, 1994). CARESS is an experimental system with primarily two objectives:

(1)knowledge representation and manipulation techniques and to implement them in PROLOG III, and

(2) to develop a knowledge programming environment for building expert systems. We discuss here the use of meta-programming, constraint logic programming and approximate reasoning for the design of expert systems

It has already been proven that meta-programming and logic programming are powerful techniques for expert system design. Fuzzy logic can be used to model one kind of uncertainty. Constraint logic programming is useful for dealing with the constraints given by operations using fuzzy sets.  相似文献   

13.
Although we have recently seen an increase of good, free game engine editors, general purpose scenario (level) editors are still lagging behind in terms of functionalities and ease of use. Using them to create game scenarios can be difficult as they often expose general engine capabilities instead of limiting the toolset to fit game-specific requirements. They often require programming skills to use, which introduce additional user skill requirements, and configuring them for a specific game can be equally difficult. In this paper we have developed SpringBoard, an open source scenario editor for games using the SpringRTS engine. Extending it to support game and level requirements is achieved with multi-level meta-programming, while still providing a system that is integrated with the GUI editor and therefore intuitive to use. Our meta-programming system has support for trigger elements (events, functions and actions), custom (composite) data types, scoped data access, higher order functions and actions, and data synchronization mechanics. This novel approach allows us to have the full expressiveness of the underlying programming language, while exposing a user-friendly GUI that consists of terminology familiar to the domain expert.  相似文献   

14.

Logic programming, with its declarative bias as well as unification and the direct representation of linguistic structures, is well qualified for meta-programming, i.e., programs working with representations of other programs as their data. However, constraint techniques seem necessary in order to fully exploit this paradigm. In the DEMOII system, the language of constraint handling rules (CHRs) has been used in order to provide a functionality that appears difficult to obtain without such means. For example, reversibility of a meta-interpreter, which can be obtained by means of constraints, turns it into a powerful program generator; in the same way, negation-as-failure implemented by means of constraints provides an incremental evaluation of integrity constraints. This paper focuses on the design of such constraints and their implementation by means of CHR.  相似文献   

15.
针对基于关系型数据库的地理信息传播模型在互联网虚拟计算环境下的不足,提出了一种基于文档数据库的全栈式地理信息传播模型。该模型以多粒度地理特征的映射规约分析计算和文档数据库的多版本并发控制为框架,用统一的内建域指定语言作为传播媒介描述载体,结合数据的运行时元编程和地理服务的REST风格部署,实现地理空间数据的动态开放式传播,证明非结构化地理空间数据的传播模型能满足逻辑语义和物理存储双重易扩展性。  相似文献   

16.
Approaches to typing logic programs often exclude various features of Standard Prolog. The system “Typical for annotated Prolog” (TaP) is a pragmatic approach to type checking programs written in Prolog without restricting the scope of the language. TaP checks Prolog programs that are extended with type declarations that support parametric polymorphism and subtyping. The purpose of this paper is to present an approach that extends Typical by meta-types for handling Prolog meta-programming techniques.  相似文献   

17.
18.
This paper introduces a variant of nominal abstract syntax in which bindable names are represented by normal meta-variables as opposed to a separate class of globally fresh names. Distinct meta-variables can be instantiated with the same concrete name, which we call aliasing. The possible aliasing patterns are controlled by explicit constraints on the distinctness (freshness) of names. This approach has already been used in the nominal meta-programming language ??ML. We recap that language and develop a theory of contextual equivalence for it. The central result of the paper is that abstract syntax trees (ASTs) involving binders can be encoded into ??ML in such a way that ??-equivalence of ASTs corresponds with contextual equivalence of their encodings. This is novel because the encoding does not rely on the existence of globally fresh names and fresh name generation, which are fundamental to the correctness of the pre-existing encoding of abstract syntax into FreshML.  相似文献   

19.
This article presents XML-based tools for parser generation and data binding generation. The underlying concept is that of transformation between formal languages, which is a form of meta-programming. We discuss the benefits of such a declarative approach with well-defined semantics: productivity, maintainability, verifiability, performance and safety.  相似文献   

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

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