Rascal MPL

website·Indexed 34 days ago

https://www.rascal-mpl.org/docs/

A programming language geared towards language processing, including syntax definition, parser generation, and source-to-source transformation. The documentation covers version rascal-0.42.2 and includes guides on algebraic data types, code models, and automated code analysis for tasks such as program slicing, McCabe complexity, and reaching definitions.

Tokens
442.6K
Snippets
3.2K
Records
3.7K
Agent score
69%

What's inside Rascal

  1. Overview of the Rascal Tutor compiler

    The Rascal Tutor is an authoring environment designed for education and documentation. It allows authors to create 'concept trees' where the root is the central subject and subtrees provide further explanations. It processes standard Markdown files and Rascal code modules to generate Docusaurus-compatible Markdown files for static websites.

    Key capabilities for authors include:

    • Creating and editing concepts using standard text editors.
    • Adding runnable code examples that are executed at compile time to ensure accuracy.
    • Generating automated screenshots of Web-based visualizations using a headless browser.
    • Creating links between concepts across different courses.
    • Using Rascal code to generate static visuals.
  2. Overview of Java M3 Model

    Java M3 is an immutable database implemented using persistent hash-tries, designed for fast analysis and data provenance. It represents all programmable artifacts in Java but focuses on local, static information (intra-procedural, flow and path insensitive). It is aligned with the Java AST model: decl parameters map to the declarations relation, other node decl parameters map to uses, and scope nesting maps to the containment relation. M3 models can be extracted from both source code and .class files in JARs.
  3. Overview of the Rascal interactive shell

    The Rascal shell is an interactive console (CLI/REPL) used for entering and executing Rascal expressions, statements, and declarations. In addition to standard Rascal language expressions, the shell provides specialized built-in functionality for REPL operations, command completion, history management, and specific shell commands.
  4. Overview of the Rascal Tutor pre-processor

    The Rascal Tutor is a pre-processor that takes Docusaurus Markdown files and Rascal modules (organized in hierarchical folders/packages) as input. It produces a folder hierarchy where each folder contains an index.md file. This output is designed to be consumed by downstream processors, typically the Docusaurus static website generator, to create HTML websites or PDF files.
  5. Overview of the vis::Charts module

    The vis::Charts module provides a simple API to create charts for Rascal numerical data, mirroring the chart.js JSON-based configuration API. It supports 8 different chart types and allows for multiple data sets in a single chart. The API is open to extension via common keyword parameters to support basic chart.js configurations.
    import vis::Charts;
  6. Overview of the Rascal meta-programming language

    Rascal is a procedural/functional language featuring immutable data. While it supports highly imperative coding styles, it provides declarative constructs designed to produce shorter and more readable code. It is specifically designed for meta-programming tasks.
  7. Overview of Rascal XML IO

    The lang::xml::IO module provides basic untyped IO for XML in Rascal. Readers and streamers produce values of type node for every nested tag. Because the binding is untyped, users should use the Validator module to bind resulting values to strictly typed Algebraic Data Types (ADTs).
    import lang::xml::IO;
  8. Overview of the Lucene text analysis wrapper

    The analysis.text.search.Lucene module provides a Rascal interface to the Apache Lucene framework. It allows for the creation and searching of text indices using Rascal loc (location) objects for both index directories and input documents. It supports custom Analyzers, Tokenizers, and Filters via Rascal callback functions or by specifying Lucene class names.
    import analysis::text::search::Lucene;
  9. Overview of the TypePal framework

    TypePal is a Rascal framework designed for name analysis, type checking, and type inference. It provides a standardized way to handle common type-checking challenges across different languages, including:

    • Managing name declarations, scoping, and usage.
    • Distinguishing between different name roles (e.g., functions, data types, labels, constants, or variables).
    • Handling imports and multiple namespaces.
    • Associating type-checking constraints with language syntax definitions.
    • Representing program types and managing global or local type inference.
    • Implementing overloading and generating precise error messages.
    • Extracting metadata for downstream compiler stages or IDE features like code generation, use-def information, and name completion.
  10. Overview of the Rascal Package Directory

    The Rascal Package Directory provides community-contributed libraries, tools, and frameworks. It excludes the core language implementation (interpreter, compiler, REPL, and IDE extensions). Each package includes license information, funding, citations, release notes, Maven dependency snippets, and API documentation generated from annotated sources. Packages are tested before release and document the specific Rascal version they depend on.
  11. Overview of Rascal Recipes for program development

    Rascal Recipes provide a collection of basic Rascal language examples and use cases to assist in writing Rascal programs. The recipes cover a wide range of development tasks including:

    • Basic language features and common tasks
    • Fact extraction and language/syntax definition
    • Parsing and transformation
    • Code generation
    • IDE extensions and visualization
  12. Overview of the UseTheSource organization and Rascal MPL

    Rascal MPL is part of the UseTheSource organization, an initiative from Centrum Wiskunde & Informatica (CWI) and the SWAT group in Amsterdam. UseTheSource is a collection of open-source projects focused on metaprogramming and software language engineering, including languages, libraries, tools, and IDEs. The goal is to help software engineers manage code complexity by automating cumbersome tasks. In this context, 'code' encompasses abstract models, specifications, data files, and source code across any software language.