CbC is an approach to create correct programs incrementally. Guided by pre-/postcondition specifications, a program is developed using refinement rules, guaranteeing the implementation is correct. With 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 deductive verifier.
CorC for information flow (C-CorC) is an extension of CorC.
Install JDK 16. CorC may not work out of the box with newer versions.
- Install Eclipse Modelling Tools (EMT) (Version 2023-09).
- Get the latest release of Z3 and add the
*/z3-[cur-version]-[x64/x32]-win/bin
folder to the environment variable PATH
-
Graphiti Install Graphiti using the update site https://download.eclipse.org/graphiti/updates/release/0.18.0
-
FeatureIDE Available in Eclipse Marketplace
-
Mylyn Available in Eclipse Marketplace (Mylyn 3.23)
-
TestNG Available in Eclipse Marketplace
-
Clone the repo:
git clone https://github.com/KIT-TVA/CorC.git
-
In EMT, select
Open Projects... -> CorC
and check the boxes for the following packages:de.tu-bs.cs.isf.cbc.exceptions
de.tu-bs.cs.isf.cbc.model
de.tu-bs.cs.isf.cbc.mutation
de.tu-bs.cs.isf.cbc.tool
de.tu-bs.cs.isf.cbc.util
de.tu-bs.cs.isf.cbcclass.tool
de.tu-bs.cs.isf.wizards
de.tu_bs.cs.isf.cbc.parser
de.tu_bs.cs.isf.cbc.statistics
de.tu_bs.cs.isf.cbc.statistics.ui
de.tu_bs.cs.isf.commands.toolbar
de.tu_bs.cs.isf.lattice
-
Open:
*.cbc.model -> model -> genmodel.genmodel
*.cbc.statistics -> model -> cbcstatistics.genmodel
Right click and
Generate Model/Edit/Editor Code
for all files listed. If EMT still displays errors, clean and rebuild all projects as described in the common issues section. -
Select any package and run project as
Eclipse Application
.
We provide different examples and case studies to explore CorC!
Create CorC-examples via File -> New -> Other... -> CorC -> CorC Examples
.
The repository you checked out contains various software product line case studies in the folder CaseStudies
. They can be loaded via File -> Open project from file system
.
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.
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.
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.
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: Clean and rebuild all projects via Project -> Clean...
.
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'
.