Teaching Type Systems Implementation with Stella, an Extensible Statically Typed Programming Language
- URL: http://arxiv.org/abs/2407.08089v1
- Date: Wed, 10 Jul 2024 23:27:21 GMT
- Title: Teaching Type Systems Implementation with Stella, an Extensible Statically Typed Programming Language
- Abstract summary: The course assumes basics of classical compiler construction, in particular, the abstract syntax representation, the Visitor pattern, and parsing.
The course is built around a language Stella with a minimalistic core and a set of small extensions.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: We report on a half-semester course focused around implementation of type systems in programming languages. The course assumes basics of classical compiler construction, in particular, the abstract syntax representation, the Visitor pattern, and parsing. The course is built around a language Stella with a minimalistic core and a set of small extensions, covering algebraic data types, references, exceptions, exhaustive pattern matching, subtyping, recursive types, universal polymorphism, and type reconstruction. Optionally, an implementation of an interpreter and a compiler is offered to the students. To facilitate fast development and variety of implementation languages we rely on the BNF Converter tool and provide templates for the students in multiple languages. Finally, we report some results of teaching based on students' achievements.
Related papers
- Action Language BC+ [3.677571687801579]
Action languages are formal models of parts of natural language that describe effects of actions.<n>We propose a new action language called BC+, which closes the gap between action languages and the modern ASP language.
arXiv Detail & Related papers (2025-06-22T14:09:49Z) - On the Impact of Language Selection for Training and Evaluating
Programming Language Models [16.125924759649106]
We evaluate the similarity of programming languages by analyzing their representations using a CodeBERT-based model.
Our experiments reveal that token representation in languages such as C++, Python, and Java exhibit proximity to one another, whereas the same tokens in languages such as Mathematica and R display significant dissimilarity.
arXiv Detail & Related papers (2023-08-25T12:57:59Z) - Soft Language Clustering for Multilingual Model Pre-training [57.18058739931463]
We propose XLM-P, which contextually retrieves prompts as flexible guidance for encoding instances conditionally.
Our XLM-P enables (1) lightweight modeling of language-invariant and language-specific knowledge across languages, and (2) easy integration with other multilingual pre-training methods.
arXiv Detail & Related papers (2023-06-13T08:08:08Z) - LMentry: A Language Model Benchmark of Elementary Language Tasks [39.71352171304755]
LMentry is a benchmark that focuses on a compact set of tasks that are trivial to humans.
It provides insights into the capabilities and robustness of large language models.
arXiv Detail & Related papers (2022-11-03T18:01:12Z) - Benchmarking Language Models for Code Syntax Understanding [79.11525961219591]
Pre-trained language models have demonstrated impressive performance in both natural language processing and program understanding.
In this work, we perform the first thorough benchmarking of the state-of-the-art pre-trained models for identifying the syntactic structures of programs.
Our findings point out key limitations of existing pre-training methods for programming languages, and suggest the importance of modeling code syntactic structures.
arXiv Detail & Related papers (2022-10-26T04:47:18Z) - AST-Probe: Recovering abstract syntax trees from hidden representations
of pre-trained language models [0.6719751155411076]
We prove the existence of a textitsyntactic subspace, lying in the hidden representations of pre-trained language models.
We show that this subspace exists in five state-of-the-art pre-trained language models.
This suggests that pre-trained language models use a small part of their representation spaces to encode syntactic information of the programming languages.
arXiv Detail & Related papers (2022-06-23T14:09:05Z) - Leveraging Language to Learn Program Abstractions and Search Heuristics [66.28391181268645]
We introduce LAPS (Language for Abstraction and Program Search), a technique for using natural language annotations to guide joint learning of libraries and neurally-guided search models for synthesis.
When integrated into a state-of-the-art library learning system (DreamCoder), LAPS produces higher-quality libraries and improves search efficiency and generalization.
arXiv Detail & Related papers (2021-06-18T15:08:47Z) - Constrained Language Models Yield Few-Shot Semantic Parsers [73.50960967598654]
We explore the use of large pretrained language models as few-shot semantics.
The goal in semantic parsing is to generate a structured meaning representation given a natural language input.
We use language models to paraphrase inputs into a controlled sublanguage resembling English that can be automatically mapped to a target meaning representation.
arXiv Detail & Related papers (2021-04-18T08:13:06Z) - Language-Agnostic Representation Learning of Source Code from Structure
and Context [43.99281651828355]
We propose a new model, which jointly learns on Context and Structure of source code.
We show that jointly training on non-parallel data from multiple programming languages improves results on all individual languages.
arXiv Detail & Related papers (2021-03-21T06:46:06Z) - Linguistic Typology Features from Text: Inferring the Sparse Features of
World Atlas of Language Structures [73.06435180872293]
We construct a recurrent neural network predictor based on byte embeddings and convolutional layers.
We show that some features from various linguistic types can be predicted reliably.
arXiv Detail & Related papers (2020-04-30T21:00:53Z) - Bridging Linguistic Typology and Multilingual Machine Translation with
Multi-View Language Representations [83.27475281544868]
We use singular vector canonical correlation analysis to study what kind of information is induced from each source.
We observe that our representations embed typology and strengthen correlations with language relationships.
We then take advantage of our multi-view language vector space for multilingual machine translation, where we achieve competitive overall translation accuracy.
arXiv Detail & Related papers (2020-04-30T16:25:39Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.