Ignore:
Timestamp:
May 12, 2025, 8:59:26 PM (10 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master, stuck-waitfor-destruct
Children:
2410424
Parents:
8fe7a85
Message:

add identification information

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/fangren_yu_MMath/features.tex

    r8fe7a85 redd11bd  
    122122\end{cfa}
    123123the call to @foo@ must pass @x@ by value, implying auto-dereference, while the call to @bar@ must pass @x@ by reference, implying no auto-dereference.
    124 Without any restrictions, this ambiguity limits the behaviour of reference types in \CFA polymorphic functions, where a type @T@ can bind to a reference or non-reference type.
     124
     125\PAB{My analysis shows} without any restrictions, this ambiguity limits the behaviour of reference types in \CFA polymorphic functions, where a type @T@ can bind to a reference or non-reference type.
    125126This ambiguity prevents the type system treating reference types the same way as other types, even if type variables could be bound to reference types.
    126127The reason is that \CFA uses a common \emph{object trait}\label{p:objecttrait} (constructor, destructor and assignment operators) to handle passing dynamic concrete type arguments into polymorphic functions, and the reference types are handled differently in these contexts so they do not satisfy this common interface.
     
    286287\end{figure}
    287288
    288 The primary issues for tuples in the \CFA type system are polymorphism and conversions.
     289\PAB{I identified} the primary issues for tuples in the \CFA type system are polymorphism and conversions.
    289290Specifically, does it make sense to have a generic (polymorphic) tuple type, as is possible for a structure?
    290291\begin{cfa}
     
    384385Scala, like \CC, provides tuple types through a library using this structural expansion, \eg Scala provides tuple sizes 1 through 22 via hand-coded generic data-structures.
    385386
    386 However, after experience gained building the \CFA runtime system, making tuple-types first-class seems to add little benefit.
     387However, after experience gained building the \CFA runtime system, \PAB{I convinced them} making tuple-types first-class seems to add little benefit.
    387388The main reason is that tuples usages are largely unstructured,
    388389\begin{cfa}
     
    571572
    572573Currently in \CFA, variadic polymorphic functions are the only place tuple types are used.
    573 And because \CFA compiles polymorphic functions versus template expansion, many wrapper functions are generated to implement both user-defined generic-types and polymorphism with variadics.
     574\PAB{My analysis showed} many wrapper functions are generated to implement both user-defined generic-types and polymorphism with variadics, because \CFA compiles polymorphic functions versus template expansion.
    574575Fortunately, the only permitted operations on polymorphic function parameters are given by the list of assertion (trait) functions.
    575576Nevertheless, this small set of functions eventually needs to be called with flattened tuple arguments.
     
    821822
    822823In general, non-standard C features (@gcc@) do not need any special treatment, as they are directly passed through to the C compiler.
    823 However, the Plan-9 semantics allow implicit conversions from the outer type to the inner type, which means the \CFA type resolver must take this information into account.
     824However, \PAB{I found} the Plan-9 semantics allow implicit conversions from the outer type to the inner type, which means the \CFA type resolver must take this information into account.
    824825Therefore, the \CFA resolver must implement the Plan-9 features and insert necessary type conversions into the translated code output.
    825826In the current version of \CFA, this is the only kind of implicit type conversion other than the standard C arithmetic conversions.
Note: See TracChangeset for help on using the changeset viewer.