joelburget / lvca

language verification, construction, and analysis
https://lvca.dev
MIT License
20 stars 0 forks source link

Evaluation provenance #19

Open joelburget opened 3 years ago

joelburget commented 3 years ago

Create new provenance type that summarizes where a value was evaluated.

joelburget commented 2 years ago

Currently thinking something like this:

position := {line: int; col: int}
range := {begin: position; end: position}

// A source location is either in the implementation of LVCA itself or a term
source_location :=
  | Implementation{filename: string; range}
  | Term(term)

// A term is either computed from others or written directly
provenance :=
  | Computed{from: list term; at: source_location}
  | Located{at: source_location}