Changeset 20e409e


Ignore:
Timestamp:
Sep 24, 2015, 9:59:20 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, ctor, deferred_resn, demangler, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, string, with_gc
Children:
02e5ab6
Parents:
bfee448
Message:

make *predefined* declarations work

Location:
doc/refrat
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • doc/refrat/Makefile

    rbfee448 r20e409e  
    3232
    3333clean :
    34         rm -f *.bbl *.aux *.dvi *.idx *.ilg *.ind *.brf *.out *.log *.toc *.blg *.pstex_t \
     34        rm -f *.bbl *.aux *.dvi *.idx *.ilg *.ind *.brf *.out *.log *.toc *.blg *.pstex_t *.cf \
    3535                ${FIGURES} ${PICTURES} ${PROGRAMS} ${GRAPHS} ${basename ${DOCUMENT}}.ps ${DOCUMENT}
    3636
     
    5858        ${LaTeX} ${basename $@}.tex
    5959
     60predefined :
     61        sed -f predefined.sed ${basename ${DOCUMENT}}.tex > ${basename $@}.cf
     62
    6063## Define the default recipes.
    6164
  • doc/refrat/predefined.sed

    rbfee448 r20e409e  
    1 /\\predefined/,/\\end{lstlisting}/ !d
    2 /\\begin{lstlisting}/,/\\end{lstlisting}/ s/\\use{.*}//g
    3 /\\predefined/ d
    4 /\\begin{lstlisting}/ d
    5 /\\end{lstlisting}/ d
     1/^\\predefined/,/^\\end{lstlisting}/ !d
     2/^\\begin{lstlisting}/,/^\\end{lstlisting}/ s/@\\use{.*}@//g
     3/^\\predefined/ d
     4/^\\begin{lstlisting}/ d
     5/^\\end{lstlisting}/ d
  • doc/refrat/refrat.tex

    rbfee448 r20e409e  
    254254\subsubsection{Semantics}
    255255
    256 CFA provides a capability for generic types; using this capability a single "generic type generator"
    257 can be written that can represent multiple concrete type instantiations by substitution of the "type
    258 parameters" of the generic type for concrete types. Syntactically a generic type generator is
    259 represented by putting a forall specifier on a struct or union declaration, as defined in section
    260 6.7.2.5. An instantiation of the generic type is written by specifying the type parameters in
    261 parentheses after the name of the generic type generator, as in the following example:
    262 \begin{lstlisting}
    263 forall( type T ) struct pair {
     256\CFA provides a capability for generic types; using this capability a single "generic type
     257generator" can be written that can represent multiple concrete type instantiations by substitution
     258of the "type parameters" of the generic type for concrete types. Syntactically a generic type
     259generator is represented by putting a forall specifier on a struct or union declaration, as defined
     260in \VRef{forall}. An instantiation of the generic type is written by specifying the type parameters
     261in parentheses after the name of the generic type generator:
     262\begin{lstlisting}
     263forall( type T | sumable( T ) ) struct pair {
    264264        T x;
    265265        T y;
    266266};
    267 
    268267pair( int ) p = { 3, 14 };
    269268\end{lstlisting}
    270269
    271270The type parameters in an instantiation of a generic type must satisfy any constraints in the forall
    272 specifier on the type generator declaration. The instantiation then has the semantics that would
    273 result if the type parameters were substituted into the type generator declaration by macro
    274 substitution.
     271specifier on the type generator declaration, e.g., \lstinline$sumable$. The instantiation then has
     272the semantics that would result if the type parameters were substituted into the type generator
     273declaration by macro substitution.
    275274
    276275Polymorphic functions may have generic types as parameters, and those generic types may use type
    277 parameters of the polymorphic function as type parameters of the generic type, as in the following
    278 example:
     276parameters of the polymorphic function as type parameters of the generic type:
    279277\begin{lstlisting}
    280278forall( type T ) void swap( pair(T) *p ) {
Note: See TracChangeset for help on using the changeset viewer.