首页> 外文会议>ACM SIGPLAN international conference on functional programming >Forest: A Language and Toolkit for Programming with Filestores
【24h】

Forest: A Language and Toolkit for Programming with Filestores

机译:森林:使用Filestores编程的语言和工具包

获取原文

摘要

A filestore is a structured collection of data files housed in a conventional hierarchical file system. Many applications use filestores as a poor-man's database, and the correct execution of these applications requires that the collection of files, directories, and symbolic links stored on disk satisfy a variety of precise invariants. Moreover, all of these structures must have acceptable ownership, permission, and timestamp attributes. Unfortunately, current programming languages do not provide support for documenting assumptions about filestores, detecting errors in them, or safely loading from and storing to them. This paper describes the design, implementation, and semantics of Forest, a new domain-specific language for describing filestores. The language uses a type-based metaphor to specify the expected structure, attributes, and invariants of filestores. Forest generates loading and storing functions that make it easy to connect data on disk to an isomorphic representation in memory that can be manipulated as if it were any other data structure. Forest also generates metadata that describes the degree to which the structures on the disk conform to the specification, making error detection easy. In a nutshell, Forest extends the rigorous discipline of typed programming languages to the untyped world of file systems. We have implemented Forest as an embedded domain-specific language in Haskell. In addition to generating infrastructure for reading, writing and checking file systems, our implementation generates type class instances that make it easy to build generic tools that operate over arbitrary filestores. We illustrate the utility of this infrastructure by building a file system visualizer, a file access checker, a generic query interface, description-directed variants of several standard UNIX shell tools and (circularly) a simple Forest description inference engine. Finally, we formalize a core fragment of Forest in a semantics inspired by classical tree logics and prove round-tripping laws showing that the loading and storing functions behave sensibly.
机译:filestore是在传统的分层文件系统中安置的数据文件集合。许多应用程序使用FileStores作为较差的人的数据库,并且正确执行这些应用程序要求存储在磁盘上的文件,目录和符号链接的集合满足各种精确的不变性。此外,所有这些结构必须具有可接受的所有权,权限和时间戳属性。遗憾的是,目前的编程语言不提供对文件中的假设的支持,检测它们中的错误,或安全地加载到它们。本文介绍了森林的设计,实现和语义,一种用于描述Filestores的新域名语言。该语言使用基于类型的隐喻来指定Filestores的预期结构,属性和不变性。森林生成加载和存储功能,使得可以轻松地将磁盘上的数据连接到内存中的同义形式,以便可以操纵,就像它是任何其他数据结构一样。森林还生成描述磁盘上结构符合规范的程度的元数据,使错误检测变得简单。简而言之,森林将类型化的编程语言的严格学科扩展到无型文件系统世界。我们在Haskell实现了森林作为嵌入式域的特定语言。除了为读取,写入和检查文件系统生成基础架构外,我们的实现还生成类型类实例,使得可以轻松构建以任意文件区运行的通用工具。我们通过构建文件系统Visualizer,文件访问检查器,通用查询接口,若干标准UNIX壳牌工具的描述导向的变量以及(循环)一个简单的森林描述推理引擎来说明这一基础架构的实用程序。最后,我们将森林的核心片段正规化在古典树逻辑的启发中,并证明圆形绊倒法律表明装载和存储功能的行为明智。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号