Skip to content

Merging PEx into the Major release P 3.0 branch. #860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 199 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
c68f93f
Removed the C backend completely in the P 2.1
ankushdesai Feb 28, 2024
7ad7b99
Upgraded P to use .Net 8.0
ankushdesai Feb 28, 2024
624f88e
Updated the actions to .Net 8.0
ankushdesai Feb 28, 2024
7aa3930
[PSym] Upgrade to .NET 8.0
aman-goel Feb 29, 2024
6e7ad32
[PCover] Adds temporary CLI mode to trigger new explicit engine
aman-goel Mar 4, 2024
54cee03
[PCover] Adds initial version of cleaned up PCover backend
aman-goel Mar 4, 2024
61fe942
[PCover] Minor
aman-goel Mar 5, 2024
58b58aa
[PCover IR] Cleans up logic relating to event handlers
aman-goel Mar 11, 2024
3e34ea0
[CLI] Adds new pcover cli (hidden)
aman-goel Mar 12, 2024
32c6e03
[PCover IR] Cleanup IR for sending event, machine creation, etc.
aman-goel Mar 12, 2024
efc656a
[PCover runtime] Adds basic runtime setup files
aman-goel Mar 12, 2024
7cc8930
[PCover] Adds placeholder for CLI config
aman-goel Mar 12, 2024
a76ec69
[PCover] Adds main and trace loggers using Log4J
aman-goel Mar 12, 2024
c82066a
[PCover] Adds event buffer represented as fifo queue with sender sema…
aman-goel Mar 12, 2024
ff2122a
[PCover] Adds event handler placeholders
aman-goel Mar 12, 2024
2d302ef
[PCover] Adds event/message placeholders
aman-goel Mar 12, 2024
0983ae8
[PCover] Adds basic code for machine/state/test driver
aman-goel Mar 12, 2024
8a76568
[PCover] Adds basic code for scheduler
aman-goel Mar 12, 2024
017f169
[PCover] Adds global data structures and program interface
aman-goel Mar 12, 2024
eb847fc
[PCover] Adds utils
aman-goel Mar 12, 2024
137e103
Merge branch 'master' into dev/aman
aman-goel Mar 18, 2024
f2c2ffa
[PCover IR] Minor renaming
aman-goel Mar 18, 2024
43b5dcf
Merge remote-tracking branch 'origin/master' into dev/aman
aman-goel Mar 18, 2024
b1f7b5d
[PCover] Adds PValues for P data types
aman-goel Mar 18, 2024
947fce0
[PCover] Renaming and minor corrections
aman-goel Mar 18, 2024
15c41cb
[PCover] Minor update to javadocs
aman-goel Mar 19, 2024
8a1777a
[PCover] Reformating
aman-goel Mar 19, 2024
b5e2d79
[PCover IR+RT] Rename Message to PMessage
aman-goel Mar 26, 2024
e7cf32b
Merge branch 'master' into dev/aman
aman-goel Mar 26, 2024
b8f25d5
[CLI] Minor correction
aman-goel Mar 26, 2024
897b64f
[PExplicit] Renames new PCover to PExplicit
aman-goel Mar 26, 2024
ad86551
Merge branch 'master' into dev/aman
aman-goel Mar 27, 2024
cfca4db
[PExplicit] Minor correction to CLI
aman-goel Mar 28, 2024
39a44dd
[PExplicit RT] Rename repeat to current, backtrack to unexplored choices
aman-goel Mar 30, 2024
6220cb7
Merge branch 'master' into dev/aman
aman-goel Apr 1, 2024
95d2ba9
Merge changes from master
aman-goel Apr 5, 2024
5d16c6a
[PExplicit RT] Adds CLI options and config
aman-goel Apr 1, 2024
9677035
[PExplicit RT] Adds new exceptions when a bug is found
aman-goel Apr 1, 2024
7e7b141
[PExplicit RT] Adds timeout/memout monitors
aman-goel Apr 1, 2024
0d43c6a
[Pexplicit RT] Adds utils for timed call, random number generator, an…
aman-goel Apr 1, 2024
1648ee3
[Pexplicit RT] Adds more logging functions
aman-goel Apr 1, 2024
008eeea
[PExplicit RT] Updates machine and message queues to check if machine…
aman-goel Apr 1, 2024
82fbcb6
[PExplicit RT] Add function to check if an event is a create machine …
aman-goel Apr 1, 2024
6653eda
[PExplicit RT] Improve choices and schedule fields
aman-goel Apr 1, 2024
b8ad8c0
[PExplicit RT] Implements main PExplicit fentry point, runtime execut…
aman-goel Apr 2, 2024
5eadaaf
[PExplicit RT] Updates loggers
aman-goel Apr 2, 2024
a343ca7
[PExplicit RT] Implements and cleans up certain PMachine/State functions
aman-goel Apr 2, 2024
8258fec
[PExplicit RT] Adds initial version of scheduler
aman-goel Apr 2, 2024
cc58992
[PExplicit RT] Implements basic machine/scheduler/FIFO functions
aman-goel Apr 2, 2024
743019e
[PExplicit RT] Adds initial support for stateless dfs-style backtracking
aman-goel Apr 2, 2024
01c93bf
[PExplicit IR] Removes StringVS
aman-goel Apr 2, 2024
35a40e3
[PExplicit RT] Corrects basic dfs-search
aman-goel Apr 3, 2024
9e9a9e0
[PExplicit RT] Improves how peeking into a machine's FIFO queue works
aman-goel Apr 3, 2024
e8d6488
[PExplicit] Support formatted PString, initial support for defers and…
aman-goel Apr 4, 2024
a5044d1
[PExplicit RT] Adds support for defers and blocking receive
aman-goel Apr 5, 2024
09ef830
[PExplicit] Adds support for receives, loops, and named tuple constru…
aman-goel Apr 8, 2024
e4d6a54
[PExplicit] Implements operations for primitive PValue types
aman-goel Apr 8, 2024
e8d47cb
[PExplicit] Adds running mvn test and github ci action
aman-goel Apr 9, 2024
7793dc2
[PExplicit RT] Implement raising an event
aman-goel Apr 9, 2024
c7a9ff6
Disable GitHub CI actions temporarily to only run PExplicit CI
aman-goel Apr 9, 2024
42ed799
[PExplicit] Several minor updates
aman-goel Apr 9, 2024
ce02120
[PExplicit] Support announce, correct named tuple set ffield, support…
aman-goel Apr 9, 2024
c281c85
[PExplicit] Several corrections
aman-goel Apr 10, 2024
52369d5
[PExplicit] Correct raise event with payload
aman-goel Apr 10, 2024
f2a2131
[PExplicit] Correct PString constructor
aman-goel Apr 10, 2024
b09a326
[PExplicit IR] Exit current flow context if raise or goto statements …
aman-goel Apr 10, 2024
ca47c6e
Update gitignore
aman-goel Apr 10, 2024
bacf312
[PExplicit] Several corrections
aman-goel Apr 10, 2024
8ca49fc
[PExplicit] Support enum references with values specified
aman-goel Apr 10, 2024
51bf48e
[PExplicit IR] Correct dynamic type casting in IR
aman-goel Apr 11, 2024
eeeec67
Suppress github ci failures due to not running them on current branch
aman-goel Apr 11, 2024
a8a1436
[PExplicit] Cleaned up type casting in IR
aman-goel Apr 11, 2024
98036b5
[PExplicit] Support continue statement
aman-goel Apr 11, 2024
23a1442
[PExplicit] Several small upgrades
aman-goel Apr 11, 2024
b4ac6d1
[PExplicit] Several corrections and minor lang feature support
aman-goel Apr 11, 2024
0f3bb3c
[PExplicit] Refactoring and cleanup
aman-goel Apr 11, 2024
a03435b
Undo temporary changes to GitHub CI
aman-goel Apr 11, 2024
1eb2605
[PExplicit] Update pom, minor refactoring
aman-goel Apr 11, 2024
0715145
[PExplicit] Update to java 17
aman-goel Apr 11, 2024
ffadabd
[PExplicit] Minor: report class cast exception as a bug
aman-goel Apr 12, 2024
e14816e
[PExplicit] Convert run status to enum
aman-goel Apr 15, 2024
cb4b0ce
[PExplicit] Clean up control flow relating to pending state transitio…
aman-goel Apr 15, 2024
2535e6e
[PExplicit] Update comments
aman-goel Apr 15, 2024
3a7ca5c
Added support for generating a warning when spec handles an event but…
ankushdesai Apr 9, 2024
4d5246c
Create custom converter for JSON serialization in .NET8 (#717)
ehua9146 Apr 15, 2024
70b3d7d
[PExplicit] Support deadlock and liveness checking
aman-goel Apr 15, 2024
70fa106
[PExplicit] Minor
aman-goel Apr 16, 2024
29b836d
[PExplicit] Adds buggy trace replayer and basic .schedule writer
aman-goel Apr 16, 2024
95472af
[PExplicit] Correct issues when replaying buggy trace
aman-goel Apr 17, 2024
05eb083
[PExplicit] Adds TextWriter to write trace in txt format
aman-goel Apr 17, 2024
fec352d
[PExplicit] Correct halt event name
aman-goel Apr 18, 2024
43ac067
[PExplicit] Adds state caching
aman-goel Apr 18, 2024
dde413d
[PExplicit] Minor refactoring
aman-goel Apr 18, 2024
283d89b
[PExplicit] Correct cycle error in replayer, enforce cycle detection …
aman-goel Apr 18, 2024
1a5d544
[PExplicit] Correct local var names in IR
aman-goel Apr 18, 2024
5da214c
[PExplicit] Correct replayer, add initial version of stateful backtra…
aman-goel Apr 19, 2024
de002e2
[PExplicit] Correct backtracking
aman-goel Apr 19, 2024
f6f37a4
[PExplicit] Refactor and enable stateful backtracking
aman-goel Apr 19, 2024
6a8272a
[PExplicit] Minor improvement to stateful backtracking
aman-goel Apr 19, 2024
0ff5bcb
[PExplicit] Reformat code
aman-goel Apr 19, 2024
b43053f
[PExplicit] More reformatting
aman-goel Apr 19, 2024
105152b
[PExplicit] Minor corrections
aman-goel Apr 19, 2024
b153bfc
[PExplicit] Correct PMachine/PMonitor hashCode and compateTo functions
aman-goel Apr 19, 2024
8785dde
[PExplicit] Uniquify instanceId for PMachine as well as PMonitor
aman-goel Apr 22, 2024
a2f0ac6
[PExplicit] Improve state caching
aman-goel Apr 23, 2024
6682d9f
[PExplicit] Add non-chronological search
aman-goel Apr 25, 2024
4cf0e22
[Pexplicit] Minor
aman-goel Apr 25, 2024
6ac0535
[PExplicit] Minor refactoring
aman-goel Apr 26, 2024
a71d77e
[PExplicit] Refactoring and cleanup
aman-goel Apr 26, 2024
d79c62f
Limit number of choices in choose expression to at most 10000 (#725)
aman-goel May 2, 2024
885c818
Make PEvents and PTypes serializable in java (#726)
mchadalavada May 3, 2024
fa8e6c5
[PExplicit IR] Minor correction
aman-goel May 1, 2024
288b966
[PExplicit] Update usage via P CLI
aman-goel May 6, 2024
7c0d346
[PExplicit] Several corrections to choice tracking
aman-goel May 6, 2024
8ecc0cf
[PExplicit] Minor refactoring
aman-goel May 6, 2024
feaf6c4
[PExplicit] Refactoring and setting defaults
aman-goel May 6, 2024
41ae6e8
[PExplicit] Correct counting unexplored choices
aman-goel May 6, 2024
5a5fab6
[PExplicit] Minor changes to logging and asserts
aman-goel May 6, 2024
fa567d1
[PExplicit] Throw error if number of choices in choose(.) exceeds 10K
aman-goel May 6, 2024
199a0e1
[PExplicit] Correct stateful backtracking with complex data choices
aman-goel May 6, 2024
22805e4
[PEx] Minor update
aman-goel May 6, 2024
4bee066
[PEx] Support Java foreign functions
aman-goel May 7, 2024
1120480
[PEx] Minor corrections to IR
aman-goel May 7, 2024
cfb47f5
[PEx] Minor: correct an assertion
aman-goel May 8, 2024
c405fae
[PEx] Make receive inside while as not implemented for now
aman-goel May 8, 2024
dcf2b44
[PEx] Experimenting with while and receive in IR
aman-goel May 8, 2024
4637281
[PEx] Correct corner cases with while, receive, and after statements
aman-goel May 13, 2024
8819bab
[Tst] Add unit test to check interaction between while, receive w/ ca…
aman-goel May 13, 2024
79827f5
Removed the C backend completely in the P 2.1
ankushdesai Feb 28, 2024
4debbcb
[PCover] Adds temporary CLI mode to trigger new explicit engine
aman-goel Mar 4, 2024
3bb07b5
[CLI] Adds new pcover cli (hidden)
aman-goel Mar 12, 2024
f16c473
[PExplicit] Renames new PCover to PExplicit
aman-goel Mar 26, 2024
73525f9
Correct sync with mainline
aman-goel May 16, 2024
6cfb438
Merge remote-tracking branch 'origin/master' into dev/pexplicit_checker
aman-goel Jun 14, 2024
c150243
[PEx] Revamps tracking unexplored choices, changes schedule choice (#…
aman-goel Jun 19, 2024
9d7199f
[PEx] Adds modes for stateful backtracking
aman-goel Jul 12, 2024
4565eda
[PEx] Add support to serialize and deserialize search tasks in/from file
aman-goel Jul 12, 2024
c02f0ed
[PEx] Updates mvn test config
aman-goel Jul 12, 2024
ae1c6a0
[PEx] Minor correction
aman-goel Jul 16, 2024
d8a4914
[PEx IR] Minor correction
aman-goel Jul 18, 2024
ec6f249
[PEx] Several improvements to IR
aman-goel Jul 18, 2024
862e757
[PEx IR] Minor cleanup
aman-goel Jul 19, 2024
f0f6af1
[PEx] Cleanup disk tasks on exit, change defaults
aman-goel Jul 19, 2024
8ffaae7
[PEx] Minor: create .schedule only if bug is found
aman-goel Jul 19, 2024
bb8eb8f
[PEx] Adds writing buggy trace in file
aman-goel Jul 19, 2024
c46622b
[PEx] Adds option --replay <.schedule file> to replay a buggy trace
aman-goel Jul 19, 2024
b23a51f
[PEx] Minor
aman-goel Jul 19, 2024
6f733d4
[PEx] Fix serialization issues found by P regression tests
aman-goel Jul 19, 2024
b6b5828
[PEx] Minor cleanup
aman-goel Jul 19, 2024
261d289
[PEx] Improve cleanup of disk tasks on exit
aman-goel Jul 20, 2024
ad40c1c
[PEx] Minor correction
aman-goel Aug 6, 2024
0174966
[PEx] Add first version of RL-based choice selection
aman-goel Aug 7, 2024
83a90b2
[PEx] Correct timelines tracking and RL-based choice selection
aman-goel Aug 8, 2024
5d5954c
[PEx] Update timelines, corrects CI
aman-goel Aug 12, 2024
d47217b
[PEx] Renaming and refactoring
aman-goel Aug 14, 2024
b8cb0e2
[CLI] Update PEx CLI options
aman-goel Aug 14, 2024
8dbc657
[CLI] Cleanup PEx CLI options
aman-goel Aug 14, 2024
43837a3
[CI] Correct PEx CI
aman-goel Aug 14, 2024
9697061
[PEx] Add support for refinement interfaces
aman-goel Aug 14, 2024
d3b603c
[Tutorial] Adds updates for running with PEx
aman-goel Aug 14, 2024
8da2326
[PEx] Minor: update pom.xml
aman-goel Aug 16, 2024
ed1b209
[PEx] Implements multi-threaded PEx version (#768)
aman-goel Sep 5, 2024
2f47cba
[PEx] Adds tracking and limiting number of choices per choose(.) stat…
aman-goel Sep 5, 2024
44d8786
[PEx] bump version, change cli defaults
aman-goel Sep 5, 2024
bbdd445
[PEx] code cleanup and refactoring
aman-goel Sep 5, 2024
c9d550e
[PEx] minor logging changes, [Tst] Change choose(100) to choose(10)
aman-goel Sep 5, 2024
c534e9e
[PEx] Minor logging changes
aman-goel Sep 5, 2024
2da5298
[PEx] Changes return codes
aman-goel Sep 5, 2024
199ffec
[PEx] Correct return codes, [Tst] Limit choose choices
aman-goel Sep 5, 2024
5c8abf0
[Tutorial] Update hints for PEx
aman-goel Sep 5, 2024
ad66ede
[PEx] Minor updates and cleanup (#775)
aman-goel Sep 25, 2024
3b738e1
[PEx] Minor correction
aman-goel Jan 14, 2025
4339eb7
[PEx] Correct repeated local var declaration in IR
aman-goel Jan 14, 2025
80227b0
[PEx] Correct code too large error due to receive-inside-loop inlining
aman-goel Jan 14, 2025
8c16929
[PEx] Adds PLoopObject to track receive-loop variables
aman-goel Jan 15, 2025
1a65fa5
[PEx] Minor: correct defaults in help menu
aman-goel Jan 16, 2025
f5ebff3
merge branch major/P3.0 into dev/pexplicit_checker
Mar 11, 2025
3106eab
modified cache@v2 to cache@v4
Mar 11, 2025
34e7bf5
Rename PEvent to Event, Handle PrimitiveType.Null in GetDefaultValue
Mar 13, 2025
07816fe
[PEx] Correct functions containing non-tail ending goto/raise (#835)
aman-goel Mar 21, 2025
0185ff5
[PEx] Correct inlining for functions returning a value (#840)
aman-goel Apr 8, 2025
fdd034d
Merge branch master into dev_p3.0/pex
Apr 8, 2025
1cec9d0
Merge branch 'dev_p3.0/pex' into inprogress/pex
aishu-j Apr 8, 2025
8d129eb
removed CSharp, Java modes in CompilerOutput , removed global.json
Apr 9, 2025
4e9807f
Minor changes to make customer model to compile (#842)
ChristineZh0u Apr 11, 2025
65b4c33
Merge pull request #841 from p-org/inprogress/pex
aishu-j Apr 14, 2025
f6b4c95
[PEx] Disable support for receive statement inside loop (#843)
aman-goel Apr 21, 2025
55a1199
Dev/remove libhandler (#847)
ankushdesai Apr 24, 2025
c5c6c72
Update build system and Java compiler, remove dependency JARs (#849)
ankushdesai Apr 24, 2025
cf2c84f
[PEx] Correct inlining functions with non-null return without assignm…
aman-goel Apr 25, 2025
28833bf
Merge branch 'master' into major/P3.0
ankushdesai Apr 25, 2025
a017510
Merge branch 'major/P3.0' into dev_p3.0/pex
ankushdesai Apr 25, 2025
99825a3
Moved PEx outside the PRuntimes
ankushdesai Apr 25, 2025
079cd1f
Update pex.yml
ankushdesai Apr 25, 2025
92b27f3
Update build scripts and test executor; add build documentation
ankushdesai Apr 28, 2025
4e13fd6
Fix Java version to 17 and correct P build directory path
ankushdesai Apr 28, 2025
a03febc
Fix Java version to 17 and correct P build directory path
ankushdesai Apr 28, 2025
70df7a6
Pex param test (#855)
zhezhouzz May 2, 2025
adee201
PR #860 Fixes: Removed Coverage and Verification modes, fixed code qu…
ankushdesai May 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/pex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will build and test PEx, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: PEx on Ubuntu

on:
push:
pull_request:
workflow_dispatch:
inputs:
args:
description: Additional arguments
default: ""
required: false
jobs:
PEx-Build-And-Test-Ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Copy link
Preview

Copilot AI May 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This workflow uses an outdated actions/checkout version. Consider upgrading to 'actions/checkout@v3' for better performance and security.

Suggested change
- uses: actions/checkout@v1
- uses: actions/checkout@v3

Copilot uses AI. Check for mistakes.

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build PEx
working-directory: Src/PEx
run: ./scripts/build_and_test.sh --build
- name: Test PEx
working-directory: Src/PEx
run: ./scripts/build_and_test.sh --test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ Bld/*
!Bld/Jars/
!Bld/Deps/
PGenerated/
PCheckerOutput/
!Src/**/Zing/*.zing
stubs.c
*.idb
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion Ext/libhandler
Submodule libhandler deleted from 0f1e36
8 changes: 3 additions & 5 deletions Src/PChecker/CheckerCore/Checker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ public static void Run(CheckerConfiguration configuration)
Error.Write(logger, ConsoleColor.Yellow, engine.GetReport());
}
break;
case CheckerMode.Verification:
case CheckerMode.Coverage:
case CheckerMode.PEx:
ExhaustiveEngine.Create(configuration).Run();
break;
default:
Expand All @@ -54,8 +53,7 @@ public static void Run(CheckerConfiguration configuration)
case CheckerMode.BugFinding:
TestingProcess.Create(configuration).Run();
break;
case CheckerMode.Verification:
case CheckerMode.Coverage:
case CheckerMode.PEx:
ExhaustiveEngine.Create(configuration).Run();
break;
default:
Expand All @@ -66,4 +64,4 @@ public static void Run(CheckerConfiguration configuration)
logger.WriteLine(". Done");
}
}
}
}
13 changes: 10 additions & 3 deletions Src/PChecker/CheckerCore/CheckerConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ public int MaxSchedulingSteps
[DataMember]
public string CustomStateMachineRuntimeLogType;

/// <summary>
/// Enables debugging.
/// </summary>
[DataMember]
public bool EnableDebugging;


/// <summary>
/// The testing scheduler unique endpoint.
Expand Down Expand Up @@ -269,10 +275,10 @@ public int MaxSchedulingSteps
public bool DisableEnvironmentExit;

/// <summary>
/// Additional arguments to pass to PSym.
/// Additional arguments to pass to checker.
/// </summary>
[DataMember]
public string PSymArgs;
public string CheckerArgs;

/// <summary>
/// Additional arguments to pass to JVM-based checker.
Expand Down Expand Up @@ -321,11 +327,12 @@ protected CheckerConfiguration()
DebugActivityCoverage = false;

IsVerbose = false;
EnableDebugging = false;

EnableColoredConsoleOutput = false;
DisableEnvironmentExit = true;

PSymArgs = "";
CheckerArgs = "";
JvmArgs = "";
}

Expand Down
3 changes: 2 additions & 1 deletion Src/PChecker/CheckerCore/CheckerCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<AssemblyName>PCheckerCore</AssemblyName>
<RootNamespace>PChecker</RootNamespace>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
<OutputPath>$(PSdkFolder)\Binaries</OutputPath>
<TargetFramework>net8.0</TargetFramework>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -22,4 +23,4 @@
<None Include="../../../Icon/icon.png" Pack="true" PackagePath="" />
<None Include="../../../README.md" Pack="true" PackagePath="" />
</ItemGroup>
</Project>
</Project>
11 changes: 4 additions & 7 deletions Src/PChecker/CheckerCore/CheckerMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ public enum CheckerMode
/// Mode for prioritized random search
/// </summary>
BugFinding,

/// <summary>
/// Mode for exhaustive symbolic exploration
/// Mode for P exploration and execution
/// </summary>
Verification,
/// <summary>
/// Mode for exhaustive explicit-state search with state-space coverage reporting
/// </summary>
Coverage
}
PEx
}
9 changes: 3 additions & 6 deletions Src/PChecker/CheckerCore/ExhaustiveEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ private string CreateArguments()
{
switch (_checkerConfiguration.Mode)
{
case CheckerMode.Verification:
arguments.Append("--strategy symbolic ");
break;
case CheckerMode.Coverage:
case CheckerMode.PEx:
arguments.Append($"--strategy {_checkerConfiguration.SchedulingStrategy} ");
break;
default:
Expand Down Expand Up @@ -109,7 +106,7 @@ private string CreateArguments()
}
}

arguments.Append($"{_checkerConfiguration.PSymArgs} ");
arguments.Append($"{_checkerConfiguration.CheckerArgs} ");

return arguments.ToString();
}
Expand Down Expand Up @@ -234,4 +231,4 @@ public void Run()
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace PChecker.Runtime.Logging
{
/// <summary>
/// Interface that allows an external module to track what
/// is happening in the <see cref="ControlledRuntime"/>.
/// is happening in the controlled runtime.
/// </summary>
public interface IControlledRuntimeLog
{
Expand Down Expand Up @@ -38,7 +38,6 @@ public interface IControlledRuntimeLog
/// <param name="senderType">The type of the sender, if any.</param>
/// <param name="senderStateName">The state name, if the sender is a state machine, else null.</param>
/// <param name="e">The event being sent.</param>
/// <param name="opGroupId">The id used to identify the send operation.</param>
/// <param name="isTargetHalted">Is the target state machine halted.</param>
void OnSendEvent(StateMachineId targetStateMachineId, string senderName, string senderType, string senderStateName,
Event e, bool isTargetHalted);
Expand Down Expand Up @@ -241,4 +240,4 @@ void OnMonitorProcessEvent(string monitorType, string stateName, string senderNa
/// </summary>
void OnCompleted();
}
}
}
3 changes: 1 addition & 2 deletions Src/PChecker/CheckerCore/Runtime/Logging/LogWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public void LogExecuteAction(StateMachineId id, string handlingStateName, string
/// <param name="senderType">The type of the sender, if any.</param>
/// <param name="senderState">The state name, if the sender is a state machine, else null.</param>
/// <param name="e">The event being sent.</param>
/// <param name="opGroupId">The id used to identify the send operation.</param>
/// <param name="isTargetHalted">Is the target state machine halted.</param>
public void LogSendEvent(StateMachineId targetStateMachineId, string senderName, string senderType, string senderState,
Event e, bool isTargetHalted)
Expand Down Expand Up @@ -624,4 +623,4 @@ internal void RemoveLog(IControlledRuntimeLog log)
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,17 @@ private static object GetEventPayloadInJson(Event e)
return pe.Payload?.ToDict();
}

/// <summary>
/// Called when the log is complete and about to be closed.
/// </summary>
public void OnCompleted()
{
}

/// <summary>
/// Invoked when the specified assertion failure has occurred.
/// </summary>
/// <param name="error">The text of the error.</param>
public void OnAssertionFailure(string error)
{
error = RemoveLogTag(error);
Expand All @@ -124,6 +131,11 @@ public void OnCreateStateMachine(StateMachineId id, string creatorName, string c
Writer.AddToLogs(updateVcMap: true);
}

/// <summary>
/// Invoked when the specified state machine is idle and the default event handler is about to be executed.
/// </summary>
/// <param name="id">The id of the state machine that the state will execute in.</param>
/// <param name="stateName">The state name, if the state machine is a state machine and a state exists, else null.</param>
public void OnDefaultEventHandler(StateMachineId id, string stateName)
{
stateName = GetShortName(stateName);
Expand All @@ -139,6 +151,12 @@ public void OnDefaultEventHandler(StateMachineId id, string stateName)
Writer.AddToLogs(updateVcMap: true);
}

/// <summary>
/// Invoked when the specified event is dequeued by an state machine.
/// </summary>
/// <param name="id">The id of the state machine that the event is being dequeued by.</param>
/// <param name="stateName">The state name, if the state machine is a state machine and a state exists, else null.</param>
/// <param name="e">The event being dequeued.</param>
public void OnDequeueEvent(StateMachineId id, string stateName, Event e)
{
var eventName = GetEventNameWithPayload(e);
Expand Down Expand Up @@ -528,4 +546,4 @@ public void OnStrategyDescription(string strategyName, string description)
Writer.AddToLogs();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace PChecker.Runtime.StateMachines.Exceptions
{
/// <summary>
/// Handles the <see cref="ControlledRuntime.OnEventDropped"/> event.
/// Handles the event dropped notification.
/// </summary>
public delegate void OnEventDroppedHandler(Event e, StateMachineId target);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,6 @@ private protected Task TryHandleActionInvocationExceptionAsync(Exception ex, str
/// <param name="type">Type of the state machine.</param>
/// <param name="name">Optional name used for logging.</param>
/// <param name="initialEvent">Optional initialization event.</param>
/// <param name="opGroupId">Optional id that can be used to identify this operation.</param>
/// <returns>The unique state machine id.</returns>
protected StateMachineId CreateStateMachine(Type type, string name, Event initialEvent = null) =>
Runtime.CreateStateMachine(null, type, name, initialEvent, this);
Expand All @@ -529,8 +528,7 @@ protected StateMachineId CreateStateMachine(Type type, string name, Event initia
/// Sends an asynchronous <see cref="Event"/> to a target.
/// </summary>
/// <param name="target">The target.</param>
/// <param name="e">The event to send.</param>
/// <param name="opGroupId">Optional id that can be used to identify this operation.</param>
/// <param name="ev">The event to send.</param>
public void SendEvent(PMachineValue target, Event ev)
{
Assert(ev != null, $"Machine cannot send a null event. Machine {Id} trying to send null event in state {CurrentStateName}.");
Expand Down Expand Up @@ -2063,4 +2061,4 @@ public IgnoreEventsAttribute(params Type[] eventTypes)
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@

namespace PChecker.Feedback;

internal class TimelineObserver: IControlledRuntimeLog
internal class TimelineObserver : IControlledRuntimeLog
{

private HashSet<(string, string, string)> _timelines = new();
private Dictionary<string, HashSet<string>> _allEvents = new();
private Dictionary<string, List<string>> _orderedEvents = new();
private IControlledRuntimeLog _controlledRuntimeLogImplementation;

public static readonly List<(int, int)> Coefficients = new();
public static int NumOfCoefficients = 50;
Expand Down Expand Up @@ -188,4 +186,4 @@ public void OnStrategyDescription(string strategyName, string description)
public void OnCompleted()
{
}
}
}
2 changes: 2 additions & 0 deletions Src/PCompiler/CompilerCore/Backend/ICodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ namespace Plang.Compiler.Backend
{
public interface ICodeGenerator
{
public const string GlobalConfigName = "GlobalConfig";

/// <summary>
/// Generate target language source files from a P project.
/// </summary>
Expand Down
Loading
Loading