Skip to content

charleskoffler/clprolf

Repository files navigation

Clprolf — Clear Programming Language & Framework

A methodology turned into a language. Good OOP becomes natural, not accidental.

Clprolf adds a conceptual layer on top of Java/C#/PHP: roles, contracts, and design rules are first-class keywords. You model systems with agents, worker agents, versions, and capacities, while the compiler enforces clarity.

If you clone the repository and find value in the project, please consider giving it a ⭐.


Scope and Positioning

Clprolf is not intended as a mainstream replacement for Java or other general-purpose languages.

It is designed for:

  • educational contexts focused on architectural clarity,
  • complex systems,
  • simulation and MAS-like applications,
  • systems requiring strong predictability and structural discipline.

Clprolf introduces explicit structural constraints through predefined roles and natures. These constraints are intentional and form part of the language’s philosophy.

Developers who prefer unrestricted class modeling and complete architectural freedom may find traditional object-oriented languages more suitable.

Clprolf is intended for contexts where early architectural control and long-term coherence are primary objectives.


🚀 Why Clprolf?

  • Safer architecture: compile-time errors prevent invalid dependencies
  • Clear concurrency: intent expressed with one_at_a_time, turn_monitor, etc.
  • Readable design: class roles (agent, worker_agent, model) explain themselves

📝 Quick Example

agent OrderService {
    with_compat OrderRepository repo;
    void checkout(Order o) { repo.save(o); }
}
  • In plain OOP: architecture drifts, concurrency bugs, endless onboarding.
  • With Clprolf: contracts explicit, roles clear, design rules enforced.

✨ Key Ideas

  • Role-based classes: agent, worker_agent, model, information, indef_obj

  • Modifiers for real-world complexity: long_action, one_at_a_time, dependent_activity

  • Works two ways:

    • Framework (annotations for Java, C#, PHP 8+)
    • Language (compiles into pure Java)

🎯 Perfect For

  • Teaching OOP and architectural thinking through structural guarantees
  • Large simulations & multi-agent systems
  • Scientific prototypes with interacting “actors”

👉 With Clprolf, your code doesn’t just run — it explains itself.


📚 Documentation — Official Clprolf Materials

Explore the complete set of official Clprolf documents. From the Language Reference Manual to focused thematic guides and conceptual insights, each resource is designed to help you understand and master the language with clarity and precision.


🧭 Start Here

  • 🚀 Getting Started with Clprolf A practical introduction showing how Clprolf makes architectural intent explicit — with real examples and enforced structural rules.

🧠 Main Documentation


⚙️ Clprolf Compiler and Frameworks

Clprolf comes with both a full compiler and lightweight annotation-based frameworks, allowing you to use the language concepts directly in Java, C#, or PHP.


🧩 Clprolf Compiler

  • Clprolf Compiler Directory The official compiler of the Clprolf language — built in Java 8 using ANTLR grammar. It translates .clp source files into pure Java, enforcing semantic rules and role coherence.

🧱 Clprolf Frameworks

Framework versions let developers use Clprolf concepts as annotations inside host languages. They bring the same clarity and role enforcement — without leaving your familiar environment.


🔬 Extended Documentation


🧩 Source Examples — Explore the Language in Action

Discover how Clprolf comes to life through concrete examples — from simple demonstrations to full applications and design patterns. Each directory showcases a different facet of the language: clarity, structure, and algorithmic expressiveness.