Date: February 2026
Release: v0.1 – C# query runtime mutual recursion support
Platforms: Linux, WSL, macOS, Windows (PowerShell)
Estimated Time: 15–30 minutes (core checks) + 15 minutes (optional manual runtime validation)
dotnet) execution paths.| Tool | Minimum Version | Notes |
|---|---|---|
swipl |
9.2.9 | Required to run the Prolog regression suite. |
.NET SDK |
9.0.2+ | Needed for manual build & execution of generated plans. |
bash / pwsh |
latest | Only used to launch the test commands; no target-specific dependencies. |
.NET steps work from any shell as long as the SDK is on PATH.dotnet is available in both PowerShell and WSL environments if running tests from both locations.Run all steps in order. Use SKIP_CSHARP_EXECUTION=1 to avoid the known dotnet run pipe deadlock (see docs/CSHARP_DOTNET_RUN_HANG_SOLUTION.md).
SKIP_CSHARP_EXECUTION=1 \
swipl -q \
-f tests/core/test_csharp_query_target.pl \
-g test_csharp_query_target:test_csharp_query_target \
-t halt
Validates:
test_fact/2)test_link/2)test_filtered/1, test_positive/1)test_increment/2, test_factorial/2)test_reachable/2)test_even/1, test_odd/1)Expected output shows “dotnet execution skipped” for each block followed by === C# query target tests complete ===.
SKIP_CSHARP_EXECUTION=1 \
swipl -q -f run_all_tests.pl -g main -t halt
Confirms that integrating the C# target does not regress other subsystems (firewall, data sources, bash targets).
Run these only if you have .NET available and want to verify end-to-end execution. They exercise the build-first workaround documented in docs/CSHARP_DOTNET_RUN_HANG_SOLUTION.md.
SKIP_CSHARP_EXECUTION=1 \
swipl -q \
-f tests/core/test_csharp_query_target.pl \
-g "test_csharp_query_target:configure_csharp_query_options, \
test_csharp_query_target:setup_test_data, \
test_csharp_query_target:build_manual_plan(test_even/1, Dir), \
halt."
Produces a project under
output/csharp/<uuid>/.
From that directory:
dotnet build --no-restore
dotnet bin/Debug/net9.0/<generated>.dll # if DLL produced
# or
./bin/Debug/net9.0/<generated> # if self-contained binary produced
Expected output: 0, 2, 4 (mutual recursion parity).
(If you prefer, run dotnet run --no-restore after reading the hang workaround.)
Run the equivalent Bash test to compare results:
swipl -q \
-g "use_module('tests/core/test_recursive_csharp_target'), \
test_recursive_csharp_target:test_cf_fact, \
halt."
Ensure C# and Bash outputs match for the same predicates (focus on mutual recursion and arithmetic cases).
| Platform | Notes |
|---|---|
| WSL / native Linux | All commands above run as-is. Ensure dotnet is installed in the Linux environment. |
| Windows PowerShell | Use SKIP_CSHARP_EXECUTION=1 to avoid pipe deadlocks. Manual build steps work identically; ensure dotnet is on the PowerShell PATH. |
| CI / Automation | Set SKIP_CSHARP_EXECUTION=1 in the job environment. Persist artefacts (output/csharp/...) as build artifacts if you need to inspect the generated C# plans. |
dotnet: install the SDK (winget install Microsoft.DotNet.SDK.9 on Windows, sudo apt install dotnet-sdk-9.0 on Ubuntu/WSL).SKIP_CSHARP_EXECUTION is set; if you need runtime validation, use the manual build-first flow.DistinctNode is present; ensure test data isn’t altered.tmp/ or output/csharp/.tests/core/test_csharp_query_target.pl passes with skip flag.run_all_tests.pl passes with skip flag.alice,charlie (join) and 0/2/4 (mutual recursion).tmp/ unless intentionally kept (--csharp-query-keep).docs/CSHARP_DOTNET_RUN_HANG_SOLUTION.md – rationale for build-first workflow.docs/targets/csharp-query-runtime.md – architectural details of the query runtime.docs/targets/comparison.md – backend capabilities comparison.tests/core/test_csharp_query_target.pl – source for helper predicates referenced above.This plan will evolve alongside the C# targets. Update it whenever the runtime gains new features (ordered dedup, memoisation, distributed execution, etc.).