simple_rosetta

Architecture

System Overview

simple_rosetta follows a layered architecture with clear separation of concerns:

┌─────────────────────────────────────────┐
│           CLI (rosetta.exe)             │
├─────────────────────────────────────────┤
│         SIMPLE_ROSETTA (Facade)         │
├─────────────────────────────────────────┤
│  SOLUTION_STORE  │  SOLUTIONS_VALIDATOR │
├─────────────────────────────────────────┤
│           simple_sql (SQLite)           │
└─────────────────────────────────────────┘

Core Components

SIMPLE_ROSETTA (Facade)

The main entry point providing a simplified API for all operations. Delegates to specialized components.

SOLUTION_STORE

SQLite-backed storage for solution metadata and code.

SOLUTIONS_VALIDATOR

Parses .e files and extracts metadata for import.

Database Schema

CREATE TABLE solutions (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    task_name TEXT NOT NULL UNIQUE,
    tier INTEGER NOT NULL,
    class_name TEXT NOT NULL,
    file_name TEXT NOT NULL,
    source_code TEXT NOT NULL,
    description TEXT,
    rosetta_url TEXT,
    created_at TEXT DEFAULT CURRENT_TIMESTAMP
);

Tier Values

ValueMeaning
1Trivial - Hello World level
2Easy - FizzBuzz level
3Moderate - Sorting algorithms
4Complex - Graph algorithms, advanced DbC

Solution File Format

Each solution is an Eiffel class with standardized note clauses:

note
    description: "[
        Rosetta Code: Task Name
        https://rosettacode.org/wiki/Task_Name

        Brief description of the solution.
    ]"
    author: "Simple Eiffel"
    see_also: "https://github.com/simple-eiffel"
    rosetta_task: "Task_Name"
    tier: "2"

class
    TASK_NAME

create
    make

feature {NONE} -- Initialization

    make
        do
            -- Implementation
        end

end

Required Note Clauses

Directory Structure

simple_rosetta/
├── src/
│   ├── facade/
│   │   └── simple_rosetta.e
│   └── storage/
│       ├── solution_store.e
│       └── task_store.e
├── solutions/
│   ├── tier1_trivial/
│   ├── tier2_easy/
│   ├── tier3_moderate/
│   └── tier4_complex/
├── testing/
│   └── lib_tests.e
├── docs/
│   ├── index.html
│   ├── user-guide.html
│   ├── api-reference.html
│   ├── architecture.html
│   └── cookbook.html
└── simple_rosetta.ecf

Dependencies