SlideShare a Scribd company logo
1 of 16
K Framework
Joint project between
the FSL group at UIUC (USA) and
the FMSE group at UAIC (Romania)
k-framework.org
K Team
• UIUC, USA
– Grigore Rosu (started K in 2003)
– Cansu Erdogan
– Dwight Guth
– David Lazar
– Patrick Meredith
– Andrei Stefanescu
Former members
– Kyle Blocher
– Peter Dinges
– Chucky Ellison
– Mike Ilseman
– Traian Serbanuta
• UAIC, Iasi, Romania
– Dorel Lucanu
– Traian Serbanuta
– Andrei Arusoae
– Denis Bogdanas
– Stefan Ciobaca
– Gheorghe Grigoras
– Radu Mereuta
– Raluca Necula
– Emilian Necula
Former Members
– Irina Asavoae
– Mihai Asavoae
Current State-of-the-Art in PL Design,
Implementation and Analysis
Consider some programming language, L
• Formal semantics of L?
– Typically skipped: considered expensive and useless
• Implementations for L
– Based on some adhoc understanding of what L is
• Model checkers for L
– Based on some adhoc encodings/models of L
• Program verifiers for L
– Based on some other adhoc encodings/models of L
• …
Example of C Program
• What should the following program evaluate to?
• According to the C “standard”, it is undefined
• GCC4, MSVC: it returns 4
GCC3, ICC, Clang: it returns 3
By April 2011, both Frama-C (with its Jessie
verification plugin) and Havoc "prove" it returns 4
int main(void) {
int x = 0;
return (x = 1) + (x = 2);
}
A Formal Semantics Manifesto
• Programming languages must have formal
semantics! (period)
– And analysis/verification tools should build on them
• Otherwise they are adhoc and likely wrong
• Informal manuals are not sufficient
– Manuals typically have a formal syntax of the
language (in an appendix)
– Why not a formal semantics appendix as well?
Motivation and Goal
We want a semantic framework
which makes it easy and fun to define
programming languages, no matter
how complex or large they are!
The K Framework
k-framework.org
A tool-supported rewrite-based
framework for defining programming
language design and semantics.
Complete K Definition of KernelC
Complete K Definition of KernelC
Syntax declared using annotated BNF
…
Complete K Definition of KernelC
Configuration given as a nested cell structure.
Leaves can be sets, multisets, lists, maps, or syntax
Complete K Definition of KernelC
Semantic rules given contextually
<k> X = V => V …</k>
<env>… X |-> (_ => V) …</env>
State-space exploration (search and model-checking)
Efficient and interactive execution (interpreters)
…
cfg[pgm]
What does the K Tool Offer?
…
…
Deductive program verification (in progress)
K Scales
Besides smaller and paradigmatic teaching
languages, several larger languages were defined
• Java 1.4 : by Chen [CAV’06]
• Verilog : by Meredith&Katelman [MEMOCODE’10]
• C : by Chucky Ellison [POPL’12]
etc.
The K Configuration of C
75 Cells!
Heap
Statistics for the C definition
• Total number of rules: ~1200
• Tested on thousands of C programs (several
benchmarks, including the gcc torture test, code
from the obfuscated C competition, etc.)
– Passed 99.2% so far!
– GCC 4.1.2 passes 99%, ICC 99.4%, Clang 98.3% (no opt.)
• The most complete formal C semantics
Next Steps
• Watch the five-minute video demo
• Download the K tool
• Do the K Tutorial
• Define your own language!
• Watch the interview on rewrite-based semantics
if you’d like to better understand our viewpoint
• Read select publications for a deeper
understanding of K’s foundations

More Related Content

Viewers also liked

richards keynote
richards keynote richards keynote
richards keynote
richardskd
 
Dracula presentation with answers ok
Dracula presentation with answers okDracula presentation with answers ok
Dracula presentation with answers ok
alexteacherproa
 
8 Colorful Ideas for My Country (Filipinization)
8 Colorful Ideas for My Country (Filipinization)8 Colorful Ideas for My Country (Filipinization)
8 Colorful Ideas for My Country (Filipinization)
Jose Radin Garduque
 
Dracula presentation with answers ok
Dracula presentation with answers okDracula presentation with answers ok
Dracula presentation with answers ok
alexteacherproa
 

Viewers also liked (20)

Philippine Civil War Theories
Philippine Civil War TheoriesPhilippine Civil War Theories
Philippine Civil War Theories
 
richards keynote
richards keynote richards keynote
richards keynote
 
Singapore (Socio-Cultural Setting)
Singapore (Socio-Cultural Setting)Singapore (Socio-Cultural Setting)
Singapore (Socio-Cultural Setting)
 
Lagopus on small arm board
Lagopus on small arm boardLagopus on small arm board
Lagopus on small arm board
 
cgfh
cgfhcgfh
cgfh
 
Dracula presentation with answers ok
Dracula presentation with answers okDracula presentation with answers ok
Dracula presentation with answers ok
 
Singapore: Economic Setting
Singapore: Economic SettingSingapore: Economic Setting
Singapore: Economic Setting
 
PARADIGMAS URBANOS. Guía sitio 2016
PARADIGMAS URBANOS. Guía sitio 2016PARADIGMAS URBANOS. Guía sitio 2016
PARADIGMAS URBANOS. Guía sitio 2016
 
Vietnam: Economic Setting
Vietnam: Economic SettingVietnam: Economic Setting
Vietnam: Economic Setting
 
Day 3
Day 3Day 3
Day 3
 
8 Questions to My Opponents in Pilipinas Debates 2016
8 Questions to My Opponents in Pilipinas Debates 20168 Questions to My Opponents in Pilipinas Debates 2016
8 Questions to My Opponents in Pilipinas Debates 2016
 
Myanmar: Political Setting
Myanmar: Political SettingMyanmar: Political Setting
Myanmar: Political Setting
 
Indonesia: Socio-Cultural Setting
Indonesia: Socio-Cultural SettingIndonesia: Socio-Cultural Setting
Indonesia: Socio-Cultural Setting
 
8 Colorful Ideas for My Country (Filipinization)
8 Colorful Ideas for My Country (Filipinization)8 Colorful Ideas for My Country (Filipinization)
8 Colorful Ideas for My Country (Filipinization)
 
Cambodia
CambodiaCambodia
Cambodia
 
Indonesia (Economic Setting)
Indonesia (Economic Setting)Indonesia (Economic Setting)
Indonesia (Economic Setting)
 
Dracula presentation with answers ok
Dracula presentation with answers okDracula presentation with answers ok
Dracula presentation with answers ok
 
Site kalu
Site kaluSite kalu
Site kalu
 
Knowtech training
Knowtech trainingKnowtech training
Knowtech training
 
Cambodia: Socio-Cultural Setting
Cambodia: Socio-Cultural SettingCambodia: Socio-Cultural Setting
Cambodia: Socio-Cultural Setting
 

Similar to K overview

PADRL Presentation 2001-11-03
PADRL Presentation 2001-11-03PADRL Presentation 2001-11-03
PADRL Presentation 2001-11-03
Mikael Nilsson
 
The Concept Of Abstract Data Types
The Concept Of Abstract Data TypesThe Concept Of Abstract Data Types
The Concept Of Abstract Data Types
Katy Allen
 
Refactoring Organizations - A Netflix Study (QCon NYC 2017)
Refactoring Organizations - A Netflix Study (QCon NYC 2017)Refactoring Organizations - A Netflix Study (QCon NYC 2017)
Refactoring Organizations - A Netflix Study (QCon NYC 2017)
Josh Evans
 
C-and-Cpp-Brochure-English. .
C-and-Cpp-Brochure-English.               .C-and-Cpp-Brochure-English.               .
C-and-Cpp-Brochure-English. .
spotguys705
 

Similar to K overview (20)

PADRL Presentation 2001-11-03
PADRL Presentation 2001-11-03PADRL Presentation 2001-11-03
PADRL Presentation 2001-11-03
 
Metamorphic Domain-Specific Languages
Metamorphic Domain-Specific LanguagesMetamorphic Domain-Specific Languages
Metamorphic Domain-Specific Languages
 
Clariah Tech Day: Controlled Vocabularies and Ontologies in Dataverse
Clariah Tech Day: Controlled Vocabularies and Ontologies in DataverseClariah Tech Day: Controlled Vocabularies and Ontologies in Dataverse
Clariah Tech Day: Controlled Vocabularies and Ontologies in Dataverse
 
Source-to-source transformations: Supporting tools and infrastructure
Source-to-source transformations: Supporting tools and infrastructureSource-to-source transformations: Supporting tools and infrastructure
Source-to-source transformations: Supporting tools and infrastructure
 
Computer Programming - Lecture E
Computer Programming - Lecture EComputer Programming - Lecture E
Computer Programming - Lecture E
 
20080115 04 - La qualimétrie pour comprendre et appréhender les SI
20080115 04 - La qualimétrie pour comprendre et appréhender les SI20080115 04 - La qualimétrie pour comprendre et appréhender les SI
20080115 04 - La qualimétrie pour comprendre et appréhender les SI
 
History of c programming language.
History of c programming language.History of c programming language.
History of c programming language.
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Lec1.pptx
Lec1.pptxLec1.pptx
Lec1.pptx
 
Simon Brown: Software Architecture as Code at I T.A.K.E. Unconference 2015
Simon Brown: Software Architecture as Code at I T.A.K.E. Unconference 2015Simon Brown: Software Architecture as Code at I T.A.K.E. Unconference 2015
Simon Brown: Software Architecture as Code at I T.A.K.E. Unconference 2015
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
 
Usability evaluation of Domain-Specific Languages
Usability evaluation of Domain-Specific LanguagesUsability evaluation of Domain-Specific Languages
Usability evaluation of Domain-Specific Languages
 
The Concept Of Abstract Data Types
The Concept Of Abstract Data TypesThe Concept Of Abstract Data Types
The Concept Of Abstract Data Types
 
The Software Engineering Discipline and Evolution of S/W Engineering Methodol...
The Software Engineering Discipline and Evolution of S/W Engineering Methodol...The Software Engineering Discipline and Evolution of S/W Engineering Methodol...
The Software Engineering Discipline and Evolution of S/W Engineering Methodol...
 
Refactoring Organizations - A Netflix Study (QCon NYC 2017)
Refactoring Organizations - A Netflix Study (QCon NYC 2017)Refactoring Organizations - A Netflix Study (QCon NYC 2017)
Refactoring Organizations - A Netflix Study (QCon NYC 2017)
 
intro.pptx
intro.pptxintro.pptx
intro.pptx
 
Btech IT Sem VII and VIII-1 (1).pdf
Btech IT Sem VII and VIII-1 (1).pdfBtech IT Sem VII and VIII-1 (1).pdf
Btech IT Sem VII and VIII-1 (1).pdf
 
C-and-Cpp-Brochure-English. .
C-and-Cpp-Brochure-English.               .C-and-Cpp-Brochure-English.               .
C-and-Cpp-Brochure-English. .
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Uc14 chap13
Uc14 chap13Uc14 chap13
Uc14 chap13
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 

K overview

  • 1. K Framework Joint project between the FSL group at UIUC (USA) and the FMSE group at UAIC (Romania) k-framework.org
  • 2. K Team • UIUC, USA – Grigore Rosu (started K in 2003) – Cansu Erdogan – Dwight Guth – David Lazar – Patrick Meredith – Andrei Stefanescu Former members – Kyle Blocher – Peter Dinges – Chucky Ellison – Mike Ilseman – Traian Serbanuta • UAIC, Iasi, Romania – Dorel Lucanu – Traian Serbanuta – Andrei Arusoae – Denis Bogdanas – Stefan Ciobaca – Gheorghe Grigoras – Radu Mereuta – Raluca Necula – Emilian Necula Former Members – Irina Asavoae – Mihai Asavoae
  • 3. Current State-of-the-Art in PL Design, Implementation and Analysis Consider some programming language, L • Formal semantics of L? – Typically skipped: considered expensive and useless • Implementations for L – Based on some adhoc understanding of what L is • Model checkers for L – Based on some adhoc encodings/models of L • Program verifiers for L – Based on some other adhoc encodings/models of L • …
  • 4. Example of C Program • What should the following program evaluate to? • According to the C “standard”, it is undefined • GCC4, MSVC: it returns 4 GCC3, ICC, Clang: it returns 3 By April 2011, both Frama-C (with its Jessie verification plugin) and Havoc "prove" it returns 4 int main(void) { int x = 0; return (x = 1) + (x = 2); }
  • 5. A Formal Semantics Manifesto • Programming languages must have formal semantics! (period) – And analysis/verification tools should build on them • Otherwise they are adhoc and likely wrong • Informal manuals are not sufficient – Manuals typically have a formal syntax of the language (in an appendix) – Why not a formal semantics appendix as well?
  • 6. Motivation and Goal We want a semantic framework which makes it easy and fun to define programming languages, no matter how complex or large they are!
  • 7. The K Framework k-framework.org A tool-supported rewrite-based framework for defining programming language design and semantics.
  • 9. Complete K Definition of KernelC Syntax declared using annotated BNF …
  • 10. Complete K Definition of KernelC Configuration given as a nested cell structure. Leaves can be sets, multisets, lists, maps, or syntax
  • 11. Complete K Definition of KernelC Semantic rules given contextually <k> X = V => V …</k> <env>… X |-> (_ => V) …</env>
  • 12. State-space exploration (search and model-checking) Efficient and interactive execution (interpreters) … cfg[pgm] What does the K Tool Offer? … … Deductive program verification (in progress)
  • 13. K Scales Besides smaller and paradigmatic teaching languages, several larger languages were defined • Java 1.4 : by Chen [CAV’06] • Verilog : by Meredith&Katelman [MEMOCODE’10] • C : by Chucky Ellison [POPL’12] etc.
  • 14. The K Configuration of C 75 Cells! Heap
  • 15. Statistics for the C definition • Total number of rules: ~1200 • Tested on thousands of C programs (several benchmarks, including the gcc torture test, code from the obfuscated C competition, etc.) – Passed 99.2% so far! – GCC 4.1.2 passes 99%, ICC 99.4%, Clang 98.3% (no opt.) • The most complete formal C semantics
  • 16. Next Steps • Watch the five-minute video demo • Download the K tool • Do the K Tutorial • Define your own language! • Watch the interview on rewrite-based semantics if you’d like to better understand our viewpoint • Read select publications for a deeper understanding of K’s foundations