Skip to content

System Documentation for Libraries

Authors
Joe Starr, Ph.D. image

Joe Starr, Ph.D.

I specialize in computational knot theory. I’m also a professional embedded software engineer.

System Architecture

flowchart LR
    ep["<< External >> 
    Entry point"]
    toml["TOML Parser"]
    rsm["Resolution State Machine"]
    io["I/O"]
    log["Log"]
    ps["Production Store"]
    jp["Janet Production"]
    pure["Pure Production"]
    range["Range Production"]
    ip["<< Interface >>
    Production"]
    ep -->|1..*| rsm
    ep -->|1..1| ps 
    ep -->|1..1| toml 
    ep -->|1..1| io 
    rsm -->|1..1| toml 
    ip -->|1..1| io 
    ip -->|1..1| log 
    rsm -->|1..1| ps 
    ep -->|1..1| log 
    rsm -->|1..1| log 
    ps -->|1..*| jp
    ps -->|1..*| pure
    ps -->|1..*| range
    jp -. Implements .-> ip
    pure -. Implements .-> ip 
    range -. Implements .-> ip 

General Design Considerations

Memory

The PDGL is to be written in C, one major consideration when using a non-memory language like C is memory leaks. The allocation (and release) of memory at runtime is complicated and error prone. To mitigate the risk of a memory leak we will restrict runtime memory allocation where possible. Instead, we will allocate memory at runtime or opt for passing of buffers.

Patterns

We will leverage the strategy pattern for defining generic productions with the interface described as the Production Interface. We will also leverage the prototype pattern for managing configurations of various 'objects'. Meaning components should not maintain internal state, any state must be passed to components.