mps-coderules/docs/content/todo/todo-language.md

2.2 KiB

TODO Language

Language aspect

  • aspects
    • language defines aspect (eg. typechecking)
    • languages using this aspect define handlers

Handler

  • create handler, optionally extend another handler
  • declare constraints
  • define rule template
    • for concept, standalone
    • applicability condition
    • what purpose does the body serve
      • reporting errors
      • require statement
      • what features are available in a rule
  • introduce constraint production
    • declare logical variables
    • on start
    • on … defining head
      • keep / replace (~)
      • pattern matching
      • the '@' syntax
    • predicates vs constraints
      • special predicates «expand» and «call»
      • calling arbitrary Java code (eval)
    • guard (when)
      • what operations are available in the guard
    • body
      • what operations are available in the body
      • using code templates %% … %%
    • alternative body

Query

  • Purpose of a query
  • Query kind
  • Parameters
  • Executed block

Macro table

  • applicable to a node of specific concept
    • macro is not applied automatically
  • macro parameters
    • parameter initialiser
  • how macro can be called
    • special predicates «expand» and «call»
  • What is the meaning of macro body
  • referring logical variables
    • «macroLogical» expression
    • $-wrapper for an expression
  • «substitution from context»
    • context parameters
    • substitutions
    • context parameters
    • specifying parameters using «with» statement

Term table

  • purpose of this root
  • what is a term
    • what are features
    • what are getters
    • extending another term
  • terms representing types
  • using terms
    • constructing new terms
      • specify subtterms
      • specify values
    • using terms as patterns
    • copy operation!
  • constructing term
    • list term
    • dataform concept and subconcepts
    • splice