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

TC solver 2 #529

Merged
merged 65 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
ca6a78b
version1 tc
FissoreD Oct 7, 2023
b52a0b8
version2 tc: first test passes
FissoreD Oct 7, 2023
2e8449e
version3: add tests
FissoreD Oct 8, 2023
69061fb
Delete apps/tc/README.md
gares Oct 10, 2023
6746b35
Apply suggestions from code review
gares Oct 10, 2023
f8c975b
Update apps/tc/Makefile.coq.local
gares Oct 10, 2023
c29b9a3
wip
gares Oct 10, 2023
6fe9f93
skeleton observer
gares Oct 10, 2023
da1328e
inst&classes auto inserted in db of elpi
FissoreD Oct 15, 2023
fb3d944
move comment
FissoreD Oct 16, 2023
8b5672b
Update get_instances order
FissoreD Oct 17, 2023
ffb669a
Persistent register
FissoreD Oct 17, 2023
5af5df1
rm generated file
gares Oct 22, 2023
ff4758f
pass a term
gares Oct 22, 2023
7c7e5c1
ignore generated file
gares Oct 22, 2023
825c084
Refactor instance/class observer
FissoreD Oct 22, 2023
e3953ff
Ok all tests + correct instance insertion order
FissoreD Oct 22, 2023
8a36c1b
WIP: tc-for2 returns tc-instnce
FissoreD Oct 23, 2023
14bc7a9
fun to get prio of an inst
FissoreD Oct 23, 2023
9973e59
function rename
FissoreD Oct 23, 2023
fb49b26
Small correction for no-argument classes
FissoreD Oct 24, 2023
5e74cdc
uniform API
gares Oct 25, 2023
bcdecdc
fix paths for vscoq
gares Oct 25, 2023
e5be2a6
wip section ending
gares Oct 25, 2023
d78cc02
OK for Instances recompilation on section end
FissoreD Oct 25, 2023
ec852b4
small test for locality in #[...] style
FissoreD Oct 26, 2023
c94d7d8
Correct behavior of #{export]
FissoreD Oct 26, 2023
aabcbc1
auto_compiler in tc.v
FissoreD Oct 26, 2023
6d988b3
Add licences in TC sources
FissoreD Oct 30, 2023
d8491c3
remove :index(X) from tc.v
FissoreD Oct 30, 2023
1c2f489
comment
FissoreD Oct 30, 2023
02a064a
Add path for plugin in CoqProject
FissoreD Oct 31, 2023
292326b
Mv function for takeover in separate file
FissoreD Oct 31, 2023
81a8dee
Update test wrt to previous commit
FissoreD Oct 31, 2023
2570e8c
Modify commad addHook to add custom hooks
FissoreD Oct 31, 2023
9bcc96b
Mv rew_forward and alias to wip
FissoreD Oct 31, 2023
1b25399
option in namespace + separated db for them
FissoreD Oct 31, 2023
73e453a
vscode hide .melin file
FissoreD Oct 31, 2023
f9a5b9a
no elpi folder in coercion
FissoreD Oct 31, 2023
e8fe51e
clean Makefile.coq.local for tc
FissoreD Oct 31, 2023
03776cf
clean code
FissoreD Oct 31, 2023
0552fbc
smal refactor
FissoreD Oct 31, 2023
74b7fdc
rename cammand to register compiler
FissoreD Oct 31, 2023
c928bee
coq option to activate compiler w/pattern fragment
FissoreD Oct 31, 2023
55cb5ed
move addAllInstances-Classes ... in dedicated file
FissoreD Oct 31, 2023
3c50554
start readme
FissoreD Oct 31, 2023
ffb3838
remove tests/mode_no_repetition.v
FissoreD Nov 1, 2023
2eea646
command get_class_info
FissoreD Nov 1, 2023
14eae87
update solver
FissoreD Nov 1, 2023
f85e7a1
Update readme
FissoreD Nov 1, 2023
2107837
update instance printer
FissoreD Nov 1, 2023
656fc15
readme udpate
FissoreD Nov 1, 2023
3e17855
Update readme
FissoreD Nov 2, 2023
06b111d
Update readme
FissoreD Nov 2, 2023
670cad5
update readme + tutorial.v
FissoreD Nov 2, 2023
165fc08
Update apps/tc/tests/WIP/premisesSort/sort1.v
gares Nov 3, 2023
43b91cd
Update apps/tc/README.md
gares Nov 3, 2023
8b81fd5
fix _CoqProject
gares Nov 3, 2023
80e7705
more tests
gares Nov 6, 2023
8e0e87c
wip TC.declare to give attributes on the fly
gares Nov 6, 2023
d88f683
Inst/Class event listener can be (de-)activated
FissoreD Nov 3, 2023
8d9db9e
Add toposort
FissoreD Nov 6, 2023
db249c3
Rename AddXXX commands
FissoreD Nov 6, 2023
440453e
Rename command with prefix
FissoreD Nov 6, 2023
f0a4439
Update readme
FissoreD Nov 6, 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ META
*.cache

apps/coercion/src/coq_elpi_coercion_hook.ml
.filestoinstall
.filestoinstall
apps/tc/src/coq_elpi_tc_hook.ml
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export ELPIDIR

DEPS=$(ELPIDIR)/elpi.cmxa $(ELPIDIR)/elpi.cma

APPS=$(addprefix apps/, derive eltac NES locker coercion)
APPS=$(addprefix apps/, derive eltac NES locker coercion tc)

ifeq "$(COQ_ELPI_ALREADY_INSTALLED)" ""
DOCDEP=build
Expand Down
21 changes: 20 additions & 1 deletion _CoqProject
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,42 @@
-Q tests elpi.tests
-Q elpi elpi

# Derive
-R apps/derive/theories elpi.apps
-R apps/derive/tests elpi.apps.derive.tests
-R apps/derive/examples elpi.apps.derive.examples

# NES
-R apps/NES/theories elpi.apps
-R apps/NES/tests elpi.apps.NES.tests
-R apps/NES/examples elpi.apps.NES.examples

# Eltac
-R apps/eltac/theories elpi.apps.eltac
-R apps/eltac/tests elpi.apps.eltac.tests
-R apps/eltac/examples elpi.apps.eltac.examples
-R apps/coercion/theories elpi.apps.coercion

# Coercion
-R apps/coercion/theories elpi.apps.coercion
FissoreD marked this conversation as resolved.
Show resolved Hide resolved
-R apps/coercion/tests elpi.apps.tc.coercion
-I apps/coercion/src

# Type classes
-R apps/tc/theories elpi.apps
-R apps/tc/tests elpi.apps.tc.tests
-R apps/tc/elpi elpi.apps.tc
-I apps/tc/src

# Coq-elpi
theories/elpi.v
theories/wip/memoization.v

-I src

src/META.coq-elpi

src/coq_elpi_graph.mli
src/coq_elpi_graph.ml
src/coq_elpi_vernacular_syntax.mlg
src/coq_elpi_vernacular.ml
src/coq_elpi_vernacular.mli
Expand Down
1 change: 1 addition & 0 deletions _CoqProject.test
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ tests/test_link_order_import1.v
tests/test_link_order_import2.v
tests/test_link_order_import3.v
tests/test_query_extra_dep.v
tests/test_toposort.v
40 changes: 40 additions & 0 deletions apps/tc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# detection of coq
ifeq "$(COQBIN)" ""
COQBIN := $(shell which coqc >/dev/null 2>&1 && dirname `which coqc`)
endif
ifeq "$(COQBIN)" ""
$(error Coq not found, make sure it is installed in your PATH or set COQBIN)
else
$(info Using coq found in $(COQBIN), from COQBIN or PATH)
endif
export COQBIN := $(COQBIN)/

all: build test

build: Makefile.coq
@$(MAKE) --no-print-directory -f Makefile.coq

test: Makefile.test.coq
@$(MAKE) --no-print-directory -f Makefile.test.coq

theories/%.vo: force
@$(MAKE) --no-print-directory -f Makefile.coq $@
tests/%.vo: force build Makefile.test.coq
@$(MAKE) --no-print-directory -f Makefile.test.coq $@
examples/%.vo: force build Makefile.test.coq
@$(MAKE) --no-print-directory -f Makefile.test.coq $@

Makefile.coq Makefile.coq.conf: _CoqProject
@$(COQBIN)/coq_makefile -f _CoqProject -o Makefile.coq
@$(MAKE) --no-print-directory -f Makefile.coq .merlin
Makefile.test.coq Makefile.test.coq.conf: _CoqProject.test
@$(COQBIN)/coq_makefile -f _CoqProject.test -o Makefile.test.coq

clean: Makefile.coq Makefile.test.coq
@$(MAKE) -f Makefile.coq $@
@$(MAKE) -f Makefile.test.coq $@

.PHONY: force all build test

install:
@$(MAKE) -f Makefile.coq $@
3 changes: 3 additions & 0 deletions apps/tc/Makefile.coq.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CAMLPKGS+= -package coq-elpi.elpi
OCAMLPATH:=../../src/:$(OCAMLPATH)
export OCAMLPATH
Loading
Loading