ucsd-progsys / liquid-fixpoint

Horn Clause Constraint Solving for Liquid Types
BSD 3-Clause "New" or "Revised" License
132 stars 60 forks source link

Expose "numeric" `FTyCon` #638

Closed ranjitjhala closed 1 year ago

ranjitjhala commented 1 year ago

This PR allows one to add a declaration

(numeric Apple)

to the preamble of a .smt2 (HORN) format query, after which

  1. all bindings of the form (n Apple) are represented in smt as int and support numeric ops
  2. comparisons of the form n == m where n and m are different numeric sorts should be wrapped with an int cast , so written as (n:int) == m

The goal is to allow more fine-grained distinction between binders in qualifier instantiation (e.g. write qualifiers that only compare some int not any of (many) params that may be int as may happen when you have a kvar with many "plain" int params with qualifiers which also have many int params.