Skip to content
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

Dedukti import and export #2

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
01aa6ed
ported files from krajono
Feb 21, 2023
5d3b277
fix: ncic_reduction are_compatible optional parameter
Mar 13, 2023
9bf3520
keyword fix
Mar 15, 2023
6e928e6
chore: more keywords
Mar 21, 2023
3aeac1d
chore: gitignore
Apr 20, 2023
20dd4d4
chore: working on dedukti import
Apr 20, 2023
a8d5c12
chore: basic term translation from dk to mat
Apr 30, 2023
f3befbe
chore: lib
Apr 30, 2023
554713a
feat: added const table
May 4, 2023
2dc7311
chore: const def/decl handling
May 6, 2023
a3bde7e
fix: removed binaries
May 6, 2023
baa35c0
fix: type errors
May 6, 2023
57ca4b8
feat: reverted appl and pi encoding
May 20, 2023
1a80560
feat: reverted univs encoding
May 20, 2023
97b7a21
feat: reverted props, Univs and lift
May 28, 2023
18286f4
feat: added generated pragma
Jun 7, 2023
c662f6c
feat: split in files; working on fixpoints
Jun 17, 2023
34bd8d0
feat: fixpoint type without body and recno
Jun 18, 2023
00265fe
feat: added recno
Jun 18, 2023
6780d15
feat: added fixpoint body parsing
Jun 19, 2023
ba886d7
chore: added inductive pragma on export
Jun 26, 2023
b10e23b
fix: fixpoint
Jun 29, 2023
6c6c172
fix: mutual fixpoint on dedukti extraction
Jun 29, 2023
1aa38ef
feat: mutual fixpoint
Jun 30, 2023
127d500
chore: inductive type export pragmas
Jul 1, 2023
6f76ac3
feat: import for inductives types and some fixies on import for fixpoint
Jul 1, 2023
1dcc760
chore: new pragma handling
Jul 3, 2023
bf85412
fix: regex
Jul 3, 2023
e76d033
feat: working on match
Jul 4, 2023
fc011b3
fix: major fixes
Jul 5, 2023
c063a59
chore: removed useless body attr in fixpoint pragma
Jul 5, 2023
6f37d67
chore: names on fixpoint
Jul 5, 2023
424b703
fix: fixpoint names
Jul 6, 2023
afbd4de
fix: general bug fixing
Jul 6, 2023
80b19a0
Delete univs.dk
specialfish9 Jul 7, 2023
c9b3049
chore: cleanup
Jul 21, 2023
a8dd442
chore: format
Jul 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_build/
**/*.exe
25 changes: 25 additions & 0 deletions components/dedukti/deduktiImport.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
(* TODO: Forse baseuri e' gia' in status *)
let rec eval_from_dedukti_stream ~asserted ~baseuri status buf =
try
let entry = Parsers.Parser.read buf in
Parsers.Entry.pp_entry Format.err_formatter entry;
let objs = ObjectConstruction.obj_of_entry status ~baseuri buf entry in
let check_and_add ((uri, _, _, _, _) as obj) =
HLog.message ("Tradotto!" ^ status#ppobj obj);
let status = NCicLibrary.add_obj status obj in
let xxaliases = GrafiteDisambiguate.aliases_for_objs status [ uri ] in
let mode = GrafiteAst.WithPreferences in
(* MATITA 1.0: fixme *)
let status = GrafiteEngine.eval_alias status (mode, xxaliases) in
status
in
(* TODO per fixare gli alias guardare matitaengine.ml da righe circa 230 235 *)
let status =
Option.fold ~none:status
~some:(fun list ->
List.fold_left (fun _ obj -> check_and_add obj) status list)
objs
in

eval_from_dedukti_stream ~asserted ~baseuri status buf
with End_of_file -> (asserted, status)
7 changes: 7 additions & 0 deletions components/dedukti/deduktiImport.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(* TODO *)
val eval_from_dedukti_stream :
asserted:'a ->
baseuri:string ->
(#GrafiteTypes.status as 'b) ->
Parsers.Parser.stream ->
'a * 'b
7 changes: 7 additions & 0 deletions components/dedukti/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(library
(name helm_dedukti)
(libraries helm_ng_library dedukti.parsers helm_ng_disambiguation helm_grafite_engine)
(wrapped false))
(env
(_
(flags (:standard -rectypes -w @A-52-4-34-37-45-9-44-48-6-32-20-58-7-57-3-68-69-70-50-42))))
Loading