FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
BatFix/src/main.cpp at main · squaresLab/BatFix · GitHub
squaresLab
/
BatFix
Public
Notifications
You must be signed in to change notification settings
Fork
1
Star
5
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
BatFix
/
src
/
main.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
87 lines (69 loc) · 2.44 KB
Breadcrumbs
BatFix
/
src
/
main.cpp
Copy path
File metadata and controls
87 lines (69 loc) · 2.44 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#
include
<
iostream
>
#
include
<
memory
>
#
include
<
algorithm
>
#
include
<
vector
>
#
include
<
sstream
>
#
include
<
map
>
#
include
<
chrono
>
#
include
<
fstream
>
#
include
<
unistd.h
>
#
include
<
sys/wait.h
>
#
include
<
filesystem
>
#
include
<
poll.h
>
#
include
"
clang/AST/DeclarationName.h
"
#
include
"
clang/Tooling/Core/Replacement.h
"
#
include
"
clang/Tooling/Tooling.h
"
#
include
"
clang/ASTMatchers/ASTMatchFinder.h
"
#
include
"
../CLI11.hpp
"
#
include
"
CodePreprocessing.h
"
#
include
"
llvm/ADT/StringRef.h
"
#
include
"
clang/Basic/Diagnostic.h
"
#
include
"
clang/Basic/SourceLocation.h
"
#
include
"
clang/AST/RecursiveASTVisitor.h
"
#
include
"
clang/Rewrite/Core/Rewriter.h
"
#
include
"
clang/AST/AST.h
"
#
include
"
clang/AST/ASTConsumer.h
"
#
include
"
clang/Frontend/TextDiagnosticPrinter.h
"
#
include
"
clang/Basic/DiagnosticOptions.h
"
#
include
"
clang/AST/Type.h
"
#
include
"
clang/AST/Stmt.h
"
#
include
<
clang/Sema/Lookup.h
>
#
include
<
clang/Sema/ExternalSemaSource.h
>
#
include
<
clang/Sema/Sema.h
>
#
include
"
clang/AST/PrettyPrinter.h
"
#
include
"
clang/Basic/LangOptions.h
"
#
include
"
JavaGraph.h
"
#
include
"
clang/Rewrite/Frontend/FixItRewriter.h
"
#
include
<
regex
>
#
include
"
clang/Analysis/CFG.h
"
#
include
"
clang/Lex/Lexer.h
"
#
include
<
stdlib.h
>
#
include
"
Enumerator.h
"
#
include
"
ClangVisitors.h
"
#
include
"
ExecutionTraces.cpp
"
#
include
"
ClangCompressedCFG.h
"
#
include
"
HyperGraph.h
"
#
include
"
MaxSATWrapper.h
"
#
include
"
SyntaxErrors.h
"
#
include
"
SemanticErrors.h
"
int
main
(
int
argc,
const
char
**argv) {
CLI
::App app{
"
Synthesizer
"
};
std::string code_file, graph_file, resource_dir, trace;
app.
add_option
(
"
-f,--file
"
, code_file,
"
Source code
"
);
app.
add_option
(
"
-g,--graph
"
, graph_file,
"
Graph code
"
);
app.
add_option
(
"
-t,--trace
"
, trace,
"
Trace code
"
);
app.
add_option
(
"
-c, --clang-resource
"
, resource_dir,
"
Clang resource dirs
"
);
CLI11_PARSE
(app, argc, argv);
std::cerr <<
"
Input files:
"
<< code_file <<
"
,
"
<< graph_file << std::endl;
int
i =
0
;
std::string code =
file_to_string
(code_file);
assert
(!code.
empty
());
code =
preprocess
(code);
SyntaxErrors
syntax
(code);
while
(!syntax.
fix_syntax_errors
() && i++ <
5
);
//
std::cout << code << std::endl;
//
std::vector<string> programs;//programs.push_back(syntax.get_current_code());
SemanticErrors
semantics
(syntax.
get_current_code
(), graph_file, trace);
while
(!semantics.
semantic_analysis
() && i++ <
5
);
return
0
;
}
Back
|
FazBrowse Home
|
New Git URL