README (Сборник программ)

2019-04-28СтудИзба

Описание файла

Файл "README" внутри архива находится в следующих папках: Сборник программ, API. Документ из архива "Сборник программ", который расположен в категории "". Всё это находится в предмете "математическая логика" из 2 семестр, которые можно найти в файловом архиве МГУ им. Ломоносова. Не смотря на прямую связь этого архива с МГУ им. Ломоносова, его также можно найти и в других разделах. .

Онлайн просмотр документа "README"

Текст из документа "README"

README.DOC for ARITY/Prolog Version 5.1 February, 1989 --------------------------------------- If you are using DOS 4.0 or greater: You need to install the ANSI.SYS driver with the /K option in your CONFIG.SYS file to disable the DOS 4.0 keyboard handling. For more information, consult your DOS Manual. Because of an error in the Microsoft Linker/Librarian the library ARITY.LIB has been split into two libraries: ARITY.LIB and ARITY1.LIB. These libraries will automatically be searched when the module CODE.OBJ is linked. The following three files are included on your ARITY/Prolog Utilities diskette. Note that instructions on how to use these files are included at the beginning of each file. colors.ari - Use this file to change screen attributes of the interpreter menu bar and all system dialog boxes. defmacro.ari - ARITY/EXPERT customers should use this file to add the default editing macro definintions to all of their ARITY/Expert databases. edmacros.ari - Use this file to create new editing macros to be used in the Interpreter's editor and dialog box editing controls. DIFFERENCES BETWEEN ARITY/Prolog Version 5.0 and Version 5.1 ------------------------------------------------------------ 1) Embedded C features are now available 2) The predicate abort/0 no longer exists, instead there is the predicate abort/1. 3) The predicate errcode/1 no longer exists, instead there is the predicate errcode/2. 4) The two enviornment file variables VANILLA and KBDRIVER have been added. 5) Assembly language routine declarations now need to be followed by the macro asmpred, as in the following: foo_3 proc far asmpred ; Arity Macro 6) Bitwise exclusive-or (\+/) is now evaluated for integers in an is-expression. 7) The predicate system/3 has been added for disabling and enabling built-in predicates. 8) The prolog.ini file is now searched for along the path by the interpreter. 9) The setup_editor predicate has been added to allow configuration of the Arity/Prolog editor. CORRECTIONS TO THE ARITY/PROLOG LANGUAGE REFERENCE MANUAL: ---------------------------------------------------------- Page 9: Both the (P and Q) and (P or Q) control operators are not valid. Page 10: The control option abort/0 is no longer supported. Instead, the predicate abort/1 is provided: abort(+AbortCode) the AbortCode will be used as the halt code if no restart predicate exists. For compatibility with existing code, abort/0 can be defined as abort :- abort(0). Page 23: the bitwise exclusive-or operator (\+/) has been added and should be used with integers only. Page 49: keys/1 predicate returns the most general functor as a result, not Name/Arity. Therefore, the example should be: ?- keys(X). X=member(_0582,_0584) ->; X=parent(_0582,_0584) ->; X=male(_0582) ->; X=female(_0582) ->; no Page 53: In the second clause of tsearch/3, the Ref should be changed to R. In the first clause of search/3, the Ref should be changed to R. In that same clause, the second line should read instance(R,Term). Page 68: Sort keys in b-trees need to be ground terms (No variables within the term). Page 85: Note the following convenient notation for a character given an ascii value in a string or atom: place a backquote(`) followed by an ascii value within the string. You can use two backquotes (``) to represent a single backquote. For example: ?- read(X). $`97`98`99$. X = abc -> ?- read(X). '``Jim``'. X = `Jim` -> Page 89: Note the following changes to the Operator Table: Operator Associativity Arity/Prolog Precedence -------- ------------- ----------------------- or yfx 675 and yfx 670 \/ yfx 665 \+/ yfx 660 /\ yfx 655 >= =:= =\= yfx 650 < =< > >= yfx 600 Page 220: The InitKey passed to send_menu_msg should be the scan code of the character you defined as an accelerator in the menu. You can get the can code by using the keyb predicate. Note the change to the example on page 220-221, which should read: check_accel(ReturnVal) :- keyb(_,ScanCode), send_menu_msg(activate(menu1,(0,0),ScanCode), ReturnVal). Chapter 12: For a number of control definitions, the documentation incorrectly lists the order in which the border attributes and background attributes of the control must be specified. In all instances where the border/background attributes are specified as (Border_attr,Bkgrnd_attr), they should instead be specified as (Bkgrnd_attr,Border_attr) Make a note of this change in your documentation. This change affects the begin_dialog definition as well as the control definitions for edit fields, push buttons, list boxes, edit boxes, and edit regions. Page 171: note that you cannot use an anonymous variable for choice_key. Page 183: The eb_set_line message incorrectly states that lines of text are numbered upwards from 0. They are numbered upwards from 1. Page 183-184: The eb_get_pos message description incorrectly states that rows and columns of text are numbered from 0. Rows and columns are numbered from 1, so the top left corner of text is at position (1,1). The description also states that (3,0) indicates the third row and first column, whereas it should read (3,1). In the diagram, position (7,0) should read (7,1), and the row/column indicator in the edit box should read 00008:013 rather than 00002:013. Page 185: The eb_delete message description should state that the lines to which the LineNum argument refers are numbered from 1. Page 224: The format of the send_menu_msg message for changing menu attributes is incorrect in the book. The correct form is: send_menu_msg(attributes(+MenuName,?colors((TNormal,TReverse), (PNormal,PReverse),(GNormal,GReverse),(Accel,Border))), true). Section 15.1.8: system(+Name/ARITY,?OldValue,?NewValue) The predicate system/3 is used to set the disable value of an evaluable predicate. When the value is set to 0, the evaluable predicate definition is used. When the value is set to 1, the database is searched for a predicate definition. You can get the value by using the same variable. Note that if you consult a predicate that is already an evaluable predicate, you will get a warning message but the code will be asserted. Section 15.1.9: setup_editor(+Bkgrnd,+Border,+Status,+ROE,+SOE,+Indent) The setup_editor predicate can be used to change the colors and preference settings of the Arity/Prolog editor. This predicate is only available in the interpreter. The arguments are defined as follows: Bkgrnd - an integer indicating the background attribute of the editor. Border - an integer indicating the border attribute of the editor. For no border, use 0. Status - an integer indicating where you want the editor status line: 1) at the top of the screen or 0) at the bottom. ROE - an integer indicating whether or not you want the buffer to reconsult on exit. SOE - an integer indicating whether or not you want the buffer to be saved when you exit. Indent - an integer indicating whether or not you want automatic indentation of new lines. The ROE, SOE and indent variables are set to 1 (on) or 0 (off). If you want the editor to be displayed using a specific color and preference combination every time you use Arity/Prolog, include a call to the setup_editor predicate in the prolog.ini file (see section 2.3.2 in the Using the Arity/Prolog Compiler and Interpreter manual). For example, the prolog.ini file could contain the following: :- setup_editor(7,0,0,1,1,1). Which would be a white on black borderless window, with the status line at the bottom of the screen. All buffers would automatically be set to indent, reconsult on exit and save on exit. Page 244: The predicate errcode/1 is no longer supported. Instead, the predicate errcode/2 is provided: errcode(-OldErrCode, +NewErrCode) which returns the current value of the error code in OldErrCode and sets the error code to NewErrCode. For compatibility with existing code, errcode/1 can be defined as follows: errcode(X) :- errcode(X, 0). Pages 248-249: The predicates date/1 and time/1 will fail if passed an instantiated argument that is an invalid date or time. Section 16.2: You may initialize chars, integers and doubles within your declarations, however, you may not initialize structs, unions, enums or arrays: :- c. /* The following are valid declarations: */ int a = 34; long b = 123456; double c = 8.0; char d = 'a'; /* The following declarations are invalid: */ int e[3] = {45,56,67}; struct {int x; int y;} f = {3,4}; int *g = x; char cstring[] = "abcdef"; :- prolog. Section 16.2.14: cstacksize You may set the C stack size (used by embedded C expressions) by assigning a value to the global variable cstacksize. The default value is 2048. The maximum value is 64K. For example, to set the stack size to 4096 bytes: :- c. int pascal cstacksize = 4096; #prolog Page 258: A float is a four byte value in the range 3.4E-38 to 3.4E+38. Page 264: A variable declaration within an embedded C expression can contain more than one variable for a particular type by using a comma list. Therefore the example on page 265 could be: { (x,y):long, Z:double, Z=x*y } Note that the semicolon (;) can be used as a separator within an embedded C expression. Therefore, the example above could also be represented as: { (x,y):long; Z:double; Z=x*y } Section 16.3.2: The following additional operators are accepted within embedded C expressions: do_while(Exp,Test) - evaluate expressions until test = 0 while_do(Test,Exp) - while test = 0, continue to evaluate expressions do_until(Exp,Test) - evaluate expressions until test not = 0 until_do(Test,Exp) - while test not = 0, continue to evaluate expressions Page 270: A float is a four byte value not eight. Page 284-286: Examples 4 and 5 should be ignored, instead you should refer to the embedded C examples on your utility diskette. Page 286: The decalaration int count_data(int); should be int pascal far count_data(int); Page 290: The trace predicate turns the debugger on, with the debugger initialy set to creep to the next port. Section 17.1.3: debug The debug/0 predicate turns the debugger on, with the debugger initialy set to leap to the spied predicate. Section 17.1.4: nodebug The nodebug/0 predicate has the same effect as the notrace/0 predicate. Section 17.2.3: resetspy The resetspy predicate will remove spy points from all currently spied predicates. Section 17.4 Debugger commands should include the following: Space bar Toggles between the debugger window and the application window. z Skips to the exit or fail port of a goal regardless of whether other spy points are set within the goal. Execution does not retain debugging information on backtracking points within goal, thus it is faster and more space efficient. You can use this command only from a call or redo port. (See also the q and s commands.) Note in this section that <line feed> will not cause the debugger to leep. CORRECTIONS TO USING THE ARITY/PROLOG COMPILER AND INTERPRETER: --------------------------------------------------------------- Page 7: The prolog.ini file is now searched for along the path, not just in the current directory. Pages 12, 14: The Esc key cannot be used to move from the main window to the menu bar. To move to the menu bar from the main window, press the Alt key or use an Alt-accelerator key option. Section 3.2.3: The Reconsult Buffer option has been added to the Buffers menu item. When the Reconsult Buffer option is chosen, the current buffer is immediately reconsulted into the Prolog database. The erase buffer option has also been added to erase the contents of the current buffer. Section 4.6.2: The leashing modes are now set by ports individually. Page 22: The New option description states that the new, empty file will be placed in buffer 1. The new file will be placed in the first clean buffer or overwrite the most recent active buffer if there is no clean buffer. Page 23: The halt.. menu option summary should read: Exits ARITY/Prolog. This option displays a dialog box which lists any file which you have altered during editing but haven't saved. You can check off the files you want to save before exiting, or you can exit without saving the files. Page 33: Paragraph 4 states that while in overwrite mode you cannot add lines to the end of a file. Overwrite mode does allow you to add lines to the end of a file. Page 36: In the Undoing line edits description, it states that if a line has not been changed when this option is chosen, the cursor will be moved to the beginning of the line. In fact, the cursor will remain at its current position if this option is chosen and no changes have been made to the line. Page 37: The Match Upper/Lowercase option has been changed to read Case Sensitive. If you choose this option, the search is case sensitive, otherwise the case is not considered when searching. Page 42: Section 4.1.9 states that you can copy the contents of the clipboard. You cannot copy or alter the contents of the clipboard buffer in any way. Page 66: When you type h at the debugger prompt, the debugger commands will be displayed in the help file window. To exit this window and return to the debugger, press the Esc key. Pages 74-76: The information displayed by the Statistics... option is not as described in the manual. The Statistics... option displays a single dialog box which gives the following information: Information on local, global, and trail stack usage. The number of times that stack space has been recovered (garbage collections). The number of global and trail cells recovered during the most recent garbage collection. The total cache size, which is the number of page slots available. The total cache used, which is the number of pages used. An EMS specification indicating whether the database pages reside in in expanded memory. Yes if they do, No if they don't. The name of the database file for the application. Pages 87-91: As a result of the optimization of the underlying ARITY/Prolog code, the interpreter fits in two code segments, code and uiseg, rather than the three code segments as described in chapter 6. Therefore, it is not necessary to link the object module apiseg.obj when creating a new version of the interpreter. However, an empty apiseg.obj file is provided so that the link command as presented in the documentation will work. If desired, you may eliminate all references to apiseg.obj in your documentation and delete the apiseg.obj file. Pages 95-97: The default startup of ARITY/Prolog will not call restart/0 on an abort. To cause this action you must link with the file STARTUPR.OBJ (see startupr.c). On pages 132-133, the .lnk extension is not assumed. Chapter 11 of Using the ARITY/Prolog Compiler and Interpreter should include the following two new environment variables: 1. VANILLA This allows you to disable the ARITY window driver by setting the value to YES. All window predicates are disabled and the interpreter will have a plain "vanilla" interface, similar to the one it had in version 4.0. The default value is NO. 2. KBDRIVER This allows you to disable the ARITY keyboard driver by setting the value to NO. The default value is YES. When installed, the operation of the driver is affected by the setting of the enviornment flag VANILLA: YES) Only Control-Breaks will be captured by the keyboard handler and abort(0) will be called. NO) Special characters (Ascii=255, Scan=1 thru 5) will be captured and Control-C's (^C) will be ignored. Chapter 11: The following equation should be used to determine enviornment flag settings for Memory usage: (Note variables denote number of Kbytes) Total Memory >= MS-DOS + .EXE Load Size + LOCAL + GLOBAL + TRAIL + (4*MINPAGES) + MINAVAIL. Page 162: An assembly language routine declaration should be followed by the macro asmpred, as in the following: foo_3 proc far asmpred ; ARITY Macro Page 170: In section 15.4.14, the getfuncarg_a description should state that you must restore DS, SS, SP, and ES to the values that they contained on entry to your assembly language routine before called getfuncarg_a. Also the number of the argument you are selecting are numbered from 1, not 0. Pages 172-175: Assembly example: the prolog module should be named copy.ari, not testcopy1.ari and should be: :- module(copy1). :- extrn copy/2:asm(testcopy_2). :- visible copy/2. The assembly routine should be changed so that the name is testcopy_2, not testcopy_1, asmpred is inserted before the macro evalargref 0 and the two instructions mov cx,0 in the section that handles functors should be changed to mov cx,1. Then the linker arguments should be: link code+uiseg+apiseg+api+copy+testcopy,api,,api+arity Pages 229-231: As a result of the optimization of the underlying ARITY/Prolog code, the object module apiseg.obj is no longer necessary when linking to create a new interpreter. However, an empty apiseg.obj file is provided so that the link command as presented in the documentation will work. If desired, you may eliminate all references to apiseg.obj in your documentation and delete the apiseg.obj file. Appendix B: The error messages listed in appendix B have been updated. The current error messages are listed in the file ERRORS.HLP. Appendix D: The predicates listed in appendix D have been updated. The current predicate summary is located in the file ARITY.HLP. 
Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
5259
Авторов
на СтудИзбе
421
Средний доход
с одного платного файла
Обучение Подробнее