Checker Framework for Kotlin Support

19 views
Skip to first unread message

nic ch

unread,
Jul 28, 2023, 11:05:50 AM7/28/23
to Checker Framework discussion
Correct me if I am wrong but Checker Framework does not support Kotlin mainly because the framework uses Java AST APIs. Are there any other reasons why it is not able to support Kotlin? 

Also does checkerframework work on Java .class files or JVM bytecode?

Michael Ernst

unread,
Jul 28, 2023, 11:18:45 AM7/28/23
to nic ch, Checker Framework discussion
You are correct:  the Checker Framework does not support Kotlin.  It would be possible to add Kotlin support by duplicating some of the code that uses javac APIs.  There is no conceptual barrier, but it would be quite a bit of engineering work.  We would accept a pull request that did this.

The same reason applies to type-checking bytecode.  However, I don't think this is as compelling a use case.  The Checker Framework is a specify-and-verify tool:  the programmer specifies the code's intended behavior, and the Checker Framework verifies the code.  It isn't as convenient to specify code for which you don't have access to the source code, and lack of access to the source code also makes it difficult to fix bugs that the Checker Framework uncovers.  But this is possible with the Checker Framework, using mechanisms such as annotation files (stub and ajava files).

-Mike

On Fri, Jul 28, 2023 at 8:05 AM nic ch <ncwb...@gmail.com> wrote:
Correct me if I am wrong but Checker Framework does not support Kotlin mainly because the framework uses Java AST APIs. Are there any other reasons why it is not able to support Kotlin? 

Also does checkerframework work on Java .class files or JVM bytecode?

--

---
You received this message because you are subscribed to the Google Groups "Checker Framework discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to checker-framework-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/checker-framework-discuss/5cee9086-829b-416b-8b43-def1edfad3a3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages