package lambdapi
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Proof assistant for the λΠ-calculus modulo rewriting
Install
dune-project
Dependency
Authors
Maintainers
Sources
lambdapi-2.0.0.tbz
sha256=66d7d29f7a0d10493b8178c4c3aeb247971e24fab3eba1c54887e1b9a82fe005
sha512=69ecf2406e4c7225ab7f8ebe11624db5d2ab989c8f30f5b6e5d426fd8ef9102f142a2840af16fb9103bb712ebcf7d314635f8b413a05df66e7b7a38548867032
doc/src/lambdapi.lplib/range.ml.html
Source file range.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54(************************************************************************) (* The λΠ-modulo Interactive Proof Assistant *) (************************************************************************) (************************************************************************) (* λΠ-modulo serialization Toplevel *) (* Copyright Inria -- Dual License LGPL 2.1 / GPL3+ *) (* Written by: F. Blanqui, E. J. Gallego Arias, F. Lefoulon *) (************************************************************************) (* Status: Experimental *) (************************************************************************) (* We follow LSP denominations except for end_ being reserved in OCaml. *) type point = { line : int; character : int } type t = { start : point; end_ : point } let make_point line character = { line; character } let make_interval start end_ = (* Fixme: don't rely on the lexicographic order *) assert (start <= end_); { start; end_ } let line pt = pt.line let column pt = pt.character let interval_start i = i.start let interval_end i = i.end_ type cmp = Before | In | After let in_range pos { start; end_ } = (* Comparison operators work as lexicographic comparison on points (meaning l is compared, then c is compared). *) if pos < start then Before else if pos > end_ then After else In let compare { start = s1; end_ = f1 } { start = s2; end_ = f2 } = if (s1 >= s2 && f1 <= f2) || (s1 <= s2 && f1 >= f2) then 0 else if f1 <= s2 then -1 else if s1 >= f2 then 1 else failwith "Intervals overlap, no inclusion between the two" let point_to_string pt = "Line : " ^ string_of_int pt.line ^ "; Column : " ^ string_of_int pt.character ^ "\n" let interval_to_string { start; end_ } = "From :\n" ^ point_to_string start ^ "To :\n" ^ point_to_string end_ let translate { start; end_ } ds df = let s2 = make_point (line start) (column start - ds) in let f2 = make_point (line end_) (column end_ + df) in assert (s2 <= f2); make_interval s2 f2
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>