Skip to content

Commit b42f745

Browse files
committed
gitignore and shortened cs predicate name
1 parent ffad6fc commit b42f745

File tree

5 files changed

+11
-110
lines changed

5 files changed

+11
-110
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ META
4848
apps/coercion/src/coq_elpi_coercion_hook.ml
4949
.filestoinstall
5050
apps/tc/src/coq_elpi_tc_hook.ml
51+
apps/cs/src/coq_elpi_cs_hook.ml

apps/cs/TODOREADME.md renamed to apps/cs/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ The `canonical_solution` app enables to program Coq canonical structure solution
44

55
This app is experimental.
66

7-
## The canonical-solution predicate
7+
## The cs predicate
88

9-
The `canonical-solution` predicate lives in the database `cs.db`
9+
The `cs` predicate lives in the database `cs.db`
1010

1111
```elpi
12-
% predicate [canonical-solution Ctx Lhs Rhs] used to unify Lhs with Rhs, with
12+
% predicate [cs Ctx Lhs Rhs] used to unify Lhs with Rhs, with
1313
% - [Ctx] is the context
1414
% - [Lhs] and [Rhs] are the terms to unify
1515
:index (0 6 6)
16-
pred canonical-solution i:goal-ctx, o:term, o:term.
16+
pred cs i:goal-ctx, o:term, o:term.
1717
```
1818

1919
By addings rules for this predicate one can recover from a CS instance search failure
@@ -34,7 +34,7 @@ Structure S : Type :=
3434
3535
Elpi Accumulate cs.db lp:{{
3636
37-
canonical-solution _ {{ sort lp:Sol }} {{ nat }} :-
37+
cs _ {{ sort lp:Sol }} {{ nat }} :-
3838
Sol = {{ Build_S nat }}.
3939
4040
}}.

apps/cs/src/coq_elpi_cs_hook.ml

Lines changed: 0 additions & 100 deletions
This file was deleted.

apps/cs/tests/test_cs.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Structure S : Type :=
88

99
Elpi Accumulate cs.db lp:{{
1010

11-
canonical-solution _ {{ sort lp:Sol }} {{ nat }} :-
11+
cs _ {{ sort lp:Sol }} {{ nat }} :-
1212
Sol = {{ Build_S nat }}.
1313

1414
}}.
@@ -28,7 +28,7 @@ Check eq_refl _ : (sort1 _) = nat1.
2828

2929
Elpi Accumulate cs.db lp:{{
3030

31-
canonical-solution _ {{ sort lp:Sol }} {{ bool }} :-
31+
cs _ {{ sort lp:Sol }} {{ bool }} :-
3232
% typing is wired in, do we want this?
3333
std.spy(Sol = {{ Prop }}).
3434

apps/cs/theories/cs.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Elpi Db cs.db lp:{{
77
% - [Ctx] is the context
88
% - [Lhs] and [Rhs] are the terms to unify
99
:index (0 6 6)
10-
pred canonical-solution i:goal-ctx, o:term, o:term.
10+
pred cs i:goal-ctx, o:term, o:term.
1111

1212
}}.
1313

@@ -17,8 +17,8 @@ Elpi Tactic canonical_solution.
1717
Elpi Accumulate lp:{{
1818

1919
solve (goal Ctx _ {{ @eq lp:T lp:Lhs lp:Rhs }} _P []) _ :-
20-
canonical-solution Ctx Lhs Rhs,
21-
% std.assert! (P = {{ eq_refl lp:Lhs }}) "canonical-solution wrong solution".
20+
cs Ctx Lhs Rhs,
21+
% std.assert! (P = {{ eq_refl lp:Lhs }}) "cs: wrong solution".
2222
true.
2323

2424
}}.

0 commit comments

Comments
 (0)