ImageVerifierCode 换一换
格式:PDF , 页数:30 ,大小:197.68KB ,
资源ID:436084      下载积分:10000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
注意:如需开发票,请勿充值!
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-436084.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(ANSI INCITS ISO IEC 13211-2-2000 Information technology - Programming languages - Prolog - Part 2 Modules.pdf)为本站会员(周芸)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

ANSI INCITS ISO IEC 13211-2-2000 Information technology - Programming languages - Prolog - Part 2 Modules.pdf

1、Reference numberISO/IEC 13211-2:2000(E)ISO/IEC 2000INTERNATIONALSTANDARDISO/IEC13211-2First edition2000-06-01Information technology Programminglanguages Prolog Part 2:ModulesTechnologies de linformation Langages de programmation Prolog Partie 2: ModulesAdopted by INCITS (InterNational Committee for

2、Information Technology Standards) as an American National Standard.Date of ANSI Approval: 1/3/01Published by American National Standards Institute,25 West 43rd Street, New York, New York 10036Copyright 2002 by Information Technology Industry Council (ITI).All rights reserved.These materials are subj

3、ect to copyright claims of International Standardization Organization (ISO), InternationalElectrotechnical Commission (IEC), American National Standards Institute (ANSI), and Information Technology Industry Council(ITI). Not for resale. No part of this publication may be reproduced in any form, incl

4、uding an electronic retrieval system, withoutthe prior written permission of ITI. All requests pertaining to this standard should be submitted to ITI, 1250 Eye Street NW,Washington, DC 20005.Printed in the United States of AmericaISO/IEC 13211-2:2000(E)PDF disclaimerThis PDF file may contain embedde

5、d typefaces. In accordance with Adobes licensing policy, this file may be printed or viewed but shall notbe edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In downloading thisfile, parties accept therein the responsibility of not i

6、nfringing Adobes licensing policy. The ISO Central Secretariat accepts no liability in thisarea.Adobe is a trademark of Adobe Systems Incorporated.Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation parameterswere opti

7、mized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In the unlikely eventthat a problem relating to it is found, please inform the Central Secretariat at the address given below. ISO/IEC 2000All rights reserved. Unless otherwise specified,

8、no part of this publication may be reproduced or utilized in any form or by any means, electronicor mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or ISOs member bodyin the country of the requester.ISO copyright officeCase postale

9、 56 Gb7 CH-1211 Geneva 20Tel. + 41 22 749 01 11Fax + 41 22 734 10 79E-mail copyrightiso.chWeb www.iso.chPrinted in Switzerlandii ISO/IEC 2000 All rights reservedISO/IEC 13211-2:2000(E)Contents PageForeword vIntroduction vi1ScopeBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBM

10、BMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBM 11.1 Notes. 12 Normative reference BMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBM 13 Terms and definitions BMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBM

11、BMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBM 14 Compliance BMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBM 34.1 Prologprocessor. 34.2 Module text . . . . . . . . .

12、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34.3 Prologgoal 34.4 Prolog modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34.4.1

13、Prolog text without modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34.4.2 The module user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44.5 Documentation 44.5

14、.1 Dynamic Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44.5.2 Inaccessible Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45SyntaxBMBMBMBMBM

15、BMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBM 45.1 Module text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45.2 T

16、erms 45.2.1 Operators 46 Language concepts and semantics BMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBM 46.1 Relatedterms. 56.1.1 Qualified and unqualified terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17、. . . . . . . . . . . 56.2 Module text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56.2.1 Module user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18、. . . . . . . . . . . . . 56.2.2 Procedure Visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56.2.3 Module interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19、. . . . . . . . . 56.2.4 Module directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66.2.5 Module body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20、. . . . 76.2.6 Clauses 76.3 Completedatabase . 86.3.1 Visibledatabase . 86.3.2 Examples 86.4 Contextsensitive predicates. 86.4.1 Metapredicate built-ins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86.4.2 Context sensitive built-in

21、s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96.4.3 Module name expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96.4.4 Examples: Metapredicates 96.5 Convertingater

22、m toaclause, andaclause toaterm 106.5.1 Convertingaterm tothehead ofa clause 106.5.2 Converting a module qualified term to a body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106.5.3 Converting the body of a clause to a term . . . . . . . . . . . . . . . . . . . . .

23、. . . . . . . . . . . . . . . . . . . . . 116.6 ExecutingaProloggoal. 12iiiISO/IEC 2000 All rights reservedISO/IEC 13211-2:2000(E)6.6.1 Data types forthe executionmodel. 126.6.2 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24、 . . . . . . . . . . 126.6.3 Searchingthe complete database . 136.6.4 Selectingaclause forexecution 136.6.5 Backtracking 146.6.6 Executing auser-definedprocedure:. 146.6.7 Executing a built-in predicate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25、 . . 146.7 Executinga control construct . 146.7.1 call/1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146.7.2 catch/3 156.7.3 throw/1 156.8 Predicate properties. 166.9 Flags . 166.9.1 Flag: colon sets callin

26、g context 166.10 Errors 166.10.1 Errorclassification 167 Built-in predicates BMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBMBM 167.1 The format of built-in predicate definitions . . . . . . . . . . . . . . . . . . . . .

27、 . . . . . . . . . . . . . . . . . . . . . . . . . . 167.1.1 Type of anargument 167.2 Module predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167.2.1 current module/1 . . . . . . . . . . . . . . . . . . . . .

28、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177.2.2 predicate property/2. 177.3 Clause retrievalandinformation . 187.3.1 clause/2 . 187.3.2 current predicate/1 197.4 Database access and modification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29、. . . . . . . . . . . . . . . . . . . . . . 207.4.1 asserta/1 . 207.4.2 assertz/1 . 217.4.3 retract/1 . 217.4.4 abolish/1. 22iv ISO/IEC 2000 All rights reservedISO/IEC 13211-2:2000(E)vISO/IEC 2000 All rights reservedForewordISO (the International Organization for Standardization) and IEC (the Intern

30、ational Electrotechnical Commission) form the specializedsystem for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of InternationalStandards through technical committees established by the respective organization to deal with particular field

31、s of technical activity. ISO andIEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, inliaison with ISO and IEC, also take part in the work.International Standards are drafted in accordance with the rules given in th

32、e ISO/IEC Directives, Part 3.In the field of information technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1. Draft InternationalStandards adopted by the joint technical committee are circulated to national bodies for voting. Publication as an International Standardre

33、quires approval by at least 75 % of the national bodies casting a vote.Attention is drawn to the possibility that some of the elements of this part of ISO/IEC 13211 may be the subject of patent rights. ISO and IECshall not be held responsible for identifying any or all such patent rights.Internation

34、al Standard ISO/IEC 13211-2 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology,Subcommittee SC 22, Programming languages, their environments and system software interfaces.ISO/IEC 13211 consists of the following parts, under the general title Information technology Progr

35、amming languages Prolog:Gbe Part 1: General coreGbe Part 2: ModulesISO/IEC 13211-2:2000(E)IntroductionThis is the first International Standard for Prolog, Part 2 (Modules). It was produced on May 1, 2000.Prolog (Programming in Logic) combines the concepts of logical and algorithmic programming, and

36、is recognizednot just as an important tool in AI (Artificial Intelligence) and expert systems, but as a general purpose high-levelprogramming language with some unique properties.The language originates from work in the early 1970s by Robert A. Kowalski while at Edinburgh University (and eversince a

37、t Imperial College, London) and Alain Colmerauer at the University of Aix-Marseilles in France. Their effortsled in 1972 to the use of formal logic as the basis for a programming language. Kowalskis research provided thetheoretical framework, while Colmerauers gave rise to the programming language P

38、rolog. Colmerauer and his team thenbuilt the first interpreter, and David Warren at the AI Department, University of Edinburgh, produced the first compiler.The crucial features of Prolog are unification and backtracking. Unification shows how two arbitrary structures can bemade equal, and Prolog pro

39、cessors employ a search strategy which tries to find a solution to a problem by backtrackingto other paths if any one particular search comes to a dead end.Prolog is good for windowing and multimedia because of the ease of building complex data structures dynamically, andalso because the concept of

40、backing out of an operation is built into the language. Prolog is also good for interactiveweb applications because the language lends itself to both the production and analysis of text, allowing for productionof HTML on the fly.This International Standard defines syntax and semantics of modules in

41、ISO Prolog. There is no other InternationalStandard for Prolog modules.Modules in Prolog serve to partition the name space and support encapsulation for the purposes of constructing largesystems out of smaller components. The module system is procedure-based rather than atom-based. This means thatea

42、ch procedure is to be defined in a given name space. The requirements for Prolog modules are rendered morecomplex by the existence of context sensitive procedures.vi ISO/IEC 2000 All rights reservedINTERNATIONAL STANDARD ISO/IEC 13211-2:2000(E)Information technology Programming languages Prolog Part

43、 2: Modules1ScopeThis part of ISO/IEC 13211 is designed to promote theapplicability and portability of Prolog modules that containProlog text complying with the requirements of the ProgrammingLanguage Prolog as specified in this part of ISO/IEC 13211.This part of ISO/IEC 13211 specifies:a) The repre

44、sentation of Prolog text that constitutes a Prologmodule,b) The constraints that shall be satisfied to prepare Prologmodules for execution, andc) The requirements, restrictions and limits imposed on aconforming Prolog processor that processes modules.This part of ISO/IEC 13211 does not specify:a) Th

45、e size or number of Prolog modules that will exceed thecapacity of any specific data processing system or languageprocessor, or the actions to be taken when the limit isexceeded,b) The methods of activating the Prolog processor or theset of commands used to control the environment in whichProlog mod

46、ules are prepared for execution,c) The mechanisms by which Prolog modules are loaded,d) The relationship between Prolog modules and theprocessor-specific file system.1.1 NotesNotes in this part of ISO/IEC 13211 have no effect on thelanguage, Prolog text, module text or Prolog processors that aredefi

47、ned as conforming to this part of ISO/IEC 13211. Reasonsfor including a note include:a) Cross references to other clauses and subclauses of thispart of ISO/IEC 13211 in order to help readers find theirway around,b) Warnings when a built-in predicate as defined in this partof ISO/IEC 13211 has a diff

48、erent meaning in some existingimplementations.2 Normative referenceISO/IEC 13211-1 : 1995, Information technology Program-ming languages Prolog Part 1: General core.3 Terms and definitionsThe terminology for this part of ISO/IEC 13211 has a formatmodeled on that of ISO 2382.An entry consists of a ph

49、rase (in bold type) being defined,followed by its definition. Words and phrases defined in theglossary are printed in italics when they are defined in ISO/IEC13211-1 or other entries of this part of ISO/IEC 13211. Whena definition contains two words or phrases defined in separateentries directly following each other (or separated only by apunctuation sign), * (an asterisk) separates them.Words and phrases not defined in the glossary are assumed tohave the meaning given in ISO 2382-15 and ISO/IEC 13211-1;if they do not appear in ISO 2382-15 or I

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1