.K File Extension
KFramework Source Code File
Developer | Runtime Verification |
Popularity |
1.3 | 3 Votes |
What is a K file?
A K file contains source code written in the K programming language. Developers create K files using source code editors like Microsoft Visual Studio Code. They then compile them using the K Framework compiler, known as kompile.
More Information
K is a framework that allows developers to design and model programming languages and software and hardware systems. The framework includes its own programming language, referred to as K.
Developers working with the K Framework write programs using the K language and save those programs' source code as K files. Typically, each K file includes one or more modules, which define a program's function(s). Each module's name consists of one or more groups of letters, numbers, or underscores, separated by hyphens. Primarily, modules consist of syntax and rules. Modules can also import other modules, saved in other K files.
After a developer finishes creating their K file(s), they can use kompile to compile the files. They can then use krun to run the program their K file(s) contain.
How to open a K file
You can open a K file with Microsoft Visual Studio Code (multiplatform), Vim (Linux), GNU Emacs (multiplatform), or any other text or source code editor.
K's developer, Runtime Verification, maintains VSCode, Vim, and Emacs extensions that make editing K files in those programs easier. For information on how to download these extensions, refer to the K Framework's official documentation.