Skip to content

Commit 0bca88f

Browse files
author
Aishwarya Jagarapu
committed
addressed comments - modified yml files, Bld files, removed coverage, verification
1 parent 51d9aee commit 0bca88f

File tree

11 files changed

+16
-41
lines changed

11 files changed

+16
-41
lines changed

.github/workflows/macosci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ jobs:
1616
with:
1717
java-version: 11
1818
- name: Cache Maven packages
19-
uses: actions/cache@v4
19+
uses: actions/cache@v2
2020
with:
2121
path: ~/.m2
2222
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2323
restore-keys: ${{ runner.os }}-m2
24+
- name: Build Java P runtime
25+
run: mvn clean package -f Src/PRuntimes/PJavaRuntime
2426
- name: Build
2527
run: dotnet build --configuration Release
2628
- name: Test
27-
run: dotnet test --configuration Release
29+
run: dotnet test --configuration Release

.github/workflows/pex.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
java-version: 17
2828
- name: Cache Maven packages
29-
uses: actions/cache@v2
29+
uses: actions/cache@v4
3030
with:
3131
path: ~/.m2
3232
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
@@ -36,4 +36,4 @@ jobs:
3636
run: ./scripts/build.sh
3737
- name: Test PEx
3838
working-directory: Src/PRuntimes/PExRuntime
39-
run: mvn test
39+
run: mvn test

.github/workflows/ubuntuci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121
path: ~/.m2
2222
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2323
restore-keys: ${{ runner.os }}-m2
24+
- name: Build Java P runtime
25+
run: mvn clean package -f Src/PRuntimes/PJavaRuntime
2426
- name: Build
2527
run: dotnet build --configuration Release
2628
- name: Test
27-
run: dotnet test --configuration Release
29+
run: dotnet test --configuration Release

Bld/build.ps1

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ pushd ..
44
Write-Host "Initializing submodules .." -ForegroundColor DarkGreen -BackgroundColor White
55
git submodule update --init --recursive
66

7+
mvn clean compile -f ./Src/PRuntimes/PJavaRuntime/pom.xml
8+
79
# Run the build! :D
810
dotnet build -c Release
911

Bld/build.sh

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ echo -e "${ORANGE} ---- Fetching git submodules ----${NOCOLOR}"
1313
# Initialize submodules
1414
git submodule update --init --recursive
1515

16+
echo -e "${ORANGE} ---- Building the Java P runtime ----${NOCOLOR}"
17+
mvn compile -q -f ./Src/PRuntimes/PJavaRuntime/pom.xml
18+
1619
echo -e "${ORANGE} ---- Building the PCompiler ----${NOCOLOR}"
1720
# Run the build!
1821

Src/PChecker/CheckerCore/Checker.cs

-4
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ public static void Run(CheckerConfiguration configuration)
3535
Error.Write(logger, ConsoleColor.Yellow, engine.GetReport());
3636
}
3737
break;
38-
case CheckerMode.Verification:
39-
case CheckerMode.Coverage:
4038
case CheckerMode.PEx:
4139
ExhaustiveEngine.Create(configuration).Run();
4240
break;
@@ -55,8 +53,6 @@ public static void Run(CheckerConfiguration configuration)
5553
case CheckerMode.BugFinding:
5654
TestingProcess.Create(configuration).Run();
5755
break;
58-
case CheckerMode.Verification:
59-
case CheckerMode.Coverage:
6056
case CheckerMode.PEx:
6157
ExhaustiveEngine.Create(configuration).Run();
6258
break;

Src/PChecker/CheckerCore/CheckerMode.cs

-8
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ public enum CheckerMode
1010
/// </summary>
1111
BugFinding,
1212
/// <summary>
13-
/// Mode for exhaustive symbolic exploration
14-
/// </summary>
15-
Verification,
16-
/// <summary>
17-
/// Mode for exhaustive explicit-state search with state-space coverage reporting
18-
/// </summary>
19-
Coverage,
20-
/// <summary>
2113
/// Mode for exhaustive explicit-state search with state-space coverage reporting
2214
/// </summary>
2315
PEx

Src/PChecker/CheckerCore/ExhaustiveEngine.cs

-4
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ private String CreateArguments()
7474
{
7575
switch (_checkerConfiguration.Mode)
7676
{
77-
case CheckerMode.Verification:
78-
arguments.Append("--strategy symbolic ");
79-
break;
80-
case CheckerMode.Coverage:
8177
case CheckerMode.PEx:
8278
arguments.Append($"--strategy {_checkerConfiguration.SchedulingStrategy} ");
8379
break;

Src/PCompiler/CompilerCore/CompilerOutput.cs

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ namespace Plang.Compiler
22
{
33
public enum CompilerOutput
44
{
5-
C,
6-
Symbolic,
75
CSharp,
86
Java,
97
PEx,

Src/PCompiler/PCommandLine/Options/PCheckerOptions.cs

+1-15
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public PCheckerOptions()
3131
basicOptions.AddPositionalArgument("path", "Path to the compiled file to check for correctness (*.dll)."+
3232
" If this option is not passed, the compiler searches for a *.dll file in the current folder").IsRequired = false;
3333
var modes = basicOptions.AddArgument("mode", "md", "Checker mode to use. Can be bugfinding or pex. If this option is not passed, bugfinding mode is used as default");
34-
modes.AllowedValues = new List<string>() { "bugfinding", "pex", "pobserve", "verification", "coverage" };
34+
modes.AllowedValues = new List<string>() { "bugfinding", "pex", "pobserve" };
3535
basicOptions.AddArgument("testcase", "tc", "Test case to explore");
3636
// basicOptions.AddArgument("smoke-testing", "tsmoke",
3737
// "Smoke test the program by running the checker on all the test cases", typeof(bool));
@@ -214,12 +214,6 @@ private static void UpdateConfigurationWithParsedArgument(CheckerConfiguration c
214214
case "bugfinding":
215215
checkerConfiguration.Mode = CheckerMode.BugFinding;
216216
break;
217-
case "verification":
218-
checkerConfiguration.Mode = CheckerMode.Verification;
219-
break;
220-
case "coverage":
221-
checkerConfiguration.Mode = CheckerMode.Coverage;
222-
break;
223217
case "pex":
224218
checkerConfiguration.Mode = CheckerMode.PEx;
225219
break;
@@ -327,7 +321,6 @@ private static void UpdateConfigurationWithParsedArgument(CheckerConfiguration c
327321
checkerConfiguration.JvmArgs = ((string)option.Value).Replace(':', ' ');
328322
break;
329323
case "checker-args":
330-
case "psym-args":
331324
checkerConfiguration.CheckerArgs = ((string)option.Value).Replace(':', ' ');
332325
break;
333326
case "pproj":
@@ -393,8 +386,6 @@ private static void FindLocalPCompiledFile(CheckerConfiguration checkerConfigura
393386
string filePattern = checkerConfiguration.Mode switch
394387
{
395388
CheckerMode.BugFinding => "*.dll",
396-
CheckerMode.Verification => "*-jar-with-dependencies.jar",
397-
CheckerMode.Coverage => "*-jar-with-dependencies.jar",
398389
CheckerMode.PEx => "*-jar-with-dependencies.jar",
399390
_ => "*.dll"
400391
};
@@ -421,11 +412,6 @@ from file in Directory.GetFiles(checkerConfiguration.PCompiledPath, filePattern,
421412
|| fileName.EndsWith($"{pathSep}p.dll"))
422413
continue;
423414
}
424-
else if (checkerConfiguration.Mode == CheckerMode.Verification || checkerConfiguration.Mode == CheckerMode.Coverage)
425-
{
426-
if (!fileName.Contains($"Symbolic{pathSep}"))
427-
continue;
428-
}
429415
else if (checkerConfiguration.Mode == CheckerMode.PEx)
430416
{
431417
if (!fileName.Contains($"PEx{pathSep}"))

Src/PCompiler/PCommandLine/Options/PCompilerOptions.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ internal PCompilerOptions()
2424
"The P compiler compiles all the P files in the project together and generates the executable that can be checked for correctness by the P checker."
2525
// + "\n\nCompiler modes :: (default: bugfinding)\n" +
2626
// " --mode bugfinding : for bug finding through stratified random search\n" +
27-
// " --mode verification : for verification through exhaustive symbolic exploration\n" +
28-
// " --mode coverage : for achieving state-space coverage through exhaustive explicit-state search\n" +
2927
// " --mode pobserve : for runtime monitoring of P specs against implementation logs"
3028
);
3129

@@ -39,7 +37,7 @@ internal PCompilerOptions()
3937
pfilesGroup.AddArgument("outdir", "o", "Dump output to directory (absolute or relative path)");
4038

4139
var modes = Parser.AddArgument("mode", "md", "Compilation mode to use. Can be bugfinding, pex, pobserve, or stately. If this option is not passed, bugfinding mode is used as default");
42-
modes.AllowedValues = new List<string>() { "bugfinding", "pex", "pobserve", "stately", "verification", "coverage" };
40+
modes.AllowedValues = new List<string>() { "bugfinding", "pex", "pobserve", "stately"};
4341

4442
Parser.AddArgument("pobserve-package", "po", "PObserve package name").IsHidden = true;
4543

0 commit comments

Comments
 (0)