Announcement

Collapse
No announcement yet.

Psychec: A Type Inference Engine For C, The C Language Meets Unification

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Psychec: A Type Inference Engine For C, The C Language Meets Unification

    Phoronix: Psychec: A Type Inference Engine For C, The C Language Meets Unification

    Psychec is a research project out of the Universidade Federal de Minas Gerais (UFMG) in Brazil that is trying to be a type inference engine for incomplete C code. Here is a small guest post by the Psyche team about their work...

    http://www.phoronix.com/scan.php?pag...r-Incomplete-C

  • #2
    Cool, never thought that our universities had this kind of stuff, and for the developer writing to phoronix, probably he/she is a forum user, so congrats to @someone

    Comment


    • #3
      What is the point?

      Comment


      • #4
        Originally posted by stqn View Post
        What is the point?
        It's on their website.

        Comment


        • #5
          To accomplish this compilation of an incomplete C program we have developed an unification-based algorithm (Hindley-Milner style) that is capable of inferring any missing declaration.
          That should save C programmers having to declare anything at all. It's even better than auto! Also, I suppose we can just forget about the upcoming Modules TS, since there'll be no need to include headers any more.
          \end{sarcasm}

          This is actually a really cool project. At a brief glance, it seems to be a written-from-scratch C compiler, which is itself written in C++14, using Haskell for the inference part. I'm not too sure what the use for it is though, outside of being a novel research project. Perhaps parts could be integrated into the mainstream compilers to provide better fix-it hints for automatically correcting trivial errors in source code?

          Comment


          • #6
            Very nice project, impressive results. I can see a number of interesting applications, but I think it could be most useful as part of an IDE, compiling code that is not complete yet (with a few adjustments, and more checking for false positives), and giving better autocompletion.

            Comment

            Working...
            X