首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 62 毫秒
1.
We provide a mathematical specification of an extension of Warren's Abstract Machine (WAM) for executing Prolog to type-constraint logic programming and prove its correctness. Our aim is to provide a full specification and correctness proof of a concrete system, the PROTOS Abstract Machine (PAM), an extension of the WAM by polymorphic order-sorted unification as required by the logic programming language PROTOS-L.In this paper, while leaving the details of the PAM's type constraint representation and solving facilities to a sequel to this work, we keep the notion of types and dynamic type constraints abstract to allow applications to different constraint formalisms like Prolog III or CLP(R). This generality permits us to introduce modular extensions of Börger's and Rosenzweig's formal derivation of the WAM. Since the type constraint handling is orthogonal to the compilation of predicates and clauses, we start from type-constraint Prolog algebras with compiled AND/OR structure that are derived from Börger's and Rosenzweig's corresponding compiled standard Prolog algebras. The specification of the type-constraint WAM extension is then given by a sequence of evolving algebras, each representing a refinement level, and for each refinement step a correctness proof is given. Thus, we obtain the theorem that for every such abstract type-constraint logic programming system L, every compiler to the WAM extension with an abstract notion of types which satisfies the specified conditions, is correct.The first author was partially funded by the German Ministry for Research and Technology (BMFT) in the framework of the WISPRO Project (Grant 01 IW 206). He would also like to thank the Scientific Center of IBM Germany where the work reported here was started.  相似文献   

2.
本文论述从逻辑程序本身提取启发式控制信息,以克服由于逻辑语言系统中控制策略的机械性所带来的不完备性和低效性。具体地给出若干启发式控制规则,并证明了这些规则的正确性。运用这些控制规则可以大大地提高系统的运行效率或改善逻辑程序的语义性质。文章最后给出启发式WAM(记作HWAM),并且用实例说明HWAM比WAM更有效,更完善。  相似文献   

3.
Answering queries in disjunctive logic programming requires the use of ancestry-resolution. The resulting complication makes it difficult to implement a Prolog-type query answering procedure for disjunctive logic programs. However, SLO-resolution provides a mechanism which is similar to SLD-resolution and hence offers a solution to this problem. The Warren Abstract Machine has been a very effective model for implementing Prolog. In this paper, we extend the WAM model of Prolog and adapt it for DISLOG — a language for disjunctive logic programming. We describe the extensions and additional instructions needed to make WAM viable for modeling and executing DISLOG. The extension is made in such a way that the original architecture is not disturbed and a Prolog program will execute as efficiently as it does in the original WAM.This work was done while the author was at the University of Kentucky.  相似文献   

4.
This paper describes a proof outline logic that covers most typical object-oriented language constructs in the presence of inheritance and subtyping. The logic is based on a weakest precondition calculus for assignments and object allocation which takes field shadowing into account. Dynamically bound method calls are tackled with a variant of Hoare's rule of adaptation that deals with the dynamic allocation of objects in object-oriented programs. The logic is based on an assertion language that is closely tailored to the abstraction level of the programming language.  相似文献   

5.
Refinement of a typed WAM extension by polymorphic order-sorted types   总被引:1,自引:1,他引:0  
We refine the mathematical specification of a WAM extension to typeconstraint logic programming given in [BeB96]. We provide a full specification and correctness proof of the PROTOS Abstract Machine (PAM), an extension of the WAM by polymorphic order-sorted unification as required by the logic programming language PROTOS-L, by refining the abstract type constraints used in [BeB96] to the polymorphic order-sorted types of PROTOS-L. This allows us to develop a detailed and mathematically precise account of the PAM's compiled type constraint representation and solving facilities, and to extend the correctness theorem to compilation on the fully specified PAM.The first author was partially funded by the German Ministry for Research and Technology (BMFT) in the framework of the WISPRO Project (Grant 01 IW 206). He would also like to thank the Scientific Center of IBM Germany where the work reported here was started.  相似文献   

6.
Although logic languages, due to their non-declarative nature, are widely proclaimed to be conducive in theory to parallel implementation, in fact there appears to be insufficient practical evidence to stimulate further developments in this field. The paper puts forward various complications which arise in assuming a solely process parallel approach as a possible explanation for this situation. As an alternative, data parallelism is posited as an underutilized forte of logic programming. The paper illustrates a data parallel implementation of a particular language called SEL which is based on sets. Thus, SEL (set equational language) is introduced as an example of logic language which lends itself to an efficient data parallel implementation. The strategy of this implementation assumes an abstract machine called SAM (set-oriented abstract machine) which is based on the WAM (Warren abstract machine). SAM serves as an intermediary between the SEL language and the target machine for the implementation, the Connection Machine. Finally, some preliminary benchmarks are presented.  相似文献   

7.
During the last decade, the integration of functional and logic languages has received widespread attraction for the purpose of offering two different programming styles in one system simultaneously. The main goal is to incorporate the characteristics of the two paradigms coherently, without degrading the performance of the whole system. However, few languages have achieved this goal. Some of them, even though they have a rich set of functions, perform poorly. Others are efficient, but lose some important facilities. The paper proposes a functional logic language Lazy Aflog and its abstract machine FWAM-II as an expressive and efficient mechanism for this incorporation. Lazy Aflog is an extension of logic language in which functions are reduced in the extended unification, called E-unification with lazy evaluation. This extended unification allows Lazy Aflog to process infinite data structures and higher-order functions naturally. FWAM-II is an extension of the Warren Abstract Machine (WAM) in which the instructions and run-time structures to provide the suspension/reactivation of functional closure are added. These facilities enable FWAM-II to support not only resolution but also infinite data structures and higher-order functions efficiently. In addition, the experimental results show that Lazy Aflog and FWAM-II could be a good compromise between expressiveness and efficiency of the integration.  相似文献   

8.
Summary The notion of abstractions in programming is characterized by the distinction between specification and implementation. As far as the specification structures are concerned, hierarchical program development with abstraction mechanisms is naturally regarded as a process of theory extensions in a many-sorted logic. To support such program development, a language called t is proposed with which one can structuredly build up theories and write their program implementation. There, the implementation is regarded as another level of theory extension, and the relation between the specification and the implementation of an abstraction is characterized in terms of a homomorphism between the two theories. On this formalism, a mechanizable proof method is introduced for validation of implementations of both data and procedural abstraction. Finally, a new data type concept is introduced to generalize the so-called type-parametrization mechanism. A justification of this concept within the first order logic is provided as well as its applications to program structuring and verification.  相似文献   

9.
The attributed variable data type plays an important role in many extensions to the basic Logic Programming language. It provides a flexible mechanism to implement constraint solvers over different domains in a standard logic programming system. To combine the technique of constraint solving with tabling and build a tabled constraint logic programming system, special work has to be done to handle attributed variables when they are copied into and out of tables. In this paper, we describe the implementation of attributed variables in XSB — a tabled logic programming system.We first introduce the internal representation of attributed variables and the interface between the internal representation and the user defined high level unification handler. Then, as the primary focus of the paper, we describe how the tabling mechanism in XSB can be extended to efficiently handle attributed variables. To save attributed variables in tables, the structure of subgoal table and answer table is modified, and the tabling engine itself requires extension as well.  相似文献   

10.
Goedel语言是一种说明性逻辑程序设计语言。该语言基于一阶逻辑,引入了一个多态多类的类型系统和多种新的语言成分,支持抽象数据类型和模块化程序设计等技术,语言本身也具有很强的说明性语义。详细介绍了Goedel语言的类型系统及其构造,对在逻辑程序设计语言中引入类型系统的作用进行了一些深入的分析和讨论。  相似文献   

11.
The port-based object is a new software abstraction for designing and implementing dynamically reconfigurable real-time software. It forms the basis of a programming model that uses domain-specific elemental units to provide specific, yet flexible, guidelines to control engineers for creating and integrating software components. We use a port-based object abstraction, based on combining the notion of an object with the port-automaton algebraic model of concurrent processes. It is supported by an implementation using domain-specific communication mechanisms and templates that have been incorporated into the Chimera real-time operating system and applied to several robotic applications. This paper describes the port-based object abstraction, provides a detailed analysis of communication and synchronization based on distributed shared memory, and describes a programming paradigm based on a framework process and code templates for quickly implementing applications  相似文献   

12.
This paper presents the implementation and performance results of anand-parallel execution model of logic programs on a shared-memory multiprocessor. The execution model is meant for logic programs with “don't-know nondeterminism”, and handles binding conflicts by dynamically detecting dependencies among literals. The model also incorporates intelligent backtracking at the clause level. Our implementation of this model is based upon the Warren Abstract Machine (WAM); hence it retains most of the efficiency of the WAM for sequential segments of logic programs. Performance results on Sequent Balance 21000 show that on suitable programs, our parallel implementation can achieve linear speedup on dozens of processors. We also present an analysis of different overheads encountered in the implementation of the execution model.  相似文献   

13.
This paper presents a semantic framework for data abstraction and refinement for verifying safety properties of open programs with integer types. The presentation is focused on an Algol-like programming language that incorporates data abstraction in its type system. We use a fully abstract game semantics in the style of Hyland and Ong and a more intensional version of the model that tracks nondeterminism introduced by abstraction in order to detect false counterexamples. These theoretical developments are incorporated in a new model-checking tool, Mage, which implements efficiently the data-abstraction refinement procedure using symbolic and on-the-fly techniques.  相似文献   

14.
利用人工智能最新研究成果--约束逻辑编程对Verilog描述进行谓词抽象,并与目前基于SAT的方法进行了比较.首先通过符号模拟建立Verilog的形式化模型,然后结合要抽象的谓词,将谓词抽象问题转化为约束逻辑编程问题并进行求解.该方法的优点是在计算抽象系统时,不需要像基于SAT的方法那样将字级约束打散成位级约束,求解效率显著提高;提供了一个统一的框架用于描述各种约束.实验结果表明,与基于SAT的抽象技术相比,基于约束逻辑编程的抽象方法的求解速度有显著提高.  相似文献   

15.
Ivan Čukić 《Software》2016,46(12):1617-1656
There is a big class of problems that requires writing programs in an asynchronous manner. Cloud computing, service‐oriented architectures, multi‐core and heterogeneous systems all require programs to be written with asynchronous components. The necessity of concurrency and asynchronous execution brings in the added complexity of the inversion of control into the system, either through message passing or through event processing. In this paper, we introduce explicit programming language support for asynchronous programming that completely hides inversion of control. The presented programming model defines a common abstraction of the different types of tasks, both synchronous and asynchronous. It defines common imperative control constructs equivalent to those of the host programming language, along with a few more advanced ones for transactional and parallel execution that can universally work for any task type. It allows the programmer to implement the logic of an asynchronous system in a natural way by writing simple, seemingly, synchronous imperative code. We will show that the programs written using this approach are easier to understand by programmers. They are also easier to design automated tests for, and for performing computer‐based static analysis of the program logic. The principles behind this approach were tested in a couple of real‐world systems with worldwide user base. Our experience shows that it makes the complex code with a lot of interdependencies between asynchronously executed tasks easy to write and reason about. Copyright © 2016 John Wiley & Sons, Ltd.  相似文献   

16.
There have been several proposals for logic programming language based on linear logic: Lolli [8], Lygon [7], LO [3], LinLog [2], Forum [11], HACL [10]. In these languages, it is possible to create and consume resources dynamically as logical formulas. The efficient handling of resource formulas is, therefore, an important issue in the implementation of these languages. Lolli, Lygon, and Forum are implemented as interpreter systems; Lolli is on SML and λProlog, Lygon is on Prolog, Forum is on SML, λProlog and Prolog. However, none of them have been implemented in Java.In this paper, we describe the Prolog Café 1 system which translates a linear logic programming language called LLP to Java via the LLPAM [12] [5], an extension of the standard WAM [16] [1] for LLP. LLP is a superset of Prolog and a subset of Lolli. The main difference from the first implementation [4] is resource compilation. That is to say, resource formulas are compiled into closures which consist of a reference of compiled code and a set of bindings for free variables. Calling these resources is integrated with the ordinary predicate invocation.Prolog Café is portable to any platform supporting Java and easily expandable with increasing Java's class libraries. In performance, on average, Prolog Café generate 2.2 times faster code for a set of classical Prolog benchmarks compared with jProlog.  相似文献   

17.
This paper presents a natural language design environment that enables the programming of complex robotic agent systems, comprising of a top level BDI architecture in conjunction with a low level operational system that relates to the hardware interface and supplemental computational processes. The design environment enforces synergy between the development of these traditionally disparate aspects through sharing of ontological information and implementing a form of natural language programming called sEnglish. The resultant system provides an inherent abstraction of defined operational concepts and procedures for agent reasoning and shared meaning between man and machine. Through this shared knowledge the robot’s operational logic and skill execution details are clear to human operators and may thus facilitate the work of design teams to enable rapid prototyping of physical agent systems in simulation or hardware.  相似文献   

18.
Systems code is almost universally written in the C programming language or a variant. C has a very low level of type and memory abstraction and formal reasoning about C systems code requires a memory model that is able to capture the semantics of C pointers and types. At the same time, proof-based verification demands abstraction, in particular from the aliasing and frame problems. In this paper we present a study in the mechanisation of two proof abstractions for pointer program verification in the Isabelle/HOL theorem prover, based on a low-level memory model for C. The language’s type system presents challenges for the multiple independent typed heaps (Burstall-Bornat) and separation logic proof techniques. In addition to issues arising from explicit value size/alignment, padding, type-unsafe casts and pointer address arithmetic, structured types such as C’s arrays and structs are problematic due to the non-monotonic nature of pointer and lvalue validity in the presence of the unary &-operator. For example, type-safe updates through pointers to fields of a struct break the independence of updates across typed heaps or ∧*-conjuncts. We provide models and rules that are able to cope with these language features and types, eschewing common over-simplifications and utilising expressive shallow embeddings in higher-order logic. Two case studies are provided that demonstrate the applicability of the mechanised models to real-world systems code; a working of the standard in-place list reversal example and an overview of the verification of the L4 microkernel’s memory allocator.  相似文献   

19.
James B. Morris 《Software》1980,10(4):249-263
The Model Programming Language implements a form of data abstraction that has been used in a large programming project, the Demos Operating System. The use of the abstraction mechanism suggests a particular programming style that has evolved over an extensive period of gaining experience with the language. The programming style and Model's approach to data abstraction are both documented here using an example designed to illustrate several of the more important issues. The goal of the paper is to demonstrate a programming style and an approach to data abstraction in a programming language that has proved useful in a significant systems programming application.  相似文献   

20.
Word自动阅卷系统的设计与实现   总被引:8,自引:0,他引:8       下载免费PDF全文
概述了现有的Office自动阅卷的类型与方法。相对于记录操作步骤进行评分的方法,分析结果文档实现阅卷评分的方法具有明显的优势,不存在适应性差与误判问题而被广泛采用。提出了基于COM自动化技术进行自动阅卷的方法,它可以克服其它方法所具有的编程难、速度慢、对文档类型有限制等缺点。介绍了基于COM自动化技术设计的Word自动阅卷系统逻辑框架,给出了系统组件的主要算法,并对配置文件形成语法进行了定义。以测试参数配置工具为例,介绍了主要实现技术。  相似文献   

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

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