
コンピュータプログラムとは、コンピュータが実行するためのプログラミング言語による一連の命令またはセット[a]である。これはソフトウェアの1つの構成要素であり、ソフトウェアにはドキュメントやその他の無形の構成要素も含まれる。[1]
人間が読める形式のコンピュータプログラムは、ソースコードと呼ばれます。コンピュータはネイティブのマシン命令しか実行できないため、ソースコードを実行するには別のコンピュータプログラムが必要です。したがって、ソースコードは、その言語用に書かれたコンパイラを使用してマシン命令に変換されます。(アセンブリ言語プログラムは、アセンブラを使用して変換されます。)結果として得られるファイルは実行可能ファイルと呼ばれます。または、ソースコードは、その言語用に書かれたインタープリタ内で実行されることもあります。[2]
実行可能ファイルの実行が要求されると、オペレーティングシステムはそれを メモリにロードし、プロセスを開始します。[3]中央処理装置はすぐにこのプロセスに切り替えて、各マシン命令をフェッチ、デコードし、実行できるようになります。[4]
ソースコードの実行が要求されると、オペレーティングシステムは対応するインタープリタをメモリにロードし、プロセスを開始します。インタープリタはソースコードをメモリにロードし、各ステートメントを翻訳して実行します。ソースコードの実行は実行可能ファイルの実行よりも遅くなります。[5] [b]さらに、インタープリタはコンピュータにインストールされている必要があります。
コンピュータプログラムの例
「Hello, World!」プログラムは、言語の基本構文を説明するために使用されます。BASIC (1964) 言語の構文は、言語を習得しやすくするために意図的に制限されています。[ 6 ]たとえば、変数は使用前に宣言されません。 [7]また、変数は自動的にゼロに初期化されます。[7]以下は、Basic で数値リストの平均を計算するコンピュータ プログラムの例です。 [8]
10 INPUT "平均を取る数値はいくつですか?" , A 20 FOR I = 1 TO A 30 INPUT "数値を入力してください:" , B 40 LET C = C + B 50 NEXT I 60 LET D = C / A 70 PRINT "平均は" , D 80 END
基本的なコンピュータプログラミングの仕組みを習得すると、より洗練された強力な言語を使って大規模なコンピュータシステムを構築できるようになります。[9]
歴史
ソフトウェア開発の改善は、コンピュータ ハードウェアの改善の結果です。ハードウェアの歴史の各段階で、コンピュータ プログラミングのタスクは劇的に変化しました。
解析エンジン

1837年、ジャカードの織機に触発されてチャールズ・バベッジは解析機関を作ろうとした。[10] 計算機の部品の名前は繊維産業から借りたものである。繊維産業では、糸は倉庫から運ばれ、製糸される。計算機には、それぞれ50桁の1000の数字を記憶する記憶装置があった。 [ 11]記憶装置の数字は処理のために工場に転送された。プログラミングは2組の穴あきカードを使って行われた。1組は操作を指示し、もう1組は変数を入力した。[10] [12]しかし、何千もの歯車とギアが完全に連携することはなかった。[13]
エイダ・ラブレスはチャールズ・バベッジの協力を得て、解析機関の解説書を作成した(1843年)。 [ 14]この解説書には、解析機関を使用してベルヌーイ数を計算する方法の詳細を記した注釈Gが含まれていた。この注釈は、歴史家によって世界初のコンピュータプログラムと認識されている。[13]
ユニバーサルチューリングマシン

1936年、アラン・チューリングは、あらゆる計算をモデル化できる理論上の装置である万能チューリングマシンを発表しました。 [15] これは、無限に長い読み取り/書き込みテープを持つ有限状態機械です。マシンはテープを前後に動かし、アルゴリズムを実行するときにその内容を変更します。マシンは初期状態から開始し、一連のステップを実行し、停止状態に遭遇すると停止します。[16]現在のすべてのコンピューターはチューリング完全です。[17]
エニアック

電子数値積分器およびコンピュータ(ENIAC)は、1943年7月から1945年秋にかけて製造された。これはチューリング完全な汎用コンピュータで、回路を作るのに17,468本の真空管を使った。中核部分は、一連のパスカリーンを配線したものだった。[18] 40台のユニットの重さは30トン、占有面積は1,800平方フィート(167 m 2 )で、アイドル時の電力消費は1940年代の貨幣価値で1時間あたり650ドルだった。 [18] 10進数のアキュムレータが20個あった。ENIACのプログラミングには2か月もかかった。[18] 3つの機能テーブルは車輪がついていて、固定された機能パネルまで転がす必要があった。機能テーブルは、太い黒いケーブルをプラグボードに差し込むことで機能パネルに接続されていた。各機能テーブルには728個の回転ノブがあった。 ENIACのプログラミングには、3,000個のスイッチのいくつかを設定することも含まれていました。プログラムのデバッグには1週間かかりました。[19] ENIACは1947年から1955年までアバディーン性能試験場で稼働し、水素爆弾のパラメータを計算し、気象パターンを予測し、大砲の照準を合わせるための射撃表を作成しました。[20]
プログラム内蔵型コンピュータ
プログラム内蔵型コンピュータは、コードを差し込んでスイッチを入れるのではなく、データをメモリにロードするのと同じように命令をメモリにロードします。 [21]その結果、コンピュータはすばやくプログラムでき、非常に高速に計算を実行できました。[22] プレスパー・エッカートとジョン・モークリーがENIACを製作しました。2人のエンジニアは、1944年2月付けの3ページのメモでプログラム内蔵型の概念を紹介しました。 [23]その後、1944年9月に、ジョン・フォン・ノイマンがENIACプロジェクトに取り組み始めました。 1945年6月30日、フォン・ノイマンはEDVACに関する報告書の第一稿を発表し、コンピュータの構造を人間の脳の構造と同一視しました。[22]この設計はフォン・ノイマン・アーキテクチャとして知られるようになりました。このアーキテクチャは、1949年にEDVACとEDSACコンピュータの構築に同時に採用されました。[24]
IBM System/360 (1964年)は、それぞれが同じ命令セットアーキテクチャを持つコンピュータのファミリーでした。モデル20は最も小型で最も安価でした。顧客は同じアプリケーションソフトウェアをアップグレードして保持することができました。[25]モデル195は最も高級でした。各System/360モデルは、マルチプログラミング[25] (メモリ内に複数のプロセスを同時に持つ)を特徴としていました。1つのプロセスが入出力を待っている間に、別のプロセスが計算を行うことができました。
IBMは各モデルをPL/1でプログラムすることを計画した。[26] COBOL、Fortran、ALGOLプログラマーを含む委員会が結成された。その目的は、包括的で使いやすく、拡張可能で、CobolとFortranに代わる言語を開発することだった。[26]その結果、コンパイルに長い時間を要する大規模で複雑な言語が生まれた。[27]

1970年代までに製造されたコンピュータには、手動でプログラミングするためのフロントパネルスイッチがありました。[28]コンピュータプログラムは参照用に紙に書かれていました。命令はオン/オフ設定の構成で表されていました。構成を設定した後、実行ボタンを押しました。このプロセスが繰り返されました。コンピュータプログラムは、紙テープ、パンチカード、または磁気テープを介して自動的に入力されました。媒体がロードされた後、スイッチを介して開始アドレスが設定され、実行ボタンが押されました。[28]
超大規模統合

ソフトウェア開発における大きなマイルストーンは、超大規模集積回路(VLSI)回路の発明(1964年)でした。 [29]第二次世界大戦後、真空管ベースの技術は、回路基板に搭載された点接触トランジスタ(1947年)とバイポーラ接合トランジスタ(1950年代後半)に置き換えられました。[ 29 ] 1960年代には、航空宇宙産業が回路基板を集積回路チップに置き換えました。[29]
フェアチャイルドセミコンダクター(1957年)とインテル(1968年)の共同創設者であるロバート・ノイスは、電界効果トランジスタの製造を改良する技術的改善を達成した(1963年)。[30]目標は、半導体接合部の電気抵抗率と伝導率を変更することです。まず、天然のケイ酸塩鉱物をシーメンス法を使用してポリシリコンロッドに変換します。[31]次に、チョクラルスキー法でロッドを単結晶シリコン、ブール結晶に変換します。[32]次に、結晶を薄くスライスしてウェハー基板を形成します。次に、フォトリソグラフィーのプレーナープロセスで、ユニポーラトランジスタ、コンデンサ、ダイオード、抵抗器をウェハー上に統合して、金属酸化物半導体(MOS)トランジスタのマトリックスを構築します。[33] [34] MOSトランジスタは、集積回路チップの主要コンポーネントです。[30]
もともと、集積回路チップは製造時に機能が設定されていました。1960年代には、電気の流れを制御することは、読み取り専用メモリ(ROM)のマトリックスをプログラミングすることに移行しました。マトリックスは、2次元のヒューズ配列に似ていました。[29]マトリックスに命令を埋め込むプロセスは、不要な接続を焼き切ることでした。[29]接続が非常に多かったため、ファームウェアプログラマーは、焼き切りを監視するために別のチップにコンピュータプログラムを書きました。 [29]この技術は、プログラマブルROMとして知られるようになりました。1971年、インテルはコンピュータプログラムをチップにインストールし、インテル4004マイクロプロセッサと名付けました。[35]

マイクロプロセッサと中央処理装置(CPU)という用語は現在では同じ意味で使用されています。しかし、CPUはマイクロプロセッサよりも古いものです。たとえば、IBM System/360 (1964年)には、セラミック基板上に個別の部品を搭載した回路基板で作られたCPUがありました。[36]
サクラメント州立大学 8008

Intel 4004(1971)は、ビジコン電卓を動作させるために設計された4ビットのマイクロプロセッサでした。発売から5か月後、Intelは8ビットのマイクロプロセッサであるIntel 8008を発売しました。ビル・ペンツはサクラメント州立大学のチームを率いて、 Intel 8008を使用した最初のマイクロコンピュータであるSac State 8008(1972)を構築しました。[37]その目的は、患者の医療記録を保存することでした。このコンピュータは、Memorexの3メガバイトのハードディスクドライブを実行するためにディスクオペレーティングシステムをサポートしていました。[29]カラーディスプレイとキーボードが1つのコンソールにパッケージ化されていました。ディスクオペレーティングシステムは、IBMのBasic Assembly Language(BAL)を使用してプログラムされていました。医療記録アプリケーションは、BASICインタープリタを使用してプログラムされていました。[29]しかし、このコンピュータは非常に高価であったため、進化の行き止まりでした。また、特定の目的のために公立大学の研究室で構築されました。[37]それにもかかわらず、このプロジェクトはIntel 8080(1974)命令セットの開発に貢献しました。[29]
x86 シリーズ
.png/500px-IBM_PC-IMG_7271_(transparent).png)
1978年、インテルがインテル8080をインテル8086にアップグレードした時に、現代のソフトウェア開発環境が始まりました。インテルはインテル8086を簡素化して、より安価なインテル8088を製造しました。[38] IBMは、パーソナルコンピュータ市場に参入した時(1981年)、インテル8088を採用しました。パーソナルコンピュータに対する消費者の需要が高まるにつれて、インテルのマイクロプロセッサ開発も増加しました。開発の連続はx86シリーズとして知られています。x86アセンブリ言語は、下位互換性のある機械命令のファミリーです。以前のマイクロプロセッサで作成された機械命令は、マイクロプロセッサのアップグレードを通じて保持されました。これにより、消費者は新しいアプリケーションソフトウェアを購入することなく、新しいコンピュータを購入することができました。命令の主なカテゴリは次のとおりです。[c]
- ランダム アクセス メモリ内の数値と文字列を設定およびアクセスするためのメモリ命令。
- 整数に対して基本的な算術演算を実行する整数算術論理ユニット(ALU) 命令。
- 実数に対して基本的な算術演算を実行する浮動小数点 ALU 命令。
- メモリを割り当て、関数とインターフェースするために必要なワードをプッシュおよびポップするためのスタック命令を呼び出します。
- 単一命令複数データ(SIMD)命令[d]は、複数のプロセッサがデータの配列に対して同じアルゴリズムを実行する場合に速度を向上させます。
プログラミング環境の変化

VLSI 回路により、プログラミング環境はコンピュータ端末(1990 年代まで)からグラフィカル ユーザー インターフェイス(GUI) コンピュータへと進化しました。コンピュータ端末では、プログラマーはコマンド ライン環境で実行される1 つのシェルしか使用できませんでした。1970 年代には、テキスト ベースのユーザー インターフェイスを通じて、フルスクリーンのソース コード編集が可能になりました。使用可能なテクノロジに関係なく、目標はプログラミング言語でプログラムすることです。
プログラミングパラダイムと言語
プログラミング言語の機能は、プログラミングの理想を表現するために組み合わせられる構成要素を提供するために存在します。[39]理想的には、プログラミング言語は次のようになります。[39]
- アイデアをコード内で直接表現します。
- 独立した考えを独立して表現する。
- アイデア間の関係をコード内で直接表現します。
- アイデアを自由に組み合わせます。
- 組み合わせが意味を成す場合にのみアイデアを組み合わせます。
- 単純な考えを単純に表現する。
これらの構成要素を提供するプログラミング言語のプログラミングスタイルは、プログラミングパラダイムに分類することができます。[ 40 ]例えば、異なるパラダイムは次のような違いを生む可能性があります。[40]
これらのプログラミングスタイルはそれぞれ異なるプログラミング言語の統合に貢献してきました。[40]
プログラミング言語は、プログラマがコンピュータに指示を伝えるためのキーワード、シンボル、識別子、ルールの集合です。 [41]これらは構文と呼ばれる一連のルールに従います。[41]
- キーワードは宣言や文を形成するための予約語です。
- シンボルは、演算、代入、制御フロー、および区切り文字を形成する文字です。
- 識別子は、定数、変数名、構造体名、関数名を形成するためにプログラマーによって作成される単語です。
- 構文規則はバッカス・ナウア形式で定義されます。
プログラミング言語は形式言語から基礎を得ています。[42]形式言語でソリューションを定義する目的は、根本的な問題を解決するためのアルゴリズムを生成することです。[42]アルゴリズムは、問題を解決するための一連の単純な命令です。[43]
プログラミング言語の世代

プログラミング言語の進化は、EDSAC (1949)がフォン・ノイマン・アーキテクチャで最初のコンピュータプログラム格納装置を使用したときに始まりました。[44] EDSACのプログラミングは、プログラミング言語の第一世代でした。
- プログラミング言語の第一世代は機械語である。[45] 機械語では、プログラマーは機械コードと呼ばれる命令番号を使用して命令を入力する必要がある。例えば、PDP -11のADD演算の命令番号は24576である。[46]
- プログラミング言語の第2世代はアセンブリ言語です。[45] アセンブリ言語を使用すると、プログラマは命令番号を覚える代わりにニーモニック 命令を使用できます。アセンブラは、各アセンブリ言語ニーモニックをそのマシン語番号に変換します。たとえば、PDP-11では、演算24576はソースコード内でADDとして参照できます。[46] 4つの基本的な算術演算には、ADD、SUB、MUL、DIVなどのアセンブリ命令があります。[46]コンピューターには、メモリセルを予約するためのDW(Define Word)などの命令もあります。次に、MOV命令を使用して、レジスタとメモリ間で整数をコピーできます。
- 第三世代のプログラミング言語では、コンパイラとインタープリタを使用してコンピュータプログラムを実行します。第三世代言語の特徴は、特定のハードウェアに依存しないことです。[49]初期の言語には、 Fortran(1958)、COBOL(1959)、ALGOL(1960)、BASIC(1964)などがあります。[45] 1973年に、効率的な機械語命令を生成する高級言語としてCプログラミング言語が登場しました。 [50]第三世代言語は歴史的にステートメントごとに多くの機械語命令を生成しましたが、 [51] Cには単一の機械語命令を生成するステートメントがあります。[e]さらに、最適化コンパイラはプログラマーを無効にし、ステートメントよりも少ない機械語命令を生成する場合があります。今日、命令型の第三世代の範囲には、言語のパラダイム全体が存在します。
- 第4世代のプログラミング言語は、プログラミング文をどのように構築するかではなく、どのような出力結果が望まれるかに重点を置いています。 [45] 宣言型言語は副作用を制限し、プログラマが比較的エラーの少ないコードを書けるようにしています。[45]人気のある第4世代言語の1つは、構造化照会言語(SQL)と呼ばれています。[45] データベース開発者は、データベースレコードを1つずつ処理する必要がなくなりました。また、単純な文で、どのように取得されるかを理解することなく、出力レコードを生成できます。
命令型言語

命令型言語は宣言、式、文を使って順次アルゴリズムを指定する。[52]
- 宣言はコンピュータプログラムに変数名を導入し、それをデータ型に割り当てます[53] – 例えば:
var x: integer; - 式は値を生成します。例:
2 + 24 を生成します - ステートメントは、変数に式を割り当てたり、変数の値を使用してプログラムの制御フローを変更したりすることがあります。たとえば、次のようになります。
x := 2 + 2; if x = 4 then do_something();
フォートラン
FORTRAN (1958) は、「IBM 数学式変換システム」として発表されました。文字列処理機能のない科学計算用に設計されました。宣言、式、ステートメントとともに、次の機能をサポートしました。
成功した理由は次のとおりです。
- プログラミングとデバッグのコストはコンピュータのランニングコストを下回りました。
- IBM によってサポートされました。
- 当時の応用は科学的なものでした。[54]
しかし、IBM以外のベンダーもFortranコンパイラを作成したが、その構文はIBMのコンパイラではおそらく失敗するものであった。[54]米国規格協会( ANSI )は1966年に最初のFortran標準を策定した。1978年にFortran 77が標準となり、1991年まで使用された。Fortran 90は以下をサポートする。
コボル
COBOL (1959) は「COmmon Business Oriented Language」の略です。Fortran はシンボルを操作しました。シンボルは数字である必要がないことがすぐに認識されたため、文字列が導入されました。[55]米国国防総省はCOBOL の開発に影響を与え、グレース・ホッパーが主な貢献者でした。ステートメントは英語に似ており、冗長でした。目標は、管理者がプログラムを読めるような言語を設計することでした。しかし、構造化されたステートメントが不足していたため、この目標は達成できませんでした。[56]
COBOLの開発は厳しく管理されていたため、ANSI標準を必要とする方言は出現しませんでした。その結果、1974年まで15年間変更されませんでした。1990年代のバージョンでは、オブジェクト指向プログラミングなどの重要な変更が行われました。[56]
アルゴル
ALGOL (1960) は「ALGOrithmic Language」の略です。プログラミング言語の設計に大きな影響を与えました。[57]ヨーロッパとアメリカのプログラミング言語の専門家の委員会から生まれたこの言語は、標準的な数学表記法を使用し、読みやすく構造化された設計でした。Algol は、Backus-Naur 形式を使用して構文を定義した最初の言語でした。[57]これにより、構文指向のコンパイラが生まれました。次のような機能が追加されました。
Algolの直接の子孫には、ある系統ではPascal、Modula-2、Ada、Delphi、Oberonが含まれます。別の系統では、子孫にはC、C++、Javaが含まれます。[57]
基本
BASIC (1964) は「初心者向け汎用シンボリック命令コード」の略です。ダートマス大学ですべての学生が学習できるように開発されました。[8]学生がより強力な言語に進まなかったとしても、Basic は記憶に残ります。[8] Basic インタープリタは、1970 年代後半に製造されたマイクロコンピュータにインストールされました。マイクロコンピュータ産業が成長するにつれて、言語も成長しました。[8]
Basicは対話型セッションの先駆者でした。[8]その環境内でオペレーティングシステムのコマンドを提供しました。
- 「new」コマンドにより空のスレートが作成されました。
- ステートメントはすぐに評価されます。
- 文の前に行番号を付けることでプログラムすることができます。[f]
- 「list」コマンドはプログラムを表示しました。
- 「run」コマンドはプログラムを実行しました。
しかし、Basicの構文は大規模なプログラムには単純すぎました。[8]最近の言語方言では、構造とオブジェクト指向の拡張機能が追加されました。Microsoftの Visual Basicは現在でも広く使用されており、グラフィカルユーザーインターフェイスを生成します。[7]
C
C プログラミング言語(1973) は、 BCPL言語がBに置き換えられ、AT&T ベル研究所が次のバージョンを「C」と呼んだことからその名前が付けられました。その目的は、UNIX オペレーティングシステムを作成することでした。[50] C は比較的小さな言語であるため、コンパイラの作成が容易です。その成長は、1980 年代のハードウェアの成長を反映しています。[50]また、アセンブリ言語の機能を備えながら、高水準の構文を使用しているため、成長しました。次のような高度な機能が追加されました。
- インラインアセンブラ。
- ポインタ上の演算。
- 関数へのポインタ。
- ビット操作。
- 複雑な演算子を自由に組み合わせる。[50]

C では、プログラマーがメモリ データのどの領域を保存するかを制御できます。グローバル変数と静的変数は、保存に必要なクロック サイクルが最も少なくなります。標準変数宣言にはスタックが自動的に使用されます。ヒープメモリは、関数からポインター変数に返されます。
malloc()
- グローバルおよび静的データ領域は、プログラム領域のすぐ上にあります。(プログラム領域は技術的にはテキスト領域と呼ばれます。マシン命令が格納される場所です。)
- グローバルデータ領域と静的データ領域は、技術的には2つの領域です。[58] 1つの領域は初期化データセグメントと呼ばれ、デフォルト値で宣言された変数が格納されます。もう1つの領域はセグメントによって開始されるブロックと呼ばれ、デフォルト値なしで宣言された変数が格納されます。
- グローバルおよび静的データ領域に格納される変数のアドレスはコンパイル時に設定されます。その値はプロセスの存続期間中保持されます。
- グローバルおよび静的領域には、関数の上(外部)で宣言されたグローバル変数
main()が格納されます。[59]main()グローバル変数は、ソースコード内の他のすべての関数から参照できます。
- グローバルおよび静的領域には、関数の上(外部)で宣言されたグローバル変数
- 一方、関数内
main()、他の関数内、または{}ブロック区切り文字内の変数宣言はローカル変数です。ローカル変数には、仮パラメータ変数も含まれます。パラメータ変数は関数定義の括弧内に囲まれます。[60]パラメータは関数へのインターフェースを提供します。
- プレフィックスを使用して宣言されたローカル変数も、グローバルおよび静的データ
static領域に格納されます。[58]グローバル変数とは異なり、静的変数は関数またはブロック内でのみ可視です。静的変数は常に値を保持します。使用例としては、関数[g]があります。int increment_counter(){static int counter = 0; counter++; return counter;}
- プレフィックスを使用して宣言されたローカル変数も、グローバルおよび静的データ
- スタック領域は、最上位のメモリアドレスの近くにある連続したメモリブロックです。[61]スタックに配置された変数は、上から下に向かって設定されます。[h] [61]スタックポインタは、最後に設定されたメモリアドレスを追跡する特別な目的のレジスタです。 [61]変数は、アセンブリ言語のPUSH命令によってスタックに配置されます。したがって、これらの変数のアドレスは実行時に設定されます。スタック変数のスコープが失われる方法は、POP命令を使用することです。
- プレフィックスなしで宣言されたローカル変数
static(仮パラメータ変数を含む)[62]は自動変数[59]と呼ばれ、スタックに格納されます。[58]これらは関数またはブロック内で可視であり、関数またはブロックを終了するとスコープを失います。
- プレフィックスなしで宣言されたローカル変数
- ヒープ領域はスタックの下にあります。[58]下から上に向かってデータが配置されます。オペレーティングシステムは、ヒープポインタと割り当てられたメモリブロックのリストを使用してヒープを管理します。 [63]スタックと同様に、ヒープ変数のアドレスは実行時に設定されます。ヒープポインタとスタックポインタが出会うと、メモリ不足エラーが発生します。
- Cはヒープメモリを割り当てる
malloc()ためのライブラリ関数を提供します。[i] [64]ヒープにデータを格納するのは追加のコピー関数です。[j]ヒープに格納された変数は、ポインタを使用して関数に効率的に渡されます。ポインタがなければ、データブロック全体をスタック経由で関数に渡す必要があります。
- Cはヒープメモリを割り当てる
C++
1970 年代、ソフトウェア エンジニアは、大規模なプロジェクトをモジュールに分割するための言語サポートを必要としていました。[65] 1 つの明らかな機能は、大規模なプロジェクトを物理的に個別のファイルに分解することでした。あまり明らかではない機能は、大規模なプロジェクトを論理的に抽象データ型に分解することでした。 [65]当時、言語は整数、浮動小数点数、文字列などの具体的な (スカラー)データ型をサポートしていました。抽象データ型は、具体的なデータ型の構造であり、新しい名前が付けられています。たとえば、整数のリストは と呼ばれます。
integer_list
オブジェクト指向の専門用語では、抽象データ型はクラスと呼ばれます。しかし、クラスは定義に過ぎず、メモリは割り当てられません。クラスにメモリが割り当てられ、識別子にバインドされると、それはオブジェクトと呼ばれます。[66]
オブジェクト指向命令型言語は、クラスの必要性と安全な関数型プログラミングの必要性を組み合わせて開発されました。[67]オブジェクト指向言語では、関数はクラスに割り当てられます。割り当てられた関数は、メソッド、メンバー関数、または操作と呼ばれます。オブジェクト指向プログラミングは、オブジェクトに対して操作を実行します。[68]
オブジェクト指向言語は、サブセット/スーパーセット関係をモデル化する構文をサポートしています。集合論では、サブセットの要素はスーパーセットに含まれるすべての属性を継承します。たとえば、学生は人です。したがって、学生の集合は人の集合のサブセットです。結果として、学生はすべての人に共通するすべての属性を継承します。さらに、学生は他の人にはない独自の属性を持っています。オブジェクト指向言語は、継承を使用してサブセット/スーパーセット関係をモデル化します。[69]オブジェクト指向プログラミングは、 1990年代後半までに主要な言語パラダイムになりました。[65]
C++(1985)はもともと「C with Classes」と呼ばれていました。[70] Simula言語のオブジェクト指向機能を追加することでCの機能を拡張するように設計されました。[71]
オブジェクト指向モジュールは 2 つのファイルで構成されます。定義ファイルはヘッダー ファイルと呼ばれます。以下は、単純な学校アプリケーションの GRADE クラスのC++ヘッダー ファイルです。
// グレード.h
// -------
// 複数のソース ファイルが重複エラーなしでこのヘッダー ファイル
をインクルードできるようにするために使用されます。 // ----------------------------------------------
#ifndef GRADE_H
#define GRADE_H
class GRADE { public : // これはコンストラクター操作です。// ---------------------------------- GRADE ( const char letter );
// これはクラス変数です。
// ------------------------- char letter ;
// これはメンバー操作です。
// --------------------------- int grade_numeric ( const char letter );
// これはクラス変数です。
// ------------------------- int numeric ; }; #endif
コンストラクタ操作はクラス名と同じ名前を持つ関数です。[72]呼び出し操作がnewステートメントを実行するときに実行されます。
モジュールのもう 1 つのファイルはソース ファイルです。以下は、単純な学校アプリケーションの GRADE クラスの C++ ソース ファイルです。
// grade.cpp
// ---------
#include "grade.h"
GRADE :: GRADE ( const char letter ) { // キーワード 'this' を使用してオブジェクトを参照します。// ------------------------------------------------ this -> letter = letter ;
// これは時間的凝集性です
// ------------------------- this -> numeric = grade_numeric ( letter ); }
int GRADE :: grade_numeric ( const char letter ) { if ( ( letter == 'A' || letter == 'a' ) ) 4を返します。else if ( ( letter == 'B' || letter == 'b' ) ) 3を返します。else if ( ( letter == 'C' || letter == ' c' ) ) 2を返します。else if ( ( letter == 'D' || letter == 'd' ) ) 1を返します。else if ( ( letter == 'F' || letter == ' f' ) ) 0を返します。else -1を返します。}
以下は、単純な学校アプリケーションの PERSON クラスのC++ヘッダー ファイルです。
// person.h
// --------
#ifndef PERSON_H
#define PERSON_H
クラスPERSON { public : PERSON ( const char * name ); const char * name ; }; #endif
以下は、簡単な学校アプリケーションの PERSON クラスのC++ソース ファイルです。
// person.cpp
// ----------
#include "person.h"
PERSON :: PERSON ( const char * name ) { this -> name = name ; }
以下は、単純な学校アプリケーションの STUDENT クラスのC++ヘッダー ファイルです。
// student.h
// ---------
#ifndef STUDENT_H
#define STUDENT_H
#include "person.h" #include "grade.h"
// STUDENT は PERSON のサブセットです。
// --------------------------------
class STUDENT : public PERSON { public : STUDENT ( const char * name ); GRADE * grade ; }; #endif
以下は、簡単な学校アプリケーションの STUDENT クラスのC++ソース ファイルです。
// student.cpp
// -----------
#include "student.h" #include "person.h"
STUDENT :: STUDENT ( const char * name ) : // PERSON スーパークラスのコンストラクターを実行します。// ------------------------------------------------- PERSON ( name ) { // 他に何もすることはありません。// ------------------- }
デモ用のドライバー プログラムは次のとおりです。
// student_dvr.cpp
// ---------------
#include <iostream> #include "student.h"
int main ( void ) { STUDENT * student = new STUDENT ( "The Student" ); student -> grade = new GRADE ( 'a' );
std :: cout
// 学生が PERSON の名前を継承していることに注意してください<< student -> name << ": Numeric grade = " << student -> grade -> numeric << " \n " ; return 0 ; }
すべてをコンパイルするためのmakefileは次のとおりです。
# メイクファイル
# --------
すべて: student_dvr
クリーン:
rm student_dvr *.o
student_dvr : student_dvr . cpp grade . o student . o person . o c++ student_dvr.cpp grade.o student.o person.o -o student_dvr
grade.o : grade.cpp grade.h c ++ -c grade.cpp
学生.o :学生.cpp学生.h c ++ -c学生.cpp
person.o : person.cpp person.h c ++ -c person.cpp
宣言型言語
命令型言語には、非ローカル変数に式を代入すると、意図しない副作用が生じる可能性があるという大きな批判が1つあります。 [73] 宣言型言語では、通常、代入文と制御フローが省略されます。宣言型言語では、どのような計算を実行するべきかが記述されますが、どのように計算するかは記述されません。宣言型言語には、関数型言語と論理型言語という2つの大きなカテゴリがあります。
関数型言語の原理は、ラムダ計算を明確な意味のガイドとして使用することである。[74]数学において、関数とは式の要素を値の範囲にマッピングする規則である。次の関数を考えてみよう。
times_10(x) = 10 * x
式は 10 * x関数によって値times_10()の範囲にマッピングされます。 1 つの値は 20 です。 これは x が 2 のときに発生します。 したがって、関数の適用は数学的に次のように記述されます。
times_10(2) = 20
関数型言語コンパイラは、この値を変数に格納しません。代わりに、プログラムカウンタを呼び出し関数に戻す前に、値をコンピュータのスタックにプッシュします。その後、呼び出し関数はスタックから値をポップします。 [75]
命令型言語は関数をサポートしています。したがって、プログラマが規律を守れば、命令型言語でも関数型プログラミングを実現できます。しかし、関数型言語は構文を通じてプログラマにこの規律を強制します。関数型言語は、何をするかを強調するように調整された構文を持っています。[ 76]
関数型プログラムは、一連の基本関数とそれに続く単一のドライバー関数で開発されます。[73]次のスニペットを検討してください。
function max( a, b ){/* code omitted */}
function min( a, b ){/* code omitted */}
function range( a, b, c ) {
return max( a, max( b, c ) ) - min( a, min( b, c ) );
}
プリミティブはmax()とですmin()。ドライバ関数は ですrange()。実行中:
put( range( 10, 4, 7) );6 を出力します。
関数型言語は、コンピュータサイエンスの研究において、新しい言語機能を探求するために使用されます。 [77]さらに、副作用がないため、並列プログラミングや並行プログラミングで人気があります。[78]しかし、アプリケーション開発者は、命令型言語のオブジェクト指向機能を好みます。[78]
リスプ
Lisp (1958) は「LISt Processor」の略です。[79]リストを処理するために調整されています。リストのリストを構築することで、データの完全な構造が形成されます。メモリ内には、ツリーデータ構造が構築されます。内部的には、ツリー構造は再帰関数に適しています。[80]ツリーを構築するための構文は、スペースで区切られた要素を括弧で囲むことです。以下は、 3つの要素のリストです。最初の2つの要素は、それ自体が2つの要素のリストです。
((A B) (HELLO WORLD) 94)
Lispには要素を抽出して再構築する関数があります。[81]関数はhead()リストの最初の要素を含むリストを返します。 関数はtail()最初の要素以外のすべてを含むリストを返します。 関数はcons()他のリストを連結したリストを返します。したがって、次の式はリストを返しますx。
cons(head(x), tail(x))
Lispの欠点の1つは、多くの関数がネストされている場合、括弧がわかりにくくなることです。[76]現代のLisp環境では、括弧の一致が保証されます。余談ですが、Lispは代入文とgotoループの命令型言語操作をサポートしています。 [82]また、Lispはコンパイル時に要素のデータ型を気にしません。 [83]代わりに、実行時にデータ型を割り当てます(再割り当てする場合もあります) 。実行時にデータ型を割り当てることを動的バインディングと呼びます。[84]動的バインディングは言語の柔軟性を高めますが、プログラミングエラーがソフトウェア開発プロセスの後半まで残る可能性があります。[84]
大規模で信頼性が高く、読みやすいLispプログラムを書くには、事前の検討が必要です。適切に計画すれば、同等の命令型言語プログラムよりもはるかに短いプログラムを作成できます。[76] Lispは人工知能で広く使用されています。しかし、その使用が受け入れられているのは、命令型言語操作があり、意図しない副作用が発生する可能性があるためです。[78]
ML
ML(1973)[85]は「メタ言語」の略です。MLは、同じタイプのデータのみが互いに比較されることを確認します。[86]たとえば、この関数には1つの入力パラメータ(整数)があり、整数を返します。
楽しい times_10 ( n : int ) : int = 10 * n ;
ML はLispのように括弧にこだわりません。以下は の応用例ですtimes_10()。
10 2回
「20 : int」を返します。(結果とデータ型の両方が返されます。)
Lispと同様に、ML はリストを処理するように調整されています。Lispとは異なり、各要素は同じデータ型です。[87]さらに、ML はコンパイル時に要素のデータ型を割り当てます。コンパイル時にデータ型を割り当てることを静的バインディングと呼びます。静的バインディングでは、コンパイラが変数が使用される前にそのコンテキストをチェックするため、信頼性が向上します。[88]
プロローグ
Prolog (1972) は「PROgramming in LOGic」の略で、形式論理に基づいた論理プログラミング言語です。この言語はフランスのマルセイユでアラン・コルメローとフィリップ・ルーセルによって開発されました。これは、エディンバラ大学のロバート・コワルスキーらが開発した選択的線形定節解決の実装です。[89]
Prolog プログラムの構成要素は事実とルールです。簡単な例を次に示します。
猫(トム)。 % トムは猫です。
ネズミ(ジェリー)。 % ジェリーはネズミです。
動物( X ) :- 猫( X ). % それぞれの猫は動物です
動物( X ) :- ネズミ( X ). % それぞれのネズミは動物です
大きい( X ) :- 猫( X ). % それぞれの猫は大きい
小さい( X ) :- ネズミ( X ). % それぞれのネズミは小さい
食べる( X , Y ) :- マウス( X )、 チーズ( Y )。 % 各マウスは各チーズを食べます
。食べる( X , Y ) :- 大きい( X )、 小さい( Y )。 % 各大きい動物は各小さい動物を食べます。
すべての事実とルールを入力したら、次のような質問をすることができます。
- トムはジェリーを食べるでしょうか?
?- 食べる(トム、ジェリー)。
本当
次の例は、Prolog が文字の等級を数値に変換する方法を示しています。
numeric_grade ( 'A' , 4 )
。numeric_grade ( 'B' , 3 )
。numeric_grade ( 'C' , 2 )
。numeric_grade ( 'D' , 1 )
。numeric_grade ( 'F' , 0 )
。numeric_grade ( X , - 1 ) :- X = 'A'ではない 、X = 'B'ではない、X = 'C'ではない、X = 'D'ではない、X = 'F'ではない。grade ( 'The Student' , ' A' )。
?- grade ( '学生' , X )、 numeric_grade ( X , Y )。X
= ' A' 、
Y = 4
包括的な例を以下に示します。[90]
1) すべてのドラゴンは火を噴きます。あるいは、同じ意味で、物がドラゴンであれば火を噴きます。
billows_fire ( X ) :-
is_a_dragon ( X ) です。
2) 親の 1 体が火を噴く場合、クリーチャーも火を噴きます。
billows_fire ( X ) :-
is_a_creature ( X )、
is_a_parent_of ( Y 、X )、
billows_fire ( Y )。
3) X が Y の母であるか、X が Y の父である場合、X は Y の親です。
is_a_parent_of ( X , Y ):- is_the_mother_of ( X , Y )
。is_a_parent_of ( X , Y ):- is_the_father_of ( X , Y )。
4) あるものがドラゴンであれば、それは生き物です。
is_a_creature ( X ) :-
is_a_dragon ( X ) です。
5) ノルベルタはドラゴンで、パフは生き物です。ノルベルタはパフの母親です。
ドラゴンである( norberta )。
生き物である( puff )。
母である( norberta 、 puff )。
ルール(2)は再帰的(帰納的)定義です。どのように実行されるかを理解する必要なく、宣言的に理解できます。
規則(3)は、関数が関係を使用してどのように表現されるかを示しています。ここで、母関数と父関数は、すべての個体が1人の母親と1人の父親だけを持つことを保証します。
Prologは型付けされていない言語です。しかし、継承は述語を使って表現することができます。ルール(4)は、クリーチャーがドラゴンのスーパークラスであることを主張しています。
質問には逆推論を使用して回答します。次の質問が与えられます:
?- billows_fire ( X ) 。
Prolog は 2 つの回答を生成します。
X = ノルベルタ
X = パフ
Prolog の実際の応用としては、人工知能における知識表現と問題解決があります。
オブジェクト指向プログラミング
オブジェクト指向プログラミングは、オブジェクトに対して操作(関数)を実行するプログラミング手法である。[91]基本的な考え方は、現象の特性をオブジェクトコンテナにグループ化し、コンテナに名前を付けることである。現象に対する操作もコンテナにグループ化される。[91]オブジェクト指向プログラミングは、コンテナの必要性と安全な関数型プログラミングの必要性を組み合わせて開発された。[92]このプログラミング手法は、オブジェクト指向言語に限定される必要はない。[93]オブジェクト指向言語では、オブジェクトコンテナはクラスと呼ばれる。非オブジェクト指向言語では、データ構造(レコードとも呼ばれる)がオブジェクトコンテナになることがある。データ構造をオブジェクトコンテナにするには、その構造専用の操作を記述する必要がある。結果として得られる構造は抽象データ型と呼ばれる。[94]ただし、継承は行われない。それでも、この欠点は克服できる。
以下は、単純な学校アプリケーションの GRADE 抽象データ型のC プログラミング言語 ヘッダー ファイルです。
/* グレード.h */
/* ------- */
/* 複数のソースファイルが
重複エラーなしでこのヘッダーファイルをインクルードできるようにするために使用されます。 */
/* ---------------------------------------------- */
#ifndef GRADE_H
#define GRADE_H
typedef struct { char letter ; } GRADE ;
/* コンストラクタ */
/* ----------- */
GRADE * grade_new ( char letter );
int grade_numeric ( char letter ); #endif
この関数は、C++コンストラクターgrade_new()操作と同じアルゴリズムを実行します。
以下は、簡単な学校アプリケーションの GRADE 抽象データ型のC プログラミング言語ソース ファイルです。
/* grade.c */
/* ------- */
#include "grade.h"
GRADE * grade_new ( char letter ) { GRADE *グレード;
/* ヒープメモリを割り当てる */
/* -------------------- */ if ( ! ( grade = calloc ( 1 , sizeof ( GRADE ) ) ) ) { fprintf ( stderr , "ERROR in %s/%s/%d: calloc() returned empty. \n " , __FILE__ , __FUNCTION__ , __LINE__ ); exit ( 1 ); }
grade -> letter = letter ;グレードを返す; }
int grade_numeric( char letter )
{
if ( ( letter == 'A' || letter == 'a' ) )
return 4;
else
if ( ( letter == 'B' || letter == 'b' ) )
return 3;
else
if ( ( letter == 'C' || letter == 'c' ) )
return 2;
else
if ( ( letter == 'D' || letter == 'd' ) )
return 1;
else
if ( ( letter == 'F' || letter == 'f' ) )
return 0;
else
return -1;
}
In the constructor, the function calloc() is used instead of malloc() because each memory cell will be set to zero.
Here is a C programming language header file for the PERSON abstract datatype in a simple school application:
/* person.h */
/* -------- */
#ifndef PERSON_H
#define PERSON_H
typedef struct
{
char *name;
} PERSON;
/* Constructor */
/* ----------- */
PERSON *person_new( char *name );
#endif
Here is a C programming language source file for the PERSON abstract datatype in a simple school application:
/* person.c */
/* -------- */
#include "person.h"
PERSON *person_new( char *name )
{
PERSON *person;
if ( ! ( person = calloc( 1, sizeof ( PERSON ) ) ) )
{
fprintf(stderr,
"ERROR in %s/%s/%d: calloc() returned empty.\n",
__FILE__,
__FUNCTION__,
__LINE__ );
exit( 1 );
}
person->name = name;
return person;
}
Here is a C programming language header file for the STUDENT abstract datatype in a simple school application:
/* student.h */
/* --------- */
#ifndef STUDENT_H
#define STUDENT_H
#include "person.h"
#include "grade.h"
typedef struct
{
/* A STUDENT is a subset of PERSON. */
/* -------------------------------- */
PERSON *person;
GRADE *grade;
} STUDENT;
/* Constructor */
/* ----------- */
STUDENT *student_new( char *name );
#endif
Here is a C programming language source file for the STUDENT abstract datatype in a simple school application:
/* student.c */
/* --------- */
#include "student.h"
#include "person.h"
STUDENT *student_new( char *name )
{
STUDENT *student;
if ( ! ( student = calloc( 1, sizeof ( STUDENT ) ) ) )
{
fprintf(stderr,
"ERROR in %s/%s/%d: calloc() returned empty.\n",
__FILE__,
__FUNCTION__,
__LINE__ );
exit( 1 );
}
/* Execute the constructor of the PERSON superclass. */
/* ------------------------------------------------- */
student->person = person_new( name );
return student;
}
Here is a driver program for demonstration:
/* student_dvr.c */
/* ------------- */
#include <stdio.h>
#include "student.h"
int main( void )
{
STUDENT *student = student_new( "The Student" );
student->grade = grade_new( 'a' );
printf( "%s: Numeric grade = %d\n",
/* Whereas a subset exists, inheritance does not. */
student->person->name,
/* Functional programming is executing functions just-in-time (JIT) */
grade_numeric( student->grade->letter ) );
return 0;
}
Here is a makefile to compile everything:
# makefile
# --------
all: student_dvr
clean:
rm student_dvr *.o
student_dvr: student_dvr.c grade.o student.o person.o
gcc student_dvr.c grade.o student.o person.o -o student_dvr
grade.o: grade.c grade.h
gcc -c grade.c
student.o: student.c student.h
gcc -c student.c
person.o: person.c person.h
gcc -c person.c
The formal strategy to build object-oriented objects is to:[95]
- Identify the objects. Most likely these will be nouns.
- Identify each object's attributes. What helps to describe the object?
- Identify each object's actions. Most likely these will be verbs.
- Identify the relationships from object to object. Most likely these will be verbs.
For example:
- A person is a human identified by a name.
- A grade is an achievement identified by a letter.
- A student is a person who earns a grade.
Syntax and semantics

The syntax of a computer program is a list of production rules which form its grammar.[96] A programming language's grammar correctly places its declarations, expressions, and statements.[97] Complementing the syntax of a language are its semantics. The semantics describe the meanings attached to various syntactic constructs.[98] A syntactic construct may need a semantic description because a production rule may have an invalid interpretation.[99] Also, different languages might have the same syntax; however, their behaviors may be different.
The syntax of a language is formally described by listing the production rules. Whereas the syntax of a natural language is extremely complicated, a subset of the English language can have this production rule listing:[100]
- a sentence is made up of a noun-phrase followed by a verb-phrase;
- a noun-phrase is made up of an article followed by an adjective followed by a noun;
- a verb-phrase is made up of a verb followed by a noun-phrase;
- an article is 'the';
- an adjective is 'big' or
- an adjective is 'small';
- a noun is 'cat' or
- a noun is 'mouse';
- a verb is 'eats';
The words in bold-face are known as non-terminals. The words in 'single quotes' are known as terminals.[101]
From this production rule listing, complete sentences may be formed using a series of replacements.[102] The process is to replace non-terminals with either a valid non-terminal or a valid terminal. The replacement process repeats until only terminals remain. One valid sentence is:
- sentence
- noun-phrase verb-phrase
- article adjective noun verb-phrase
- the adjective noun verb-phrase
- the big noun verb-phrase
- the big cat verb-phrase
- the big cat verb noun-phrase
- the big cat eats noun-phrase
- the big cat eats article adjective noun
- the big cat eats the adjective noun
- the big cat eats the small noun
- the big cat eats the small mouse
However, another combination results in an invalid sentence:
- the small mouse eats the big cat
Therefore, a semantic is necessary to correctly describe the meaning of an eat activity.
One production rule listing method is called the Backus–Naur form (BNF).[103] BNF describes the syntax of a language and itself has a syntax. This recursive definition is an example of a meta-language.[98] The syntax of BNF includes:
::=which translates to is made up of a[n] when a non-terminal is to its right. It translates to is when a terminal is to its right.|which translates to or.<and>which surround non-terminals.
Using BNF, a subset of the English language can have this production rule listing:
<sentence> ::= <noun-phrase><verb-phrase>
<noun-phrase> ::= <article><adjective><noun>
<verb-phrase> ::= <verb><noun-phrase>
<article> ::= the
<adjective> ::= big | small
<noun> ::= cat | mouse
<verb> ::= eats
Using BNF, a signed-integer has the production rule listing:[104]
<signed-integer> ::= <sign><integer>
<sign> ::= + | -
<integer> ::= <digit> | <digit><integer>
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Notice the recursive production rule:
<integer> ::= <digit> | <digit><integer>
This allows for an infinite number of possibilities. Therefore, a semantic is necessary to describe a limitation of the number of digits.
Notice the leading zero possibility in the production rules:
<integer> ::= <digit> | <digit><integer>
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Therefore, a semantic is necessary to describe that leading zeros need to be ignored.
Two formal methods are available to describe semantics. They are denotational semantics and axiomatic semantics.[105]
Software engineering and computer programming
.jpg/500px-Two_women_operating_ENIAC_(full_resolution).jpg)
Software engineering is a variety of techniques to produce quality computer programs.[106] Computer programming is the process of writing or editing source code. In a formal environment, a systems analyst will gather information from managers about all the organization's processes to automate. This professional then prepares a detailed plan for the new or modified system.[107] The plan is analogous to an architect's blueprint.[107]
Performance objectives
The systems analyst has the objective to deliver the right information to the right person at the right time.[108] The critical factors to achieve this objective are:[108]
- The quality of the output. Is the output useful for decision-making?
- The accuracy of the output. Does it reflect the true situation?
- The format of the output. Is the output easily understood?
- The speed of the output. Time-sensitive information is important when communicating with the customer in real time.
Cost objectives
Achieving performance objectives should be balanced with all of the costs, including:[109]
- Development costs.
- Uniqueness costs. A reusable system may be expensive. However, it might be preferred over a limited-use system.
- Hardware costs.
- Operating costs.
Applying a systems development process will mitigate the axiom: the later in the process an error is detected, the more expensive it is to correct.[110]
Waterfall model
The waterfall model is an implementation of a systems development process.[111] As the waterfall label implies, the basic phases overlap each other:[112]
- The investigation phase is to understand the underlying problem.
- The analysis phase is to understand the possible solutions.
- The design phase is to plan the best solution.
- The implementation phase is to program the best solution.
- The maintenance phase lasts throughout the life of the system. Changes to the system after it is deployed may be necessary.[113] Faults may exist, including specification faults, design faults, or coding faults. Improvements may be necessary. Adaption may be necessary to react to a changing environment.
Computer programmer
A computer programmer is a specialist responsible for writing or modifying the source code to implement the detailed plan.[107] A programming team is likely to be needed because most systems are too large to be completed by a single programmer.[114] However, adding programmers to a project may not shorten the completion time. Instead, it may lower the quality of the system.[114] To be effective, program modules need to be defined and distributed to team members.[114] Also, team members must interact with one another in a meaningful and effective way.[114]
Computer programmers may be programming in the small: programming within a single module.[115] Chances are a module will execute modules located in other source code files. Therefore, computer programmers may be programming in the large: programming modules so they will effectively couple with each other.[115] Programming-in-the-large includes contributing to the application programming interface (API).
Program modules
Modular programming is a technique to refine imperative language programs. Refined programs may reduce the software size, separate responsibilities, and thereby mitigate software aging. A program module is a sequence of statements that are bounded within a block and together identified by a name.[116] Modules have a function, context, and logic:[117]
- The function of a module is what it does.
- The context of a module are the elements being performed upon.
- The logic of a module is how it performs the function.
The module's name should be derived first by its function, then by its context. Its logic should not be part of the name.[117] For example, function compute_square_root( x ) or function compute_square_root_integer( i : integer ) are appropriate module names. However, function compute_square_root_by_division( x ) is not.
The degree of interaction within a module is its level of cohesion.[117] Cohesion is a judgment of the relationship between a module's name and its function. The degree of interaction between modules is the level of coupling.[118] Coupling is a judgement of the relationship between a module's context and the elements being performed upon.
Cohesion
The levels of cohesion from worst to best are:[119]
- Coincidental Cohesion: A module has coincidental cohesion if it performs multiple functions, and the functions are completely unrelated. For example,
function read_sales_record_print_next_line_convert_to_float(). Coincidental cohesion occurs in practice if management enforces silly rules. For example, "Every module will have between 35 and 50 executable statements."[119] - Logical Cohesion: A module has logical cohesion if it has available a series of functions, but only one of them is executed. For example,
function perform_arithmetic( perform_addition, a, b ). - Temporal Cohesion: A module has temporal cohesion if it performs functions related to time. One example,
function initialize_variables_and_open_files(). Another example,stage_one(),stage_two(), ... - Procedural Cohesion: A module has procedural cohesion if it performs multiple loosely related functions. For example,
function read_part_number_update_employee_record(). - Communicational Cohesion: A module has communicational cohesion if it performs multiple closely related functions. For example,
function read_part_number_update_sales_record(). - Informational Cohesion: A module has informational cohesion if it performs multiple functions, but each function has its own entry and exit points. Moreover, the functions share the same data structure. Object-oriented classes work at this level.
- Functional Cohesion: a module has functional cohesion if it achieves a single goal working only on local variables. Moreover, it may be reusable in other contexts.
Coupling
The levels of coupling from worst to best are:[118]
- Content Coupling: A module has content coupling if it modifies a local variable of another function. COBOL used to do this with the alter verb.
- Common Coupling: A module has common coupling if it modifies a global variable.
- Control Coupling: A module has control coupling if another module can modify its control flow. For example,
perform_arithmetic( perform_addition, a, b ). Instead, control should be on the makeup of the returned object. - Stamp Coupling: A module has stamp coupling if an element of a data structure passed as a parameter is modified. Object-oriented classes work at this level.
- Data Coupling: A module has data coupling if all of its input parameters are needed and none of them are modified. Moreover, the result of the function is returned as a single object.
Data flow analysis

Data flow analysis is a design method used to achieve modules of functional cohesion and data coupling.[120] The input to the method is a data-flow diagram. A data-flow diagram is a set of ovals representing modules. Each module's name is displayed inside its oval. Modules may be at the executable level or the function level.
The diagram also has arrows connecting modules to each other. Arrows pointing into modules represent a set of inputs. Each module should have only one arrow pointing out from it to represent its single output object. (Optionally, an additional exception arrow points out.) A daisy chain of ovals will convey an entire algorithm. The input modules should start the diagram. The input modules should connect to the transform modules. The transform modules should connect to the output modules.[121]
Functional categories
.svg/500px-Operating_system_placement_(software).svg.png)
Computer programs may be categorized along functional lines. The main functional categories are application software and system software. System software includes the operating system, which couples computer hardware with application software.[122] The purpose of the operating system is to provide an environment where application software executes in a convenient and efficient manner.[122] Both application software and system software execute utility programs. At the hardware level, a microcode program controls the circuits throughout the central processing unit.
Application software
Application software is the key to unlocking the potential of the computer system.[123] Enterprise application software bundles accounting, personnel, customer, and vendor applications. Examples include enterprise resource planning, customer relationship management, and supply chain management software.
Enterprise applications may be developed in-house as a one-of-a-kind proprietary software.[124] Alternatively, they may be purchased as off-the-shelf software. Purchased software may be modified to provide custom software. If the application is customized, then either the company's resources are used or the resources are outsourced. Outsourced software development may be from the original software vendor or a third-party developer.[125]
The potential advantages of in-house software are features and reports may be developed exactly to specification.[126] Management may also be involved in the development process and offer a level of control.[127] Management may decide to counteract a competitor's new initiative or implement a customer or vendor requirement.[128] A merger or acquisition may necessitate enterprise software changes. The potential disadvantages of in-house software are time and resource costs may be extensive.[124] Furthermore, risks concerning features and performance may be looming.
The potential advantages of off-the-shelf software are upfront costs are identifiable, the basic needs should be fulfilled, and its performance and reliability have a track record.[124] The potential disadvantages of off-the-shelf software are it may have unnecessary features that confuse end users, it may lack features the enterprise needs, and the data flow may not match the enterprise's work processes.[124]
One approach to economically obtaining a customized enterprise application is through an application service provider.[129] Specialty companies provide hardware, custom software, and end-user support. They may speed the development of new applications because they possess skilled information system staff. The biggest advantage is it frees in-house resources from staffing and managing complex computer projects.[129] Many application service providers target small, fast-growing companies with limited information system resources.[129] On the other hand, larger companies with major systems will likely have their technical infrastructure in place. One risk is having to trust an external organization with sensitive information. Another risk is having to trust the provider's infrastructure reliability.[129]
Operating system

Scheduling, Preemption, Context Switching
An operating system is the low-level software that supports a computer's basic functions, such as scheduling processes and controlling peripherals.[122]
In the 1950s, the programmer, who was also the operator, would write a program and run it. After the program finished executing, the output may have been printed, or it may have been punched onto paper tape or cards for later processing.[28] More often than not the program did not work. The programmer then looked at the console lights and fiddled with the console switches. If less fortunate, a memory printout was made for further study. In the 1960s, programmers reduced the amount of wasted time by automating the operator's job. A program called an operating system was kept in the computer at all times.[130]
The term operating system may refer to two levels of software.[131] The operating system may refer to the kernel program that manages the processes, memory, and devices. More broadly, the operating system may refer to the entire package of the central software. The package includes a kernel program, command-line interpreter, graphical user interface, utility programs, and editor.[131]
Kernel Program

The kernel's main purpose is to manage the limited resources of a computer:
- The kernel program should perform process scheduling,[132] which is also known as a context switch. The kernel creates a process control block when a computer program is selected for execution. However, an executing program gets exclusive access to the central processing unit only for a time slice. To provide each user with the appearance of continuous access, the kernel quickly preempts each process control block to execute another one. The goal for system developers is to minimize dispatch latency.

- The kernel program should perform memory management.
- When the kernel initially loads an executable into memory, it divides the address space logically into regions.[133] The kernel maintains a master-region table and many per-process-region (pregion) tables—one for each running process.[133] These tables constitute the virtual address space. The master-region table is used to determine where its contents are located in physical memory. The pregion tables allow each process to have its own program (text) pregion, data pregion, and stack pregion.
- The program pregion stores machine instructions. Since machine instructions do not change, the program pregion may be shared by many processes of the same executable.[133]
- To save time and memory, the kernel may load only blocks of execution instructions from the disk drive, not the entire execution file completely.[132]
- The kernel is responsible for translating virtual addresses into physical addresses. The kernel may request data from the memory controller and, instead, receive a page fault.[134] If so, the kernel accesses the memory management unit to populate the physical data region and translate the address.[135]
- The kernel allocates memory from the heap upon request by a process.[64] When the process is finished with the memory, the process may request for it to be freed. If the process exits without requesting all allocated memory to be freed, then the kernel performs garbage collection to free the memory.
- The kernel also ensures that a process only accesses its own memory, and not that of the kernel or other processes.[132]
- The kernel program should perform file system management.[132] The kernel has instructions to create, retrieve, update, and delete files.
- The kernel program should perform device management.[132] The kernel provides programs to standardize and simplify the interface to the mouse, keyboard, disk drives, printers, and other devices. Moreover, the kernel should arbitrate access to a device if two processes request it at the same time.
- The kernel program should perform network management.[136] The kernel transmits and receives packets on behalf of processes. One key service is to find an efficient route to the target system.
- The kernel program should provide system level functions for programmers to use.[137]
- Programmers access files through a relatively simple interface that in turn executes a relatively complicated low-level I/O interface. The low-level interface includes file creation, file descriptors, file seeking, physical reading, and physical writing.
- Programmers create processes through a relatively simple interface that in turn executes a relatively complicated low-level interface.
- Programmers perform date/time arithmetic through a relatively simple interface that in turn executes a relatively complicated low-level time interface.[138]
- The kernel program should provide a communication channel between executing processes.[139] For a large software system, it may be desirable to engineer the system into smaller processes. Processes may communicate with one another by sending and receiving signals.
Originally, operating systems were programmed in assembly; however, modern operating systems are typically written in higher-level languages like C, Objective-C, and Swift.[k]
Utility program
A utility program is designed to aid system administration and software execution. Operating systems execute hardware utility programs to check the status of disk drives, memory, speakers, and printers.[140] A utility program may optimize the placement of a file on a crowded disk. System utility programs monitor hardware and network performance. When a metric is outside an acceptable range, a trigger alert is generated.[141]
Utility programs include compression programs so data files are stored on less disk space.[140] Compressed programs also save time when data files are transmitted over the network.[140] Utility programs can sort and merge data sets.[141] Utility programs detect computer viruses.[141]
Microcode program





A microcode program is the bottom-level interpreter that controls the data path of software-driven computers.[142] (Advances in hardware have migrated these operations to hardware execution circuits.)[142] Microcode instructions allow the programmer to more easily implement the digital logic level[143]—the computer's real hardware. The digital logic level is the boundary between computer science and computer engineering.[144]
A logic gate is a tiny transistor that can return one of two signals: on or off.[145]
- Having one transistor forms the NOT gate.
- Connecting two transistors in series forms the NAND gate.
- Connecting two transistors in parallel forms the NOR gate.
- Connecting a NOT gate to a NAND gate forms the AND gate.
- Connecting a NOT gate to a NOR gate forms the OR gate.
These five gates form the building blocks of binary algebra—the digital logic functions of the computer.
Microcode instructions are mnemonics programmers may use to execute digital logic functions instead of forming them in binary algebra. They are stored in a central processing unit's (CPU) control store.[146] These hardware-level instructions move data throughout the data path.
The micro-instruction cycle begins when the microsequencer uses its microprogram counter to fetch the next machine instruction from random-access memory.[147] The next step is to decode the machine instruction by selecting the proper output line to the hardware module.[148] The final step is to execute the instruction using the hardware module's set of gates.

Instructions to perform arithmetic are passed through an arithmetic logic unit (ALU).[149] The ALU has circuits to perform elementary operations to add, shift, and compare integers. By combining and looping the elementary operations through the ALU, the CPU performs its complex arithmetic.
Microcode instructions move data between the CPU and the memory controller. Memory controller microcode instructions manipulate two registers. The memory address register is used to access each memory cell's address. The memory data register is used to set and read each cell's contents.[150]
Microcode instructions move data between the CPU and the many computer buses. The disk controller bus writes to and reads from hard disk drives. Data is also moved between the CPU and other functional units via the peripheral component interconnect express bus.[151]
Notes
- ^ The Prolog language allows for a database of facts and rules to be entered in any order. However, a question about a database must be at the very end.
- ^ An executable has each machine instruction ready for the CPU.
- ^ For more information, visit X86 assembly language#Instruction types.
- ^ introduced in 1999
- ^ Operators like
x++will usually compile to a single instruction. - ^ The line numbers were typically incremented by 10 to leave room if additional statements were added later.
- ^ This function could be written more concisely as
int increment_counter(){ static int counter; return ++counter;}. 1) Static variables are automatically initialized to zero. 2)++counteris a prefix increment operator. - ^ This is despite the metaphor of a stack, which normally grows from bottom to top.
- ^ C also provides the
calloc()function to allocate heap memory. It provides two additional services: 1) It allows the programmer to create an array of arbitrary size. 2) It sets each memory cell to zero. - ^ For string variables, C provides the
strdup()function. It executes both the allocation function and the copy function. - ^ The UNIX operating system was written in C, macOS was written in Objective-C, and Swift replaced Objective-C.
References
- ^ "ISO/IEC 2382:2015". ISO. 2020-09-03. Archived from the original on 2016-06-17. Retrieved 2022-05-26.
[Software includes] all or part of the programs, procedures, rules, and associated documentation of an information processing system.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 7. ISBN 0-201-71012-9.
An alternative to compiling a source program is to use an interpreter. An interpreter can directly execute a source program[.]
- ^ Silberschatz, Abraham (1994). Operating System Concepts, Fourth Edition. Addison-Wesley. p. 98. ISBN 978-0-201-50480-4.
- ^ Tanenbaum, Andrew S. (1990). Structured Computer Organization, Third Edition. Prentice Hall. p. 32. ISBN 978-0-13-854662-5.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 7. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 30. ISBN 0-201-71012-9.
Their intention was to produce a language that was very simple for students to learn[.]
- ^ a b c Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 31. ISBN 0-201-71012-9.
- ^ a b c d e f Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 30. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 30. ISBN 0-201-71012-9.
The idea was that students could be merely casual users or go on from Basic to more sophisticated and powerful languages[.]
- ^ a b McCartney, Scott (1999). ENIAC – The Triumphs and Tragedies of the World's First Computer. Walker and Company. p. 16. ISBN 978-0-8027-1348-3.
- ^ Tanenbaum, Andrew S. (1990). Structured Computer Organization, Third Edition. Prentice Hall. p. 14. ISBN 978-0-13-854662-5.
- ^ Bromley, Allan G. (1998). "Charles Babbage's Analytical Engine, 1838" (PDF). IEEE Annals of the History of Computing. 20 (4): 29–45. doi:10.1109/85.728228. S2CID 2285332. Archived (PDF) from the original on 2016-03-04. Retrieved 2015-10-30.
- ^ a b Tanenbaum, Andrew S. (1990). Structured Computer Organization, Third Edition. Prentice Hall. p. 15. ISBN 978-0-13-854662-5.
- ^ J. Fuegi; J. Francis (October–December 2003), "Lovelace & Babbage and the creation of the 1843 'notes'", Annals of the History of Computing, 25 (4): 16, 19, 25, doi:10.1109/MAHC.2003.1253887
- ^ Rosen, Kenneth H. (1991). Discrete Mathematics and Its Applications. McGraw-Hill, Inc. p. 654. ISBN 978-0-07-053744-6.
Turing machines can model all the computations that can be performed on a computing machine.
- ^ Linz, Peter (1990). An Introduction to Formal Languages and Automata. D. C. Heath and Company. p. 234. ISBN 978-0-669-17342-0.
- ^ Linz, Peter (1990). An Introduction to Formal Languages and Automata. D. C. Heath and Company. p. 243. ISBN 978-0-669-17342-0.
[A]ll the common mathematical functions, no matter how complicated, are Turing-computable.
- ^ a b c McCartney, Scott (1999). ENIAC – The Triumphs and Tragedies of the World's First Computer. Walker and Company. p. 102. ISBN 978-0-8027-1348-3.
- ^ McCartney, Scott (1999). ENIAC – The Triumphs and Tragedies of the World's First Computer. Walker and Company. p. 94. ISBN 978-0-8027-1348-3.
- ^ McCartney, Scott (1999). ENIAC – The Triumphs and Tragedies of the World's First Computer. Walker and Company. p. 107. ISBN 978-0-8027-1348-3.
- ^ McCartney, Scott (1999). ENIAC – The Triumphs and Tragedies of the World's First Computer. Walker and Company. p. 120. ISBN 978-0-8027-1348-3.
- ^ a b McCartney, Scott (1999). ENIAC – The Triumphs and Tragedies of the World's First Computer. Walker and Company. p. 118. ISBN 978-0-8027-1348-3.
- ^ McCartney, Scott (1999). ENIAC – The Triumphs and Tragedies of the World's First Computer. Walker and Company. p. 119. ISBN 978-0-8027-1348-3.
- ^ McCartney, Scott (1999). ENIAC – The Triumphs and Tragedies of the World's First Computer. Walker and Company. p. 123. ISBN 978-0-8027-1348-3.
- ^ a b Tanenbaum, Andrew S. (1990). Structured Computer Organization, Third Edition. Prentice Hall. p. 21. ISBN 978-0-13-854662-5.
- ^ a b Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 27. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 29. ISBN 0-201-71012-9.
- ^ a b c Silberschatz, Abraham (1994). Operating System Concepts, Fourth Edition. Addison-Wesley. p. 6. ISBN 978-0-201-50480-4.
- ^ a b c d e f g h i "Bill Pentz — A bit of Background: the Post-War March to VLSI". Digibarn Computer Museum. August 2008. Archived from the original on March 21, 2022. Retrieved January 31, 2022.
- ^ a b To the Digital Age: Research Labs, Start-up Companies, and the Rise of MOS. Johns Hopkins University Press. 2002. ISBN 9780801886393. Archived from the original on February 2, 2023. Retrieved February 3, 2022.
- ^ Chalamala, Babu (2017). "Manufacturing of Silicon Materials for Microelectronics and Solar PV". Sandia National Laboratories. Archived from the original on March 23, 2023. Retrieved February 8, 2022.
- ^ "Fabricating ICs Making a base wafer". Britannica. Archived from the original on February 8, 2022. Retrieved February 8, 2022.
- ^ "Introduction to NMOS and PMOS Transistors". Anysilicon. 4 November 2021. Archived from the original on 6 February 2022. Retrieved February 5, 2022.
- ^ "microprocessor definition". Britannica. Archived from the original on April 1, 2022. Retrieved April 1, 2022.
- ^ "Chip Hall of Fame: Intel 4004 Microprocessor". Institute of Electrical and Electronics Engineers. July 2, 2018. Archived from the original on February 7, 2022. Retrieved January 31, 2022.
- ^ "360 Revolution" (PDF). Father, Son & Co. 1990. Archived (PDF) from the original on 2022-10-10. Retrieved February 5, 2022.
- ^ a b "Inside the world's long-lost first microcomputer". c/net. January 8, 2010. Archived from the original on February 1, 2022. Retrieved January 31, 2022.
- ^ "Bill Gates, Microsoft and the IBM Personal Computer". InfoWorld. August 23, 1982. Archived from the original on 18 February 2023. Retrieved 1 February 2022.
- ^ a b Stroustrup, Bjarne (2013). The C++ Programming Language, Fourth Edition. Addison-Wesley. p. 10. ISBN 978-0-321-56384-2.
- ^ a b c Stroustrup, Bjarne (2013). The C++ Programming Language, Fourth Edition. Addison-Wesley. p. 11. ISBN 978-0-321-56384-2.
- ^ a b Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 159. ISBN 0-619-06489-7.
- ^ a b Linz, Peter (1990). An Introduction to Formal Languages and Automata. D. C. Heath and Company. p. 2. ISBN 978-0-669-17342-0.
- ^ Weiss, Mark Allen (1994). Data Structures and Algorithm Analysis in C++. Benjamin/Cummings Publishing Company, Inc. p. 29. ISBN 0-8053-5443-3.
- ^ Tanenbaum, Andrew S. (1990). Structured Computer Organization, Third Edition. Prentice Hall. p. 17. ISBN 978-0-13-854662-5.
- ^ a b c d e f Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 160. ISBN 0-619-06489-7.
- ^ a b c Tanenbaum, Andrew S. (1990). Structured Computer Organization, Third Edition. Prentice Hall. p. 399. ISBN 978-0-13-854662-5.
- ^ Tanenbaum, Andrew S. (1990). Structured Computer Organization, Third Edition. Prentice Hall. p. 400. ISBN 978-0-13-854662-5.
- ^ Tanenbaum, Andrew S. (1990). Structured Computer Organization, Third Edition. Prentice Hall. p. 398. ISBN 978-0-13-854662-5.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 26. ISBN 0-201-71012-9.
- ^ a b c d Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 37. ISBN 0-201-71012-9.
- ^ Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 160. ISBN 0-619-06489-7.
With third-generation and higher-level programming languages, each statement in the language translates into several instructions in machine language.
- ^ Wilson, Leslie B. (1993). Comparative Programming Languages, Second Edition. Addison-Wesley. p. 75. ISBN 978-0-201-56885-1.
- ^ Stroustrup, Bjarne (2013). The C++ Programming Language, Fourth Edition. Addison-Wesley. p. 40. ISBN 978-0-321-56384-2.
- ^ a b Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 16. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 24. ISBN 0-201-71012-9.
- ^ a b Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 25. ISBN 0-201-71012-9.
- ^ a b c d Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 19. ISBN 0-201-71012-9.
- ^ a b c d "Memory Layout of C Programs". 12 September 2011. Archived from the original on 6 November 2021. Retrieved 6 November 2021.
- ^ a b Kernighan, Brian W.; Ritchie, Dennis M. (1988). The C Programming Language Second Edition. Prentice Hall. p. 31. ISBN 0-13-110362-8.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 128. ISBN 0-201-71012-9.
- ^ a b c Kerrisk, Michael (2010). The Linux Programming Interface. No Starch Press. p. 121. ISBN 978-1-59327-220-3.
- ^ Kerrisk, Michael (2010). The Linux Programming Interface. No Starch Press. p. 122. ISBN 978-1-59327-220-3.
- ^ Kernighan, Brian W.; Ritchie, Dennis M. (1988). The C Programming Language Second Edition. Prentice Hall. p. 185. ISBN 0-13-110362-8.
- ^ a b Kernighan, Brian W.; Ritchie, Dennis M. (1988). The C Programming Language Second Edition. Prentice Hall. p. 187. ISBN 0-13-110362-8.
- ^ a b c Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 38. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 193. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 39. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 35. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 192. ISBN 0-201-71012-9.
- ^ Stroustrup, Bjarne (2013). The C++ Programming Language, Fourth Edition. Addison-Wesley. p. 22. ISBN 978-0-321-56384-2.
- ^ Stroustrup, Bjarne (2013). The C++ Programming Language, Fourth Edition. Addison-Wesley. p. 21. ISBN 978-0-321-56384-2.
- ^ Stroustrup, Bjarne (2013). The C++ Programming Language, Fourth Edition. Addison-Wesley. p. 49. ISBN 978-0-321-56384-2.
- ^ a b Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 218. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 217. ISBN 0-201-71012-9.
- ^ Weiss, Mark Allen (1994). Data Structures and Algorithm Analysis in C++. Benjamin/Cummings Publishing Company, Inc. p. 103. ISBN 0-8053-5443-3.
When there is a function call, all the important information needs to be saved, such as register values (corresponding to variable names) and the return address (which can be obtained from the program counter)[.] ... When the function wants to return, it ... restores all the registers. It then makes the return jump. Clearly, all of this work can be done using a stack, and that is exactly what happens in virtually every programming language that implements recursion.
- ^ a b c Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 230. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 240. ISBN 0-201-71012-9.
- ^ a b c Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 241. ISBN 0-201-71012-9.
- ^ Jones, Robin; Maynard, Clive; Stewart, Ian (December 6, 2012). The Art of Lisp Programming. Springer Science & Business Media. p. 2. ISBN 9781447117193.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 220. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 221. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 229. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 227. ISBN 0-201-71012-9.
- ^ a b Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 222. ISBN 0-201-71012-9.
- ^ Gordon, Michael J. C. (1996). "From LCF to HOL: a short history". Archived from the original on 2016-09-05. Retrieved 2021-10-30.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 233. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 235. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 55. ISBN 0-201-71012-9.
- ^ Colmerauer, A.; Roussel, P. (1992). "The birth of Prolog" (PDF). ACM SIGPLAN Notices. 28 (3). Association for Computing Machinery: 5. doi:10.1145/155360.155362.
- ^ Kowalski, R., Dávila, J., Sartor, G. and Calejo, M., 2023. Logical English for law and education. In Prolog: The Next 50 Years (pp. 287-299). Cham: Springer Nature Switzerland.
- ^ a b Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 35. ISBN 0-201-71012-9.
Simula was based on Algol 60 with one very important addition — the class concept. ... The basic idea was that the data (or data structure) and the operations performed on it belong together[.]
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 39. ISBN 0-201-71012-9.
Originally, a large number of experimental languages were designed, many of which combined object-oriented and functional programming.
- ^ Schach, Stephen R. (1990). Software Engineering. Aksen Associates Incorporated Publishers. p. 284. ISBN 0-256-08515-3.
While it is true that OOD [(object oriented design)] as such is not supported by the majority of popular languages, a large subset of OOD can be used.
- ^ Weiss, Mark Allen (1994). Data Structures and Algorithm Analysis in C++. Benjamin/Cummings Publishing Company, Inc. p. 57. ISBN 0-8053-5443-3.
- ^ Schach, Stephen R. (1990). Software Engineering. Aksen Associates Incorporated Publishers. p. 285. ISBN 0-256-08515-3.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 290. ISBN 0-201-71012-9.
The syntax (or grammar) of a programming language describes the correct form in which programs may be written[.]
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 78. ISBN 0-201-71012-9.
The main components of an imperative language are declarations, expressions, and statements.
- ^ a b Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 290. ISBN 0-201-71012-9.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 294. ISBN 0-201-71012-9.
- ^ Rosen, Kenneth H. (1991). Discrete Mathematics and Its Applications. McGraw-Hill, Inc. p. 615. ISBN 978-0-07-053744-6.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 291. ISBN 0-201-71012-9.
- ^ Rosen, Kenneth H. (1991). Discrete Mathematics and Its Applications. McGraw-Hill, Inc. p. 616. ISBN 978-0-07-053744-6.
- ^ Rosen, Kenneth H. (1991). Discrete Mathematics and Its Applications. McGraw-Hill, Inc. p. 623. ISBN 978-0-07-053744-6.
- ^ Rosen, Kenneth H. (1991). Discrete Mathematics and Its Applications. McGraw-Hill, Inc. p. 624. ISBN 978-0-07-053744-6.
- ^ Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition. Addison-Wesley. p. 297. ISBN 0-201-71012-9.
- ^ Schach, Stephen R. (1990). Software Engineering. Aksen Associates Incorporated Publishers. p. Preface. ISBN 0-256-08515-3.
- ^ a b c Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 507. ISBN 0-619-06489-7.
- ^ a b Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 513. ISBN 0-619-06489-7.
- ^ Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 514. ISBN 0-619-06489-7.
- ^ Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 516. ISBN 0-619-06489-7.
- ^ Schach, Stephen R. (1990). Software Engineering. Aksen Associates Incorporated Publishers. p. 8. ISBN 0-256-08515-3.
- ^ Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 517. ISBN 0-619-06489-7.
- ^ Schach, Stephen R. (1990). Software Engineering. Aksen Associates Incorporated Publishers. p. 345. ISBN 0-256-08515-3.
- ^ a b c d Schach, Stephen R. (1990). Software Engineering. Aksen Associates Incorporated Publishers. p. 319. ISBN 0-256-08515-3.
- ^ a b Schach, Stephen R. (1990). Software Engineering. Aksen Associates Incorporated Publishers. p. 331. ISBN 0-256-08515-3.
- ^ Schach, Stephen R. (1990). Software Engineering. Aksen Associates Incorporated Publishers. p. 216. ISBN 0-256-08515-3.
- ^ a b c Schach, Stephen R. (1990). Software Engineering. Aksen Associates Incorporated Publishers. p. 219. ISBN 0-256-08515-3.
- ^ a b Schach, Stephen R. (1990). Software Engineering. Aksen Associates Incorporated Publishers. p. 226. ISBN 0-256-08515-3.
- ^ a b Schach, Stephen R. (1990). Software Engineering. Aksen Associates Incorporated Publishers. p. 220. ISBN 0-256-08515-3.
- ^ Schach, Stephen R. (1990). Software Engineering. Aksen Associates Incorporated Publishers. p. 258. ISBN 0-256-08515-3.
- ^ Schach, Stephen R. (1990). Software Engineering. Aksen Associates Incorporated Publishers. p. 259. ISBN 0-256-08515-3.
- ^ a b c Silberschatz, Abraham (1994). Operating System Concepts, Fourth Edition. Addison-Wesley. p. 1. ISBN 978-0-201-50480-4.
- ^ Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 147. ISBN 0-619-06489-7.
The key to unlocking the potential of any computer system is application software.
- ^ a b c d Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 147. ISBN 0-619-06489-7.
- ^ Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 147. ISBN 0-619-06489-7.
[A] third-party software firm, often called a value-added software vendor, may develop or modify a software program to meet the needs of a particular industry or company.
- ^ Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 148. ISBN 0-619-06489-7.
Heading: Proprietary Software; Subheading: Advantages; Quote: You can get exactly what you need in terms of features, reports, and so on.
- ^ Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 148. ISBN 0-619-06489-7.
Heading: Proprietary Software; Subheading: Advantages; Quote: Being involved in the development offers a further level of control over the results.
- ^ Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 147. ISBN 0-619-06489-7.
Heading: Proprietary Software; Subheading: Advantages; Quote: There is more flexibility in making modifications that may be required to counteract a new initiative by one of your competitors or to meet new supplier and/or customer requirements.
- ^ a b c d Stair, Ralph M. (2003). Principles of Information Systems, Sixth Edition. Thomson. p. 149. ISBN 0-619-06489-7.
- ^ Tanenbaum, Andrew S. (1990). Structured Computer Organization, Third Edition. Prentice Hall. p. 11. ISBN 978-0-13-854662-5.
- ^ a b Kerrisk, Michael (2010). The Linux Programming Interface. No Starch Press. p. 21. ISBN 978-1-59327-220-3.
- ^ a b c d e Kerrisk, Michael (2010). The Linux Programming Interface. No Starch Press. p. 22. ISBN 978-1-59327-220-3.
- ^ a b c Bach, Maurice J. (1986). The Design of the UNIX Operating System. Prentice-Hall, Inc. p. 152. ISBN 0-13-201799-7.
- ^ Tanenbaum, Andrew S. (2013). Structured Computer Organization, Sixth Edition. Pearson. p. 443. ISBN 978-0-13-291652-3.
- ^ Lacamera, Daniele (2018). Embedded Systems Architecture. Packt. p. 8. ISBN 978-1-78883-250-2.
- ^ Kerrisk, Michael (2010). The Linux Programming Interface. No Starch Press. p. 23. ISBN 978-1-59327-220-3.
- ^ Kernighan, Brian W. (1984). The Unix Programming Environment. Prentice Hall. p. 201. ISBN 0-13-937699-2.
- ^ Kerrisk, Michael (2010). The Linux Programming Interface. No Starch Press. p. 187. ISBN 978-1-59327-220-3.
- ^ Haviland, Keith (1987). Unix システムプログラミング. Addison-Wesley Publishing Company. p. 121. ISBN 0-201-12919-1。
- ^ abc Stair, Ralph M. (2003).情報システムの原則、第 6 版。トムソン。p. 145。ISBN 0-619-06489-7。
- ^ abc Stair, Ralph M. (2003).情報システムの原則、第 6 版。トムソン。p. 146。ISBN 0-619-06489-7。
- ^ ab Tanenbaum, Andrew S. (2013). Structured Computer Organization, Sixth Edition . Pearson. p. 6. ISBN 978-0-13-291652-3。
- ^ Tanenbaum, Andrew S. (2013). Structured Computer Organization, Sixth Edition . Pearson. p. 243. ISBN 978-0-13-291652-3。
- ^ Tanenbaum, Andrew S. (2013). Structured Computer Organization, Sixth Edition . Pearson. p. 147. ISBN 978-0-13-291652-3。
- ^ Tanenbaum, Andrew S. (2013). Structured Computer Organization, Sixth Edition . Pearson. p. 148. ISBN 978-0-13-291652-3。
- ^ Tanenbaum, Andrew S. (2013). Structured Computer Organization, Sixth Edition . Pearson. p. 253. ISBN 978-0-13-291652-3。
- ^ Tanenbaum, Andrew S. (2013). Structured Computer Organization, Sixth Edition . Pearson. p. 255. ISBN 978-0-13-291652-3。
- ^ Tanenbaum, Andrew S. (2013). Structured Computer Organization, Sixth Edition . Pearson. p. 161. ISBN 978-0-13-291652-3。
- ^ Tanenbaum, Andrew S. (2013). Structured Computer Organization, Sixth Edition . Pearson. p. 166. ISBN 978-0-13-291652-3。
- ^ Tanenbaum, Andrew S. (2013). Structured Computer Organization, Sixth Edition . Pearson. p. 249. ISBN 978-0-13-291652-3。
- ^ Tanenbaum, Andrew S. (2013). Structured Computer Organization, Sixth Edition . Pearson. p. 111. ISBN 978-0-13-291652-3。
