The software stack data-type as an operating system service

Jon W. Osterlund
{"title":"The software stack data-type as an operating system service","authors":"Jon W. Osterlund","doi":"10.1145/199200.316995","DOIUrl":null,"url":null,"abstract":"Codes which manage compilation and use of named software stacks are described. An item on such a stack ordinarily consists of one word, but it may be extended 'by a fixed length through association with an auxilliary field declared separately. In this way, structures such as buffers, inodes and I/0 redirection may be managed with the stacking discipline familiar to Forth users. Eight access methods are provided, which are bound to the desired stack within \"domains\" established by the user codes. Domains may be nested with one another, and with control structures such as BEGIN .. UNTIL, DO .. LOOP, and IF .. ELSE .. THEN. Examples illustrate co\"ect use. Preface The \"stack\" and \"R\" are familiar to Forth users. It is possible, however, to use Forth without awareness of the stack-like characteristics of the dictionary, into which codes may be loaded and from which they may be forgotten, and it is also possible to be aware of many of Forth's advantages without knowledge of \"reenterability\" or of \"list theory\". These topics are beyond the presegt scope, but the software stack data-type to be described is a contribution to the ease with which re-enterable codes may be written. Such codes are important because they allow the practj.ce of computing science to closely pfll\"allel the theory of lists, which in turn illumines the practice of Forth. One is tempted to write about successful applications of software stacks, rather than how or why they may be used. Often they provide a workable alternative to linked lists. But my uses, including management of RAM buffers, character-by-character buffering of keyboard input, the saving of environments (the old directory w.lten changing to a new one), multi-way sorts, and· a recursive disassembler, are less important than the effect they have had on the stackbuilder itself. It has become abstract in form and capable of early introduction to the system, thus providing its facilities throughout subsequent compilation. Software stacks can hold changing lists of lists (of lists .. ) containing references tQ compiled an~ executable Forth words. The overhead of ·interpretation is avoided, yet the lists remain subject to run-time modification. \"Stackbuilder\" refers to the code& shown and discussed in tfle appendix, which allow the user to declare stacks for private purposes, and to access them via eight \"methods\". Forth professionals familiar with compile-time nesting, state-sensitive behavior, saving of data on E,, and the <BUILQS .. DOES> construct can look \"under the hood\", but it is my purpose to introduce the use of those codes, not their operation. Perhaps you will discover. additional applications of this versatile data-type. Introduction •• A Simple Example A Forth user may declare a software stack named MYST ACK which will hold up to 10 items, by writing:","PeriodicalId":441527,"journal":{"name":"Annual Workshop on Forth","volume":"53 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1993-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Annual Workshop on Forth","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/199200.316995","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Codes which manage compilation and use of named software stacks are described. An item on such a stack ordinarily consists of one word, but it may be extended 'by a fixed length through association with an auxilliary field declared separately. In this way, structures such as buffers, inodes and I/0 redirection may be managed with the stacking discipline familiar to Forth users. Eight access methods are provided, which are bound to the desired stack within "domains" established by the user codes. Domains may be nested with one another, and with control structures such as BEGIN .. UNTIL, DO .. LOOP, and IF .. ELSE .. THEN. Examples illustrate co"ect use. Preface The "stack" and "R" are familiar to Forth users. It is possible, however, to use Forth without awareness of the stack-like characteristics of the dictionary, into which codes may be loaded and from which they may be forgotten, and it is also possible to be aware of many of Forth's advantages without knowledge of "reenterability" or of "list theory". These topics are beyond the presegt scope, but the software stack data-type to be described is a contribution to the ease with which re-enterable codes may be written. Such codes are important because they allow the practj.ce of computing science to closely pfll"allel the theory of lists, which in turn illumines the practice of Forth. One is tempted to write about successful applications of software stacks, rather than how or why they may be used. Often they provide a workable alternative to linked lists. But my uses, including management of RAM buffers, character-by-character buffering of keyboard input, the saving of environments (the old directory w.lten changing to a new one), multi-way sorts, and· a recursive disassembler, are less important than the effect they have had on the stackbuilder itself. It has become abstract in form and capable of early introduction to the system, thus providing its facilities throughout subsequent compilation. Software stacks can hold changing lists of lists (of lists .. ) containing references tQ compiled an~ executable Forth words. The overhead of ·interpretation is avoided, yet the lists remain subject to run-time modification. "Stackbuilder" refers to the code& shown and discussed in tfle appendix, which allow the user to declare stacks for private purposes, and to access them via eight "methods". Forth professionals familiar with compile-time nesting, state-sensitive behavior, saving of data on E,, and the construct can look "under the hood", but it is my purpose to introduce the use of those codes, not their operation. Perhaps you will discover. additional applications of this versatile data-type. Introduction •• A Simple Example A Forth user may declare a software stack named MYST ACK which will hold up to 10 items, by writing:
将软件堆栈数据类型作为操作系统服务
描述了管理已命名软件栈的编译和使用的代码。这种堆栈上的项通常由一个单词组成,但它可以通过与单独声明的辅助字段相关联来扩展固定长度。通过这种方式,缓冲区、索引节点和I/0重定向等结构可以使用Forth用户熟悉的堆叠原则进行管理。提供了八种访问方法,它们被绑定到由用户代码建立的“域”内所需的堆栈。域可以彼此嵌套,也可以与诸如BEGIN ..直到……循环和IF…其他. .然后。举例说明了co的用法。Forth用户对“stack”和“R”很熟悉。然而,在使用Forth时,可能不知道字典的类似堆栈的特性,代码可能被加载到字典中,也可能从字典中被遗忘,也可能在不知道“可重用性”或“列表论”的情况下意识到Forth的许多优点。这些主题超出了目前的范围,但是要描述的软件堆栈数据类型是对编写可重用代码的便利性的贡献。这些代码很重要,因为它们允许实践。计算科学的一个重要方面是紧密地填补了“列”的理论,这反过来又启发了福斯的实践。人们倾向于写软件栈的成功应用,而不是写它们如何使用或为什么使用。它们通常为链表提供一种可行的替代方案。但是,我的用途,包括RAM缓冲区的管理、键盘输入的逐个字符缓冲、环境的保存(旧目录将更改为新目录)、多路排序和递归反汇编器,都不如它们对stackbuilder本身的影响重要。它在形式上变得抽象,能够在系统的早期引入,从而在随后的编译中提供它的功能。软件栈可以保存不断变化的列表的列表(列表的列表…)包含参考tQ编译的~可执行的Forth字。避免了解释的开销,但列表仍然可以在运行时进行修改。“Stackbuilder”指的是在附录中显示和讨论的代码,它允许用户为私有目的声明堆栈,并通过八个“方法”访问它们。熟悉编译时嵌套、状态敏感行为、在E上保存数据和构造的专业人员可以看到“幕后”,但我的目的是介绍这些代码的使用,而不是它们的操作。也许你会发现。这种通用数据类型的其他应用程序。一个Forth用户可以声明一个名为MYST ACK的软件栈,它最多可以保存10个项目,通过这样写:
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信