A language designed to compile and execute on mathematical virtual machines.
Simplicity is the philosophy of ashlang. The language is simple to learn and expresses relationships very close to the arithmetization. Functions are globally available to encourage the development of a single, well audited, well maintained standard library of logic that can be re-used in many proving systems.
Targets
ashlang currently supports two targets:
ar1cs- an extended rank 1 constraint system that includes witness calculation instructionstasm- a novel assembly language used to express instructions for the Triton VM
Provers
ashlang supprts proving on the following systems:
TritonVM/triton-vm- usingtasmtarget in this cratemicrosoft/spartan- usingar1cstarget in chancehudson/ashlang-spartan
Language
ashlang is a scripting language for expressing mathematical relations between scalars and vectors in a finite field.
The language is untyped, with each variable being one of the following:
- scalar
- vector
- matrix (of any dimension)
ashlang is designed to be written in conjunction with a lower level language. Each file is a single function, it may be invoked using its filename. Directories are recursively imported and functions become globally available.
Features
- element-wise vector operations
- throws if vectors of mismatched size are used in an operation e.g.
val[0..10] * lav[0..5] - functions cannot be declared, each file is a single function
- files are not imported, function calls match the filename and tell the compiler what files are needed
- r1cs witnesses can be computed without specialized code