Changeset ebec8ed


Ignore:
Timestamp:
Oct 1, 2020, 3:54:12 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
615767b
Parents:
506d4f0
Message:

finish last changes to report

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/fangren_yu_COOP_S20/Report.tex

    r506d4f0 rebec8ed  
    1 \documentclass[twoside,12pt]{article}
     1\documentclass[twoside,11pt]{article}
    22
    33%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    1111\usepackage[labelformat=simple,aboveskip=0pt,farskip=0pt]{subfig}
    1212\renewcommand{\thesubfigure}{\alph{subfigure})}
     13\usepackage[flushmargin]{footmisc}                                              % support label/reference in footnote
    1314\usepackage{latexsym}                                   % \Box glyph
    1415\usepackage{mathptmx}                                   % better math font with "times"
    15 \usepackage{appendix}
     16\usepackage[toc]{appendix}                                                              % article does not have appendix
    1617\usepackage[usenames]{color}
    1718\input{common}                                          % common CFA document macros
     
    381382\subsubsection{Source: \lstinline{AST/SymbolTable.hpp}}
    382383
    383 
    384 \subsubsection{Source: \lstinline{SymTab/Indexer.h}}
    385 
    386384Function
    387385\begin{C++}
     
    612610
    613611
    614 \begin{appendices}[toc,titletoc]
     612\appendix
    615613\section{Appendix}
    616 
    617614
    618615\subsection{Kinds of Type Parameters}
    619616\label{s:KindsTypeParameters}
    620617
    621 A type parameter in a @forall@ clause has three possible kinds:
     618A type parameter in a @forall@ clause has 3 kinds:
    622619\begin{enumerate}[listparindent=0pt]
    623620\item
    624 @dtype@: any data type (built-in or user defined).
    625 
    626 There is also a difference between opaque types (incomplete types, \ie those with only a forward declaration) and concrete types.
    627 Only concrete types can be directly used as a variable type.
    628 
    629 \CFA provides the @otype@ shorthand to require a type parameter be concrete, which also implicitly asserts the existence of its default and copy constructors, assignment, and destructor\footnote{\CFA implements the same automatic resource management (RAII) semantics as \CC.}.
    630 \item
    631 @ftype@: any function type.
    632 
    633 @ftype@ provides two purposes:
    634 \begin{itemize}
    635 \item
    636 Differentiate function pointer from data pointer because (in theory) some systems have different sizes for these pointers.
    637 \item
    638 Disallow a function pointer to match an overloaded data pointer, since variables and functions can have the same names.
    639 \end{itemize}
     621@dtype@: any data type (built-in or user defined) that is not a concrete type.
     622
     623A non-concrete type is an incomplete type such as an opaque type or pointer/reference with an implicit (pointer) size and implicitly generated reference and dereference operations.
     624\item
     625@otype@: any data type (built-in or user defined) that is concrete type.
     626
     627A concrete type is a complete type, \ie types that can be used to create a variable, which also implicitly asserts the existence of default and copy constructors, assignment, and destructor\footnote{\CFA implements the same automatic resource management (RAII) semantics as \CC.}.
     628% \item
     629% @ftype@: any function type.
     630%
     631% @ftype@ provides two purposes:
     632% \begin{itemize}
     633% \item
     634% Differentiate function pointer from data pointer because (in theory) some systems have different sizes for these pointers.
     635% \item
     636% Disallow a function pointer to match an overloaded data pointer, since variables and functions can have the same names.
     637% \end{itemize}
    640638
    641639\item
    642640@ttype@: tuple (variadic) type.
    643641
    644 @ttype@ parameter may only appear as type of the last parameter in a function, and it provides a type-safe way to implement variadic functions.
     642Restricted to the type for the last parameter in a function, it provides a type-safe way to implement variadic functions.
    645643Note however, that it has certain restrictions, as described in the implementation section below.
    646644\end{enumerate}
     
    673671\begin{enumerate}
    674672\item
    675 All types are function declarations are candidates of implicit parameters.
     673All types, variables, and functions are candidates of implicit parameters
    676674\item
    677675The parameter (assertion) name must match the actual declarations.
    678 \item
    679 Currently, assertions are all functions.
    680 Note that since \CFA has variable overloading, implicit value parameters might also be supported in the future.
    681676\end{enumerate}
    682677
     
    732727In particular, polymorphic variadic recursion must be structural (\ie the number of arguments decreases in any possible recursive calls), otherwise code generation gets into an infinite loop.
    733728The \CFA compiler sets a limit on assertion depth and reports an error if assertion resolution does not terminate within the limit (as for \lstinline[language=C++]@templates@ in \CC).
    734 \end{appendices}
    735729
    736730\bibliographystyle{plain}
Note: See TracChangeset for help on using the changeset viewer.