Zykov Manual 1.0

A simple guide to graph programming and semantic publishing

Zykov 1.0 Stable
Graph programming · semantic publishing · interactive hypertext

Write topology. Publish semantic spaces.

Zykov is a graph-oriented programming language and a semantic publishing system. It lets you describe graphs with algebraic expressions, attach meaning to nodes and categories, and compile the result into navigable semantic web publications.

1. Introduction

1.1 What is a graph?

A graph is a structure made of nodes and edges. Nodes represent things. Edges represent relationships between those things.

For example, a graph can represent people connected by collaboration, concepts connected by influence, or pages connected by a reading path.

A * B

In Zykov, this expression means: create a graph where A is connected to B.

1.2 What is a semantic page?

A semantic page is a web page where information is not only arranged as text, but also connected through meaning. Instead of a linear article, the page becomes a small navigable system.

  • A museum archive where artworks are connected by artist, period and technique.
  • A research notebook where concepts, lemmas and examples form a graph.
  • A newsroom where sources, events and interpretations are connected as a semantic map.

1.3 Why Zykov?

Zykov was created to make graph topology readable and writable. Instead of treating graphs as hidden data structures, Zykov turns graph expressions into visible semantic spaces.

Core idea: the topology itself becomes part of the reading experience.

2. Zykov 101

2.1 Installation

Install Zykov / Zygrafi globally from the project folder:

npm install -g .

Then test the CLI:

zygrafi --help

2.2 Your first semantic page

Create a file called hello.zyk:

Title = "Hello Zykov"
Background = "#dfe7e1"

all = {
  Title:"This is your first semantic page",
  Text:"Here you can test your semantic page."
}

Room = hello * zykov

entry hello = {
  Title:"Hello",
  Text:"This is a semantic publication node."
}

entry zykov = {
  Title:"Zykov",
  Text:"Zykov transforms graph expressions into navigable semantic spaces."
}

gallery = {
  Room -> "Main Room"
}

Compile it:

zygrafi build hello.zyk

2.3 Topics and filters

Topics allow you to group nodes semantically. They also work as visual filters in the interface.

Categories = {
  idea -> "#4db6ac",
  note -> "#ce93d8"
}

Room = (write + draw + build) :: idea + path([hello,zykov,notelab]) :: note

2.4 Adding text

Use entry blocks to attach text to nodes.

entry write = {
  Title:"Write",
  Text:"Use Zykov expressions to describe relations as graph algebra."
}

2.5 Color

Colors define the visual identity of your semantic publication.

Background = "#dfe7e1"

NodesColor = {
  entries -> "#34495e",
  general -> "#5d6d7e"
}

EdgesColor = "#7ac9a2"
ElementMeaningExample
BackgroundPage or room background#dfe7e1
CategoriesTopic colorsidea
NodesColorNode color rulesentries
EdgesColorEdge color rulesgeneral

2.6 Rooms

A room is a graph space inside a semantic gallery. It can have its own title and introductory text.

roomData "Main Room" = {
  Title: "Zygrafi NoteLab",
  Text: "A notebook-like laboratory for Zykov scripts."
}

A gallery connects one or more graph rooms to visible titles.

gallery = {
  Room -> "Main Room"
}

With several rooms:

gallery = {
  Computers -> "Computers 1960-1990",
  Anthropology -> "20th Century Anthropology",
  Sneakers -> "Sneaker History"
}

3. Tools for Designers

Studio / NoteLab

Interactive notebook environment for writing, running and inspecting Zykov scripts.

Diagnostic

Generates a visual diagnostic report and ErrorGraph when a script has structural issues.

ColorChart

Extracts the visual language of the project: backgrounds, nodes, edges, categories and room themes.

3.1 Studio / NoteLab

zygrafi studio
zygrafi studio hello.zyk

3.2 Diagnostic

zygrafi diagnostic hello.zyk

This generates:

hello.diagnostic.html

3.3 ColorChart

zygrafi colorchart hello.zyk

This generates:

hello.colorchart.html

4. Basic Functions

Zykov includes helper functions for constructing graph patterns more easily.

4.1 path

path([A,B,C,D])

Creates a path graph: A-B-C-D.

4.2 star

star(Center,[A,B,C])

Connects one center node to a list of leaves.

4.3 link

link([A,B,C])

Connects a list of graph components using the Zykov join operation.

4.4 agg

agg([G1,G2,G3])

Aggregates a list of graph components by overlay.

4.5 Lists

L = [A,B,C]
Room = path(L)

4.6 Layouts

Zykov supports several graph layouts:

Layout = "circular"
Layout = "grid"
Layout = "radial"
Layout = "forceAtlas"
Layout = "concentric"
Layout = "random"

5. Guide for Mathematicians

5.1 Your first field notebook

Use Zykov Studio as a field notebook for graph equations. Write expressions, run them, inspect the resulting topology, and annotate nodes with definitions, lemmas or examples.

Title = "Graph Field Notebook"

G = A * (B + C) + path([D,E,F])

entry A = {
  Title:"A",
  Text:"A distinguished vertex in the working graph."
}

gallery = {
  G -> "Working Graph"
}

5.2 Documenting equations

Graph expressions can become documented mathematical objects.

entry G = {
  Title:"Graph equation",
  Text:"This room documents a graph built from join and overlay operations."
}

5.3 Advanced functions for equation generalization

Functions allow reusable graph constructions.

triangle(a,b,c) = a*b + b*c + a*c

Room = triangle(A,B,C)

5.4 Practical example: n-ary trees

A simple n-ary construction can be represented by creating layers and connecting parents to children.

L1 = [A]
L2 = [B,C,D]
L3 = [E,F,G,H,I,J,K,L,M]

Room =
  star(A,L2)
+ star(B,[E,F,G])
+ star(C,[H,I,J])
+ star(D,[K,L,M])

gallery = {
  Room -> "A small n-ary tree"
}

For mathematical work: Zykov can be used as an executable notebook for graph equations, examples, visual checks and semantic documentation.

Typical Workflow

zygrafi studio myproject.zyk
zygrafi diagnostic myproject.zyk
zygrafi colorchart myproject.zyk
zygrafi build myproject.zyk

This workflow lets you write, validate, inspect and publish a semantic graph project.