-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
September 2018 work items #1522
Comments
Can I put in a vote for native support for |
First of all, note the F* syntax highlighting in this post!! Seems Github has shipped it. Here's a prototype for calc statements. The module Calc
type calc_eq #t : t -> t -> Type =
| CalcRefl : #x:t -> calc_eq x x
| CalcStep : #x:t -> #y:t -> #z:t -> calc_eq x y -> squash (y == z) -> calc_eq x z
let rec elim_calc_eq #t (#x #y : t) (p : calc_eq x y) : Lemma (x == y) =
match p with
| CalcRefl -> ()
| CalcStep p' _ -> elim_calc_eq p'
let init (#t:Type) (x:t) : calc_eq x x = CalcRefl
let step (#t:Type) (#x #y z : t) (_ : squash (y == z)) (p : calc_eq x y) : calc_eq x z =
CalcStep p ()
let finish (#t:Type) (#x #y :t) (p : calc_eq x y) : squash (x == y) = elim_calc_eq p
let a_proof =
finish (step 6 () (init (1 + 2 + 3)))
let comm (#x #y : int) : squash (x + y == y + x) = ()
let bigger_proof (c:int) (h : unit -> squash (c == 42)) : squash (c + 2 + 3 == 47) =
finish (
step 47 () (
step (5 + 42) (h ()) (
step (5 + c) comm (
step (c + 5) () (
init (c + 2 + 3))))))
(* We can also use tactics for individual steps *)
open FStar.Mul
open FStar.Tactics
open FStar.Tactics.Canon
let with_a_tactic (c:int) : squash (2 * (c + 3) == 7 * c - 5 * (c - 1) + 1) =
finish (
step (7 * c - 5 * (c - 1) + 1) (_ by (dump "1"; canon ())) (
step (2 * c + 6) (_ by (dump "2"; canon ())) (
init (2 * (c + 3))))) |
We discussed today the progress made on these issues in September.
Closing this issue and opening a new one for October work items. |
This is a meta-issue to track a few main bits of feature work that we are tackling in the next few weeks, hoping to demo some of the results at our "all-hands" meeting in September.
We track progress on the specific points below in other issues, but will report a summary of the progress here.
fstar --indent
@victor-dumitrescu. We aim to use this feature to automatically "beautify" concrete syntax, with a first goal being to apply this to all files in FStar/ulib. We track progress in issue Issues related to fstar --indent #1298Monotonic buffers @aseemr: LowStar.Buffer to support indexing with preorders, witness/recall etc. We track progress in Revising the Low* libraries for mutable, low-level data structures #1420
Typeclasses and a fix to the unifier @mtzguido. The unifier picks solutions that are sometimes too specific, hindering typeclass resolution. We track progress in Type classes and higher kinded types #1486
Incremental extraction and cross-module inlining @nikswamy. We aim to support inlining of symbols marked
inline_for_extraction
across interface boundaries. We track progress in Cross-module inlining, incremental extraction, use_extracted_interfaces, and already_cached #1444The text was updated successfully, but these errors were encountered: