Ignore:
Timestamp:
Feb 4, 2021, 9:56:11 AM (10 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
9af0fe2d
Parents:
6a99803
Message:

Andrew MMath: Supposed to be focused on features but it ended up leaking out.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/existing.tex

    r6a99803 r29c9b23  
    1 \chapter{\texorpdfstring{\CFA Existing Features}{Cforall Existing Features}}
     1\chapter{\CFA Existing Features}
    22
    33\CFA (C-for-all)~\cite{Cforall} is an open-source project extending ISO C with
     
    4343
    4444\section{Reference Type}
    45 \CFA adds a rebindable reference type to C, but more expressive than the \CC
     45\CFA adds a rebindable reference type to C, but more expressive than the \Cpp
    4646reference.  Multi-level references are allowed and act like auto-dereferenced
    4747pointers using the ampersand (@&@) instead of the pointer asterisk (@*@). \CFA
     
    6060
    6161Both constructors and destructors are operators, which means they are just
    62 functions with special operator names rather than type names in \CC. The
     62functions with special operator names rather than type names in \Cpp. The
    6363special operator names may be used to call the functions explicitly (not
    64 allowed in \CC for constructors).
     64allowed in \Cpp for constructors).
    6565
    6666In general, operator names in \CFA are constructed by bracketing an operator
     
    8989matching overloaded destructor @void ^?{}(T &);@ is called.  Without explicit
    9090definition, \CFA creates a default and copy constructor, destructor and
    91 assignment (like \CC). It is possible to define constructors/destructors for
     91assignment (like \Cpp). It is possible to define constructors/destructors for
    9292basic and existing types.
    9393
     
    9595\CFA uses parametric polymorphism to create functions and types that are
    9696defined over multiple types. \CFA polymorphic declarations serve the same role
    97 as \CC templates or Java generics. The ``parametric'' means the polymorphism is
     97as \Cpp templates or Java generics. The ``parametric'' means the polymorphism is
    9898accomplished by passing argument operations to associate \emph{parameters} at
    9999the call site, and these parameters are used in the function to differentiate
     
    135135
    136136Note, a function named @do_once@ is not required in the scope of @do_twice@ to
    137 compile it, unlike \CC template expansion. Furthermore, call-site inferencing
     137compile it, unlike \Cpp template expansion. Furthermore, call-site inferencing
    138138allows local replacement of the most specific parametric functions needs for a
    139139call.
     
    179179}
    180180\end{cfa}
    181 The generic type @node(T)@ is an example of a polymorphic-type usage.  Like \CC
     181The generic type @node(T)@ is an example of a polymorphic-type usage.  Like \Cpp
    182182templates usage, a polymorphic-type usage must specify a type parameter.
    183183
Note: See TracChangeset for help on using the changeset viewer.