Skip to content

Commit 890a8f3

Browse files
committed
Strip trailing whitespace
Use ```bash git grep --name-only ' $' | xargs sed s'/ \+$//g' -i ```
1 parent c3b87af commit 890a8f3

File tree

14 files changed

+342
-342
lines changed

14 files changed

+342
-342
lines changed

Makefile.in

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (C) 2009-2015 Anne Pacalet ([email protected])
44
# and Yves Bertot ([email protected])
55
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6-
# This file is distributed under the terms of the
6+
# This file is distributed under the terms of the
77
# GNU Lesser General Public License Version 2.1
88
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99

@@ -98,7 +98,7 @@ $(DPDUSAGE) : $(CMOS_DPDUSAGE)
9898
$(ECHO_CIBLE)
9999
@OCAMLLEX@ $<
100100

101-
GENERATED+=$(PRE)_lex.ml
101+
GENERATED+=$(PRE)_lex.ml
102102

103103
%.ml : %.mly
104104
$(ECHO_CIBLE)
@@ -108,7 +108,7 @@ GENERATED+=$(PRE)_parse.ml $(PRE)_parse.mli
108108

109109
depend: .depend
110110

111-
.depend : $(ML_ALL)
111+
.depend : $(ML_ALL)
112112
$(ECHO_CIBLE)
113113
@OCAMLDEP@ $(ML_ALL) *.mli > $@
114114

@@ -221,12 +221,12 @@ clean_coq : Make_coq
221221
$(MAKE) -f $< clean
222222

223223
clean_test :
224-
rm -f $(TESTS) $(TESTS_LOG) $(TESTS_OK)
224+
rm -f $(TESTS) $(TESTS_LOG) $(TESTS_OK)
225225
rm -f $(TESTDIR)/Test.vo $(TESTDIR)/Test.glob
226226
rm -f $(TESTDIR)/Morph.vo $(TESTDIR)/Morph.glob
227227

228228
clean : clean_coq clean_test
229-
rm -f $(GENERATED)
229+
rm -f $(GENERATED)
230230
rm -f $(CMOS_DPDUSAGE) $(CMOS_DPD2DOT) $(CMXS) $(ML_ALL:%.ml=%.o) *.cmi
231231
rm -f $(ML_ALL:%.ml=%.annot)
232232
rm -f $(DPD2DOT) $(DPDUSAGE) $(DPDPLUGIN)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ This should produce a plug-in library for Coq and an executable :
5151
- `./dpd2dot` : a tool to transform .dpd files into .dot graphs.
5252

5353
If you prefer all compiled files to stay in the coq-dpdgraph directory, you can
54-
skip the make install command. However, you will have to use
54+
skip the make install command. However, you will have to use
5555
$ coqtop -R <coq-dpdgraph-directory> dpdgraph -I <coq-dpdgraph-directory>
5656

5757
#### install using opam

TODO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ TODO: transfer this to GitHub issues !
33

44
Rebuild a demo !
55

6-
-[2014-01-07]
6+
-[2014-01-07]
77
- utiliser ocamlgraph pour le calcul de le cloture transitive
88
dans la fonction reduce_graph (cf. mail Julien Narboux)
99

10-
-[2013-09-12]
10+
-[2013-09-12]
1111
- adaptation for OCaml 4.00.1 and Coq 8.4pl1 (April 2013)
1212
(.ml -> .ml4 + change in Declarations types)
1313
- tests are nor working as before : TODO

configure.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (C) 2009-2015 Anne Pacalet ([email protected])
44
# and Yves Bertot ([email protected])
55
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6-
# This file is distributed under the terms of the
6+
# This file is distributed under the terms of the
77
# GNU Lesser General Public License Version 2.1
88
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99
# the script generated by autoconf from this input will set the following
@@ -169,7 +169,7 @@ if test "$OCAMLFIND" = ""; then
169169
else
170170
OCAMLGRAPH_PATH=`ocamlfind query ocamlgraph | tr -d '\\r\\n'`
171171
if test "$OCAMLGRAPH_PATH" = "" ;then
172-
OCAMLGRAPH=no
172+
OCAMLGRAPH=no
173173
fi
174174
fi
175175

coqdoc.css

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
body { padding: 0px 0px;
2-
margin: 0px 0px;
2+
margin: 0px 0px;
33
background-color: white }
44

55
#page { display: block;
@@ -15,7 +15,7 @@ body { padding: 0px 0px;
1515
border-bottom-style: solid;
1616
border-width: thin }
1717

18-
#header h1 { padding: 0;
18+
#header h1 { padding: 0;
1919
margin: 0;}
2020

2121

@@ -53,46 +53,46 @@ body { padding: 0px 0px;
5353
background-color: #90bdff;
5454
border-style: plain}
5555

56-
.inlinecode {
56+
.inlinecode {
5757
display: inline;
58-
font-family: monospace }
58+
font-family: monospace }
5959

60-
.code {
60+
.code {
6161
display: block;
62-
font-family: monospace }
62+
font-family: monospace }
6363

6464
/* Pied de page */
6565

6666
#footer { font-size: 65%;
6767
font-family: sans-serif; }
6868

6969
#footer a:visited { color: blue; }
70-
#footer a:link { text-decoration: none;
70+
#footer a:link { text-decoration: none;
7171
color: #888888; }
7272

7373
.id { display: inline; }
7474

75-
.id[type="constructor"] {
75+
.id[type="constructor"] {
7676
color: rgb(60%,0%,0%);
7777
}
7878

79-
.id[type="var"] {
79+
.id[type="var"] {
8080
color: rgb(40%,0%,40%);
8181
}
8282

83-
.id[type="definition"] {
83+
.id[type="definition"] {
8484
color: rgb(0%,40%,0%);
8585
}
8686

87-
.id[type="lemma"] {
87+
.id[type="lemma"] {
8888
color: rgb(0%,40%,0%);
8989
}
9090

91-
.id[type="inductive"] {
91+
.id[type="inductive"] {
9292
color: rgb(0%,0%,80%);
9393
}
9494

95-
.id[type="keyword"] {
95+
.id[type="keyword"] {
9696
color : #cf1d1d;
9797
/* color: black; */
9898
}

dpd2dot.ml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ let out_file = ref None
1313
let set_out_file file = out_file := Some file
1414

1515
let spec_args = [
16-
("-o", Arg.String set_out_file,
16+
("-o", Arg.String set_out_file,
1717
": name of output file (default: name of input file .dot)");
18-
("-with-defs", Arg.Set Dpd_compute.with_defs,
18+
("-with-defs", Arg.Set Dpd_compute.with_defs,
1919
": show everything (default)");
20-
("-without-defs", Arg.Clear Dpd_compute.with_defs,
20+
("-without-defs", Arg.Clear Dpd_compute.with_defs,
2121
": show only Prop objects");
22-
("-rm-trans", Arg.Set Dpd_compute.reduce_trans,
22+
("-rm-trans", Arg.Set Dpd_compute.reduce_trans,
2323
": remove transitive dependencies (default)");
24-
("-keep-trans", Arg.Clear Dpd_compute.reduce_trans,
24+
("-keep-trans", Arg.Clear Dpd_compute.reduce_trans,
2525
": keep transitive dependencies");
26-
("-debug", Arg.Set Dpd_compute.debug_flag,
26+
("-debug", Arg.Set Dpd_compute.debug_flag,
2727
": set debug mode");
28-
("-v", Arg.Set version_option,
28+
("-v", Arg.Set version_option,
2929
": print version and exit");
3030
]
3131

@@ -35,10 +35,10 @@ let do_file n f =
3535
let g = Dpd_lex.read f in
3636
let g = Dpd_compute.build_graph g in
3737
Dpd_compute.simplify_graph g;
38-
let dotfile = match !out_file with
39-
| None -> (Filename.chop_extension f)^".dot"
40-
| Some f ->
41-
if n = 0 then f
38+
let dotfile = match !out_file with
39+
| None -> (Filename.chop_extension f)^".dot"
40+
| Some f ->
41+
if n = 0 then f
4242
else (Filename.chop_extension f)^"."^(string_of_int n)^".dot"
4343
in
4444
Dpd_dot.graph_file dotfile g
@@ -49,14 +49,14 @@ let main () =
4949
let args = ref [] in
5050
let memo_arg arg = args := arg :: !args in
5151
Arg.parse spec_args memo_arg usage_msg;
52-
if !version_option
52+
if !version_option
5353
then Format.printf "This is '%s' (part of DpdGraph tools - version %s)@."
5454
(Filename.basename Sys.argv.(0)) Version.version
5555
else match !args with
5656
| [] -> Dpd_compute.error "no source file to process ?@.";
5757
Arg.usage spec_args usage_msg
5858
| f::[] -> do_file 0 f
59-
| l ->
59+
| l ->
6060
ignore (List.fold_left (fun n f -> do_file n f; n+1) 1 l)
6161

6262
let () = main ()

dpd_compute.ml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
(* (see the enclosed LICENSE file for mode details) *)
88
(*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*)
99

10-
let debug_flag = ref false
10+
let debug_flag = ref false
1111
let with_defs = ref true
1212
let reduce_trans = ref true
1313

1414
let pp intro format = Format.printf "%s" intro ; Format.printf format
1515

16-
let debug format =
16+
let debug format =
1717
if !debug_flag then pp "(debug): " format
1818
else Format.ifprintf Format.std_formatter format
1919

@@ -30,7 +30,7 @@ let pp_lex_pos fmt p = Format.fprintf fmt "(l:%d, c:%d)"
3030
let pp_lex_inter fmt (p1, p2) =
3131
Format.fprintf fmt "between %a and %a" pp_lex_pos p1 pp_lex_pos p2
3232

33-
let get_attrib a attribs =
33+
let get_attrib a attribs =
3434
try Some (List.assoc a attribs) with Not_found -> None
3535

3636
let bool_attrib a attribs = match get_attrib a attribs with
@@ -71,11 +71,11 @@ let build_graph lobj =
7171
let g = G.create () in
7272
let node_tbl = Hashtbl.create 10 in
7373
let get_node id = Hashtbl.find node_tbl id in
74-
let add_obj o = match o with
75-
| N ((id, _, _) as n) ->
74+
let add_obj o = match o with
75+
| N ((id, _, _) as n) ->
7676
Hashtbl.add node_tbl id n; let n = G.V.create n in G.add_vertex g n
77-
| E (id1, id2, attribs) ->
78-
try
77+
| E (id1, id2, attribs) ->
78+
try
7979
let e = G.E.create (get_node id1) attribs (get_node id2) in
8080
G.add_edge_e g e
8181
with Not_found -> raise (Error "Cannot build edge : node doesn't exist")
@@ -86,14 +86,14 @@ let build_graph lobj =
8686

8787
(** remove edge (n1 -> n2) iff n2 is indirectly reachable by n1 *)
8888
(* TODO : not sure this is working for graphs with cycles *)
89-
let reduce_graph g =
89+
let reduce_graph g =
9090
(* a table in which each node is mapped to the set of indirected accessible
9191
* nodes *)
9292
let module Vset = Set.Make (G.V) in
9393
let reach_tbl = Hashtbl.create (G.nb_vertex g) in
94-
let rec reachable v =
94+
let rec reachable v =
9595
try Hashtbl.find reach_tbl v (* already done *)
96-
with Not_found ->
96+
with Not_found ->
9797
let nb_succ_before = List.length (G.succ g v) in
9898
let add_succ_reachable acc s =
9999
let acc = (* add [s] successors *)
@@ -113,9 +113,9 @@ let reduce_graph g =
113113
G.iter_vertex (fun v -> ignore (reachable v)) g
114114

115115
let remove_node g n =
116-
let transfer_edges p =
116+
let transfer_edges p =
117117
G.remove_edge g p n;
118-
List.iter (fun s -> G.add_edge g p s) (G.succ g n)
118+
List.iter (fun s -> G.add_edge g p s) (G.succ g n)
119119
in
120120
List.iter transfer_edges (G.pred g n);
121121
G.remove_vertex g n (* also remove edges n -> s *)

0 commit comments

Comments
 (0)