1 unstable release

0.1.0 Nov 25, 2024

#1451 in Data structures

Download history 125/week @ 2024-11-22 26/week @ 2024-11-29 6/week @ 2024-12-06

157 downloads per month

Apache-2.0

14KB
380 lines

STyC - Structural TYpe Compiler

STyC provides an ability to define simple high-level domain-specific type systems.

What is STyC type?

Each STyc type is represented by Shape. Shape defines possible values type con have.

There are multiple Shape meta types:

  • Scalar - shape representing scalar 128 bit value
  • Symbol - shape representing single possible value defined by it's name
  • Set - shape representing heterogeneous set of shapes
  • Vector - shape representing homogeneous directional vector of shapes with fixed length range
  • Structure - shape representing set of key value pairs
  • Nominative - shape representing named type identified by name and having undefined set of possible values

Basic Operations

All shapes define set of basic predefined operations that you can utilize to implement higher level ones.

All basic operations could be applied for all shapes, although result of operation might be undefined. For example adding two symbols is impossible due to definition of symbol.

Addition

TODO

No runtime deps