ysharoda / Deriving-Definitions

Generating Library definitions from Theory Expressions
5 stars 0 forks source link

Deriving Library Definitions from Theory Expressions

This project aims to eliminate the boilerplate associated with building libraries of Algebra in formal systems. Instead of library builders providing every definition of the library, they write theory expressions and an interpreter generates the described theories and many of their constructions.

Installation

  git clone https://github.com/ysharoda/Deriving-Definitions.git
  cd Deriving-Definitions
  make install 

Running

  tog [options] [file] 

tog --help gives the full options. Of specific interest are the following options:

Input Syntax

The Syntax of the expressions is adapted from [1].

  Map m = {a0 to b0 ; a1 to b1 ; ... ; an to bn}
  Theory T = {a0 : t0 ; a1 : t1, ... ; an : tn}
  T' = extend T {a0 : t0 ; a1 : t1 ; ... ; an : tn}
  T' = rename T m 
  T' = combine T1 m1 T2 m2 over T
  I  = id from T1 to T2

The Interpreter

To generate a library from the expressions above, we extend tog by creating a 3-phase interpreter that works as follows:

References

[1] Carette, J., O'Connor, R. and Sharoda, Y., 2019. Building on the Diamonds between Theories: Theory Presentation Combinators. arXiv preprint arXiv:1812.08079.

[2] Carette, J., Farmer, W.M. and Sharoda, Y., 2020, July. Leveraging the information contained in theory presentations. In International Conference on Intelligent Computer Mathematics (pp. 55-70). Springer, Cham.