News for hackers. Stuff that matters.
Re:Semantics of C in K Framework by sxp on Sunday December 13, 2020 @01:37PM (#25408881)
https://kframework.org/ has high level details. It says "K is a rewrite-based executable semantic framework in which programming languages, type systems and formal analysis tools can be defined using configurations, computations and rules. "

I was confused by the git repo because I thought the "K" was referring to https://en.wikipedia.org/wiki/K_(programming_language) which is a terse APL-style language.

Re:Semantics of C in K Framework by voldacar on Sunday December 13, 2020 @03:07PM (#25409712)
Yeah same
Re:Semantics of C in K Framework by smabie on Sunday December 13, 2020 @02:12PM (#25409185)
yeah me too, probably should change its name.
Re:Semantics of C in K Framework by klyrs on Sunday December 13, 2020 @02:21PM (#25409259)
Pawing through this github account, it appears that they've been using the name for about 10 years. I wouldn't suggest renaming the project, but the link title could be clearer if it read "C in the K Framework"
Re:Semantics of C in K Framework by alexisread on Sunday December 13, 2020 @03:44PM (#25410066)
The K framework is a tool to help verify semantics of languages- there are definitions for WASM, Ethereum VM, lisp, java etc.

Tbh I thought a lot of of the development had moved to K-Maude, guess I was wrong :)

http://fsl.cs.illinois.edu/pubs/serbanuta-rosu-2010-wrla-sli...

Re:Semantics of C in K Framework by sabas123 on Sunday December 13, 2020 @02:08PM (#25409147)
What is the form of the program produced by this, is it native x86 or does K provide some sort of runtime/vm style elements?

Does it fully encode all semantics? Since typically formal verifications have issues with floating point stuff (hence why we STILL don't have complete formal models of C even in 2019).

What is the performance like compared to traditional compilers?

And to me the most important, what things can we suddenly do with K that we can't easily do with a combination of other tools, since it seems that it can do a lot more but this isn't really explained all that well to an outsider IMO.

Re:Semantics of C in K Framework by jlouis on Sunday December 13, 2020 @06:28PM (#25411546)
Usually it isn't about execution of programs, but analysis of their properties.

To do so you can use eg model checking, and you require a semantic definition for doing so.

I don't recall floating point stuff being hard to encode. See eg the flocq project.

Re:Semantics of C in K Framework by tom_mellior on Monday December 14, 2020 @05:43AM (#25415525)
What's wrong with CompCert's floating point model?
Re:Semantics of C in K Framework by mratsim on Monday December 14, 2020 @03:48AM (#25414825)
The highest profile project that has been using the K framework for formal specification and formal verification is likely Ethereum:

- The K EVM, the execution environment of Ethereum Smart Contract: https://github.com/kframework/evm-semantics

- Formal verification of the Beacon Chain, the Proof-Of-Stake consensus and finality protocol for Etheruem 2.0 phase 0: https://github.com/runtimeverification/beacon-chain-verifica...

Re:Semantics of C in K Framework by ssakamoto on Sunday December 13, 2020 @02:25PM (#25409301)
The title should certainly be changed to better reflect the project, though the paper is certainly enjoyable to read