[python] kill python frontend

Summary: Undeveloped frontend needs maintenance.  We will most probably not pursue Python anyway.

Reviewed By: mbouaziz, jvillard

Differential Revision: D9894299

fbshipit-source-id: c9707b904
master
Nikos Gorogiannis 6 years ago committed by Facebook Github Bot
parent a5d3203ce8
commit bca942c694

@ -11,7 +11,6 @@ bindir = @bindir@
BUCK = @BUCK@
BUILD_C_ANALYZERS = @BUILD_C_ANALYZERS@
BUILD_JAVA_ANALYZERS = @BUILD_JAVA_ANALYZERS@
BUILD_PYTHON_ANALYZERS = @BUILD_PYTHON_ANALYZERS@
CAML_LD_LIBRARY_PATH = @CAML_LD_LIBRARY_PATH@
CC = @CC@
CFLAGS = @CFLAGS@

@ -67,15 +67,6 @@ AC_ARG_ENABLE(java-analyzers,
BUILD_JAVA_ANALYZERS=$enable_java_analyzers
AC_SUBST([BUILD_JAVA_ANALYZERS])
AC_ARG_ENABLE(python-analyzers,
AS_HELP_STRING([--disable-python-analyzers],
[do not build the Python analyzers (default is to build them)]),
,
enable_python_analyzers=yes)
BUILD_PYTHON_ANALYZERS=$enable_python_analyzers
AC_SUBST([BUILD_PYTHON_ANALYZERS])
AC_ARG_WITH(fcp-clang,
AS_HELP_STRING([--with-fcp-clang],
[use $CLANG_PREFIX/bin/clang to override the default compiler (default is not to override)]),

@ -255,7 +255,6 @@ $(GENERATED_FROM_AUTOCONF): $(MAKEFILE_LIST)
-e "s|@INFER_GIT_BRANCH[@]|$$INFER_GIT_BRANCH|g" \
-e "s|@BUILD_C_ANALYZERS[@]|$(BUILD_C_ANALYZERS)|g" \
-e "s|@BUILD_JAVA_ANALYZERS[@]|$(BUILD_JAVA_ANALYZERS)|g" \
-e "s|@BUILD_PYTHON_ANALYZERS[@]|$(BUILD_PYTHON_ANALYZERS)|g" \
-e "s|@OPAMSWITCH[@]|$(OPAMSWITCH)|g" \
-e "s|@XCODE_SELECT[@]|$(XCODE_SELECT)|g" \
-e "s|@INFER_MAN_LAST_MODIFIED[@]|$(INFER_MAN_LAST_MODIFIED)|g" \

@ -34,7 +34,6 @@ type stats_type =
| ClangFrontend of SourceFile.t
| ClangFrontendLinters of SourceFile.t
| JavaFrontend of SourceFile.t
| PythonFrontend of SourceFile.t
| TotalFrontend
| Backend of SourceFile.t
| TotalBackend
@ -46,7 +45,6 @@ let source_file_of_stats_type = function
| ClangFrontend source_file
| ClangFrontendLinters source_file
| JavaFrontend source_file
| PythonFrontend source_file
| Backend source_file ->
Some source_file
| _ ->
@ -74,8 +72,6 @@ let relative_path_of_stats_type stats_type =
Config.frontend_stats_dir_name
| JavaFrontend _ ->
Config.frontend_stats_dir_name
| PythonFrontend _ ->
Config.frontend_stats_dir_name
| TotalFrontend ->
Config.frontend_stats_dir_name
| Backend _ ->
@ -99,8 +95,6 @@ let string_of_stats_type = function
"clang_frontend_and_linters"
| JavaFrontend _ ->
"java_frontend"
| PythonFrontend _ ->
"python_frontend"
| TotalFrontend ->
"total_frontend"
| Backend _ ->

@ -18,7 +18,6 @@ type stats_type =
| ClangFrontend of SourceFile.t
| ClangFrontendLinters of SourceFile.t
| JavaFrontend of SourceFile.t
| PythonFrontend of SourceFile.t
| TotalFrontend
| Backend of SourceFile.t
| TotalBackend

@ -85,7 +85,6 @@ type build_system =
| BMake
| BMvn
| BNdk
| BPython
| BXcode
[@@deriving compare]
@ -114,7 +113,6 @@ let build_system_exe_assoc =
; (BMvn, "mvn")
; (BMvn, "mvnw")
; (BNdk, "ndk-build")
; (BPython, "python")
; (BXcode, "xcodebuild") ]

@ -40,7 +40,6 @@ type build_system =
| BMake
| BMvn
| BNdk
| BPython
| BXcode
[@@deriving compare]

@ -69,9 +69,6 @@ val source_file_encoding : SourceFile.t -> string
(** source directory: the directory inside the results dir corresponding to a source file *)
type source_dir [@@deriving compare]
val source_dir_to_string : source_dir -> string
(** expose the source dir as a string *)
val source_dir_get_internal_file : source_dir -> string -> filename
(** get the path to an internal file with the given extention (.tenv, ...) *)

@ -6,15 +6,15 @@
*)
open! IStd
type t = Clang | Java | Python [@@deriving compare]
type t = Clang | Java [@@deriving compare]
let equal = [%compare.equal: t]
let language_to_string = [(Clang, "C/C++/ObjC"); (Java, "Java"); (Python, "python")]
let language_to_string = [(Clang, "C/C++/ObjC"); (Java, "Java")]
let to_string lang = List.Assoc.find_exn language_to_string ~equal lang
let to_explicit_string = function Clang -> "Clang" | Java -> "Java" | Python -> "Python"
let to_explicit_string = function Clang -> "Clang" | Java -> "Java"
let of_string s = List.Assoc.find (List.Assoc.inverse language_to_string) ~equal:String.equal s

@ -7,7 +7,7 @@
open! IStd
type t = Clang | Java | Python [@@deriving compare]
type t = Clang | Java [@@deriving compare]
val equal : t -> t -> bool

@ -43,8 +43,6 @@ let clang_enabled = is_yes "@BUILD_C_ANALYZERS@"
let java_enabled = is_yes "@BUILD_JAVA_ANALYZERS@"
let python_enabled = is_yes "@BUILD_PYTHON_ANALYZERS@"
let xcode_enabled = is_not_no "@XCODE_SELECT@"
let man_pages_last_modify_date = "@INFER_MAN_LAST_MODIFIED@"

@ -23,8 +23,6 @@ val clang_enabled : bool
val java_enabled : bool
val python_enabled : bool
val xcode_enabled : bool
val man_pages_last_modify_date : string

@ -2326,8 +2326,6 @@ and sigma_imply tenv calc_index_frame calc_missing subs prop1 sigma2 : subst2 *
; "java.lang.String.value" ]
in
Sil.Estruct (List.map ~f:mk_fld_sexp fields, Sil.inst_none)
| Python ->
L.die InternalError "mk_constant_string_hpred not implemented for Python"
in
let const_string_texp =
match !Language.curr_language with
@ -2344,8 +2342,6 @@ and sigma_imply tenv calc_index_frame calc_missing subs prop1 sigma2 : subst2 *
; nbytes= None
; dynamic_length= None
; subtype= Subtype.exact }
| Python ->
L.die InternalError "const_string_texp not implemented for Python"
in
Sil.Hpointsto (root, sexp, const_string_texp)
in

@ -462,8 +462,6 @@ let mk_ptsto_exp_footprint pname tenv orig_prop (lexp, typ) max_stamp inst :
Subtype.exact
| Java ->
Subtype.subtypes
| Python ->
L.die InternalError "Subtypes for Python not implemented"
in
let create_ptsto footprint_part off0 =
match (root, off0, typ.Typ.desc) with

@ -705,8 +705,6 @@ let prop_init_formals_seed tenv new_formals (prop : 'a Prop.t) : Prop.exposed Pr
Exp.Sizeof {typ; nbytes= None; dynamic_length= None; subtype= Subtype.exact}
| Java ->
Exp.Sizeof {typ; nbytes= None; dynamic_length= None; subtype= Subtype.subtypes}
| Python ->
L.die InternalError "prop_init_formals_seed not implemented for Python"
in
Prop.mk_ptsto_lvar tenv Prop.Fld_init Sil.inst_formal (pv, texp, None)
in

@ -46,7 +46,7 @@ depend:
ocamldep -native \
-I IR -I absint -I atd -I backend -I base -I biabduction -I bufferoverrun -I checkers \
-I clang -I concurrency -I eradicate -I facebook -I integration -I istd \
-I java -I labs -I python -I quandary -I unit -I unit/clang -I deadcode \
-I java -I labs -I quandary -I unit -I unit/clang -I deadcode \
$(ml_src_files) > deadcode/.depend
# circular dependency... not sure how to fix properly

@ -21,8 +21,6 @@ let clang = is_yes "@BUILD_C_ANALYZERS@"
let java = is_yes "@BUILD_JAVA_ANALYZERS@"
let python = is_yes "@BUILD_PYTHON_ANALYZERS@"
let facebook = is_yes "@IS_FACEBOOK_TREE@"
let extra_cflags = if "@EXTRA_CFLAGS" = "" then [] else ["@EXTRA_CFLAGS@"]

@ -7,7 +7,6 @@ let source_dirs =
(if facebook then "facebook" else "opensource")
:: ( (if clang then ["clang"; "unit" ^/ "clang"] else ["clang_stubs"; "unit" ^/ "clang_stubs"])
@ [ (if java then "java" else "java_stubs")
; (if python && facebook then "python" else "python_stubs")
; "absint"
; "backend"
; "biabduction"
@ -45,8 +44,6 @@ let infer_cflags =
let stanzas =
( if clang then ["(ocamllex types_lexer ctl_lexer)"; "(menhir (modules types_parser ctl_parser))"]
else [] )
@ ( if python && facebook then ["(ocamllex pythonLexer)"; "(menhir (modules pythonParser))"]
else [] )
@ [ Format.sprintf
{|
(library

@ -22,7 +22,6 @@ type mode =
| ClangCompilationDB of [`Escaped of string | `Raw of string] list
| Javac of Javac.compiler * string * string list
| Maven of string * string list
| Python of string list
| PythonCapture of Config.build_system * string list
| XcodeXcpretty of string * string list
[@@deriving compare]
@ -39,8 +38,6 @@ let pp_mode fmt = function
args
| ClangCompilationDB _ ->
F.fprintf fmt "ClangCompilationDB driver mode"
| Python args ->
F.fprintf fmt "Python driver mode:@\nargs = %a" Pp.cli_args args
| PythonCapture (bs, args) ->
F.fprintf fmt "PythonCapture driver mode:@\nbuild system = '%s'@\nargs = %a"
(Config.string_of_build_system bs)
@ -215,9 +212,6 @@ let capture ~changed_files = function
| Maven (prog, args) ->
L.progress "Capturing in maven mode...@." ;
Maven.capture ~prog ~args
| Python args ->
(* pretend prog is the root directory of the project *)
PythonMain.go args
| PythonCapture (build_system, build_cmd) ->
register_perf_stats_report PerfStats.TotalFrontend ;
L.progress "Capturing in %s mode...@." (Config.string_of_build_system build_system) ;
@ -412,8 +406,6 @@ let assert_supported_mode required_analyzer requested_mode_string =
Version.clang_enabled
| `Java ->
Version.java_enabled
| `Python ->
Version.python_enabled
| `Xcode ->
Version.clang_enabled && Version.xcode_enabled
in
@ -424,8 +416,6 @@ let assert_supported_mode required_analyzer requested_mode_string =
"clang"
| `Java ->
"java"
| `Python ->
"python"
| `Xcode ->
"clang and xcode"
in
@ -441,8 +431,6 @@ let assert_supported_build_system build_system =
Config.string_of_build_system build_system |> assert_supported_mode `Java
| BClang | BMake | BNdk ->
Config.string_of_build_system build_system |> assert_supported_mode `Clang
| BPython ->
Config.string_of_build_system build_system |> assert_supported_mode `Python
| BXcode ->
Config.string_of_build_system build_system |> assert_supported_mode `Xcode
| BBuck ->
@ -489,8 +477,6 @@ let mode_of_build_command build_cmd =
Javac (Javac.Javac, prog, args)
| BMvn ->
Maven (prog, args)
| BPython ->
Python args
| BXcode when Config.xcpretty ->
XcodeXcpretty (prog, args)
| BBuck when (not Config.flavors) && Config.reactive_mode ->

@ -19,7 +19,6 @@ type mode =
| ClangCompilationDB of [`Escaped of string | `Raw of string] list
| Javac of Javac.compiler * string * string list
| Maven of string * string list
| Python of string list
| PythonCapture of Config.build_system * string list
| XcodeXcpretty of string * string list
[@@deriving compare]

@ -1,9 +0,0 @@
(*
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
open! IStd
let go _ = ()

@ -1,10 +0,0 @@
(*
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
open! IStd
val go : string list -> unit
Loading…
Cancel
Save