/optica

Language-integrated query from a different optic

Primary LanguageScalaApache License 2.0Apache-2.0

Build Status

optica

This repository contains Optica, the library associated to the article Viewing Language-Integrated Query From a Different Optic (J. López González and Juan M. Serrano), which was recently submitted to Science of Computer Programming.

Repo Structure

Core

  • concrete: definition of read-only concrete optics.
  • symantics: symantics of Optica (both optic combinators and actions), along with the standard, XQuery, TripletFun and T-LINQ interpretations.
  • xquery: algebraic data type that represents a subset of the XQuery grammar, with an interpretation to textual XQuery expressions.
  • triplet: definition of TripletFun and involved data types, with an interpretation to SQL select statements.
  • sql: algebraic data type that represents a subset of the SQL grammar, with an interpretation to textual SELECT statements.
  • tlinq: subset of T-LINQ primitives, along with the standard semantics.

Examples

  • couple: couple model and general queries over it.
  • organisation: organisation model and general queries over it.
  • test: suite of tests to execute general queries over different underlying infrastructures.

Running Tests

  1. Install SBT
  2. Clone this repo: $ git clone https://github.com/hablapps/optica.git
  3. Change directory: $ cd optica
  4. Run tests: $ sbt test (it might take up to several minutes)