Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/refrat/refrat.tex

    r53ba273 ra752883  
    1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2 %%
    3 %% Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    4 %%
    5 %% The contents of this file are covered under the licence agreement in the
    6 %% file "LICENCE" distributed with Cforall.
    7 %%
    8 %% refrat.tex --
    9 %%
    10 %% Author           : Peter A. Buhr
    11 %% Created On       : Wed Apr  6 14:52:25 2016
    12 %% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Wed Apr  6 21:57:27 2016
    14 %% Update Count     : 2
    15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    16 
    171% requires tex packages: texlive-base texlive-latex-base tex-common texlive-humanities texlive-latex-extra texlive-fonts-recommended
    182
     
    215
    226% Latex packages used in the document.
     7
    238\usepackage{fullpage,times}
    249\usepackage{xspace}
     
    3823% Names used in the document.
    3924
    40 \newcommand{\CFA}{C$\mathbf\forall$\xspace}     % set language symbolic name
     25\newcommand{\CFA}{C$\forall$\xspace}    % set language symbolic name
    4126\newcommand{\CFL}{Cforall\xspace}               % set language text name
    4227\newcommand{\CC}{C\kern-.1em\hbox{+\kern-.25em+}\xspace} % CC symbolic name
     
    166151% CFA based on ANSI C
    167152\lstdefinelanguage{CFA}[ANSI]{C}%
    168 {morekeywords={_Alignas,_Alignof,__alignof,__alignof__,asm,__asm,__asm__,_At,_Atomic,__attribute,__attribute__,auto,
    169     _Bool,catch,catchResume,choose,_Complex,__complex,__complex__,__const,__const__,disable,dtype,enable,__extension__,
    170         fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,__label__,lvalue,_Noreturn,otype,restrict,_Static_assert,
    171         _Thread_local,throw,throwResume,trait,try,typeof,__typeof,__typeof__,},
     153{morekeywords={asm,_Alignas,_Alignof,_At,_Atomic,_Bool,catch,catchResume,choose,_Complex,trait,disable,dtype,enable,
     154        fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,lvalue,_Noreturn,otype,restrict,_Static_assert,
     155        _Thread_local,throw,throwResume,try,},
    172156}%
    173157
     
    179163xleftmargin=\parindent,
    180164escapechar=@,
    181 mathescape=true,
    182165keepspaces=true,
    183166showstringspaces=false,
    184167showlines=true,
    185 aboveskip=6pt,
    186 belowskip=4pt,
    187168}%
    188169
     
    190171% replace/adjust listings characters that look bad in sanserif
    191172\lst@CCPutMacro
    192 \lst@ProcessOther{"22}{\lst@ttfamily{"}{\raisebox{0.3ex}{\ttfamily\upshape "}}} % replace double quote
    193 \lst@ProcessOther{"27}{\lst@ttfamily{'}{\raisebox{0.3ex}{\ttfamily\upshape '\hspace*{-2pt}}}} % replace single quote
    194 \lst@ProcessOther{"2D}{\lst@ttfamily{-}{\ttfamily\upshape -}} % replace minus
     173\lst@ProcessOther{"2D}{\lst@ttfamily{-{}}{{\ttfamily\upshape -}}} % replace minus
    195174\lst@ProcessOther{"3C}{\lst@ttfamily{<}{\texttt{<}}} % replace less than
    196175\lst@ProcessOther{"3E}{\lst@ttfamily{<}{\texttt{>}}} % replace greater than
    197176\lst@ProcessOther{"5E}{\raisebox{0.4ex}{$\scriptstyle\land\,$}} % replace circumflex
    198 \lst@ProcessOther{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
    199 \lst@ProcessOther{"60}{\lst@ttfamily{`}{\raisebox{0.3ex}{\ttfamily\upshape \hspace*{-2pt}`}}} % replace backquote
     177\lst@ProcessLetter{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
    200178\lst@ProcessOther{"7E}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}} % replace tilde
    201179%\lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde
     
    38653843``\lstinline$Safe_pointer$ acts like a pointer to \lstinline$int$''.
    38663844\begin{lstlisting}
    3867 trait ptr_to( otype P | pointer( P ), otype T ) {@\impl{ptr_to}@@\use{pointer}@
     3845trait ptr_to( type P | pointer( P ), otype T ) {@\impl{ptr_to}@@\use{pointer}@
    38683846        lvalue T *?( P );
    38693847        lvalue T ?[?]( P, long int );
    38703848};
    3871 trait ptr_to_const( otype P | pointer( P ), otype T ) {@\impl{ptr_to_const}@
     3849trait ptr_to_const( type P | pointer( P ), otype T ) {@\impl{ptr_to_const}@
    38723850        const lvalue T *?( P );
    38733851        const lvalue T ?[?]( P, long int );@\use{pointer}@
    38743852};
    3875 trait ptr_to_volatile( otype P | pointer( P ), otype T ) }@\impl{ptr_to_volatile}@
     3853trait ptr_to_volatile( type P | pointer( P ), otype T ) }@\impl{ptr_to_volatile}@
    38763854        volatile lvalue T *?( P );
    38773855        volatile lvalue T ?[?]( P, long int );@\use{pointer}@
    38783856};
    3879 trait ptr_to_const_volatile( otype P | pointer( P ), otype T ) }@\impl{ptr_to_const_volatile}@
     3857trait ptr_to_const_volatile( type P | pointer( P ), otype T ) }@\impl{ptr_to_const_volatile}@
    38803858        const volatile lvalue T *?( P );@\use{pointer}@
    38813859        const volatile lvalue T ?[?]( P, long int );
     
    38873865``\lstinline$ptr_to$'' specifications.
    38883866\begin{lstlisting}
    3889 trait m_l_ptr_to( otype P | m_l_pointer( P ),@\use{m_l_pointer}@@\impl{m_l_ptr_to}@ otype T | ptr_to( P, T )@\use{ptr_to}@ {
     3867trait m_l_ptr_to( type P | m_l_pointer( P ),@\use{m_l_pointer}@@\impl{m_l_ptr_to}@ otype T | ptr_to( P, T )@\use{ptr_to}@ {
    38903868        P ?=?( P *, T * );
    38913869        T * ?=?( T **, P );
    38923870};
    3893 trait m_l_ptr_to_const( otype P | m_l_pointer( P ),@\use{m_l_pointer}@@\impl{m_l_ptr_to_const}@ otype T | ptr_to_const( P, T )@\use{ptr_to_const}@) {
     3871trait m_l_ptr_to_const( type P | m_l_pointer( P ),@\use{m_l_pointer}@@\impl{m_l_ptr_to_const}@ otype T | ptr_to_const( P, T )@\use{ptr_to_const}@) {
    38943872        P ?=?( P *, const T * );
    38953873        const T * ?=?( const T **, P );
    38963874};
    3897 trait m_l_ptr_to_volatile( otype P | m_l_pointer( P ),@\use{m_l_pointer}@@\impl{m_l_ptr_to_volatile}@ otype T | ptr_to_volatile( P, T )) {@\use{ptr_to_volatile}@
     3875trait m_l_ptr_to_volatile( type P | m_l_pointer( P ),@\use{m_l_pointer}@@\impl{m_l_ptr_to_volatile}@ otype T | ptr_to_volatile( P, T )) {@\use{ptr_to_volatile}@
    38983876        P ?=?( P *, volatile T * );
    38993877        volatile T * ?=?( volatile T **, P );
    39003878};
    3901 trait m_l_ptr_to_const_volatile( otype P | ptr_to_const_volatile( P ),@\use{ptr_to_const_volatile}@@\impl{m_l_ptr_to_const_volatile}@
    3902                 otype T | m_l_ptr_to_volatile( P, T ) | m_l_ptr_to_const( P )) {@\use{m_l_ptr_to_const}@@\use{m_l_ptr_to_volatile}@
     3879trait m_l_ptr_to_const_volatile( type P | ptr_to_const_volatile( P ),@\use{ptr_to_const_volatile}@@\impl{m_l_ptr_to_const_volatile}@
     3880                type T | m_l_ptr_to_volatile( P, T ) | m_l_ptr_to_const( P )) {@\use{m_l_ptr_to_const}@@\use{m_l_ptr_to_volatile}@
    39033881        P ?=?( P *, const volatile T * );
    39043882        const volatile T * ?=?( const volatile T **, P );
Note: See TracChangeset for help on using the changeset viewer.