Clprolf is a language and framework designed to make architectural roles explicit.
In most object-oriented systems, separation of responsibilities relies on discipline.
Clprolf encodes that discipline structurally.
Every class declares what it is.
Instead of writing:
public class OrderManager { }
In Clprolf you declare the role:
public agent OrderProcessor { }
or
public worker_agent OrderRepository { }
Each class has a declension (its architectural nature).
The core declensions are:
agent → business responsibilityworker_agent → technical executionmodel → passive domain entityinformation → technical data containerindef_obj → transitional, undefined roleindef_objClprolf does not require architectural clarity upfront.
You can begin with:
public indef_obj OrderManager {
public void process(Order order) {
validate(order);
save(order);
notify(order);
}
}
indef_obj represents a temporary state.
Refactoring can happen later.
After identifying responsibilities:
| Concern | Nature |
|---|---|
| Business validation | Business |
| Persistence | Technical |
| Notification | Technical |
You refactor:
public agent OrderProcessor {
private OrderRepository repository;
private OrderNotifier notifier;
public void process(Order order) {
validate(order);
repository.save(order);
notifier.notify(order);
}
}
public worker_agent OrderRepository { ... }
public worker_agent OrderNotifier { ... }
The behavior is unchanged. The architecture becomes explicit.
Clprolf does not only suggest discipline.
It enforces structural coherence.
Example:
public agent A1AnimalImpl nature AnimalWorker { }
This attempts to inherit a worker_agent from an agent.
Result:
ARCH-A1 => Class A1AnimalImpl:
the mother Class should be an agent (AnimalWorker)
The equivalent Java code would compile:
public class A1AnimalImpl extends AnimalWorker { }
Clprolf rejects it as architecturally inconsistent.
Clprolf also distinguishes between:
version_inh (alternative implementations)capacity_inh (shared capabilities)Example of forbidden usage:
public agent BA4Animal contracts Animal, Vehicule { }
Error:
ARCH-BA4 => contracts multiple version_inh interfaces (forbidden)
The rule prevents ambiguous role inheritance.
Clprolf does not change:
It changes:
Clprolf encodes architectural responsibility at the language level instead of leaving it to convention.