Skip to content

Commit 4df8091

Browse files
committed
init CLI structure
1 parent 39d9d01 commit 4df8091

File tree

6 files changed

+180
-19
lines changed

6 files changed

+180
-19
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ Symbolic Execution engine for finding bugs in EO programs
44
Functionally symex consists of the following parts:
55
- parsing CFG (Control Flow Graph) of a program;
66
- traversing the CFG and capture path constraints and symbolic equasions for variables;
7-
- solving the contstraints and euquasions;
7+
- solving the constraints and equations;
88
- generating notifications based on specified checks;
99

1010

11-
Checks are supplied in predifined format.
11+
Checks are supplied in predefined format.
1212

1313

1414
Traversing can be extended via plugin mechanism.

pom.xml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -95,37 +95,47 @@ SOFTWARE.
9595
</properties>
9696
<dependencies>
9797
<dependency>
98-
<groupId>org.eolang</groupId>
99-
<artifactId>eo-parser</artifactId>
100-
<version>${eo.version}</version>
98+
<groupId>org.junit</groupId>
99+
<artifactId>junit-bom</artifactId>
100+
<version>5.9.2</version>
101+
<type>pom</type>
102+
<scope>test</scope>
101103
</dependency>
102-
<dependency>
103-
<groupId>org.slf4j</groupId>
104-
<artifactId>slf4j-api</artifactId>
105-
<version>2.0.6</version>
104+
<dependency>
105+
<groupId>org.junit.jupiter</groupId>
106+
<artifactId>junit-jupiter-engine</artifactId>
107+
<version>5.9.2</version>
108+
<scope>test</scope>
106109
</dependency>
107110
<dependency>
108-
<groupId>com.jcabi</groupId>
109-
<artifactId>jcabi-log</artifactId>
111+
<groupId>org.junit.jupiter</groupId>
112+
<artifactId>junit-jupiter-params</artifactId>
113+
<version>5.9.2</version>
114+
<scope>test</scope>
110115
</dependency>
111116
<dependency>
112-
<groupId>org.cactoos</groupId>
113-
<artifactId>cactoos</artifactId>
114-
<version>0.55.0</version>
117+
<groupId>org.junit.jupiter</groupId>
118+
<artifactId>junit-jupiter-api</artifactId>
119+
<version>5.9.2</version>
120+
<scope>test</scope>
115121
</dependency>
116122
<dependency>
117-
<groupId>com.jcabi</groupId>
118-
<artifactId>jcabi-xml</artifactId>
119-
<version>0.23.2</version>
123+
<groupId>org.junit-pioneer</groupId>
124+
<artifactId>junit-pioneer</artifactId>
125+
<version>1.9.1</version>
126+
<scope>test</scope>
120127
</dependency>
121128
</dependencies>
122129
<build>
123130
<plugins>
124131
<plugin>
125132
<artifactId>maven-compiler-plugin</artifactId>
126-
<configuration>
133+
<version>3.8.1</version>
134+
<configuration combine.self="override">
135+
<source>8</source>
136+
<target>8</target>
127137
<compilerArgs>
128-
<arg>-Aproject=${project.groupId}/${project.artifactId}</arg>
138+
<arg>-Xpkginfo:always</arg>
129139
</compilerArgs>
130140
</configuration>
131141
</plugin>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2020-2023 Polystat.org
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included
14+
* in all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
package org.polystat.symex;
25+
26+
import java.util.Arrays;
27+
28+
/**
29+
* CLI for Symex.
30+
*
31+
* @since 1.0
32+
*/
33+
public final class SymexCli {
34+
35+
/**
36+
* Hiding ctor.
37+
*/
38+
private SymexCli() {
39+
}
40+
41+
/**
42+
* CLI entry point.
43+
* @param args Parameters
44+
*/
45+
@SuppressWarnings({"PMD.SystemPrintln", "PMD.ProhibitPublicStaticMethods"})
46+
public static void main(final String[] args) {
47+
System.out.printf(
48+
"Parameters:\n%s",
49+
Arrays.toString(args)
50+
);
51+
}
52+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2020-2023 Polystat.org
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included
14+
* in all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
/**
26+
* Symex Engine core.
27+
*
28+
* @since 1.0
29+
*/
30+
package org.polystat.symex;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2020-2023 Polystat.org
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included
14+
* in all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
package org.polystat.symex;
25+
26+
import org.junit.jupiter.api.Test;
27+
28+
/**
29+
* Tests for CLI.
30+
*
31+
* @since 1.0
32+
*/
33+
class SymexCliTest {
34+
35+
@Test
36+
void simpleRunWorks() {
37+
SymexCli.main(new String[] {""});
38+
}
39+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2020-2023 Polystat.org
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included
14+
* in all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
/**
26+
* Tests for Symex.
27+
*
28+
* @since 1.0
29+
*/
30+
package org.polystat.symex;

0 commit comments

Comments
 (0)