Kampa: an experimental programming language
Experimentální programovací jazyk Kampa
bachelor thesis (DEFENDED)

View/ Open
Permanent link
http://hdl.handle.net/20.500.11956/119420Identifiers
Study Information System: 222552
Collections
- Kvalifikační práce [9131]
Author
Advisor
Referee
Bednárek, David
Faculty / Institute
Faculty of Mathematics and Physics
Discipline
Programming and Software Systems
Department
Department of Distributed and Dependable Systems
Date of defense
7. 7. 2020
Publisher
Univerzita Karlova, Matematicko-fyzikální fakultaLanguage
English
Grade
Excellent
Keywords (Czech)
programovací jazyk Kampa, Truffle, JIT překladač
Keywords (English)
Kampa programming language, Truffle, JIT compiler
Kampa je všeobecný programovací jazyk. Je imperativní, ale má i rysy funkcionálního programování. Jeho nejzajímavější vlastnosti zahrnují hodnotové typy, zapisované stručně jako n-tice (tuples), rekurzivně platné immutable kvalifikátory a pojmenované operátory. Samozřejmostí je pak zacházení s funkcemi jako s hodnotami a vnitřní funkce s možností využití proměnných z vnější funkce (closures). Díky tzv. závislým typům je možné svázat velikost pole se zvolenou proměnnou. Pole se dají použít i přímo jako součásti jiných datových struktur (nejen jako reference). To ve spojení se závislými typy umožňuje do- sáhnout téměř libovolného rozložení v paměti. Kromě specifikace tato práce zahrnuje i pokusnou implementaci založenou na frameworku Truffle. 1
Kampa is a general-purpose programming language. It is imperative, but influenced by functional programming. Its distinguishing features include value types with a concise tuple syntax, immutability that applies recursively, and custom named operators. Clo- sures and first-class functions are a matter of course. Thanks to dependent types, the size of an array may be bound to any immutable variable or field. Arrays can be embed- ded in other data structures. This, in conjunction with dependent types, allows almost arbitrary memory layouts. In addition to the specification, this thesis also provides a proof-of-concept implementation built on top of Truffle. 1