CC++
1 program
Added 2026-03-13T10:00:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: Compositional C++
Provenance: commit cb1ebd4b74 · authored 2026-03-13T01:05:29+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
2 sources · pl_id:
pl/ccRelated languages
LLM-contributed programs
Parallel Fibonacci
Provenance: commit cb1ebd4b74 · authored 2026-03-13T01:05:29+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
/* CC++ (Compositional C++) parallel Fibonacci
* Demonstrates par{} blocks for parallel task creation and sync variables.
* K.M. Chandy & C. Kesselman, "CC++: A Declarative Concurrent
* Object-Oriented Programming Notation", Caltech TR-92-02, 1992.
*/
#include <iostream>
using namespace std;
int fib(int n) {
if (n <= 1) return n;
sync int f1, f2;
par {
f1 = fib(n - 1);
f2 = fib(n - 2);
}
return f1 + f2;
}
int main() {
for (int i = 0; i <= 10; i++)
cout << "fib(" << i << ") = " << fib(i) << endl;
return 0;
}
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)