Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
4d2d92ca
Commit
4d2d92ca
authored
Sep 10, 2012
by
Claude Marche
Browse files
Removed (or commented out) some dead code, thanks to OCaml 4.00
parent
30884114
Changes
58
Hide whitespace changes
Inline
Side-by-side
plugins/parser/genequlin.ml
View file @
4d2d92ca
...
...
@@ -23,7 +23,6 @@
open
Why3
open
Format
(**************)
(*
...
...
plugins/tptp/tptp_lexer.mll
View file @
4d2d92ca
...
...
@@ -23,22 +23,25 @@
open
Lexing
open
Tptp_ast
open
Tptp_parser
open
Tptp_typing
open
Why3
(* lexical errors *)
exception
IllegalCharacter
of
char
exception
UnterminatedComment
(* dead code
exception UnterminatedString
*)
exception
UnknownDDW
of
string
exception
UnknownDW
of
string
let
()
=
Exn_printer
.
register
(
fun
fmt
e
->
match
e
with
|
IllegalCharacter
c
->
fprintf
fmt
"illegal character %c"
c
|
UnterminatedComment
->
fprintf
fmt
"unterminated comment"
(* dead code
| UnterminatedString -> fprintf fmt "unterminated string"
*)
|
UnknownDDW
s
->
fprintf
fmt
"unknown system_word %s"
s
|
UnknownDW
s
->
fprintf
fmt
"unknown defined_word %s"
s
|
_
->
raise
e
)
...
...
@@ -243,6 +246,7 @@ and comment_line = parse
{ comment_line lexbuf }
{
(* dead code
let with_location f lb =
if Debug.test_flag Debug.stack_trace then f lb else
try f lb with
...
...
@@ -257,6 +261,7 @@ and comment_line = parse
let library_of_env = Env.register_format "
tptp
" ["
p
";"
ax
"] read_channel
~desc:"
TPTP
format
(
CNF
FOF
FOFX
TFF
)
"
*)
}
(*
...
...
plugins/tptp/tptp_parser.mly
View file @
4d2d92ca
...
...
@@ -19,16 +19,18 @@
/**************************************************************************/
%
{
open
Parsing
open
Tptp_ast
let
loc
()
=
(
symbol_start_pos
()
,
symbol_end_pos
()
)
let
floc
()
=
Why3
.
Loc
.
extract
(
loc
()
)
(* dead code
let loc_i i = (rhs_start_pos i, rhs_end_pos i)
let floc_i i = Why3.Loc.extract (loc_i i)
let loc_ij i j = (rhs_start_pos i, rhs_end_pos j)
let floc_ij i j = Why3.Loc.extract (loc_ij i j)
*)
let
mk_e
n
=
{
e_node
=
n
;
e_loc
=
floc
()
}
...
...
plugins/tptp/tptp_printer.ml
View file @
4d2d92ca
...
...
@@ -26,7 +26,6 @@ open Ident
open
Ty
open
Term
open
Decl
open
Task
open
Printer
let
ident_printer
=
...
...
plugins/tptp/tptp_typing.ml
View file @
4d2d92ca
...
...
@@ -66,9 +66,11 @@ type symbol =
|
Sdobj
of
lsymbol
|
Suse
of
theory
(* dead code
type env = symbol Mstr.t
type implicit = (string,symbol) Hashtbl.t
*)
(** Defined symbols : arithmetic etc... *)
...
...
src/config/whyconfig.ml
View file @
4d2d92ca
...
...
@@ -20,7 +20,6 @@
open
Format
open
Why3
open
Util
open
Whyconf
let
usage_msg
=
...
...
src/core/decl.ml
View file @
4d2d92ca
...
...
@@ -18,7 +18,6 @@
(* *)
(**************************************************************************)
open
Format
open
Util
open
Ident
open
Ty
...
...
src/core/term.ml
View file @
4d2d92ca
...
...
@@ -1243,6 +1243,7 @@ let t_equal_alpha = t_equal_alpha (ref (-1)) (ref (-1)) Mvs.empty Mvs.empty
(* hash modulo alpha *)
(* dead code
let rec pat_hash_alpha p =
match p.pat_node with
| Pwild -> 0
...
...
@@ -1254,6 +1255,7 @@ let rec pat_hash_alpha p =
| Por (p, q) ->
Hashcons.combine
(Hashcons.combine 4 (pat_hash_alpha p)) (pat_hash_alpha q)
*)
let
rec
t_hash_alpha
c
m
t
=
let
fn
=
t_hash_alpha
c
m
in
...
...
src/core/ty.ml
View file @
4d2d92ca
...
...
@@ -242,7 +242,7 @@ let ts_tuple_ids = Hid.create 17
let
ts_tuple
=
Util
.
Hint
.
memo
17
(
fun
n
->
let
vl
=
ref
[]
in
for
i
=
1
to
n
do
vl
:=
create_tvsymbol
(
id_fresh
"a"
)
::
!
vl
done
;
for
_
i
=
1
to
n
do
vl
:=
create_tvsymbol
(
id_fresh
"a"
)
::
!
vl
done
;
let
ts
=
create_tysymbol
(
id_fresh
(
"tuple"
^
string_of_int
n
))
!
vl
None
in
Hid
.
add
ts_tuple_ids
ts
.
ts_name
n
;
ts
)
...
...
src/driver/autodetection.ml
View file @
4d2d92ca
...
...
@@ -50,7 +50,6 @@ The regexp must start with ^.
open
Format
open
Util
open
Ident
open
Whyconf
open
Stdlib
module
Wc
=
Whyconf
...
...
@@ -112,10 +111,12 @@ let load_prover kind (id,section) =
(
sprintf
"In section prover %s command specified without driver"
id
);
prover
(* dead code
let editor_keys =
let add acc k = Sstr.add k acc in
List.fold_left add Sstr.empty
["command"]
*)
let
load_editor
section
=
check_exhaustive
section
prover_keys
;
...
...
@@ -187,7 +188,9 @@ let read_auto_detection_data main =
|
Not_found
->
Loc
.
errorm
"provers-detection-data.conf not found at %s@."
filename
(* dead code
let provers_found = ref 0
*)
let
read_editors
main
=
let
filename
=
Filename
.
concat
(
Whyconf
.
datadir
main
)
...
...
@@ -212,6 +215,7 @@ let make_command =
in
Str
.
global_substitute
cmd_regexp
replace
com
(* dead code
let sanitize_exec =
let first c = match c with
| '_' | ' ' -> "_"
...
...
@@ -222,6 +226,7 @@ let sanitize_exec =
| _ -> char_to_alnumus c
in
sanitizer first rest
*)
let
ask_prover_version
exec_name
version_switch
=
let
out
=
Filename
.
temp_file
"out"
""
in
...
...
src/driver/call_provers.ml
View file @
4d2d92ca
...
...
@@ -19,7 +19,6 @@
(**************************************************************************)
open
Format
open
Sysutil
(** time regexp "%h:%m:%s" *)
type
timeunit
=
...
...
src/driver/driver.ml
View file @
4d2d92ca
...
...
@@ -21,7 +21,6 @@
open
Format
open
Util
open
Ident
open
Ty
open
Term
open
Decl
open
Theory
...
...
src/driver/driver_parser.mly
View file @
4d2d92ca
...
...
@@ -20,7 +20,7 @@
%
{
open
Driver_ast
open
Parsing
let
loc
()
=
Loc
.
extract
(
symbol_start_pos
()
,
symbol_end_pos
()
)
let
loc_i
i
=
Loc
.
extract
(
rhs_start_pos
i
,
rhs_end_pos
i
)
let
infix
s
=
"infix "
^
s
...
...
src/driver/whyconf.ml
View file @
4d2d92ca
...
...
@@ -683,7 +683,9 @@ let set_policies config policies =
(*******)
(* dead code
let set_conf_file config conf_file = {config with conf_file = conf_file}
*)
let
get_conf_file
config
=
config
.
conf_file
(*******)
...
...
src/ide/gconfig.ml
View file @
4d2d92ca
...
...
@@ -20,7 +20,6 @@
open
Format
open
Why3
open
Util
open
Rc
open
Whyconf
...
...
@@ -170,6 +169,7 @@ let set_locs_flag =
fun
b
->
(
if
b
then
Debug
.
set_flag
else
Debug
.
unset_flag
)
fl
(* dead code
let load_altern alterns (_,section) =
let unknown =
{prover_name = get_string section "unknown_name";
...
...
@@ -186,6 +186,7 @@ let load_altern alterns (_,section) =
prover_altern = get_string ~default:"" section "known_alternative";
} in
Mprover.add unknown known alterns
*)
let
load_config
config
original_config
=
(* let main = get_main config in *)
...
...
src/ide/gmain.ml
View file @
4d2d92ca
...
...
@@ -1078,7 +1078,7 @@ let paste_on_selection () =
match
a
with
|
S
.
Goal
g
->
let
keygen
=
MA
.
keygen
in
let
rec
paste
=
function
let
paste
=
function
|
S
.
Transf
f
->
MA
.
init_any
(
S
.
Transf
(
S
.
add_transf_to_goal
~
keygen
(
env_session
()
)
g
f
))
...
...
src/main.ml
View file @
4d2d92ca
...
...
@@ -25,7 +25,6 @@ open Whyconf
open
Theory
open
Task
open
Driver
open
Trans
let
usage_msg
=
sprintf
"Usage: %s [options] [[file|-] [-T <theory> [-G <goal>]...]...]..."
...
...
src/parser/denv.ml
View file @
4d2d92ca
...
...
@@ -25,7 +25,6 @@ open Ident
open
Ptree
open
Ty
open
Term
open
Theory
(** types with destructive type variables *)
...
...
src/parser/glob.ml
View file @
4d2d92ca
...
...
@@ -30,10 +30,12 @@ let dummy_id = id_register (id_fresh "dummy")
let
glob
=
Hashtbl
.
create
5003
(* could be improved with nested hash tables *)
(* dead code
let with_loc f = function
| None -> ()
| Some loc when loc = Loc.dummy_position -> ()
| Some loc -> f loc
*)
let
use
loc
id
=
let
f
,
l
,
c
,
_
=
Loc
.
get
loc
in
...
...
src/parser/lexer.mll
View file @
4d2d92ca
...
...
@@ -22,8 +22,7 @@
open
Format
open
Lexing
open
Term
open
Ptree
open
Parser
open
Parser
(* lexical errors *)
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment