Is Data a Software?

1 коммент. | добавить комментарий
Сегодня инициировал, а затем полтора часа участвовал в дискуссии, смысл которой можно свести к вопросу "можно ли входные данные, обрабатываемые программой, также называть Software"?

По завершении дискуссии, нашел интересную статью Peter Suber, "What is Software?" Несколько цитат из глав 9 и 11:

To compile a program written in a high level language, it must be treated as data by another program, the compiler. It must passively be worked upon, so that later it may actively do work. Without this step, the programmer might as well have spoken in English. Programs written originally in the binary code readable by the machine do not require this translation, and hence need not be treated as data. But virtually all programs written today are written in higher level languages.
Apart from this critical step in the very functioning of software, programs are treated as data for the purpose of copying (publishing) and transmitting them. Even if a program were originally written in machine language, chances are good that if we are using it, its code has once been treated as data by another program.

Software may essentially be pattern, but how is it to be distinguished from patterns that are used as data rather than software? How does it take the position of natura naturata and then natura naturans? This seems to be the central mystery. How can pattern be read as instructions? How can mere pattern rise from passivity to activity? Why isn't sheer syntactical pattern always inert, perpetually data and never software?
We can approach answers to these questions by saying that software is pattern in a controlling position, while the same pattern in a different position will be data (and the same pattern under different language conventions will be noise). But what is this "position"? The first thing to observe about it is that it is not part of the pattern. It is the use to which the pattern is put, or the relation between the software-pattern and other patterns that are currently functioning as data. In this, to assume the "controlling position" is similar to meeting the physical requirement of readability; it leaves the pattern unchanged and occurs independently of the syntactic and semantic content of the pattern.

It is this "position" or use of the software pattern that enables its binary code to be taken as code for instructions that are to be executed. The matter is simpler than it may appear. If we write down on one piece of paper directions for copying a page of text, and on another piece of paper directions for erasing or shredding a page of text, then we may give them to a stranger and ask that the top sheet be read and applied to the bottom sheet. It does not matter how they are shuffled; each can apply to the other as it can apply to itself. One is put in a controlling position if the "hardware" (here the stranger) reads one first and one second. Odysseus may command his men to tie him to the mast as his ship passes the island of sirens, and to ignore any commands to be released that he might issue. If his men obey this command, then it "poisons the well" for future commands and causes them to be interpreted as data. But the commands to be released are like the directions written to the stranger: fully satisfactory and "authoritative" as commands. Whether they function as commands or data is a matter of whether they are taken up earlier or later than other contenders.

Вкратце: data также является software. IEEE также считает данные подмножеством software.

Комментарии к методам

0 коммент. | добавить комментарий
Очень понравилась фраза из SQLite coding style; не могу удержаться, чтобы не скопировать сюда:

  1. Function header comment defines the behavior of the function in sufficient detail to allow the function to be reimplemented from scratch without reference to the original code.