Article thumbnail
Location of Repository

Specifying Input/Output by Enumeration

By Walter W. Wilson and Yu Lei

Abstract

Input/output is awkward in declarative languages [2]. Some functional languages like LISP have procedural read and write operations. Prolog has ugly read and write "predicates " that execute in sequence. Haskell monads provide pure functional I/O but still involve a sequence of actions. A logic programming language called "axiomatic language " [3,4] has a different approach that may be more declarative. Axiomatic language is intended as a way to specify the behavior of a program as seen by an external observer. It is based on the idea that any function or program-- even an interactive program-- can be specified by a static infinite set of symbolic expressions that enumerate all possible inputs-- or sequences of inputs-- and the corresponding outputs. For a batch program that reads an input file and writes an output file, these expressions could have the following form, (Program <name> <input> <output>) where <name> is the symbolic name of the program and <input> and <output> are symbolic expressions for files. These expressions would be generated for all possible input files and the corresponding output files. In this writeup a symbolic expression is defined as a symbol, a character in single quotes, or a sequence of symbolic expressions separated by blanks and enclosed in parentheses. We also use a character string in double quotes to represent a sequence of characters. Consider, for example, a program that reads an input text file and writes an output file consisting of the input lines in sorted order. This program could be defined by symbolic expressions such as the following

Year: 2012
OAI identifier: oai:CiteSeerX.psu:10.1.1.227.6709
Provided by: CiteSeerX
Download PDF:
Sorry, we are unable to provide the full text but you may find it at the following location(s):
  • http://citeseerx.ist.psu.edu/v... (external link)
  • http://csl.stanford.edu/%7Echr... (external link)
  • Suggested articles


    To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.