Hi @wtedst, thank you for your interest in participating in GSoC with the Swift project!
is the command line tool mentioned supposed to be implemented in Swift or C++ (or can one choose)?
Up to you - I would recommend Swift
is the output file mentioned in the second bullet supposed to be human-readable or will only be directly used by the compiler/command line tool?
This file doesn't need to be human readable. The purpose of this file is to capture detailed information about the solutions produced by the constraint system, and it will be consumed by the separate command line tool.
how does the tool get its input? from the file mentioned above or via XPC from the compiler/SourceKit or both?
Great question! I was imagining that the command line tool takes the type inference output file as input via stdin, but we can definitely workshop this idea. I think adding a new SourceKit request for type inference information at a particular location in a source file is a great idea, and it's something we would need anyway if we ever wanted to provide this information to an editor. If you choose the SourceKit route, you might not need the output file mentioned above.
any other major knowledge/skill requirements from the compiler world (and maybe some book recommendation on that)?
From your second set of questions it looks like you are already pretty familiar with type checking! I would recommend getting to know Swift's type inference algorithm, which is described in detail here, and the new diagnostic architecture, which you can learn about on the Swift Blog.
Additionally, if this is your first time diving into the Swift project, I highly recommend setting up/building the project and trying to step through the constraint solver. For example, try setting a breakpoint in
ConstraintSystem::simplifyConstraint (in CSSimplify.cpp), compile a Swift file that contains a simple expression, and then step through the execution of the type inference algorithm. This is the best way to learn the details about the constraint solving algorithm!
Please let me know if you have any further questions!