Ignore:
Timestamp:
Apr 10, 2025, 5:27:36 PM (10 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master, stuck-waitfor-destruct
Children:
234c432
Parents:
6174ecc (diff), bb506e0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
doc/theses/fangren_yu_MMath
Files:
3 edited

Legend:

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

    r6174ecc rb1b513d  
    11\chapter{Conclusion}
    22
    3 The goal of this thesis is to ...
     3In the past few years of development, \CFA has gone from a proof-of-concept prototype to an actual experimental language, with a few medium-sized projects written completely in \CFA included in the language's libraries ($\approx$\,45,000 lines of code).\footnote{In Fall 2024, two amazing CS343 students completed all 6 concurrent assignments in \CFA. Many small language problems were uncovered and missing features discovered; these issues are being fixed for Fall 2025.}
     4The work done in this thesis is motivated by real needs arising from the development and testing of these projects, which often pushes the limits of \CFA's type system and compiler capabilities.
     5While most of the previous \CFA language feature and compiler developments were done either in isolation or with limited testing, getting them to work together and with real projects is presenting significant new challenges.
     6These challenges could have been foreseen before development and testing began in earnest.
    47
     8This work aims to identify and fix a number of practical issues of multiple \CFA type-system features and their interactions.
     9In particular, the inclusion of reference types, tuple types, and generic structures together with rich overloading in the language makes the complexity of expression resolution much higher than in other programming languages.
     10I significantly reworked the abstract syntax-tree representation and resolution algorithm to push the \CFA compilation time down to a practical level.
     11The expression-cost system was also revised multiple times to make overload selection more predictable and match programmer's intuition and expectation in the majority of cases.
     12Still, fundamental problems remain and fixing them will require significant changes to the language type-system, possibly from the ground up.
     13
     14As per the \CFA project motto ``describe not prescribe,'' \CFA's type system is designed to have a lot of flexibility and give programmers freedom in the usage of overloading and polymorphism.
     15With such a complex type system, it is very difficult (sometimes even impossible) to try to have the compiler accept all the intuitively valid \CFA programs.
     16As has been demonstrated, the \CFA programming language is still far from complete, and the primary future goal is to expand \CFA's type-resolution capability while maintaining, expressibility, decent compile-time, and excellent run-time performance.
     17Stealing some theoretical insights of parametric polymorphism from functional programming, may also prove to be useful.
  • doc/theses/fangren_yu_MMath/resolution.tex

    r6174ecc rb1b513d  
    151151Specifically, the resolution algorithms used in \CC and Java are greedy, selecting the best match for each subexpression without considering the higher-level ones (bottom-up).
    152152Therefore, at each resolution step, the arguments are already given unique interpretations, so the ordering only needs to compare different sets of conversion targets (function parameter types) on the same set of input.
    153 \begin{cfa}
    154 @generate a C++ example here@
    155 
    156 read more
    157 \end{cfa}
    158153
    159154In \CFA, trying to use such a system is problematic because of the presence of return-type overloading of functions and variable.
  • doc/theses/fangren_yu_MMath/uw-ethesis-frontpgs.tex

    r6174ecc rb1b513d  
    131131\begin{center}\textbf{Abstract}\end{center}
    132132
    133 Type resolution ...
     133\CFA (C-for-all) is an evolutionary extension of C programming language, which introduces many modern programming language features to C.
     134\CFA has a type system built around parametric polymorphism, and the polymorphic functions are prefixed by a @forall@ declaration of type parameters, giving the language its name.
     135
     136This thesis presents a series of work on type resolution in \CFA. Every function, including the built-in C operators, can be overloaded in \CFA, therefore resolving function overloads and generic type parameters is at the heart of \CFA expression analysis. This thesis focuses on the interactions of various \CFA language features such as reference and generic types in type resolution, analyzes the known issues and presents improvements to the type system that fix those problems. Ideas for future work are also given for further improving the consistency of \CFA type system at a language design level.
    134137
    135138\cleardoublepage
Note: See TracChangeset for help on using the changeset viewer.