# jeremyhuiskamp/gols architecture

> Architecture diagram of the GitHub repository jeremyhuiskamp/gols, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jeremyhuiskamp/gols
- Repository: https://github.com/jeremyhuiskamp/gols

## Overview

##### Core Components
- Parser (represented in gols.go)
- Evaluator (lambda.go and primitive.go)
- Testing Framework (gols_test.go)
- Reference Implementation (original.ss)

A. Main Processing Pipeline:

- Primitive Operations (from primitive.go)
- Lambda Handling (from lambda.go)
- Core Language Features (from gols.go)

C. Testing & Verification Layer:
##### A parallel track showing
- Test Suite (gols_test.go)
- Reference Implementation (original.ss)
- Verification Flow

##### Component Relationships
- Direct relationships between the implementation and reference
- Test coverage paths
- Primitive operation connections

##### Top Layer
- High-level flow of the interpreter
- Main components interaction

##### Middle Layer
- Detailed breakdown of parser and evaluator
- Primitive operations
- Lambda handling

##### Bottom Layer
- Testing infrastructure
- Verification against reference implementation

Additional Considerations:

##### CI/CD Integration
- Travis CI workflow
- Code coverage reporting (codecov)
- Quality checks (Ebert)

##### Clear Boundaries
- Core interpreter
- Testing framework
- Reference implementation
- CI/CD pipeline

Level of Detail:

- Version control and CI/CD as peripheral components
- Clear separation between implementation and reference

Remember to maintain a balance between showing the theoretical language implementation aspects and the practical software engineering concerns like testing and CI/CD.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Main Processing Pipeline"
        Input["Input (Scheme Code)"]
        Parser["Parser"]:::parser
        AST["Abstract Syntax Tree"]
        Evaluator["Evaluator"]:::evaluator
        Output["Output"]
        
        Input --> Parser
        Parser --> AST
        AST --> Evaluator
        Evaluator --> Output
    end

    subgraph "Core Components"
        CoreInterpreter["Core Interpreter"]:::core
        LambdaHandler["Lambda Handler"]:::lambda
        PrimitiveOps["Primitive Operations"]:::primitive
        
        Evaluator --> CoreInterpreter
        Evaluator --> LambdaHandler
        Evaluator --> PrimitiveOps
    end

    subgraph "Testing & Verification"
        TestSuite["Test Suite"]:::test
        RefImpl["Reference Implementation"]:::reference
        TestRunner["Test Runner"]:::test
        
        TestSuite --> TestRunner
        RefImpl --> TestRunner
        TestRunner --> CoreInterpreter
    end

    subgraph "CI/CD Pipeline"
        TravisCI["Travis CI"]:::cicd
        CodeCov["Code Coverage"]:::cicd
        CodeQuality["Code Quality (Ebert)"]:::cicd
        
        TravisCI --> CodeCov
        TravisCI --> CodeQuality
    end

    %% Component Mappings
    click Parser "https://github.com/jeremyhuiskamp/gols/blob/master/gols.go"
    click LambdaHandler "https://github.com/jeremyhuiskamp/gols/blob/master/lambda.go"
    click PrimitiveOps "https://github.com/jeremyhuiskamp/gols/blob/master/primitive.go"
    click TestSuite "https://github.com/jeremyhuiskamp/gols/blob/master/gols_test.go"
    click RefImpl "https://github.com/jeremyhuiskamp/gols/blob/master/reference-implementation/original.ss"
    click TravisCI "https://github.com/jeremyhuiskamp/gols/blob/master/.travis.yml"
    click CodeCov "https://github.com/jeremyhuiskamp/gols/blob/master/ci/codecov.sh"
    click CodeQuality "https://github.com/jeremyhuiskamp/gols/blob/master/.ebert.yml"

    %% Styling
    classDef parser fill:#3498db
    classDef evaluator fill:#2ecc71
    classDef core fill:#95a5a6
    classDef lambda fill:#e74c3c
    classDef primitive fill:#f1c40f
    classDef test fill:#9b59b6
    classDef reference fill:#34495e
    classDef cicd fill:#1abc9c

    %% Legend
    subgraph Legend
        L1["Parser Component"]:::parser
        L2["Evaluator Component"]:::evaluator
        L3["Core Component"]:::core
        L4["Lambda Handler"]:::lambda
        L5["Primitive Operations"]:::primitive
        L6["Testing Component"]:::test
        L7["Reference Implementation"]:::reference
        L8["CI/CD Component"]:::cicd
    end
```
