UnifyWeaver

UnifyWeaver

A Prolog transpiler that turns logic programs into LINQ-style data pipelines.

One codebase → Bash streams, C# queries, Go binaries, SQL views, and more.


📦 Project Documentation (code)

📚 Educational Materials (13-Book Series)

Core Sequence

Portable Targets

Integration & Advanced

View All Books →


Key Features


Example: CSV to JSON Pipeline

Input (Prolog):

% Define data source
csv_source(users/4, [
    file('users.csv'),
    has_header(true)
]).

% Define transformation
process_user(Name, Age, City, Output) :-
    Age >= 18,
    format(string(Output),
           '{"name":"~w","age":~w,"city":"~w"}',
           [Name, Age, City]).

% Compile to bash
?- compile_to_bash(process_user/4, BashScript).

Output (Bash):

#!/bin/bash
# Streaming CSV processor with age filter

tail -n +2 users.csv | while IFS=',' read name age city _; do
    if (( age >= 18 )); then
        printf '{"name":"%s","age":%d,"city":"%s"}\n' \
               "$name" "$age" "$city"
    fi
done

Use Cases


Getting Started

  1. Installation
    git clone https://github.com/s243a/UnifyWeaver.git
    cd UnifyWeaver
    swipl examples/load_demo.pl
    
  2. Learn the Basics
  3. Explore Examples
    • See examples/ in the repository
    • Run demos: swipl examples/data_sources_demo.pl

Recent Updates

December 2025

November 2025


Documentation

For Users

For Learners

For Developers


Community


License


This site is published from the gh-pages branch.
Source: github.com/s243a/UnifyWeaver