Changeset 051aec4


Ignore:
Timestamp:
Mar 25, 2024, 9:02:48 AM (2 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
bf050c5
Parents:
41fb996
Message:

word smithing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/mike_brooks_MMath/intro.tex

    r41fb996 r051aec4  
    11\chapter{Introduction}
    22
    3 All modern programming languages provide three high-level containers (collection): array, linked, and string.
    4 Often array is part of the programming language, while linked is built from pointer types, and string from a combination of array and linked.
     3All modern programming languages provide three high-level containers (collection): array, linked-list, and string.
     4Often array is part of the programming language, while linked-list is built from pointer types, and string from a combination of array and linked-list.
    55
    66\cite{Blache19}
     
    1717\section{Linked List}
    1818
    19 Linked provides a homogeneous container with $O(log N)$/$O(N)$ access to elements using successor and predecessor operations.
    20 Subscripting by value is sometimes available.
    21 Linked types are normally dynamically sized by adding/removing node using link fields internal or external to the elements (nodes).
    22 If a programming language allows pointer to stack storage, linked types can be allocated on the stack;
     19Linked-list provides a homogeneous container with $O(log N)$/$O(N)$ access to elements using successor and predecessor operations.
     20Subscripting by value is sometimes available, \eg hash table.
     21Linked types are normally dynamically sized by adding/removing nodes using link fields internal or external to the elements (nodes).
     22If a programming language allows pointer to stack storage, linked-list types can be allocated on the stack;
    2323otherwise, elements are heap allocated and explicitly/implicitly managed.
    2424
     
    3535\section{Motivation}
    3636
    37 The goal of this work is to introduce safe and complex versions of array, link, and string into the programming language \CFA, which based on C.
    38 Unfortunately, to make C better while retaining a high level of backwards compatibility requires a significant knowledge of C's design.
     37The goal of this work is to introduce safe and complex versions of array, link-lists, and string into the programming language \CFA~\cite{CFA}, which is based on C.
     38Unfortunately, to make C better, while retaining a high level of backwards compatibility, requires a significant knowledge of C's design.
    3939Hence, it is assumed the reader has a medium knowledge of C or \CC, on which extensive new C knowledge is built.
    4040
     
    4242\subsection{C?}
    4343
    44 Like many established programming languages, C has a standards committee and multiple ANSI/ISO language manuals~\cite{C99,C11,C18,C23}.
    45 However, most programming languages are only partially explained by these manuals.
     44Like many established programming languages, C has a standards committee and multiple ANSI/\-ISO language manuals~\cite{C99,C11,C18,C23}.
     45However, most programming languages are only partially explained by standard's manuals.
    4646When it comes to explaining how C works, the definitive source is the @gcc@ compiler, which is mimicked by other C compilers, such as Clang~\cite{clang}.
    47 Often other C compilers must \emph{ape} @gcc@ because a large part of the C library (runtime) system is embedded with @gcc@ features.
     47Often other C compilers must \emph{ape} @gcc@ because a large part of the C library (runtime) system contains @gcc@ features.
    4848While some key aspects of C need to be explained by quoting from the language reference manual, to illustrate definite program semantics, I devise a program, whose behaviour exercises the point at issue, and shows its behaviour.
    4949These example programs show
    5050\begin{itemize}
    5151        \item the compiler accepts or rejects certain syntax,
    52         \item the prints output to buttress a claim of behaviour,
     52        \item prints output to buttress a claim of behaviour,
    5353        \item executes without triggering any embedded assertions testing pre/post-assertions or invariants.
    5454\end{itemize}
     
    7777with a segmentation fault at runtime.
    7878Clearly, @gcc@ understands these ill-typed case, and yet allows the program to compile, which seems like madness.
    79 Compiling with @-Werror@, which turns warnings into errors, is often too strong, because some warnings are just warnings.
     79Compiling with flag @-Werror@, which turns warnings into errors, is often too strong, because some warnings are just warnings.
    8080In the following discussion, ``ill-typed'' means giving a nonzero @gcc@ exit condition with a message that discusses typing.
    8181Note, \CFA's type-system rejects all these ill-typed cases as type mismatch errors.
Note: See TracChangeset for help on using the changeset viewer.