CorC
With CorC, we implemented an IDE to create programs following the Correctness-by-Construction approach. Starting with an abstract specification, CorC supports CbC developers in refining a program by a sequence of refinement steps and in verifying the correctness of these refinements.
Description
CorC
Correctness-by-Construction (CbC) is an approach to incrementally create correct programs. Guided by pre-/postcondition specications, a program is created using refinement rules, guaranteeing the resulting implementation is correct. With the Eclipse plugin CorC, we implemented a graphical and textual IDE to create programs following the CbC approach. Starting with an abstract specification, CorC supports CbC developers in refining a program by a sequence of refinement steps and in verifying the correctness of these refinement steps using a theorem prover.
WebCorC
With WebCorC, we offer a basic version of CorC in the web without the need to set up Eclipse.
C-CorC
CorC for information flow (C-CorC) is an extension of CorC.
Getting Started
CorC requires Eclipse Modelling Tools (EMT) to be installed and extended with various plugins.
Java Version
Install JDK 16. CorC may not work out of the box with newer versions.
Software
- Install Eclipse Modelling Tools (Version 2023-09).
- Get the latest release of Z3 and add the
*/z3-[cur-version]-[x64/x32]-win/binfolder to the environment variable PATH
EMT Plugins
-
Graphiti Install Graphiti using the update site https://download.eclipse.org/graphiti/updates/0.18.0/
-
KeY Install KeY using the update site https://formal.iti.kit.edu/key/download/releases/2.6/eclipse/ (disable
Group itemsto show available plugins, install all) -
Xtext Available in Eclipse Marketplace
-
FeatureIDE Available in Eclipse Marketplace
-
Mylyn Available in Eclipse Marketplace (Mylyn 3.23)
-
TestNG Available in Eclipse Marketplace
CorC Setup
-
Clone the repo:
git clone https://github.com/KIT-TVA/CorC.git -
Install JaMoPP using the two plugins inside package
*.tool.update(disableGroup itemsto show available plugins). -
Open the following packages in Eclipse Modelling Tools:
de.tu-bs.cs.isf.cbc.exceptionsde.tu-bs.cs.isf.cbc.modelde.tu-bs.cs.isf.cbc.mutationde.tu-bs.cs.isf.cbc.toolde.tu-bs.cs.isf.cbc.utilde.tu-bs.cs.isf.cbcclass.toolde.tu-bs.cs.isf.wizardsde.tu_bs.cs.isf.cbc.parserde.tu_bs.cs.isf.cbc.statisticsde.tu_bs.cs.isf.cbc.statistics.uide.tu_bs.cs.isf.commands.toolbarde.tu_bs.cs.isf.lattice
-
Open:
*.cbc.model -> model -> genmodel.genmodel*.cbc.statistics -> model -> cbcstatistics.genmodel
Right click and
Generate Model/Edit/Editor Codefor all files listed. -
Select any package and run project as
Eclipse Application.
Examples & Case Study Introduction
We provide different examples and case studies to explore CorC!
Examples
Create CorC-examples via File -> New -> Other... -> CorC -> CorC Examples Select examples you want to create.
Case studies
The repository you checked out contains various software product line case studies. They can be loaded via File -> Open project from file system.
BankAccount
The BankAccount implements basic functions of a bank account such as withdrawals, limits, money transfers and checking the account balance.
- BankAccount Object-oriented implementation with class structure and CbC-Classes.
- BankAccountOO Object-oriented implementation with class structure and CbC-Classes. Non-SPL implementation.
Elevator
The Elevator implements basic functions of an elevator such as the movement and entering and leaving of persons.
- Elevator Object-oriented implementation with class structure and CbC-Classes.
The product line Email implements basic functions of an email system including server- and client-side interactions.
- EmailOO Object-oriented implementation with class structure and CbC-Classes. Non-SPL implementation.
- EmailFeatureInteraction Java-Implementation without implementation with CbC.
IntegerList
The IntegerList implements a list of integers with add and sort operations.
- IntegerList Object-oriented implementation with class structure and CbC-Classes.
- IntegerListOO Object-oriented implementation with class structure and CbC-Classes. Non-SPL implementation.
Common Issues
Problem: EMT gets stuck while trying to generate a model.
Solution: Terminate EMT using any process manager and generate the model again.
Problem: Multiple resolving errors after generating model files.
Solution: Uninstall JaMoPP Plugins via Window -> Preferences -> Install/Update -> Uninstall or update. Afterwards reinstall as described above.
Problem: Cycling depedency issues.
Solution: Navigate to: Project -> Properties -> Java Compiler -> Building -> Configure Workspace Settings -> Build path problems -> Circular dependencies and set the listbox to Warning.
Problem: Errors in certain files about undefined methods and classes.
Solution: Changing the compliance: Project -> Java Compiler -> JDK Complicance -> Use compliance from execution environment 'JavaSE-16'.
Participating organisations
Reference papers
- 1.Author(s): Tabea Bordis, Maximilian Kodetzki, Tobias Runge, Ina SchaeferPublished in Lecture Notes in Computer Science, Software Engineering and Formal Methods. SEFM 2022 Collocated Workshops by Springer International Publishing in 2023, page: 156-16310.1007/978-3-031-26236-4_13
- 2.Author(s): Tabea Bordis, Loek Cleophas, Alexander Kittelmann, Tobias Runge, Ina Schaefer, Bruce W. WatsonPublished in Lecture Notes in Computer Science, The Logic of Software. A Tasting Menu of Formal Methods by Springer International Publishing in 2022, page: 80-10410.1007/978-3-031-08166-8_5
- 3.Author(s): Tobias Runge, Tabea Bordis, Thomas Thüm, Ina SchaeferPublished in Lecture Notes in Computer Science, Formal Methods Teaching by Springer International Publishing in 2021, page: 101-11610.1007/978-3-030-91550-6_8
- 4.Author(s): Tobias Runge, Ina Schaefer, Loek Cleophas, Thomas Thüm, Derrick Kourie, Bruce W. WatsonPublished in Lecture Notes in Computer Science, Fundamental Approaches to Software Engineering by Springer International Publishing in 2019, page: 25-4210.1007/978-3-030-16722-6_2
Mentions
- 1.Author(s): Bernhard Beckert, Richard Bubel, Daniel Drodt, Reiner Hähnle, Florian Lanzinger, Wolfram Pfeifer, Mattias Ulbrich, Alexander WeiglPublished in Lecture Notes in Computer Science, Formal Methods by Springer Nature Switzerland in 2024, page: 597-62310.1007/978-3-031-71177-0_32
- 2.Author(s): Maximilian Kodetzki, Tabea Bordis, Michael Kirsten, Ina SchaeferPublished in Lecture Notes in Computer Science, Leveraging Applications of Formal Methods, Verification and Validation. Software Engineering Methodologies by Springer Nature Switzerland in 2024, page: 222-24110.1007/978-3-031-75387-9_14
- 3.Author(s): Tobias Runge, Alexander Kittelmann, Marco Servetto, Alex Potanin, Ina SchaeferPublished in Lecture Notes in Computer Science, Software Engineering and Formal Methods by Springer International Publishing in 2022, page: 209-22610.1007/978-3-031-17108-6_13
- 4.Author(s): Bernhard Beckert, Richard Bubel, Reiner Hähnle, Mattias UlbrichPublished in Lecture Notes in Computer Science, Leveraging Applications of Formal Methods, Verification and Validation. Software Engineering by Springer Nature Switzerland in 2022, page: 281-30010.1007/978-3-031-19756-7_16
- 5.Author(s): Alexander Kittelmann, Tobias Runge, Tabea Bordis, Ina SchaeferPublished in Lecture Notes in Computer Science, Leveraging Applications of Formal Methods, Verification and Validation. Verification Principles by Springer International Publishing in 2022, page: 242-26310.1007/978-3-031-19849-6_15
- 6.Author(s): Reiner HähnlePublished in Edsger Wybe Dijkstra by ACM in 2022, page: 105-14010.1145/3544585.3544593
- 7.Author(s): Tobias Runge, Alex Potanin, Thomas Thüm, Ina SchaeferPublished in Lecture Notes in Computer Science, Formal Techniques for Distributed Objects, Components, and Systems by Springer International Publishing in 2022, page: 131-15010.1007/978-3-031-08679-3_9
- 8.Author(s): Alexander Knüppel, Tobias Runge, Ina SchaeferPublished in Lecture Notes in Computer Science, Leveraging Applications of Formal Methods, Verification and Validation: Verification Principles by Springer International Publishing in 2020, page: 187-20710.1007/978-3-030-61362-4_10
- 9.Author(s): Tobias Runge, Thomas Thüm, Loek Cleophas, Ina Schaefer, Bruce W. WatsonPublished in Lecture Notes in Computer Science, Formal Methods. FM 2019 International Workshops by Springer International Publishing in 2020, page: 388-40510.1007/978-3-030-54997-8_25
- 1.Author(s): Maximilian Kodetzki, Tabea Bordis, Alex Potanin, Ina SchaeferPublished in Proceedings of the 2025 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software by ACM in 2025, page: 99-11510.1145/3759429.3762623
- 2.Author(s): Maximilian Kodetzki, Tabea Bordis, Tobias Runge, Ina SchaeferPublished in Proceedings of the 18th International Working Conference on Variability Modelling of Software-Intensive Systems by ACM in 2024, page: 17-2610.1145/3634713.3634714
- 3.Author(s): Ina Schaefer, Tobias Runge, Loek Cleophas, Bruce W. WatsonPublished in 2021 IEEE Secure Development Conference (SecDev) by IEEE in 2021, page: 1-210.1109/secdev51306.2021.00012
- 1.Author(s): Anurudh Peduri, Ina Schaefer, Michael WalterPublished in Proceedings of the ACM on Programming Languages by Association for Computing Machinery (ACM) in 2025, page: 534-56210.1145/3720433
- 2.Author(s): Tabea Bordis, Maximilian Kodetzki, Ina SchaeferPublished in Computer by Institute of Electrical and Electronics Engineers (IEEE) in 2024, page: 113-11910.1109/mc.2024.3390948
- 3.Author(s): Tobias Runge, Tabea Bordis, Alex Potanin, Thomas Thüm, Ina SchaeferPublished in Logical Methods in Computer Science by Centre pour la Communication Scientifique Directe (CCSD) in 202310.46298/lmcs-19(2:16)2023
- 4.Author(s): Changjing WANG, Zhongxiong CAO, Chuling YU, Changchang WANG, Qing HUANG, Zhengkang ZUOPublished in Wuhan University Journal of Natural Sciences by EDP Sciences in 2023, page: 246-25610.1051/wujns/2023283246
- 5.Author(s): Muhammad Fezan Afzal, Imran Khan, Javed Rashid, Mubbashar Saddique, Heba G. MohamedPublished in Computers, Materials & Continua by Tech Science Press in 2023, page: 3653-367010.32604/cmc.2023.041627
- 6.Author(s): Zhengkang ZUO, Ying HU, Qing HUANG, Yuan WANG, Changjing WANGPublished in Wuhan University Journal of Natural Sciences by EDP Sciences in 2022, page: 405-41410.1051/wujns/2022275405
- 7.Author(s): Tabea Bordis, Tobias Runge, David Schultz, Ina SchaeferPublished in Journal of Computer Languages by Elsevier BV in 2022, page: 10111910.1016/j.cola.2022.101119
- 1.Author(s): Rosaine F. Semler, Jhonnatan R. Semler, Marco A. Wehrmeister, Luiz F. P. Southier, César A. Uribe, José E. R. Cury, Marcelo TeixeiraPublished in 202510.1109/icpm66919.2025.11220671
- 2.Author(s): Maximilian KodetzkiPublished in 202510.1109/issrew67781.2025.00053
- 3.Author(s): Rémi Garcia, Paolo ModestiPublished in 202410.3390/electronics13234660
- 4.Author(s): Tobias Runge, Tabea Bordis, Alex Potanin, Thomas Thüm, Ina SchaeferPublished by arXiv in 202210.48550/arxiv.2211.15261
Contributors
Contact person
Related projects
Core Informatics
A Helmholtz Pilot Program