SGCC

From Esolang
Jump to navigation Jump to search

SGCC, named after the State Grid Corporation of China listed on wikipedia as the third largest company by revenue, as of writing, is an esolang created by User:Yayimhere, as a highly simple, graph esolang. SGCC could be considered a Computational model, but it does have a sort of, "set syntax".

Memory model

SGCC uses a non directed graph, with each node holding a number in the set of decimals. Any starting SGCC graph is finite, but it can(and most likely will) grow infinitely.

Semantics

Every iteration of SGCC consists of constructing a new graph from the old one, to be iterated on with the same process, halting if the new graph hasn't changed. For every node thats connected, take their product, and create a new node with the result, connecting the original ones to that node. If a node is created with the same value as another one they are merged. This is the only process of computation.

Extensions

I/O may me implemented. For every node, it can be marked with a p at the end. This will get it printed every iteration. Replacing a node with i will take a number input at the start of the program, and I will take input on every iteration.

Syntax

For every node x connecting to y, write:

x y

each on a separate line. A negative number is ofcourse -x and decimals are written using commas.