diff --git a/.github/workflows/ClingoSharp.CI.yml b/.github/workflows/ClingoSharp.CI.yml index 3f7555c..56f826d 100644 --- a/.github/workflows/ClingoSharp.CI.yml +++ b/.github/workflows/ClingoSharp.CI.yml @@ -16,12 +16,12 @@ on: jobs: build: - runs-on: windows-latest - steps: - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v2 + with: + persist-credentials: false - name: Checkout submodules run: | git submodule init @@ -30,14 +30,47 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.100 + - name: Building dependecies + run: cmd.exe "/c .\build-win32.bat" - name: Build run: dotnet build --configuration Release - name: Test run: | dotnet test --configuration Debug /p:CollectCoverage=true /p:CoverletOutput=results/ /p:CoverletOutputFormat=lcov - powershell -Command "(gc 'tests\ClingoSharp.Tests\results\coverage.info') -replace [regex]::escape('D:\a\ClingoSharp\ClingoSharp\'), [regex]::escape('') | Out-File -encoding ASCII coverage.info" + (Get-Content '.\tests\results\coverage.info') -replace [Regex]::Escape('D:\a\ClingoSharp\ClingoSharp\'), [Regex]::Escape('') | Out-File -encoding ASCII coverage.info + - name: Building documentation + run: | + choco install docfx -y + docfx '.\docfx.json' + if ($lastexitcode -ne 0){ + throw [System.Exception] "docfx build failed with exit code $lastexitcode." + } - name: Reporting coverage result uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: .\coverage.info + - name: Upload Artifacts + uses: actions/upload-artifact@v1 + with: + name: site + path: _site + + deploy: + needs: [build] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Download Artifacts # The built project is downloaded into the 'site' folder. + uses: actions/download-artifact@v1 + with: + name: site + - name: Deploy + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + BRANCH: gh-pages + FOLDER: "site" # The deployment folder should match the name of the artifact. Even though our project builds into the 'build' folder the artifact name of 'site' must be placed here. \ No newline at end of file diff --git a/.gitignore b/.gitignore index 42c0ae5..9c39ff8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,11 @@ +############### +# folder # +############### +DROP/ +TEMP/ +_site/ +*.vs + # Created by https://www.gitignore.io/api/csharp # Edit at https://www.gitignore.io/?templates=csharp @@ -25,6 +33,7 @@ mono_crash.* [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ +[Pp]ackages/ x64/ x86/ [Aa][Rr][Mm]/ @@ -33,7 +42,6 @@ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ -[Bb]uild/ # Visual Studio 2015/2017 cache/options directory .vs/ diff --git a/ClingoSharp.sln b/ClingoSharp.sln index b865134..ae533de 100644 --- a/ClingoSharp.sln +++ b/ClingoSharp.sln @@ -1,15 +1,21 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 -VisualStudioVersion = 16.0.29613.14 +VisualStudioVersion = 16.0.29806.167 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClingoSharpApp", "source\ClingoSharpApp\ClingoSharpApp.csproj", "{1A137938-8A13-48AB-A4C5-360EE31F7A37}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClingoSharp", "src\ClingoSharp\ClingoSharp.csproj", "{AD231050-B939-48E7-8D5B-5D313C44B8B8}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{441EC391-37C0-41FF-B472-618505E2AA7B}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{9F79E55B-82B5-450C-AA07-6559196F8B31}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClingoSharp", "source\ClingoSharp\ClingoSharp.csproj", "{CA41D45B-D389-4681-A36D-D9E7AF2E0217}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{498A4F49-6B6C-4A39-932D-9F7F41DCE625}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClingoSharp.Tests", "tests\ClingoSharp.Tests\ClingoSharp.Tests.csproj", "{0289A89E-85B0-471C-AB80-E5580C36F6D6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClingoSharp.Application", "examples\ClingoSharp.Application.csproj", "{6CC66EE6-4846-4B62-9E85-3822BE02A729}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClingoSharp.Test", "tests\ClingoSharp.Test.csproj", "{E26B31EE-8CF9-43E7-A8F7-E7D7EF283A73}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClingoSharp.NativeWrapper", "src\ClingoSharp.NativeWrapper\ClingoSharp.NativeWrapper.csproj", "{F85762B3-1F18-404A-9778-8066F74E486A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClingoSharp.CoreServices", "src\ClingoSharp.CoreServices\ClingoSharp.CoreServices.csproj", "{FD343390-4193-4981-B985-4FA0767B77A1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -17,27 +23,37 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1A137938-8A13-48AB-A4C5-360EE31F7A37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1A137938-8A13-48AB-A4C5-360EE31F7A37}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1A137938-8A13-48AB-A4C5-360EE31F7A37}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1A137938-8A13-48AB-A4C5-360EE31F7A37}.Release|Any CPU.Build.0 = Release|Any CPU - {CA41D45B-D389-4681-A36D-D9E7AF2E0217}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CA41D45B-D389-4681-A36D-D9E7AF2E0217}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CA41D45B-D389-4681-A36D-D9E7AF2E0217}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CA41D45B-D389-4681-A36D-D9E7AF2E0217}.Release|Any CPU.Build.0 = Release|Any CPU - {0289A89E-85B0-471C-AB80-E5580C36F6D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0289A89E-85B0-471C-AB80-E5580C36F6D6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0289A89E-85B0-471C-AB80-E5580C36F6D6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0289A89E-85B0-471C-AB80-E5580C36F6D6}.Release|Any CPU.Build.0 = Release|Any CPU + {AD231050-B939-48E7-8D5B-5D313C44B8B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD231050-B939-48E7-8D5B-5D313C44B8B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD231050-B939-48E7-8D5B-5D313C44B8B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD231050-B939-48E7-8D5B-5D313C44B8B8}.Release|Any CPU.Build.0 = Release|Any CPU + {6CC66EE6-4846-4B62-9E85-3822BE02A729}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CC66EE6-4846-4B62-9E85-3822BE02A729}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CC66EE6-4846-4B62-9E85-3822BE02A729}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CC66EE6-4846-4B62-9E85-3822BE02A729}.Release|Any CPU.Build.0 = Release|Any CPU + {E26B31EE-8CF9-43E7-A8F7-E7D7EF283A73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E26B31EE-8CF9-43E7-A8F7-E7D7EF283A73}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E26B31EE-8CF9-43E7-A8F7-E7D7EF283A73}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E26B31EE-8CF9-43E7-A8F7-E7D7EF283A73}.Release|Any CPU.Build.0 = Release|Any CPU + {F85762B3-1F18-404A-9778-8066F74E486A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F85762B3-1F18-404A-9778-8066F74E486A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F85762B3-1F18-404A-9778-8066F74E486A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F85762B3-1F18-404A-9778-8066F74E486A}.Release|Any CPU.Build.0 = Release|Any CPU + {FD343390-4193-4981-B985-4FA0767B77A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD343390-4193-4981-B985-4FA0767B77A1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD343390-4193-4981-B985-4FA0767B77A1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD343390-4193-4981-B985-4FA0767B77A1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {CA41D45B-D389-4681-A36D-D9E7AF2E0217} = {441EC391-37C0-41FF-B472-618505E2AA7B} - {0289A89E-85B0-471C-AB80-E5580C36F6D6} = {441EC391-37C0-41FF-B472-618505E2AA7B} + {AD231050-B939-48E7-8D5B-5D313C44B8B8} = {9F79E55B-82B5-450C-AA07-6559196F8B31} + {6CC66EE6-4846-4B62-9E85-3822BE02A729} = {498A4F49-6B6C-4A39-932D-9F7F41DCE625} + {F85762B3-1F18-404A-9778-8066F74E486A} = {9F79E55B-82B5-450C-AA07-6559196F8B31} + {FD343390-4193-4981-B985-4FA0767B77A1} = {9F79E55B-82B5-450C-AA07-6559196F8B31} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8FD73ECA-F51C-4B18-8442-724187341EA4} + SolutionGuid = {18573E7B-B9A8-42B3-8ADD-0FF827D999D6} EndGlobalSection EndGlobal diff --git a/api/.gitignore b/api/.gitignore new file mode 100644 index 0000000..e8079a3 --- /dev/null +++ b/api/.gitignore @@ -0,0 +1,5 @@ +############### +# temp file # +############### +*.yml +.manifest diff --git a/api/index.md b/api/index.md new file mode 100644 index 0000000..78dc9c0 --- /dev/null +++ b/api/index.md @@ -0,0 +1,2 @@ +# PLACEHOLDER +TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*! diff --git a/articles/intro.md b/articles/intro.md new file mode 100644 index 0000000..c0478ce --- /dev/null +++ b/articles/intro.md @@ -0,0 +1 @@ +# Add your introductions here! diff --git a/articles/toc.yml b/articles/toc.yml new file mode 100644 index 0000000..ff89ef1 --- /dev/null +++ b/articles/toc.yml @@ -0,0 +1,2 @@ +- name: Introduction + href: intro.md diff --git a/build-ubuntu.sh b/build-ubuntu.sh new file mode 100644 index 0000000..5fea597 --- /dev/null +++ b/build-ubuntu.sh @@ -0,0 +1,15 @@ +if [ ! -f "clingo\build\i686\bin\Release\clingo.so" ]; then + cmake "clingo" -B"clingo\build\i386" -DCLINGO_BUILD_SHARED=ON -DCLINGO_BUILD_WITH_PYTHON=OFF -DCLINGO_BUILD_WITH_LUA=OFF -DCLINGO_BUILD_APPS=OFF -m32 + cmake --build "clingo\build\i368" +fi + +if [ ! -f "clingo\build\x86_64\bin\Release\clingo.so" ]; then + cmake "clingo" -B"clingo\build\x86_64" -DCLINGO_BUILD_SHARED=ON -DCLINGO_BUILD_WITH_PYTHON=OFF -DCLINGO_BUILD_WITH_LUA=OFF -DCLINGO_BUILD_APPS=OFF -m64 + cmake --build "clingo\build\x86_64" +fi + +mkdir -p -v "tests\bin\Debug\netcoreapp3.1\lib32" +xcopy /y "clingo\build\i368\bin\Release\clingo.so" "tests\bin\Debug\netcoreapp3.1\lib32" + +mkdir -p -v "tests\bin\Debug\netcoreapp3.1\lib" +xcopy /y "clingo\build\x86_64\bin\Release\clingo.so" "tests\bin\Debug\netcoreapp3.1\lib" \ No newline at end of file diff --git a/build-win32.bat b/build-win32.bat new file mode 100644 index 0000000..6400c2f --- /dev/null +++ b/build-win32.bat @@ -0,0 +1,15 @@ +IF NOT EXIST "clingo\build\x86\bin\Release\clingo.dll" ( + cmake "clingo" -B"clingo\build\x86" -DCLINGO_BUILD_SHARED=ON -DCLINGO_BUILD_WITH_PYTHON=OFF -DCLINGO_BUILD_WITH_LUA=OFF -DCLINGO_BUILD_APPS=OFF -G "Visual Studio 16 2019" -A Win32 + cmake --build "clingo\build\x86" --config Release +) + +IF NOT EXIST "clingo\build\x64\bin\Release\clingo.dll" ( + cmake "clingo" -B"clingo\build\x64" -DCLINGO_BUILD_SHARED=ON -DCLINGO_BUILD_WITH_PYTHON=OFF -DCLINGO_BUILD_WITH_LUA=OFF -DCLINGO_BUILD_APPS=OFF -G "Visual Studio 16 2019" -A x64 + cmake --build "clingo\build\x64" --config Release +) + +IF NOT EXIST "tests\bin\Debug\netcoreapp3.1\lib32" mkdir "tests\bin\Debug\netcoreapp3.1\lib32" +xcopy /y "clingo\build\x86\bin\Release\clingo.dll" "tests\bin\Debug\netcoreapp3.1\lib32" + +IF NOT EXIST "tests\bin\Debug\netcoreapp3.1\lib" mkdir "tests\bin\Debug\netcoreapp3.1\lib" +xcopy /y "clingo\build\x64\bin\Release\clingo.dll" "tests\bin\Debug\netcoreapp3.1\lib" diff --git a/coverage.info b/coverage.info new file mode 100644 index 0000000..2f8a915 --- /dev/null +++ b/coverage.info @@ -0,0 +1,2850 @@ +SF:\src\ClingoSharp.CoreServices\Shared\Repository.cs +FN:37,T ClingoSharp.CoreServices.Repository::GetModule() +FNDA:2,T ClingoSharp.CoreServices.Repository::GetModule() +DA:38,2 +DA:39,2 +DA:40,2 +FN:47,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.CoreServices.Repository::GetModule(System.Type) +FNDA:0,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.CoreServices.Repository::GetModule(System.Type) +DA:48,0 +DA:49,0 +DA:50,0 +FN:23,System.Void ClingoSharp.CoreServices.Repository::.cctor() +FNDA:1,System.Void ClingoSharp.CoreServices.Repository::.cctor() +DA:24,1 +DA:25,1 +DA:26,1 +LF:9 +LH:6 +BRF:0 +BRH:0 +FNF:3 +FNH:2 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\Atom.cs +FN:9,System.UInt32 ClingoSharp.CoreServices.Types.Atom::get_Value() +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Atom::get_Value() +DA:10,0 +FN:16,System.UInt32 ClingoSharp.CoreServices.Types.Atom::op_Implicit(ClingoSharp.CoreServices.Types.Atom) +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Atom::op_Implicit(ClingoSharp.CoreServices.Types.Atom) +DA:17,0 +DA:18,0 +DA:19,0 +FN:25,ClingoSharp.CoreServices.Types.Atom ClingoSharp.CoreServices.Types.Atom::op_Implicit(System.UInt32) +FNDA:0,ClingoSharp.CoreServices.Types.Atom ClingoSharp.CoreServices.Types.Atom::op_Implicit(System.UInt32) +DA:26,0 +DA:27,0 +DA:28,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\Control.cs +FN:10,System.IntPtr ClingoSharp.CoreServices.Types.Control::get_Object() +FNDA:0,System.IntPtr ClingoSharp.CoreServices.Types.Control::get_Object() +DA:11,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +FNF:1 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\Id.cs +FN:9,System.UInt32 ClingoSharp.CoreServices.Types.Id::get_Value() +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Id::get_Value() +DA:10,0 +FN:16,System.UInt32 ClingoSharp.CoreServices.Types.Id::op_Implicit(ClingoSharp.CoreServices.Types.Id) +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Id::op_Implicit(ClingoSharp.CoreServices.Types.Id) +DA:17,0 +DA:18,0 +DA:19,0 +FN:25,ClingoSharp.CoreServices.Types.Id ClingoSharp.CoreServices.Types.Id::op_Implicit(System.UInt32) +FNDA:0,ClingoSharp.CoreServices.Types.Id ClingoSharp.CoreServices.Types.Id::op_Implicit(System.UInt32) +DA:26,0 +DA:27,0 +DA:28,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\Literal.cs +FN:9,System.Int32 ClingoSharp.CoreServices.Types.Literal::get_Value() +FNDA:0,System.Int32 ClingoSharp.CoreServices.Types.Literal::get_Value() +DA:10,0 +FN:16,System.Int32 ClingoSharp.CoreServices.Types.Literal::op_Implicit(ClingoSharp.CoreServices.Types.Literal) +FNDA:0,System.Int32 ClingoSharp.CoreServices.Types.Literal::op_Implicit(ClingoSharp.CoreServices.Types.Literal) +DA:17,0 +DA:18,0 +DA:19,0 +FN:25,ClingoSharp.CoreServices.Types.Literal ClingoSharp.CoreServices.Types.Literal::op_Implicit(System.Int32) +FNDA:0,ClingoSharp.CoreServices.Types.Literal ClingoSharp.CoreServices.Types.Literal::op_Implicit(System.Int32) +DA:26,0 +DA:27,0 +DA:28,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\Location.cs +FN:15,System.String ClingoSharp.CoreServices.Types.Location::get_BeginFile() +FNDA:0,System.String ClingoSharp.CoreServices.Types.Location::get_BeginFile() +DA:16,0 +FN:20,System.String ClingoSharp.CoreServices.Types.Location::get_EndFile() +FNDA:0,System.String ClingoSharp.CoreServices.Types.Location::get_EndFile() +DA:21,0 +FN:25,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_BeginLine() +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_BeginLine() +DA:26,0 +FN:30,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_BeginColumn() +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_BeginColumn() +DA:31,0 +FN:35,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_EndLine() +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_EndLine() +DA:36,0 +FN:40,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_EndColumn() +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_EndColumn() +DA:41,0 +LF:6 +LH:0 +BRF:0 +BRH:0 +FNF:6 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\Model.cs +FN:10,System.IntPtr ClingoSharp.CoreServices.Types.Model::get_Object() +FNDA:0,System.IntPtr ClingoSharp.CoreServices.Types.Model::get_Object() +DA:11,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +FNF:1 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\Part.cs +FN:17,System.String ClingoSharp.CoreServices.Types.Part::get_Name() +FNDA:0,System.String ClingoSharp.CoreServices.Types.Part::get_Name() +DA:18,0 +FN:22,ClingoSharp.CoreServices.Types.Symbol[] ClingoSharp.CoreServices.Types.Part::get_Params() +FNDA:0,ClingoSharp.CoreServices.Types.Symbol[] ClingoSharp.CoreServices.Types.Part::get_Params() +DA:23,0 +LF:2 +LH:0 +BRF:0 +BRH:0 +FNF:2 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\Signature.cs +FN:10,System.UInt64 ClingoSharp.CoreServices.Types.Signature::get_Value() +FNDA:0,System.UInt64 ClingoSharp.CoreServices.Types.Signature::get_Value() +DA:11,0 +FN:17,System.UInt64 ClingoSharp.CoreServices.Types.Signature::op_Implicit(ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.UInt64 ClingoSharp.CoreServices.Types.Signature::op_Implicit(ClingoSharp.CoreServices.Types.Signature) +DA:18,0 +DA:19,0 +DA:20,0 +FN:26,ClingoSharp.CoreServices.Types.Signature ClingoSharp.CoreServices.Types.Signature::op_Implicit(System.UInt64) +FNDA:0,ClingoSharp.CoreServices.Types.Signature ClingoSharp.CoreServices.Types.Signature::op_Implicit(System.UInt64) +DA:27,0 +DA:28,0 +DA:29,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\SolveControl.cs +FN:10,System.IntPtr ClingoSharp.CoreServices.Types.SolveControl::get_Object() +FNDA:0,System.IntPtr ClingoSharp.CoreServices.Types.SolveControl::get_Object() +DA:11,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +FNF:1 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\SolveHandle.cs +FN:10,System.IntPtr ClingoSharp.CoreServices.Types.SolveHandle::get_Object() +FNDA:0,System.IntPtr ClingoSharp.CoreServices.Types.SolveHandle::get_Object() +DA:11,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +FNF:1 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\Symbol.cs +FN:10,System.UInt64 ClingoSharp.CoreServices.Types.Symbol::get_Value() +FNDA:0,System.UInt64 ClingoSharp.CoreServices.Types.Symbol::get_Value() +DA:11,0 +FN:17,System.UInt64 ClingoSharp.CoreServices.Types.Symbol::op_Implicit(ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,System.UInt64 ClingoSharp.CoreServices.Types.Symbol::op_Implicit(ClingoSharp.CoreServices.Types.Symbol) +DA:18,0 +DA:19,0 +DA:20,0 +FN:26,ClingoSharp.CoreServices.Types.Symbol ClingoSharp.CoreServices.Types.Symbol::op_Implicit(System.UInt64) +FNDA:0,ClingoSharp.CoreServices.Types.Symbol ClingoSharp.CoreServices.Types.Symbol::op_Implicit(System.UInt64) +DA:27,0 +DA:28,0 +DA:29,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\SymbolicAtomIterator.cs +FN:14,System.UInt64 ClingoSharp.CoreServices.Types.SymbolicAtomIterator::get_Value() +FNDA:0,System.UInt64 ClingoSharp.CoreServices.Types.SymbolicAtomIterator::get_Value() +DA:15,0 +FN:21,System.UInt64 ClingoSharp.CoreServices.Types.SymbolicAtomIterator::op_Implicit(ClingoSharp.CoreServices.Types.SymbolicAtomIterator) +FNDA:0,System.UInt64 ClingoSharp.CoreServices.Types.SymbolicAtomIterator::op_Implicit(ClingoSharp.CoreServices.Types.SymbolicAtomIterator) +DA:22,0 +DA:23,0 +DA:24,0 +FN:30,ClingoSharp.CoreServices.Types.SymbolicAtomIterator ClingoSharp.CoreServices.Types.SymbolicAtomIterator::op_Implicit(System.UInt64) +FNDA:0,ClingoSharp.CoreServices.Types.SymbolicAtomIterator ClingoSharp.CoreServices.Types.SymbolicAtomIterator::op_Implicit(System.UInt64) +DA:31,0 +DA:32,0 +DA:33,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\SymbolicAtoms.cs +FN:10,System.IntPtr ClingoSharp.CoreServices.Types.SymbolicAtoms::get_Object() +FNDA:0,System.IntPtr ClingoSharp.CoreServices.Types.SymbolicAtoms::get_Object() +DA:11,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +FNF:1 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\TruthValue.cs +FN:10,System.Int32 ClingoSharp.CoreServices.Types.TruthValue::get_Value() +FNDA:0,System.Int32 ClingoSharp.CoreServices.Types.TruthValue::get_Value() +DA:11,0 +FN:17,System.Int32 ClingoSharp.CoreServices.Types.TruthValue::op_Implicit(ClingoSharp.CoreServices.Types.TruthValue) +FNDA:0,System.Int32 ClingoSharp.CoreServices.Types.TruthValue::op_Implicit(ClingoSharp.CoreServices.Types.TruthValue) +DA:18,0 +DA:19,0 +DA:20,0 +FN:26,ClingoSharp.CoreServices.Types.TruthValue ClingoSharp.CoreServices.Types.TruthValue::op_Implicit(System.Int32) +FNDA:0,ClingoSharp.CoreServices.Types.TruthValue ClingoSharp.CoreServices.Types.TruthValue::op_Implicit(System.Int32) +DA:27,0 +DA:28,0 +DA:29,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Types\Weight.cs +FN:9,System.Int32 ClingoSharp.CoreServices.Types.Weight::get_Value() +FNDA:0,System.Int32 ClingoSharp.CoreServices.Types.Weight::get_Value() +DA:10,0 +FN:16,System.Int32 ClingoSharp.CoreServices.Types.Weight::op_Implicit(ClingoSharp.CoreServices.Types.Weight) +FNDA:0,System.Int32 ClingoSharp.CoreServices.Types.Weight::op_Implicit(ClingoSharp.CoreServices.Types.Weight) +DA:17,0 +DA:18,0 +DA:19,0 +FN:25,ClingoSharp.CoreServices.Types.Weight ClingoSharp.CoreServices.Types.Weight::op_Implicit(System.Int32) +FNDA:0,ClingoSharp.CoreServices.Types.Weight ClingoSharp.CoreServices.Types.Weight::op_Implicit(System.Int32) +DA:26,0 +DA:27,0 +DA:28,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:\src\ClingoSharp.CoreServices\Shared\ClingoContext.cs +FN:14,System.Reflection.Assembly ClingoSharp.CoreServices.Shared.ClingoContext::Load(System.Reflection.AssemblyName) +FNDA:8,System.Reflection.Assembly ClingoSharp.CoreServices.Shared.ClingoContext::Load(System.Reflection.AssemblyName) +DA:15,8 +DA:16,8 +DA:17,1 +DA:19,1 +DA:21,1 +DA:23,1 +DA:26,7 +DA:27,8 +BRDA:16,19,0,1 +BRDA:16,19,1,7 +FN:29,System.IntPtr ClingoSharp.CoreServices.Shared.ClingoContext::LoadUnmanagedDll(System.String) +FNDA:2,System.IntPtr ClingoSharp.CoreServices.Shared.ClingoContext::LoadUnmanagedDll(System.String) +DA:30,2 +DA:31,2 +DA:32,2 +DA:33,2 +DA:36,0 +DA:37,2 +BRDA:31,14,0,2 +BRDA:31,14,1,0 +FN:39,System.IntPtr ClingoSharp.CoreServices.Shared.ClingoContext::LoadNativeClingoLibrary() +FNDA:2,System.IntPtr ClingoSharp.CoreServices.Shared.ClingoContext::LoadNativeClingoLibrary() +DA:40,2 +DA:42,2 +DA:44,2 +DA:46,2 +DA:49,2 +DA:50,2 +DA:51,2 +DA:52,2 +DA:53,0 +DA:54,0 +DA:55,0 +DA:56,0 +DA:58,0 +DA:59,0 +DA:60,0 +DA:63,2 +DA:64,2 +BRDA:46,44,0,0 +BRDA:46,44,1,2 +BRDA:49,73,0,2 +BRDA:49,73,1,0 +BRDA:53,99,0,0 +BRDA:53,99,1,0 +FN:70,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.CoreServices.Shared.ClingoContext::GetModule(System.Type) +FNDA:2,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.CoreServices.Shared.ClingoContext::GetModule(System.Type) +DA:71,2 +DA:72,2 +DA:73,2 +DA:74,2 +DA:75,2 +FN:77,T ClingoSharp.CoreServices.Shared.ClingoContext::GetModule() +FNDA:2,T ClingoSharp.CoreServices.Shared.ClingoContext::GetModule() +DA:78,2 +DA:79,2 +DA:80,2 +LF:39 +LH:31 +BRF:10 +BRH:5 +FNF:5 +FNH:5 +end_of_record +SF:\src\ClingoSharp\Clingo.cs +FN:30,System.String ClingoSharp.Clingo::get_Version() +FNDA:1,System.String ClingoSharp.Clingo::get_Version() +DA:31,1 +DA:32,1 +DA:33,1 +DA:34,1 +DA:35,1 +DA:37,1 +DA:38,1 +BRDA:32,11,0,1 +BRDA:32,11,1,1 +FN:63,System.Void ClingoSharp.Clingo::HandleClingoError(System.Boolean) +FNDA:1,System.Void ClingoSharp.Clingo::HandleClingoError(System.Boolean) +DA:64,1 +DA:65,1 +DA:66,0 +DA:67,0 +DA:68,0 +DA:70,0 +DA:73,0 +DA:75,0 +DA:77,0 +DA:79,0 +DA:81,0 +DA:83,0 +DA:84,1 +BRDA:65,7,0,0 +BRDA:68,27,0,0 +BRDA:68,27,1,0 +BRDA:70,53,2,0 +BRDA:70,53,3,0 +BRDA:70,53,4,0 +BRDA:70,53,5,0 +BRDA:70,53,1,0 +BRDA:70,53,0,0 +BRDA:65,7,1,1 +FN:90,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.Clingo::GetModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.Clingo::GetModule() +DA:91,0 +DA:92,0 +DA:93,0 +FN:99,ClingoSharp.CoreServices.Interfaces.Modules.IMainModule ClingoSharp.Clingo::GetMainModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.Modules.IMainModule ClingoSharp.Clingo::GetMainModule() +DA:100,0 +DA:101,0 +DA:102,0 +FN:17,System.Void ClingoSharp.Clingo::.cctor() +FNDA:1,System.Void ClingoSharp.Clingo::.cctor() +DA:18,1 +DA:46,1 +DA:47,1 +DA:48,1 +LF:30 +LH:14 +BRF:12 +BRH:3 +FNF:5 +FNH:3 +end_of_record +SF:\src\ClingoSharp\Control.cs +FN:42,ClingoSharp.SymbolicAtoms ClingoSharp.Control::get_SymbolicAtoms() +FNDA:0,ClingoSharp.SymbolicAtoms ClingoSharp.Control::get_SymbolicAtoms() +DA:43,0 +DA:44,0 +DA:45,0 +DA:46,0 +FN:89,System.Void ClingoSharp.Control::Finalize() +FNDA:0,System.Void ClingoSharp.Control::Finalize() +DA:90,0 +DA:91,0 +DA:92,0 +FN:102,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.Control::GetModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.Control::GetModule() +DA:103,0 +DA:104,0 +DA:105,0 +FN:111,ClingoSharp.CoreServices.Interfaces.Modules.IControlModule ClingoSharp.Control::GetControlModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.Modules.IControlModule ClingoSharp.Control::GetControlModule() +DA:112,0 +DA:113,0 +DA:114,0 +FN:116,ClingoSharp.CoreServices.Types.Control ClingoSharp.Control::op_Implicit(ClingoSharp.Control) +FNDA:0,ClingoSharp.CoreServices.Types.Control ClingoSharp.Control::op_Implicit(ClingoSharp.Control) +DA:117,0 +DA:118,0 +DA:119,0 +FN:121,ClingoSharp.Control ClingoSharp.Control::op_Implicit(ClingoSharp.CoreServices.Types.Control) +FNDA:0,ClingoSharp.Control ClingoSharp.Control::op_Implicit(ClingoSharp.CoreServices.Types.Control) +DA:122,0 +DA:123,0 +DA:124,0 +FN:131,System.Void ClingoSharp.Control::Dispose() +FNDA:0,System.Void ClingoSharp.Control::Dispose() +DA:132,0 +DA:133,0 +DA:134,0 +DA:135,0 +DA:136,0 +DA:137,0 +DA:138,0 +DA:140,0 +DA:141,0 +BRDA:133,12,0,0 +BRDA:133,12,1,0 +FN:149,System.Void ClingoSharp.Control::Add(System.String,System.Collections.Generic.List`1,System.String) +FNDA:0,System.Void ClingoSharp.Control::Add(System.String,System.Collections.Generic.List`1,System.String) +DA:150,0 +DA:151,0 +DA:152,0 +BRDA:151,14,0,0 +BRDA:151,14,1,0 +FN:158,System.Void ClingoSharp.Control::Ground(System.Collections.Generic.List`1>>,System.Object) +FNDA:0,System.Void ClingoSharp.Control::Ground(System.Collections.Generic.List`1>>,System.Object) +DA:159,0 +DA:197,0 +DA:198,0 +DA:199,0 +DA:200,0 +DA:201,0 +DA:203,0 +DA:204,0 +BRDA:197,16,0,0 +BRDA:197,16,1,0 +BRDA:203,82,0,0 +BRDA:203,82,1,0 +FN:216,ClingoSharp.Union`2 ClingoSharp.Control::Solve(System.Collections.Generic.List`1,System.Int32>>,System.Func`2,System.Action`2,System.Action`1,System.Boolean,System.Boolean) +FNDA:0,ClingoSharp.Union`2 ClingoSharp.Control::Solve(System.Collections.Generic.List`1,System.Int32>>,System.Func`2,System.Action`2,System.Action`1,System.Boolean,System.Boolean) +DA:217,0 +DA:270,0 +DA:271,0 +DA:272,0 +DA:273,0 +DA:274,0 +DA:275,0 +DA:276,0 +DA:277,0 +DA:278,0 +DA:279,0 +DA:281,0 +DA:282,0 +DA:283,0 +DA:284,0 +DA:285,0 +DA:286,0 +DA:287,0 +DA:288,0 +DA:289,0 +DA:290,0 +DA:291,0 +DA:292,0 +DA:293,0 +DA:294,0 +DA:295,0 +DA:296,0 +DA:298,0 +DA:299,0 +DA:300,0 +DA:302,0 +DA:304,0 +DA:307,0 +DA:308,0 +DA:309,0 +DA:312,0 +DA:313,0 +BRDA:272,51,0,0 +BRDA:274,246,1,0 +BRDA:276,92,0,0 +BRDA:276,92,1,0 +BRDA:283,146,0,0 +BRDA:286,172,0,0 +BRDA:286,172,1,0 +BRDA:283,146,1,0 +BRDA:289,207,0,0 +BRDA:289,207,1,0 +BRDA:274,246,0,0 +BRDA:272,51,1,0 +BRDA:299,277,0,0 +BRDA:299,277,1,0 +BRDA:300,291,0,0 +BRDA:300,291,1,0 +BRDA:302,323,0,0 +BRDA:302,331,0,0 +BRDA:302,323,1,0 +BRDA:302,331,1,0 +BRDA:302,339,0,0 +BRDA:302,339,1,0 +BRDA:307,380,0,0 +BRDA:307,380,1,0 +BRDA:307,394,0,0 +BRDA:307,394,1,0 +FN:53,System.Void ClingoSharp.Control::.cctor() +FNDA:1,System.Void ClingoSharp.Control::.cctor() +DA:54,1 +DA:55,1 +DA:56,1 +FN:33,System.Void ClingoSharp.Control::.ctor(ClingoSharp.CoreServices.Types.Control) +FNDA:0,System.Void ClingoSharp.Control::.ctor(ClingoSharp.CoreServices.Types.Control) +DA:34,0 +DA:58,0 +DA:59,0 +DA:60,0 +DA:61,0 +FN:68,System.Void ClingoSharp.Control::.ctor(System.Collections.Generic.List`1,System.Action`2,System.Int32) +FNDA:1,System.Void ClingoSharp.Control::.ctor(System.Collections.Generic.List`1,System.Action`2,System.Int32) +DA:69,1 +DA:70,1 +DA:80,1 +DA:82,1 +DA:83,1 +BRDA:80,35,0,1 +BRDA:80,35,1,0 +FN:71,System.Void ClingoSharp.Control/<>c__DisplayClass7_0::<.ctor>g__loggerCallback|0(ClingoSharp.CoreServices.Enums.WarningCode,System.String,System.IntPtr) +FNDA:0,System.Void ClingoSharp.Control/<>c__DisplayClass7_0::<.ctor>g__loggerCallback|0(ClingoSharp.CoreServices.Enums.WarningCode,System.String,System.IntPtr) +DA:72,0 +DA:73,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:78,0 +BRDA:73,12,0,0 +BRDA:73,12,1,0 +FN:161,System.Boolean ClingoSharp.Control/<>c__DisplayClass15_0::g__groundCallback|0(ClingoSharp.CoreServices.Types.Location,System.String,ClingoSharp.CoreServices.Types.Symbol[],System.IntPtr,ClingoSharp.CoreServices.Callbacks.SymbolCallback,System.IntPtr) +FNDA:0,System.Boolean ClingoSharp.Control/<>c__DisplayClass15_0::g__groundCallback|0(ClingoSharp.CoreServices.Types.Location,System.String,ClingoSharp.CoreServices.Types.Symbol[],System.IntPtr,ClingoSharp.CoreServices.Callbacks.SymbolCallback,System.IntPtr) +DA:162,0 +DA:164,0 +DA:166,0 +DA:167,0 +DA:170,0 +DA:171,0 +DA:172,0 +DA:174,0 +DA:175,0 +DA:176,0 +DA:177,0 +DA:178,0 +DA:179,0 +DA:180,0 +DA:181,0 +DA:182,0 +DA:184,0 +DA:185,0 +DA:188,0 +DA:190,0 +DA:191,0 +DA:192,0 +DA:194,0 +BRDA:171,55,0,0 +BRDA:171,55,1,0 +BRDA:176,92,0,0 +BRDA:178,143,1,0 +BRDA:178,143,0,0 +BRDA:176,92,1,0 +FN:219,System.Boolean ClingoSharp.Control/<>c__DisplayClass16_0::g__notifyCallback|0(ClingoSharp.CoreServices.Enums.SolveEventType,System.IntPtr,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.Control/<>c__DisplayClass16_0::g__notifyCallback|0(ClingoSharp.CoreServices.Enums.SolveEventType,System.IntPtr,System.Boolean&) +DA:220,0 +DA:221,0 +DA:224,0 +DA:225,0 +DA:228,0 +DA:229,0 +DA:230,0 +DA:231,0 +DA:232,0 +DA:234,0 +DA:237,0 +DA:238,0 +DA:239,0 +DA:240,0 +DA:242,0 +DA:243,0 +DA:244,0 +DA:245,0 +DA:247,0 +DA:250,0 +DA:251,0 +DA:252,0 +DA:253,0 +DA:254,0 +DA:256,0 +DA:259,0 +DA:262,0 +DA:263,0 +DA:265,0 +DA:267,0 +BRDA:225,10,1,0 +BRDA:228,43,0,0 +BRDA:228,43,1,0 +BRDA:225,10,2,0 +BRDA:237,98,0,0 +BRDA:237,98,1,0 +BRDA:225,10,3,0 +BRDA:250,169,0,0 +BRDA:250,169,1,0 +BRDA:225,10,0,0 +LF:149 +LH:8 +BRF:54 +BRH:1 +FNF:16 +FNH:2 +end_of_record +SF:\src\ClingoSharp\MessageCode.cs +FN:27,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_OperationUndefined() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_OperationUndefined() +DA:28,0 +FN:28,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_RuntimeError() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_RuntimeError() +DA:29,0 +FN:29,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_AtomUndefined() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_AtomUndefined() +DA:30,0 +FN:30,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_FileIncluded() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_FileIncluded() +DA:31,0 +FN:31,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_VariableUnbounded() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_VariableUnbounded() +DA:32,0 +FN:32,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_GlobalVariable() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_GlobalVariable() +DA:33,0 +FN:33,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_Other() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_Other() +DA:34,0 +FN:39,System.String ClingoSharp.MessageCode::get_Name() +FNDA:0,System.String ClingoSharp.MessageCode::get_Name() +DA:40,0 +FN:53,System.Collections.Generic.IEnumerable`1 ClingoSharp.MessageCode::GetNames() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.MessageCode::GetNames() +DA:54,0 +DA:55,0 +DA:56,0 +FN:59,System.Collections.Generic.IEnumerable`1 ClingoSharp.MessageCode::GetValues() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.MessageCode::GetValues() +DA:60,0 +DA:61,0 +DA:62,0 +FN:69,System.Int32 ClingoSharp.MessageCode::CompareTo(ClingoSharp.Enums.Enumeration) +FNDA:0,System.Int32 ClingoSharp.MessageCode::CompareTo(ClingoSharp.Enums.Enumeration) +DA:70,0 +DA:71,0 +DA:72,0 +DA:73,0 +DA:76,0 +DA:77,0 +BRDA:71,2,0,0 +BRDA:71,2,1,0 +BRDA:71,21,0,0 +BRDA:71,21,1,0 +FN:80,System.Boolean ClingoSharp.MessageCode::Equals(ClingoSharp.Enums.Enumeration) +FNDA:0,System.Boolean ClingoSharp.MessageCode::Equals(ClingoSharp.Enums.Enumeration) +DA:81,0 +DA:82,0 +DA:83,0 +DA:84,0 +DA:87,0 +DA:88,0 +BRDA:82,2,0,0 +BRDA:82,2,1,0 +BRDA:82,21,0,0 +BRDA:82,21,1,0 +FN:91,System.String ClingoSharp.MessageCode::ToString() +FNDA:0,System.String ClingoSharp.MessageCode::ToString() +DA:92,0 +DA:93,0 +DA:94,0 +FN:45,System.Void ClingoSharp.MessageCode::.ctor(System.Int32) +FNDA:0,System.Void ClingoSharp.MessageCode::.ctor(System.Int32) +DA:46,0 +FN:12,System.Void ClingoSharp.MessageCode::.cctor() +FNDA:0,System.Void ClingoSharp.MessageCode::.cctor() +DA:13,0 +DA:14,0 +DA:15,0 +DA:16,0 +DA:17,0 +DA:18,0 +DA:19,0 +DA:20,0 +DA:21,0 +DA:22,0 +LF:40 +LH:0 +BRF:8 +BRH:0 +FNF:15 +FNH:0 +end_of_record +SF:\src\ClingoSharp\Model.cs +FN:36,ClingoSharp.SolveControl ClingoSharp.Model::get_Context() +FNDA:0,ClingoSharp.SolveControl ClingoSharp.Model::get_Context() +DA:37,0 +DA:38,0 +DA:39,0 +DA:40,0 +FN:49,System.Collections.Generic.List`1 ClingoSharp.Model::get_Cost() +FNDA:0,System.Collections.Generic.List`1 ClingoSharp.Model::get_Cost() +DA:50,0 +DA:51,0 +DA:52,0 +DA:53,0 +FN:61,System.Int32 ClingoSharp.Model::get_Number() +FNDA:0,System.Int32 ClingoSharp.Model::get_Number() +DA:62,0 +DA:63,0 +DA:64,0 +DA:65,0 +FN:73,System.Boolean ClingoSharp.Model::get_OptimalityProven() +FNDA:0,System.Boolean ClingoSharp.Model::get_OptimalityProven() +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +FN:85,System.Int32 ClingoSharp.Model::get_ThreadId() +FNDA:0,System.Int32 ClingoSharp.Model::get_ThreadId() +DA:86,0 +DA:87,0 +DA:88,0 +DA:89,0 +FN:97,ClingoSharp.ModelType ClingoSharp.Model::get_Type() +FNDA:0,ClingoSharp.ModelType ClingoSharp.Model::get_Type() +DA:98,0 +DA:99,0 +DA:101,0 +DA:102,0 +DA:103,0 +DA:104,0 +DA:105,0 +DA:106,0 +DA:107,0 +DA:108,0 +BRDA:101,26,1,0 +BRDA:101,26,2,0 +BRDA:101,26,3,0 +BRDA:101,26,0,0 +FN:129,ClingoSharp.CoreServices.Types.Model ClingoSharp.Model::op_Implicit(ClingoSharp.Model) +FNDA:0,ClingoSharp.CoreServices.Types.Model ClingoSharp.Model::op_Implicit(ClingoSharp.Model) +DA:130,0 +DA:131,0 +DA:132,0 +FN:134,ClingoSharp.Model ClingoSharp.Model::op_Implicit(ClingoSharp.CoreServices.Types.Model) +FNDA:0,ClingoSharp.Model ClingoSharp.Model::op_Implicit(ClingoSharp.CoreServices.Types.Model) +DA:135,0 +DA:136,0 +DA:137,0 +FN:149,System.Boolean ClingoSharp.Model::Contains(ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Model::Contains(ClingoSharp.Symbol) +DA:150,0 +DA:151,0 +DA:152,0 +DA:153,0 +FN:159,System.Void ClingoSharp.Model::Extend(System.Collections.Generic.List`1) +FNDA:0,System.Void ClingoSharp.Model::Extend(System.Collections.Generic.List`1) +DA:160,0 +DA:161,0 +DA:162,0 +DA:163,0 +FN:170,System.Boolean ClingoSharp.Model::IsTrue(System.Int32) +FNDA:0,System.Boolean ClingoSharp.Model::IsTrue(System.Int32) +DA:171,0 +DA:172,0 +DA:173,0 +DA:174,0 +DA:175,0 +DA:177,0 +DA:179,0 +DA:180,0 +FN:191,System.Collections.Generic.List`1 ClingoSharp.Model::GetSymbols(System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean) +FNDA:0,System.Collections.Generic.List`1 ClingoSharp.Model::GetSymbols(System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean) +DA:192,0 +DA:193,0 +DA:194,0 +DA:195,0 +DA:196,0 +DA:197,0 +DA:198,0 +DA:200,0 +DA:202,0 +DA:203,0 +BRDA:194,6,0,0 +BRDA:194,6,1,0 +BRDA:195,17,0,0 +BRDA:195,17,1,0 +BRDA:196,30,0,0 +BRDA:196,30,1,0 +BRDA:197,44,0,0 +BRDA:197,44,1,0 +BRDA:198,58,0,0 +BRDA:198,58,1,0 +FN:205,System.String ClingoSharp.Model::ToString() +FNDA:0,System.String ClingoSharp.Model::ToString() +DA:206,0 +DA:207,0 +DA:208,0 +DA:210,0 +DA:211,0 +DA:212,0 +DA:213,0 +DA:214,0 +DA:215,0 +DA:216,0 +DA:218,0 +DA:219,0 +DA:220,0 +DA:222,0 +DA:223,0 +DA:224,0 +DA:225,0 +DA:226,0 +DA:227,0 +DA:228,0 +DA:229,0 +DA:231,0 +DA:232,0 +DA:233,0 +DA:234,0 +DA:236,0 +DA:237,0 +DA:238,0 +DA:239,0 +DA:241,0 +DA:242,0 +BRDA:211,231,1,0 +BRDA:213,49,0,0 +BRDA:213,49,1,0 +BRDA:222,89,0,0 +BRDA:226,118,0,0 +BRDA:226,118,1,0 +BRDA:226,139,0,0 +BRDA:226,139,1,0 +BRDA:222,89,1,0 +BRDA:211,231,0,0 +FN:115,System.Void ClingoSharp.Model::.cctor() +FNDA:0,System.Void ClingoSharp.Model::.cctor() +DA:116,0 +DA:117,0 +DA:118,0 +FN:119,System.Void ClingoSharp.Model::.ctor(ClingoSharp.CoreServices.Types.Model) +FNDA:0,System.Void ClingoSharp.Model::.ctor(ClingoSharp.CoreServices.Types.Model) +DA:120,0 +DA:121,0 +DA:122,0 +DA:123,0 +LF:100 +LH:0 +BRF:24 +BRH:0 +FNF:15 +FNH:0 +end_of_record +SF:\src\ClingoSharp\ModelType.cs +FN:26,ClingoSharp.ModelType ClingoSharp.ModelType::get_StableModel() +FNDA:0,ClingoSharp.ModelType ClingoSharp.ModelType::get_StableModel() +DA:27,0 +FN:31,ClingoSharp.ModelType ClingoSharp.ModelType::get_BraveConsequences() +FNDA:0,ClingoSharp.ModelType ClingoSharp.ModelType::get_BraveConsequences() +DA:32,0 +FN:36,ClingoSharp.ModelType ClingoSharp.ModelType::get_CautiousConsequences() +FNDA:0,ClingoSharp.ModelType ClingoSharp.ModelType::get_CautiousConsequences() +DA:37,0 +FN:42,System.String ClingoSharp.ModelType::get_Name() +FNDA:0,System.String ClingoSharp.ModelType::get_Name() +DA:43,0 +FN:56,System.Collections.Generic.IEnumerable`1 ClingoSharp.ModelType::GetNames() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.ModelType::GetNames() +DA:57,0 +DA:58,0 +DA:59,0 +FN:62,System.Collections.Generic.IEnumerable`1 ClingoSharp.ModelType::GetValues() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.ModelType::GetValues() +DA:63,0 +DA:64,0 +DA:65,0 +FN:72,System.Int32 ClingoSharp.ModelType::CompareTo(ClingoSharp.Enums.Enumeration) +FNDA:0,System.Int32 ClingoSharp.ModelType::CompareTo(ClingoSharp.Enums.Enumeration) +DA:73,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:79,0 +DA:80,0 +BRDA:74,2,0,0 +BRDA:74,2,1,0 +BRDA:74,21,0,0 +BRDA:74,21,1,0 +FN:83,System.Boolean ClingoSharp.ModelType::Equals(ClingoSharp.Enums.Enumeration) +FNDA:0,System.Boolean ClingoSharp.ModelType::Equals(ClingoSharp.Enums.Enumeration) +DA:84,0 +DA:85,0 +DA:86,0 +DA:87,0 +DA:90,0 +DA:91,0 +BRDA:85,2,0,0 +BRDA:85,2,1,0 +BRDA:85,21,0,0 +BRDA:85,21,1,0 +FN:94,System.String ClingoSharp.ModelType::ToString() +FNDA:0,System.String ClingoSharp.ModelType::ToString() +DA:95,0 +DA:96,0 +DA:97,0 +FN:48,System.Void ClingoSharp.ModelType::.ctor(System.Int32) +FNDA:0,System.Void ClingoSharp.ModelType::.ctor(System.Int32) +DA:49,0 +FN:12,System.Void ClingoSharp.ModelType::.cctor() +FNDA:0,System.Void ClingoSharp.ModelType::.cctor() +DA:13,0 +DA:14,0 +DA:15,0 +DA:16,0 +DA:17,0 +DA:18,0 +LF:32 +LH:0 +BRF:8 +BRH:0 +FNF:11 +FNH:0 +end_of_record +SF:\src\ClingoSharp\SolveControl.cs +FN:15,System.Void ClingoSharp.SolveControl::.ctor(ClingoSharp.CoreServices.Types.SolveControl) +FNDA:0,System.Void ClingoSharp.SolveControl::.ctor(ClingoSharp.CoreServices.Types.SolveControl) +DA:16,0 +DA:17,0 +DA:18,0 +DA:19,0 +LF:4 +LH:0 +BRF:0 +BRH:0 +FNF:1 +FNH:0 +end_of_record +SF:\src\ClingoSharp\SolveHandle.cs +FN:40,ClingoSharp.CoreServices.Types.SolveHandle ClingoSharp.SolveHandle::op_Implicit(ClingoSharp.SolveHandle) +FNDA:0,ClingoSharp.CoreServices.Types.SolveHandle ClingoSharp.SolveHandle::op_Implicit(ClingoSharp.SolveHandle) +DA:41,0 +DA:42,0 +DA:43,0 +FN:45,ClingoSharp.SolveHandle ClingoSharp.SolveHandle::op_Implicit(ClingoSharp.CoreServices.Types.SolveHandle) +FNDA:0,ClingoSharp.SolveHandle ClingoSharp.SolveHandle::op_Implicit(ClingoSharp.CoreServices.Types.SolveHandle) +DA:46,0 +DA:47,0 +DA:48,0 +FN:54,System.Void ClingoSharp.SolveHandle::Cancel() +FNDA:0,System.Void ClingoSharp.SolveHandle::Cancel() +DA:55,0 +DA:56,0 +DA:57,0 +FN:59,ClingoSharp.SolveResult ClingoSharp.SolveHandle::Get() +FNDA:0,ClingoSharp.SolveResult ClingoSharp.SolveHandle::Get() +DA:60,0 +DA:61,0 +DA:63,0 +DA:64,0 +DA:65,0 +DA:66,0 +DA:67,0 +DA:68,0 +DA:69,0 +DA:70,0 +DA:71,0 +DA:73,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:78,0 +DA:79,0 +DA:80,0 +DA:81,0 +BRDA:64,52,0,0 +BRDA:64,52,1,0 +BRDA:68,85,0,0 +BRDA:68,85,1,0 +BRDA:73,118,0,0 +BRDA:73,118,1,0 +BRDA:73,142,0,0 +BRDA:73,142,1,0 +FN:83,System.Void ClingoSharp.SolveHandle::Resume() +FNDA:0,System.Void ClingoSharp.SolveHandle::Resume() +DA:84,0 +DA:85,0 +DA:86,0 +FN:88,System.Boolean ClingoSharp.SolveHandle::Wait(System.Nullable`1) +FNDA:0,System.Boolean ClingoSharp.SolveHandle::Wait(System.Nullable`1) +DA:89,0 +DA:90,0 +DA:92,0 +DA:93,0 +BRDA:90,19,0,0 +BRDA:90,19,1,0 +BRDA:90,42,0,0 +BRDA:90,42,1,0 +FN:111,System.Collections.IEnumerator ClingoSharp.SolveHandle::System.Collections.IEnumerable.GetEnumerator() +FNDA:0,System.Collections.IEnumerator ClingoSharp.SolveHandle::System.Collections.IEnumerable.GetEnumerator() +DA:112,0 +DA:113,0 +DA:114,0 +FN:26,System.Void ClingoSharp.SolveHandle::.cctor() +FNDA:0,System.Void ClingoSharp.SolveHandle::.cctor() +DA:27,0 +DA:28,0 +DA:29,0 +FN:30,System.Void ClingoSharp.SolveHandle::.ctor(ClingoSharp.CoreServices.Types.SolveHandle) +FNDA:0,System.Void ClingoSharp.SolveHandle::.ctor(ClingoSharp.CoreServices.Types.SolveHandle) +DA:31,0 +DA:32,0 +DA:33,0 +DA:34,0 +FN:95,System.Boolean ClingoSharp.SolveHandle/d__10::MoveNext() +FNDA:0,System.Boolean ClingoSharp.SolveHandle/d__10::MoveNext() +DA:96,0 +DA:99,0 +DA:100,0 +DA:101,0 +DA:103,0 +DA:104,0 +DA:105,0 +DA:106,0 +DA:107,0 +DA:108,0 +DA:109,0 +BRDA:96,14,0,0 +BRDA:108,177,1,0 +BRDA:103,116,0,0 +BRDA:96,14,1,0 +BRDA:103,116,1,0 +BRDA:108,177,0,0 +LF:57 +LH:0 +BRF:18 +BRH:0 +FNF:10 +FNH:0 +end_of_record +SF:\src\ClingoSharp\SolveResult.cs +FN:12,System.Boolean ClingoSharp.SolveResult::get_IsExhausted() +FNDA:0,System.Boolean ClingoSharp.SolveResult::get_IsExhausted() +DA:13,0 +FN:17,System.Boolean ClingoSharp.SolveResult::get_IsInterrupted() +FNDA:0,System.Boolean ClingoSharp.SolveResult::get_IsInterrupted() +DA:18,0 +FN:22,System.Nullable`1 ClingoSharp.SolveResult::get_IsSatisfiable() +FNDA:0,System.Nullable`1 ClingoSharp.SolveResult::get_IsSatisfiable() +DA:23,0 +FN:28,System.Boolean ClingoSharp.SolveResult::get_IsUnknown() +FNDA:0,System.Boolean ClingoSharp.SolveResult::get_IsUnknown() +DA:29,0 +FN:33,System.Nullable`1 ClingoSharp.SolveResult::get_IsUnSatisfiable() +FNDA:0,System.Nullable`1 ClingoSharp.SolveResult::get_IsUnSatisfiable() +DA:34,0 +FN:39,System.Void ClingoSharp.SolveResult::.ctor() +FNDA:0,System.Void ClingoSharp.SolveResult::.ctor() +DA:40,0 +LF:6 +LH:0 +BRF:0 +BRH:0 +FNF:6 +FNH:0 +end_of_record +SF:\src\ClingoSharp\Symbol.cs +FN:32,ClingoSharp.Symbol ClingoSharp.Symbol::get_Infimum() +FNDA:0,ClingoSharp.Symbol ClingoSharp.Symbol::get_Infimum() +DA:33,0 +DA:34,0 +DA:35,0 +DA:36,0 +FN:44,ClingoSharp.Symbol ClingoSharp.Symbol::get_Supremum() +FNDA:0,ClingoSharp.Symbol ClingoSharp.Symbol::get_Supremum() +DA:45,0 +DA:46,0 +DA:47,0 +DA:48,0 +FN:60,System.Collections.Generic.List`1 ClingoSharp.Symbol::get_Arguments() +FNDA:0,System.Collections.Generic.List`1 ClingoSharp.Symbol::get_Arguments() +DA:61,0 +DA:62,0 +DA:63,0 +DA:64,0 +FN:72,System.String ClingoSharp.Symbol::get_Name() +FNDA:0,System.String ClingoSharp.Symbol::get_Name() +DA:73,0 +DA:74,0 +DA:75,0 +DA:76,0 +FN:84,System.Boolean ClingoSharp.Symbol::get_IsNegative() +FNDA:0,System.Boolean ClingoSharp.Symbol::get_IsNegative() +DA:85,0 +DA:86,0 +DA:87,0 +DA:88,0 +FN:96,System.Int32 ClingoSharp.Symbol::get_Number() +FNDA:0,System.Int32 ClingoSharp.Symbol::get_Number() +DA:97,0 +DA:98,0 +DA:99,0 +DA:100,0 +FN:108,System.Boolean ClingoSharp.Symbol::get_IsPositive() +FNDA:0,System.Boolean ClingoSharp.Symbol::get_IsPositive() +DA:109,0 +DA:110,0 +DA:111,0 +DA:112,0 +FN:120,System.String ClingoSharp.Symbol::get_String() +FNDA:0,System.String ClingoSharp.Symbol::get_String() +DA:121,0 +DA:122,0 +DA:123,0 +DA:124,0 +FN:132,ClingoSharp.SymbolType ClingoSharp.Symbol::get_Type() +FNDA:0,ClingoSharp.SymbolType ClingoSharp.Symbol::get_Type() +DA:133,0 +DA:134,0 +DA:136,0 +DA:137,0 +DA:138,0 +DA:139,0 +DA:140,0 +DA:141,0 +DA:142,0 +DA:143,0 +DA:144,0 +DA:145,0 +BRDA:136,19,1,0 +BRDA:136,19,2,0 +BRDA:136,19,5,0 +BRDA:136,19,6,0 +BRDA:136,19,8,0 +BRDA:136,19,0,0 +BRDA:136,19,3,0 +BRDA:136,19,4,0 +BRDA:136,19,7,0 +FN:215,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.Symbol::GetModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.Symbol::GetModule() +DA:216,0 +DA:217,0 +DA:218,0 +FN:224,ClingoSharp.CoreServices.Interfaces.Modules.ISymbolModule ClingoSharp.Symbol::GetSymbolModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.Modules.ISymbolModule ClingoSharp.Symbol::GetSymbolModule() +DA:225,0 +DA:226,0 +DA:227,0 +FN:229,ClingoSharp.CoreServices.Types.Symbol ClingoSharp.Symbol::op_Implicit(ClingoSharp.Symbol) +FNDA:0,ClingoSharp.CoreServices.Types.Symbol ClingoSharp.Symbol::op_Implicit(ClingoSharp.Symbol) +DA:230,0 +DA:231,0 +DA:232,0 +FN:234,ClingoSharp.Symbol ClingoSharp.Symbol::op_Implicit(ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,ClingoSharp.Symbol ClingoSharp.Symbol::op_Implicit(ClingoSharp.CoreServices.Types.Symbol) +DA:235,0 +DA:236,0 +DA:237,0 +FN:243,ClingoSharp.Symbol ClingoSharp.Symbol::op_Implicit(System.Int32) +FNDA:0,ClingoSharp.Symbol ClingoSharp.Symbol::op_Implicit(System.Int32) +DA:244,0 +DA:245,0 +DA:246,0 +DA:247,0 +FN:253,ClingoSharp.Symbol ClingoSharp.Symbol::op_Implicit(System.String) +FNDA:0,ClingoSharp.Symbol ClingoSharp.Symbol::op_Implicit(System.String) +DA:254,0 +DA:255,0 +DA:256,0 +DA:257,0 +FN:259,System.Boolean ClingoSharp.Symbol::op_LessThan(ClingoSharp.Symbol,ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::op_LessThan(ClingoSharp.Symbol,ClingoSharp.Symbol) +DA:260,0 +DA:261,0 +DA:262,0 +FN:264,System.Boolean ClingoSharp.Symbol::op_LessThanOrEqual(ClingoSharp.Symbol,ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::op_LessThanOrEqual(ClingoSharp.Symbol,ClingoSharp.Symbol) +DA:265,0 +DA:266,0 +DA:267,0 +FN:269,System.Boolean ClingoSharp.Symbol::op_GreaterThan(ClingoSharp.Symbol,ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::op_GreaterThan(ClingoSharp.Symbol,ClingoSharp.Symbol) +DA:270,0 +DA:271,0 +DA:272,0 +FN:274,System.Boolean ClingoSharp.Symbol::op_GreaterThanOrEqual(ClingoSharp.Symbol,ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::op_GreaterThanOrEqual(ClingoSharp.Symbol,ClingoSharp.Symbol) +DA:275,0 +DA:276,0 +DA:277,0 +FN:279,System.Boolean ClingoSharp.Symbol::op_Equality(ClingoSharp.Symbol,ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::op_Equality(ClingoSharp.Symbol,ClingoSharp.Symbol) +DA:280,0 +DA:281,0 +DA:282,0 +FN:284,System.Boolean ClingoSharp.Symbol::op_Inequality(ClingoSharp.Symbol,ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::op_Inequality(ClingoSharp.Symbol,ClingoSharp.Symbol) +DA:285,0 +DA:286,0 +DA:287,0 +FN:299,System.Boolean ClingoSharp.Symbol::Match(System.String,System.Int32) +FNDA:0,System.Boolean ClingoSharp.Symbol::Match(System.String,System.Int32) +DA:300,0 +DA:301,0 +DA:302,0 +DA:303,0 +DA:304,0 +DA:305,0 +BRDA:301,19,0,0 +BRDA:301,19,1,0 +BRDA:302,43,0,0 +BRDA:302,43,1,0 +BRDA:303,56,0,0 +BRDA:303,56,1,0 +BRDA:303,59,0,0 +BRDA:303,59,1,0 +BRDA:303,80,0,0 +BRDA:303,80,1,0 +FN:308,System.Int32 ClingoSharp.Symbol::CompareTo(ClingoSharp.Symbol) +FNDA:0,System.Int32 ClingoSharp.Symbol::CompareTo(ClingoSharp.Symbol) +DA:309,0 +DA:310,0 +DA:311,0 +DA:312,0 +DA:315,0 +DA:316,0 +DA:317,0 +DA:320,0 +DA:321,0 +DA:322,0 +DA:325,0 +DA:326,0 +BRDA:310,25,0,0 +BRDA:310,25,1,0 +BRDA:315,56,0,0 +BRDA:315,56,1,0 +BRDA:320,87,0,0 +BRDA:320,87,1,0 +FN:329,System.Boolean ClingoSharp.Symbol::Equals(ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::Equals(ClingoSharp.Symbol) +DA:330,0 +DA:331,0 +DA:332,0 +FN:335,System.Boolean ClingoSharp.Symbol::Equals(System.Object) +FNDA:0,System.Boolean ClingoSharp.Symbol::Equals(System.Object) +DA:336,0 +DA:337,0 +DA:338,0 +DA:339,0 +DA:342,0 +DA:343,0 +BRDA:337,2,0,0 +BRDA:337,2,1,0 +BRDA:337,21,0,0 +BRDA:337,21,1,0 +FN:346,System.Int32 ClingoSharp.Symbol::GetHashCode() +FNDA:0,System.Int32 ClingoSharp.Symbol::GetHashCode() +DA:347,0 +DA:348,0 +DA:349,0 +FN:352,System.String ClingoSharp.Symbol::ToString() +FNDA:0,System.String ClingoSharp.Symbol::ToString() +DA:353,0 +DA:354,0 +DA:355,0 +DA:356,0 +FN:152,System.Void ClingoSharp.Symbol::.cctor() +FNDA:0,System.Void ClingoSharp.Symbol::.cctor() +DA:153,0 +DA:154,0 +DA:155,0 +FN:156,System.Void ClingoSharp.Symbol::.ctor(ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,System.Void ClingoSharp.Symbol::.ctor(ClingoSharp.CoreServices.Types.Symbol) +DA:157,0 +DA:158,0 +DA:159,0 +DA:160,0 +FN:165,System.Void ClingoSharp.Symbol::.ctor(System.Int32) +FNDA:0,System.Void ClingoSharp.Symbol::.ctor(System.Int32) +DA:166,0 +DA:167,0 +DA:168,0 +DA:169,0 +DA:170,0 +FN:175,System.Void ClingoSharp.Symbol::.ctor(System.String) +FNDA:0,System.Void ClingoSharp.Symbol::.ctor(System.String) +DA:176,0 +DA:177,0 +DA:178,0 +DA:179,0 +DA:180,0 +FN:185,System.Void ClingoSharp.Symbol::.ctor(System.Collections.Generic.List`1) +FNDA:0,System.Void ClingoSharp.Symbol::.ctor(System.Collections.Generic.List`1) +DA:186,0 +DA:187,0 +DA:188,0 +DA:189,0 +DA:190,0 +DA:191,0 +FN:199,System.Void ClingoSharp.Symbol::.ctor(System.String,System.Collections.Generic.List`1,System.Boolean) +FNDA:0,System.Void ClingoSharp.Symbol::.ctor(System.String,System.Collections.Generic.List`1,System.Boolean) +DA:200,0 +DA:201,0 +DA:202,0 +DA:203,0 +DA:204,0 +DA:205,0 +LF:145 +LH:0 +BRF:29 +BRH:0 +FNF:33 +FNH:0 +end_of_record +SF:\src\ClingoSharp\SymbolicAtom.cs +FN:21,System.Boolean ClingoSharp.SymbolicAtom::get_IsExternal() +FNDA:0,System.Boolean ClingoSharp.SymbolicAtom::get_IsExternal() +DA:22,0 +DA:23,0 +DA:24,0 +DA:25,0 +FN:30,System.Boolean ClingoSharp.SymbolicAtom::get_IsFact() +FNDA:0,System.Boolean ClingoSharp.SymbolicAtom::get_IsFact() +DA:31,0 +DA:32,0 +DA:33,0 +DA:34,0 +FN:39,System.Int32 ClingoSharp.SymbolicAtom::get_Literal() +FNDA:0,System.Int32 ClingoSharp.SymbolicAtom::get_Literal() +DA:40,0 +DA:41,0 +DA:42,0 +DA:43,0 +FN:48,ClingoSharp.Symbol ClingoSharp.SymbolicAtom::get_Symbol() +FNDA:0,ClingoSharp.Symbol ClingoSharp.SymbolicAtom::get_Symbol() +DA:49,0 +DA:50,0 +DA:51,0 +DA:52,0 +FN:59,ClingoSharp.CoreServices.Types.SymbolicAtoms ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +FNDA:0,ClingoSharp.CoreServices.Types.SymbolicAtoms ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +DA:60,0 +DA:61,0 +DA:62,0 +FN:64,ClingoSharp.CoreServices.Types.SymbolicAtomIterator ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +FNDA:0,ClingoSharp.CoreServices.Types.SymbolicAtomIterator ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +DA:65,0 +DA:66,0 +DA:67,0 +FN:69,ClingoSharp.Symbol ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +FNDA:0,ClingoSharp.Symbol ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +DA:70,0 +DA:71,0 +DA:72,0 +FN:74,System.Int32 ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +FNDA:0,System.Int32 ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +DA:75,0 +DA:76,0 +DA:77,0 +FN:93,System.Boolean ClingoSharp.SymbolicAtom::Match(System.String,System.Int32) +FNDA:0,System.Boolean ClingoSharp.SymbolicAtom::Match(System.String,System.Int32) +DA:94,0 +DA:95,0 +DA:96,0 +FN:82,System.Void ClingoSharp.SymbolicAtom::.ctor(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator) +FNDA:0,System.Void ClingoSharp.SymbolicAtom::.ctor(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator) +DA:83,0 +DA:84,0 +DA:85,0 +DA:86,0 +DA:87,0 +LF:36 +LH:0 +BRF:0 +BRH:0 +FNF:10 +FNH:0 +end_of_record +SF:\src\ClingoSharp\SymbolicAtomIterator.cs +FN:29,ClingoSharp.CoreServices.Types.SymbolicAtoms ClingoSharp.SymbolicAtomIterator::op_Implicit(ClingoSharp.SymbolicAtomIterator) +FNDA:0,ClingoSharp.CoreServices.Types.SymbolicAtoms ClingoSharp.SymbolicAtomIterator::op_Implicit(ClingoSharp.SymbolicAtomIterator) +DA:30,0 +DA:31,0 +DA:32,0 +FN:34,ClingoSharp.CoreServices.Types.SymbolicAtomIterator ClingoSharp.SymbolicAtomIterator::op_Implicit(ClingoSharp.SymbolicAtomIterator) +FNDA:0,ClingoSharp.CoreServices.Types.SymbolicAtomIterator ClingoSharp.SymbolicAtomIterator::op_Implicit(ClingoSharp.SymbolicAtomIterator) +DA:35,0 +DA:36,0 +DA:37,0 +FN:55,System.Collections.IEnumerator ClingoSharp.SymbolicAtomIterator::System.Collections.IEnumerable.GetEnumerator() +FNDA:0,System.Collections.IEnumerator ClingoSharp.SymbolicAtomIterator::System.Collections.IEnumerable.GetEnumerator() +DA:56,0 +DA:57,0 +DA:58,0 +FN:18,System.Void ClingoSharp.SymbolicAtomIterator::.ctor(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator) +FNDA:0,System.Void ClingoSharp.SymbolicAtomIterator::.ctor(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator) +DA:19,0 +DA:20,0 +DA:21,0 +DA:22,0 +DA:23,0 +FN:43,System.Boolean ClingoSharp.SymbolicAtomIterator/d__5::MoveNext() +FNDA:0,System.Boolean ClingoSharp.SymbolicAtomIterator/d__5::MoveNext() +DA:44,0 +DA:45,0 +DA:47,0 +DA:48,0 +DA:49,0 +DA:50,0 +DA:51,0 +DA:52,0 +DA:53,0 +BRDA:44,14,0,0 +BRDA:47,233,1,0 +BRDA:44,14,1,0 +BRDA:47,233,0,0 +LF:23 +LH:0 +BRF:4 +BRH:0 +FNF:5 +FNH:0 +end_of_record +SF:\src\ClingoSharp\SymbolicAtoms.cs +FN:32,System.Collections.Generic.List`1> ClingoSharp.SymbolicAtoms::get_Signatures() +FNDA:0,System.Collections.Generic.List`1> ClingoSharp.SymbolicAtoms::get_Signatures() +DA:33,0 +DA:34,0 +DA:35,0 +DA:36,0 +DA:37,0 +DA:38,0 +DA:39,0 +DA:40,0 +FN:45,ClingoSharp.SymbolicAtom ClingoSharp.SymbolicAtoms::get_Item(ClingoSharp.Symbol) +FNDA:0,ClingoSharp.SymbolicAtom ClingoSharp.SymbolicAtoms::get_Item(ClingoSharp.Symbol) +DA:46,0 +DA:47,0 +DA:48,0 +DA:49,0 +DA:52,0 +DA:53,0 +BRDA:47,15,0,0 +BRDA:47,15,1,0 +FN:59,System.Int32 ClingoSharp.SymbolicAtoms::get_Count() +FNDA:0,System.Int32 ClingoSharp.SymbolicAtoms::get_Count() +DA:60,0 +DA:61,0 +DA:62,0 +DA:63,0 +FN:84,System.Collections.Generic.IEnumerable`1 ClingoSharp.SymbolicAtoms::get_Values() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.SymbolicAtoms::get_Values() +DA:85,0 +DA:86,0 +DA:87,0 +DA:88,0 +FN:113,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.SymbolicAtoms::GetModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.SymbolicAtoms::GetModule() +DA:114,0 +DA:115,0 +DA:116,0 +FN:122,ClingoSharp.CoreServices.Interfaces.Modules.ISymbolicAtomsModule ClingoSharp.SymbolicAtoms::GetSymbolicAtomsModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.Modules.ISymbolicAtomsModule ClingoSharp.SymbolicAtoms::GetSymbolicAtomsModule() +DA:123,0 +DA:124,0 +DA:125,0 +FN:127,ClingoSharp.CoreServices.Types.SymbolicAtoms ClingoSharp.SymbolicAtoms::op_Implicit(ClingoSharp.SymbolicAtoms) +FNDA:0,ClingoSharp.CoreServices.Types.SymbolicAtoms ClingoSharp.SymbolicAtoms::op_Implicit(ClingoSharp.SymbolicAtoms) +DA:128,0 +DA:129,0 +DA:130,0 +FN:132,ClingoSharp.SymbolicAtoms ClingoSharp.SymbolicAtoms::op_Implicit(ClingoSharp.CoreServices.Types.SymbolicAtoms) +FNDA:0,ClingoSharp.SymbolicAtoms ClingoSharp.SymbolicAtoms::op_Implicit(ClingoSharp.CoreServices.Types.SymbolicAtoms) +DA:133,0 +DA:134,0 +DA:135,0 +FN:162,System.Boolean ClingoSharp.SymbolicAtoms::ContainsKey(ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.SymbolicAtoms::ContainsKey(ClingoSharp.Symbol) +DA:163,0 +DA:164,0 +DA:165,0 +FN:168,System.Collections.Generic.IEnumerator`1 ClingoSharp.SymbolicAtoms::GetEnumerator() +FNDA:0,System.Collections.Generic.IEnumerator`1 ClingoSharp.SymbolicAtoms::GetEnumerator() +DA:169,0 +DA:170,0 +DA:171,0 +DA:172,0 +FN:175,System.Boolean ClingoSharp.SymbolicAtoms::TryGetValue(ClingoSharp.Symbol,ClingoSharp.SymbolicAtom&) +FNDA:0,System.Boolean ClingoSharp.SymbolicAtoms::TryGetValue(ClingoSharp.Symbol,ClingoSharp.SymbolicAtom&) +DA:176,0 +DA:177,0 +DA:178,0 +DA:179,0 +DA:182,0 +DA:183,0 +DA:185,0 +DA:186,0 +DA:187,0 +BRDA:177,10,0,0 +BRDA:177,10,1,0 +BRDA:185,76,0,0 +BRDA:185,76,1,0 +FN:190,System.Collections.IEnumerator ClingoSharp.SymbolicAtoms::System.Collections.IEnumerable.GetEnumerator() +FNDA:0,System.Collections.IEnumerator ClingoSharp.SymbolicAtoms::System.Collections.IEnumerable.GetEnumerator() +DA:191,0 +DA:192,0 +DA:193,0 +FN:95,System.Void ClingoSharp.SymbolicAtoms::.cctor() +FNDA:0,System.Void ClingoSharp.SymbolicAtoms::.cctor() +DA:96,0 +DA:97,0 +DA:98,0 +FN:99,System.Void ClingoSharp.SymbolicAtoms::.ctor(ClingoSharp.CoreServices.Types.SymbolicAtoms) +FNDA:0,System.Void ClingoSharp.SymbolicAtoms::.ctor(ClingoSharp.CoreServices.Types.SymbolicAtoms) +DA:100,0 +DA:101,0 +DA:102,0 +DA:103,0 +FN:69,System.Boolean ClingoSharp.SymbolicAtoms/d__9::MoveNext() +FNDA:0,System.Boolean ClingoSharp.SymbolicAtoms/d__9::MoveNext() +DA:70,0 +DA:71,0 +DA:72,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:78,0 +BRDA:70,14,0,0 +BRDA:74,203,1,0 +BRDA:70,14,1,0 +BRDA:74,203,0,0 +FN:149,System.Boolean ClingoSharp.SymbolicAtoms/d__18::MoveNext() +FNDA:0,System.Boolean ClingoSharp.SymbolicAtoms/d__18::MoveNext() +DA:150,0 +DA:151,0 +DA:152,0 +DA:154,0 +DA:155,0 +DA:156,0 +DA:157,0 +DA:158,0 +DA:159,0 +BRDA:150,14,0,0 +BRDA:155,253,1,0 +BRDA:150,14,1,0 +BRDA:155,253,0,0 +FN:196,System.Boolean ClingoSharp.SymbolicAtoms/>-GetEnumerator>d__23::MoveNext() +FNDA:0,System.Boolean ClingoSharp.SymbolicAtoms/>-GetEnumerator>d__23::MoveNext() +DA:197,0 +DA:198,0 +DA:199,0 +DA:201,0 +DA:202,0 +DA:203,0 +DA:204,0 +DA:205,0 +BRDA:197,14,0,0 +BRDA:201,214,1,0 +BRDA:197,14,1,0 +BRDA:201,214,0,0 +LF:85 +LH:0 +BRF:18 +BRH:0 +FNF:17 +FNH:0 +end_of_record +SF:\src\ClingoSharp\SymbolType.cs +FN:12,System.String[] ClingoSharp.SymbolType::get_SymbolNames() +FNDA:0,System.String[] ClingoSharp.SymbolType::get_SymbolNames() +DA:13,0 +DA:14,0 +DA:15,0 +DA:16,0 +DA:17,0 +DA:18,0 +DA:19,0 +DA:20,0 +FN:25,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Infimum() +FNDA:0,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Infimum() +DA:26,0 +FN:26,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Number() +FNDA:0,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Number() +DA:27,0 +FN:27,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_String() +FNDA:0,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_String() +DA:28,0 +FN:28,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Function() +FNDA:0,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Function() +DA:29,0 +FN:29,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Supremum() +FNDA:0,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Supremum() +DA:30,0 +FN:35,System.String ClingoSharp.SymbolType::get_Name() +FNDA:0,System.String ClingoSharp.SymbolType::get_Name() +DA:36,0 +FN:49,System.Collections.Generic.IEnumerable`1 ClingoSharp.SymbolType::GetNames() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.SymbolType::GetNames() +DA:50,0 +DA:51,0 +DA:52,0 +FN:55,System.Collections.Generic.IEnumerable`1 ClingoSharp.SymbolType::GetValues() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.SymbolType::GetValues() +DA:56,0 +DA:57,0 +DA:58,0 +FN:65,System.Int32 ClingoSharp.SymbolType::CompareTo(ClingoSharp.Enums.Enumeration) +FNDA:0,System.Int32 ClingoSharp.SymbolType::CompareTo(ClingoSharp.Enums.Enumeration) +DA:66,0 +DA:67,0 +DA:68,0 +DA:69,0 +DA:72,0 +DA:73,0 +BRDA:67,2,0,0 +BRDA:67,2,1,0 +BRDA:67,21,0,0 +BRDA:67,21,1,0 +FN:76,System.Boolean ClingoSharp.SymbolType::Equals(ClingoSharp.Enums.Enumeration) +FNDA:0,System.Boolean ClingoSharp.SymbolType::Equals(ClingoSharp.Enums.Enumeration) +DA:77,0 +DA:78,0 +DA:79,0 +DA:80,0 +DA:83,0 +DA:84,0 +BRDA:78,2,0,0 +BRDA:78,2,1,0 +BRDA:78,21,0,0 +BRDA:78,21,1,0 +FN:87,System.String ClingoSharp.SymbolType::ToString() +FNDA:0,System.String ClingoSharp.SymbolType::ToString() +DA:88,0 +DA:89,0 +DA:90,0 +FN:41,System.Void ClingoSharp.SymbolType::.ctor(System.Int32) +FNDA:0,System.Void ClingoSharp.SymbolType::.ctor(System.Int32) +DA:42,0 +LF:36 +LH:0 +BRF:8 +BRH:0 +FNF:13 +FNH:0 +end_of_record +SF:\src\ClingoSharp\Union.cs +FN:54,System.Void ClingoSharp.Union`2::Set(T1) +FNDA:0,System.Void ClingoSharp.Union`2::Set(T1) +DA:55,0 +DA:56,0 +DA:57,0 +DA:58,0 +DA:59,0 +FN:65,System.Void ClingoSharp.Union`2::Set(T2) +FNDA:0,System.Void ClingoSharp.Union`2::Set(T2) +DA:66,0 +DA:67,0 +DA:68,0 +DA:69,0 +DA:70,0 +FN:77,System.Boolean ClingoSharp.Union`2::IsType(System.Type) +FNDA:0,System.Boolean ClingoSharp.Union`2::IsType(System.Type) +DA:78,0 +DA:79,0 +DA:80,0 +DA:81,0 +DA:83,0 +DA:84,0 +DA:85,0 +DA:88,0 +DA:89,0 +BRDA:79,19,0,0 +BRDA:79,19,1,0 +BRDA:83,52,0,0 +BRDA:83,52,1,0 +FN:96,System.Boolean ClingoSharp.Union`2::IsType() +FNDA:0,System.Boolean ClingoSharp.Union`2::IsType() +DA:97,0 +DA:98,0 +DA:99,0 +FN:107,System.Boolean ClingoSharp.Union`2::TryGet(System.Type,System.Object&) +FNDA:0,System.Boolean ClingoSharp.Union`2::TryGet(System.Type,System.Object&) +DA:108,0 +DA:109,0 +DA:110,0 +DA:111,0 +DA:112,0 +DA:113,0 +DA:114,0 +DA:116,0 +DA:118,0 +DA:119,0 +DA:120,0 +DA:121,0 +DA:122,0 +DA:123,0 +DA:125,0 +DA:127,0 +DA:128,0 +DA:129,0 +BRDA:109,19,0,0 +BRDA:111,33,0,0 +BRDA:111,33,1,0 +BRDA:109,19,1,0 +BRDA:118,72,0,0 +BRDA:120,88,0,0 +BRDA:120,88,1,0 +BRDA:118,72,1,0 +FN:137,System.Boolean ClingoSharp.Union`2::TryGet(T&) +FNDA:0,System.Boolean ClingoSharp.Union`2::TryGet(T&) +DA:138,0 +DA:139,0 +DA:140,0 +DA:141,0 +DA:142,0 +FN:150,System.Object ClingoSharp.Union`2::Get(System.Type) +FNDA:0,System.Object ClingoSharp.Union`2::Get(System.Type) +DA:151,0 +DA:152,0 +DA:153,0 +DA:154,0 +DA:157,0 +DA:158,0 +DA:160,0 +BRDA:152,12,0,0 +BRDA:152,12,1,0 +FN:168,T ClingoSharp.Union`2::Get() +FNDA:0,T ClingoSharp.Union`2::Get() +DA:169,0 +DA:170,0 +DA:171,0 +FN:181,ClingoSharp.Union`2 ClingoSharp.Union`2::op_Implicit(T1) +FNDA:0,ClingoSharp.Union`2 ClingoSharp.Union`2::op_Implicit(T1) +DA:182,0 +DA:183,0 +DA:184,0 +FN:190,ClingoSharp.Union`2 ClingoSharp.Union`2::op_Implicit(T2) +FNDA:0,ClingoSharp.Union`2 ClingoSharp.Union`2::op_Implicit(T2) +DA:191,0 +DA:192,0 +DA:193,0 +FN:200,T1 ClingoSharp.Union`2::op_Implicit(ClingoSharp.Union`2) +FNDA:0,T1 ClingoSharp.Union`2::op_Implicit(ClingoSharp.Union`2) +DA:201,0 +DA:202,0 +DA:203,0 +DA:204,0 +DA:207,0 +DA:208,0 +BRDA:202,15,0,0 +BRDA:202,15,1,0 +FN:215,T2 ClingoSharp.Union`2::op_Implicit(ClingoSharp.Union`2) +FNDA:0,T2 ClingoSharp.Union`2::op_Implicit(ClingoSharp.Union`2) +DA:216,0 +DA:217,0 +DA:218,0 +DA:219,0 +DA:222,0 +DA:223,0 +BRDA:217,15,0,0 +BRDA:217,15,1,0 +FN:226,System.Object ClingoSharp.Union`2::Clone() +FNDA:0,System.Object ClingoSharp.Union`2::Clone() +DA:227,0 +DA:228,0 +DA:229,0 +DA:230,0 +DA:231,0 +DA:232,0 +DA:233,0 +DA:234,0 +DA:236,0 +DA:237,0 +DA:239,0 +DA:240,0 +DA:241,0 +DA:242,0 +DA:243,0 +DA:244,0 +DA:245,0 +DA:247,0 +DA:248,0 +DA:251,0 +DA:252,0 +BRDA:228,12,0,0 +BRDA:231,38,0,0 +BRDA:231,38,1,0 +BRDA:228,12,1,0 +BRDA:239,95,0,0 +BRDA:242,125,0,0 +BRDA:242,125,1,0 +BRDA:239,95,1,0 +FN:264,System.Boolean ClingoSharp.Union`2::op_Equality(ClingoSharp.Union`2,System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::op_Equality(ClingoSharp.Union`2,System.Object) +DA:265,0 +DA:266,0 +DA:267,0 +FN:275,System.Boolean ClingoSharp.Union`2::op_Inequality(ClingoSharp.Union`2,System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::op_Inequality(ClingoSharp.Union`2,System.Object) +DA:276,0 +DA:277,0 +DA:278,0 +FN:281,System.Boolean ClingoSharp.Union`2::Equals(System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::Equals(System.Object) +DA:282,0 +DA:283,0 +DA:284,0 +DA:285,0 +DA:288,0 +DA:289,0 +BRDA:283,2,0,0 +BRDA:283,2,1,0 +BRDA:283,21,0,0 +BRDA:283,21,1,0 +FN:296,System.Boolean ClingoSharp.Union`2::Equals(ClingoSharp.Union`2) +FNDA:0,System.Boolean ClingoSharp.Union`2::Equals(ClingoSharp.Union`2) +DA:297,0 +DA:298,0 +DA:299,0 +DA:300,0 +DA:302,0 +DA:303,0 +DA:304,0 +DA:307,0 +DA:308,0 +BRDA:298,13,0,0 +BRDA:298,13,1,0 +BRDA:298,29,0,0 +BRDA:298,29,1,0 +BRDA:302,75,0,0 +BRDA:302,75,1,0 +BRDA:302,91,0,0 +BRDA:302,91,1,0 +FN:311,System.Int32 ClingoSharp.Union`2::GetHashCode() +FNDA:0,System.Int32 ClingoSharp.Union`2::GetHashCode() +DA:312,0 +DA:313,0 +DA:314,0 +DA:315,0 +DA:318,0 +DA:319,0 +DA:320,0 +DA:323,0 +DA:324,0 +BRDA:313,12,0,0 +BRDA:313,12,1,0 +BRDA:318,46,0,0 +BRDA:318,46,1,0 +FN:332,System.Int32 ClingoSharp.Union`2::CompareTo(ClingoSharp.Union`2) +FNDA:0,System.Int32 ClingoSharp.Union`2::CompareTo(ClingoSharp.Union`2) +DA:333,0 +DA:334,0 +DA:335,0 +DA:336,0 +DA:337,0 +DA:338,0 +DA:341,0 +DA:343,0 +DA:344,0 +DA:345,0 +DA:346,0 +DA:347,0 +DA:350,0 +DA:353,0 +DA:354,0 +BRDA:334,13,0,0 +BRDA:334,13,1,0 +BRDA:334,29,0,0 +BRDA:336,53,0,0 +BRDA:336,53,1,0 +BRDA:334,29,1,0 +BRDA:343,109,0,0 +BRDA:343,109,1,0 +BRDA:343,125,0,0 +BRDA:345,151,0,0 +BRDA:345,151,1,0 +BRDA:343,125,1,0 +FN:358,System.Int32 ClingoSharp.Union`2::CompareTo(System.Object) +FNDA:0,System.Int32 ClingoSharp.Union`2::CompareTo(System.Object) +DA:359,0 +DA:360,0 +DA:361,0 +DA:362,0 +DA:365,0 +DA:366,0 +BRDA:360,2,0,0 +BRDA:360,2,1,0 +BRDA:360,21,0,0 +BRDA:360,21,1,0 +FN:375,System.Boolean ClingoSharp.Union`2::op_LessThan(ClingoSharp.Union`2,System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::op_LessThan(ClingoSharp.Union`2,System.Object) +DA:376,0 +DA:377,0 +DA:378,0 +FN:387,System.Boolean ClingoSharp.Union`2::op_LessThanOrEqual(ClingoSharp.Union`2,System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::op_LessThanOrEqual(ClingoSharp.Union`2,System.Object) +DA:388,0 +DA:389,0 +DA:390,0 +FN:399,System.Boolean ClingoSharp.Union`2::op_GreaterThan(ClingoSharp.Union`2,System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::op_GreaterThan(ClingoSharp.Union`2,System.Object) +DA:400,0 +DA:401,0 +DA:402,0 +FN:411,System.Boolean ClingoSharp.Union`2::op_GreaterThanOrEqual(ClingoSharp.Union`2,System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::op_GreaterThanOrEqual(ClingoSharp.Union`2,System.Object) +DA:412,0 +DA:413,0 +DA:414,0 +FN:421,System.String ClingoSharp.Union`2::ToString(System.String,System.IFormatProvider) +FNDA:0,System.String ClingoSharp.Union`2::ToString(System.String,System.IFormatProvider) +DA:422,0 +DA:423,0 +DA:424,0 +DA:425,0 +DA:426,0 +DA:427,0 +DA:430,0 +DA:432,0 +DA:433,0 +DA:434,0 +DA:435,0 +DA:436,0 +DA:439,0 +DA:442,0 +DA:443,0 +BRDA:423,12,0,0 +BRDA:425,36,0,0 +BRDA:425,36,1,0 +BRDA:423,12,1,0 +BRDA:432,96,0,0 +BRDA:434,122,0,0 +BRDA:434,122,1,0 +BRDA:432,96,1,0 +FN:445,System.String ClingoSharp.Union`2::ToString() +FNDA:0,System.String ClingoSharp.Union`2::ToString() +DA:446,0 +DA:447,0 +DA:448,0 +DA:449,0 +DA:451,0 +DA:452,0 +DA:453,0 +DA:456,0 +DA:457,0 +BRDA:447,12,0,0 +BRDA:447,12,1,0 +BRDA:451,46,0,0 +BRDA:451,46,1,0 +FN:28,System.Void ClingoSharp.Union`2::.ctor(T1) +FNDA:0,System.Void ClingoSharp.Union`2::.ctor(T1) +DA:29,0 +DA:30,0 +DA:31,0 +DA:32,0 +DA:33,0 +FN:39,System.Void ClingoSharp.Union`2::.ctor(T2) +FNDA:0,System.Void ClingoSharp.Union`2::.ctor(T2) +DA:40,0 +DA:41,0 +DA:42,0 +DA:43,0 +DA:44,0 +LF:191 +LH:0 +BRF:70 +BRH:0 +FNF:28 +FNH:0 +end_of_record +SF:\src\ClingoSharp\Exceptions\BadAllocationException.cs +FN:9,System.Void ClingoSharp.Exceptions.BadAllocationException::.ctor() +FNDA:0,System.Void ClingoSharp.Exceptions.BadAllocationException::.ctor() +DA:10,0 +FN:10,System.Void ClingoSharp.Exceptions.BadAllocationException::.ctor(System.String) +FNDA:0,System.Void ClingoSharp.Exceptions.BadAllocationException::.ctor(System.String) +DA:11,0 +LF:2 +LH:0 +BRF:0 +BRH:0 +FNF:2 +FNH:0 +end_of_record +SF:\src\ClingoSharp\Exceptions\LogicException.cs +FN:9,System.Void ClingoSharp.Exceptions.LogicException::.ctor() +FNDA:0,System.Void ClingoSharp.Exceptions.LogicException::.ctor() +DA:10,0 +FN:10,System.Void ClingoSharp.Exceptions.LogicException::.ctor(System.String) +FNDA:0,System.Void ClingoSharp.Exceptions.LogicException::.ctor(System.String) +DA:11,0 +LF:2 +LH:0 +BRF:0 +BRH:0 +FNF:2 +FNH:0 +end_of_record +SF:\src\ClingoSharp\Exceptions\RuntimeException.cs +FN:9,System.Void ClingoSharp.Exceptions.RuntimeException::.ctor() +FNDA:0,System.Void ClingoSharp.Exceptions.RuntimeException::.ctor() +DA:10,0 +FN:10,System.Void ClingoSharp.Exceptions.RuntimeException::.ctor(System.String) +FNDA:0,System.Void ClingoSharp.Exceptions.RuntimeException::.ctor(System.String) +DA:11,0 +LF:2 +LH:0 +BRF:0 +BRH:0 +FNF:2 +FNH:0 +end_of_record +SF:\src\ClingoSharp\Exceptions\UnknownException.cs +FN:6,System.Void ClingoSharp.Exceptions.UnknownException::.ctor() +FNDA:0,System.Void ClingoSharp.Exceptions.UnknownException::.ctor() +DA:7,0 +FN:7,System.Void ClingoSharp.Exceptions.UnknownException::.ctor(System.String) +FNDA:0,System.Void ClingoSharp.Exceptions.UnknownException::.ctor(System.String) +DA:8,0 +LF:2 +LH:0 +BRF:0 +BRH:0 +FNF:2 +FNH:0 +end_of_record +SF:\src\ClingoSharp\Enums\Enumeration.cs +FN:16,System.Int32 ClingoSharp.Enums.Enumeration::get_Value() +FNDA:0,System.Int32 ClingoSharp.Enums.Enumeration::get_Value() +DA:17,0 +FN:21,System.String ClingoSharp.Enums.Enumeration::get_Name() +FNDA:0,System.String ClingoSharp.Enums.Enumeration::get_Name() +DA:22,0 +FN:41,System.Collections.Generic.IEnumerable`1 ClingoSharp.Enums.Enumeration::GetNames() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.Enums.Enumeration::GetNames() +DA:42,0 +DA:43,0 +FN:50,System.Collections.Generic.IEnumerable`1 ClingoSharp.Enums.Enumeration::GetValues() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.Enums.Enumeration::GetValues() +DA:51,0 +DA:52,0 +FN:60,ClingoSharp.Enums.Enumeration ClingoSharp.Enums.Enumeration::GetValue(System.Int32) +FNDA:0,ClingoSharp.Enums.Enumeration ClingoSharp.Enums.Enumeration::GetValue(System.Int32) +DA:61,0 +DA:62,0 +DA:63,0 +FN:71,ClingoSharp.Enums.Enumeration ClingoSharp.Enums.Enumeration::Parse(System.String,System.Boolean) +FNDA:0,ClingoSharp.Enums.Enumeration ClingoSharp.Enums.Enumeration::Parse(System.String,System.Boolean) +DA:72,0 +DA:73,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:80,0 +DA:81,0 +DA:85,0 +DA:86,0 +DA:87,0 +DA:90,0 +DA:91,0 +BRDA:73,9,0,0 +BRDA:75,18,0,0 +BRDA:75,18,1,0 +BRDA:73,9,1,0 +BRDA:85,48,0,0 +BRDA:85,48,1,0 +FN:98,ClingoSharp.Enums.Enumeration ClingoSharp.Enums.Enumeration::Parse(System.String) +FNDA:0,ClingoSharp.Enums.Enumeration ClingoSharp.Enums.Enumeration::Parse(System.String) +DA:99,0 +DA:100,0 +DA:101,0 +FN:110,TEnum ClingoSharp.Enums.Enumeration::Parse(System.String,System.Boolean) +FNDA:0,TEnum ClingoSharp.Enums.Enumeration::Parse(System.String,System.Boolean) +DA:111,0 +DA:112,0 +DA:113,0 +FN:121,TEnum ClingoSharp.Enums.Enumeration::Parse(System.String) +FNDA:0,TEnum ClingoSharp.Enums.Enumeration::Parse(System.String) +DA:122,0 +DA:123,0 +DA:124,0 +FN:133,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,System.Boolean,ClingoSharp.Enums.Enumeration&) +FNDA:0,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,System.Boolean,ClingoSharp.Enums.Enumeration&) +DA:134,0 +DA:135,0 +DA:136,0 +DA:137,0 +BRDA:135,18,0,0 +BRDA:135,18,1,0 +FN:145,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,ClingoSharp.Enums.Enumeration&) +FNDA:0,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,ClingoSharp.Enums.Enumeration&) +DA:146,0 +DA:147,0 +DA:148,0 +FN:158,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,System.Boolean,TEnum&) +FNDA:0,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,System.Boolean,TEnum&) +DA:159,0 +DA:160,0 +DA:161,0 +DA:162,0 +DA:163,0 +DA:166,0 +DA:167,0 +DA:168,0 +BRDA:160,12,0,0 +BRDA:160,12,1,0 +FN:177,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,TEnum&) +FNDA:0,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,TEnum&) +DA:178,0 +DA:179,0 +DA:180,0 +FN:201,System.Boolean ClingoSharp.Enums.Enumeration::Equals(System.Object) +FNDA:0,System.Boolean ClingoSharp.Enums.Enumeration::Equals(System.Object) +DA:202,0 +DA:203,0 +DA:204,0 +DA:205,0 +DA:208,0 +DA:209,0 +DA:210,0 +BRDA:203,15,0,0 +BRDA:203,15,1,0 +FN:213,System.Int32 ClingoSharp.Enums.Enumeration::GetHashCode() +FNDA:0,System.Int32 ClingoSharp.Enums.Enumeration::GetHashCode() +DA:214,0 +DA:215,0 +DA:216,0 +FN:27,System.Void ClingoSharp.Enums.Enumeration::.ctor(System.Int32) +FNDA:0,System.Void ClingoSharp.Enums.Enumeration::.ctor(System.Int32) +DA:28,0 +DA:29,0 +DA:30,0 +DA:31,0 +LF:63 +LH:0 +BRF:12 +BRH:0 +FNF:16 +FNH:0 +end_of_record +SF:\src\ClingoSharp.NativeWrapper\ControlModuleImpl.cs +FN:100,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::New(System.String[],ClingoSharp.CoreServices.Callbacks.LoggerCallback,System.UInt32,ClingoSharp.CoreServices.Types.Control&) +FNDA:1,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::New(System.String[],ClingoSharp.CoreServices.Callbacks.LoggerCallback,System.UInt32,ClingoSharp.CoreServices.Types.Control&) +DA:101,1 +DA:107,1 +DA:109,1 +DA:111,1 +DA:112,1 +DA:114,1 +DA:115,1 +BRDA:107,18,0,0 +BRDA:107,18,1,1 +BRDA:111,51,0,1 +BRDA:111,51,1,0 +FN:117,System.Void ClingoSharp.NativeWrapper.ControlModuleImpl::Free(ClingoSharp.CoreServices.Types.Control) +FNDA:0,System.Void ClingoSharp.NativeWrapper.ControlModuleImpl::Free(ClingoSharp.CoreServices.Types.Control) +DA:118,0 +DA:119,0 +DA:120,0 +FN:126,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::Add(ClingoSharp.CoreServices.Types.Control,System.String,System.String[],System.String) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::Add(ClingoSharp.CoreServices.Types.Control,System.String,System.String[],System.String) +DA:127,0 +DA:128,0 +DA:130,0 +DA:132,0 +DA:133,0 +BRDA:128,4,0,0 +BRDA:128,4,1,0 +FN:135,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::Ground(ClingoSharp.CoreServices.Types.Control,ClingoSharp.CoreServices.Types.Part[],ClingoSharp.CoreServices.Callbacks.GroundCallback) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::Ground(ClingoSharp.CoreServices.Types.Control,ClingoSharp.CoreServices.Types.Part[],ClingoSharp.CoreServices.Callbacks.GroundCallback) +DA:136,0 +DA:158,0 +DA:159,0 +DA:161,0 +DA:163,0 +DA:164,0 +BRDA:158,23,0,0 +BRDA:158,23,1,0 +BRDA:159,44,0,0 +BRDA:159,44,1,0 +BRDA:161,76,0,0 +BRDA:161,76,1,0 +FN:170,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::Solve(ClingoSharp.CoreServices.Types.Control,ClingoSharp.CoreServices.Enums.SolveMode,ClingoSharp.CoreServices.Types.Literal[],ClingoSharp.CoreServices.EventHandlers.SolveEventHandler,ClingoSharp.CoreServices.Types.SolveHandle&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::Solve(ClingoSharp.CoreServices.Types.Control,ClingoSharp.CoreServices.Enums.SolveMode,ClingoSharp.CoreServices.Types.Literal[],ClingoSharp.CoreServices.EventHandlers.SolveEventHandler,ClingoSharp.CoreServices.Types.SolveHandle&) +DA:171,0 +DA:183,0 +DA:185,0 +DA:186,0 +DA:188,0 +DA:190,0 +DA:192,0 +DA:194,0 +DA:195,0 +BRDA:185,19,0,0 +BRDA:185,19,1,0 +BRDA:186,70,0,0 +BRDA:186,70,1,0 +BRDA:190,111,0,0 +BRDA:190,111,1,0 +FN:201,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::GetConst(ClingoSharp.CoreServices.Types.Control,System.String,ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::GetConst(ClingoSharp.CoreServices.Types.Control,System.String,ClingoSharp.CoreServices.Types.Symbol&) +DA:202,0 +DA:203,0 +DA:204,0 +DA:205,0 +DA:206,0 +DA:207,0 +FN:209,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::HasConst(ClingoSharp.CoreServices.Types.Control,System.String,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::HasConst(ClingoSharp.CoreServices.Types.Control,System.String,System.Boolean&) +DA:210,0 +DA:211,0 +DA:212,0 +DA:213,0 +DA:214,0 +DA:215,0 +FN:217,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::GetSymbolicAtoms(ClingoSharp.CoreServices.Types.Control,ClingoSharp.CoreServices.Types.SymbolicAtoms&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::GetSymbolicAtoms(ClingoSharp.CoreServices.Types.Control,ClingoSharp.CoreServices.Types.SymbolicAtoms&) +DA:218,0 +DA:219,0 +DA:220,0 +DA:221,0 +DA:222,0 +DA:223,0 +FN:26,System.Void ClingoSharp.NativeWrapper.ControlModuleImpl::.ctor() +FNDA:1,System.Void ClingoSharp.NativeWrapper.ControlModuleImpl::.ctor() +DA:27,1 +DA:28,1 +DA:29,1 +DA:30,2 +DA:31,2 +DA:32,3 +DA:33,3 +DA:34,3 +DA:35,2 +DA:36,1 +DA:37,2 +DA:38,3 +DA:39,3 +DA:40,3 +DA:41,3 +DA:42,3 +DA:43,3 +DA:44,2 +DA:45,2 +DA:47,1 +DA:48,1 +FN:140,System.UInt64 ClingoSharp.NativeWrapper.ControlModuleImpl/<>c::b__13_3(ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,System.UInt64 ClingoSharp.NativeWrapper.ControlModuleImpl/<>c::b__13_3(ClingoSharp.CoreServices.Types.Symbol) +DA:141,0 +BRDA:141,2,0,0 +BRDA:141,2,1,0 +FN:150,ClingoSharp.CoreServices.Types.Symbol ClingoSharp.NativeWrapper.ControlModuleImpl/<>c::b__13_2(System.UInt64) +FNDA:0,ClingoSharp.CoreServices.Types.Symbol ClingoSharp.NativeWrapper.ControlModuleImpl/<>c::b__13_2(System.UInt64) +DA:151,0 +BRDA:151,47,0,0 +BRDA:151,47,1,0 +FN:102,System.Void ClingoSharp.NativeWrapper.ControlModuleImpl/<>c__DisplayClass10_0::g__clingoLoggerCallback|0(ClingoSharp.NativeWrapper.Enums.clingo_warning,System.String,System.IntPtr) +FNDA:0,System.Void ClingoSharp.NativeWrapper.ControlModuleImpl/<>c__DisplayClass10_0::g__clingoLoggerCallback|0(ClingoSharp.NativeWrapper.Enums.clingo_warning,System.String,System.IntPtr) +DA:103,0 +DA:104,0 +DA:105,0 +FN:172,System.Int32 ClingoSharp.NativeWrapper.ControlModuleImpl/<>c__DisplayClass14_0::g__clingoSolveEventCallback|0(ClingoSharp.NativeWrapper.Enums.clingo_solve_event_type,System.IntPtr,System.IntPtr,System.Boolean[]&) +FNDA:0,System.Int32 ClingoSharp.NativeWrapper.ControlModuleImpl/<>c__DisplayClass14_0::g__clingoSolveEventCallback|0(ClingoSharp.NativeWrapper.Enums.clingo_solve_event_type,System.IntPtr,System.IntPtr,System.Boolean[]&) +DA:173,0 +DA:174,0 +DA:176,0 +DA:178,0 +DA:180,0 +DA:181,0 +BRDA:180,33,0,0 +BRDA:180,33,1,0 +LF:80 +LH:28 +BRF:24 +BRH:2 +FNF:13 +FNH:2 +end_of_record +SF:\src\ClingoSharp.NativeWrapper\MainModuleImpl.cs +FN:30,System.String ClingoSharp.NativeWrapper.MainModuleImpl::GetVersion() +FNDA:1,System.String ClingoSharp.NativeWrapper.MainModuleImpl::GetVersion() +DA:31,1 +DA:32,1 +DA:33,1 +DA:34,1 +DA:36,1 +DA:38,1 +DA:39,1 +DA:40,1 +DA:42,1 +DA:43,1 +DA:44,1 +DA:46,1 +DA:47,1 +FN:49,ClingoSharp.CoreServices.Enums.ErrorCode ClingoSharp.NativeWrapper.MainModuleImpl::GetErrorCode() +FNDA:0,ClingoSharp.CoreServices.Enums.ErrorCode ClingoSharp.NativeWrapper.MainModuleImpl::GetErrorCode() +DA:50,0 +DA:51,0 +DA:52,0 +FN:54,System.String ClingoSharp.NativeWrapper.MainModuleImpl::GetErrorMessage() +FNDA:0,System.String ClingoSharp.NativeWrapper.MainModuleImpl::GetErrorMessage() +DA:55,0 +DA:56,0 +DA:57,0 +LF:19 +LH:13 +BRF:0 +BRH:0 +FNF:3 +FNH:1 +end_of_record +SF:\src\ClingoSharp.NativeWrapper\ModelModuleImpl.cs +FN:73,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::Contains(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Symbol,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::Contains(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Symbol,System.Boolean&) +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:78,0 +DA:79,0 +FN:81,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::Extends(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Symbol[]) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::Extends(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Symbol[]) +DA:82,0 +DA:83,0 +DA:84,0 +DA:85,0 +DA:86,0 +DA:87,0 +BRDA:83,2,0,0 +BRDA:83,2,1,0 +BRDA:84,53,0,0 +BRDA:84,53,1,0 +FN:89,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetCosts(ClingoSharp.CoreServices.Types.Model,System.Int64[]&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetCosts(ClingoSharp.CoreServices.Types.Model,System.Int64[]&) +DA:90,0 +DA:91,0 +DA:92,0 +DA:94,0 +DA:95,0 +DA:96,0 +DA:97,0 +DA:98,0 +DA:101,0 +DA:102,0 +DA:103,0 +BRDA:94,27,0,0 +BRDA:94,27,1,0 +FN:105,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetNumber(ClingoSharp.CoreServices.Types.Model,System.UInt64&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetNumber(ClingoSharp.CoreServices.Types.Model,System.UInt64&) +DA:106,0 +DA:107,0 +DA:108,0 +DA:109,0 +DA:110,0 +DA:111,0 +FN:113,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetSymbols(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Enums.ShowType,ClingoSharp.CoreServices.Types.Symbol[]&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetSymbols(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Enums.ShowType,ClingoSharp.CoreServices.Types.Symbol[]&) +DA:114,0 +DA:115,0 +DA:116,0 +DA:118,0 +DA:119,0 +DA:120,0 +DA:121,0 +DA:122,0 +DA:123,0 +DA:126,0 +DA:127,0 +DA:128,0 +BRDA:118,28,0,0 +BRDA:118,28,1,0 +FN:130,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetThreadId(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Id&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetThreadId(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Id&) +DA:131,0 +DA:132,0 +DA:133,0 +DA:134,0 +DA:135,0 +DA:136,0 +FN:138,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetType(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Enums.ModelType&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetType(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Enums.ModelType&) +DA:139,0 +DA:140,0 +DA:141,0 +DA:142,0 +DA:143,0 +DA:144,0 +FN:146,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::IsOptimalityProven(ClingoSharp.CoreServices.Types.Model,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::IsOptimalityProven(ClingoSharp.CoreServices.Types.Model,System.Boolean&) +DA:147,0 +DA:148,0 +DA:149,0 +DA:150,0 +DA:151,0 +DA:152,0 +FN:154,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::IsTrue(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Literal,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::IsTrue(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Literal,System.Boolean&) +DA:155,0 +DA:156,0 +DA:157,0 +DA:158,0 +DA:159,0 +DA:160,0 +FN:166,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetContext(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.SolveControl&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetContext(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.SolveControl&) +DA:167,0 +DA:168,0 +DA:169,0 +DA:170,0 +DA:171,0 +DA:172,0 +FN:174,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetSymbolicAtoms(ClingoSharp.CoreServices.Types.SolveControl,ClingoSharp.CoreServices.Types.SymbolicAtoms&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetSymbolicAtoms(ClingoSharp.CoreServices.Types.SolveControl,ClingoSharp.CoreServices.Types.SymbolicAtoms&) +DA:175,0 +DA:176,0 +DA:177,0 +DA:178,0 +DA:179,0 +DA:180,0 +FN:182,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::AddClause(ClingoSharp.CoreServices.Types.SolveControl,ClingoSharp.CoreServices.Types.Literal[]) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::AddClause(ClingoSharp.CoreServices.Types.SolveControl,ClingoSharp.CoreServices.Types.Literal[]) +DA:183,0 +DA:184,0 +DA:185,0 +DA:186,0 +DA:187,0 +DA:188,0 +BRDA:184,2,0,0 +BRDA:184,2,1,0 +BRDA:185,53,0,0 +BRDA:185,53,1,0 +LF:83 +LH:0 +BRF:12 +BRH:0 +FNF:12 +FNH:0 +end_of_record +SF:\src\ClingoSharp.NativeWrapper\SolveHandleModuleImpl.cs +FN:37,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Get(ClingoSharp.CoreServices.Types.SolveHandle,ClingoSharp.CoreServices.Enums.SolveResult&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Get(ClingoSharp.CoreServices.Types.SolveHandle,ClingoSharp.CoreServices.Enums.SolveResult&) +DA:38,0 +DA:39,0 +DA:40,0 +DA:41,0 +DA:42,0 +DA:43,0 +FN:45,System.Void ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Wait(ClingoSharp.CoreServices.Types.SolveHandle,System.Double,System.Boolean&) +FNDA:0,System.Void ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Wait(ClingoSharp.CoreServices.Types.SolveHandle,System.Double,System.Boolean&) +DA:46,0 +DA:47,0 +DA:48,0 +DA:49,0 +DA:50,0 +FN:52,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Model(ClingoSharp.CoreServices.Types.SolveHandle,ClingoSharp.CoreServices.Types.Model&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Model(ClingoSharp.CoreServices.Types.SolveHandle,ClingoSharp.CoreServices.Types.Model&) +DA:53,0 +DA:54,0 +DA:55,0 +DA:56,0 +DA:57,0 +DA:58,0 +FN:60,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Resume(ClingoSharp.CoreServices.Types.SolveHandle) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Resume(ClingoSharp.CoreServices.Types.SolveHandle) +DA:61,0 +DA:62,0 +DA:63,0 +DA:64,0 +FN:66,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Cancel(ClingoSharp.CoreServices.Types.SolveHandle) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Cancel(ClingoSharp.CoreServices.Types.SolveHandle) +DA:67,0 +DA:68,0 +DA:69,0 +DA:70,0 +FN:72,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Close(ClingoSharp.CoreServices.Types.SolveHandle) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Close(ClingoSharp.CoreServices.Types.SolveHandle) +DA:73,0 +DA:74,0 +DA:75,0 +DA:76,0 +LF:29 +LH:0 +BRF:0 +BRH:0 +FNF:6 +FNH:0 +end_of_record +SF:\src\ClingoSharp.NativeWrapper\SymbolicAtomsModuleImpl.cs +FN:58,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetSize(ClingoSharp.CoreServices.Types.SymbolicAtoms,System.UIntPtr&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetSize(ClingoSharp.CoreServices.Types.SymbolicAtoms,System.UIntPtr&) +DA:59,0 +DA:60,0 +DA:61,0 +DA:62,0 +DA:63,0 +DA:64,0 +FN:66,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetBeginIterator(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.Signature,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetBeginIterator(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.Signature,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +DA:67,0 +DA:68,0 +DA:69,0 +DA:70,0 +DA:71,0 +DA:72,0 +DA:73,0 +BRDA:69,9,0,0 +BRDA:69,9,1,0 +FN:75,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetEndIterator(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetEndIterator(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +DA:76,0 +DA:77,0 +DA:78,0 +DA:79,0 +DA:80,0 +DA:81,0 +FN:83,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::Find(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::Find(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +DA:84,0 +DA:85,0 +DA:86,0 +DA:87,0 +DA:88,0 +DA:89,0 +FN:91,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IteratorIsEqualTo(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IteratorIsEqualTo(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +DA:92,0 +DA:93,0 +DA:94,0 +DA:95,0 +DA:96,0 +DA:97,0 +FN:99,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetSymbol(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetSymbol(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.Symbol&) +DA:100,0 +DA:101,0 +DA:102,0 +DA:103,0 +DA:104,0 +DA:105,0 +FN:107,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IsFact(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IsFact(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +DA:108,0 +DA:109,0 +DA:110,0 +DA:111,0 +DA:112,0 +DA:113,0 +FN:115,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IsExternal(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IsExternal(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +DA:116,0 +DA:117,0 +DA:118,0 +DA:119,0 +DA:120,0 +DA:121,0 +FN:123,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetLiteral(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.Literal&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetLiteral(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.Literal&) +DA:124,0 +DA:125,0 +DA:126,0 +DA:127,0 +DA:128,0 +DA:129,0 +FN:131,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetSignatures(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.Signature[]&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetSignatures(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.Signature[]&) +DA:132,0 +DA:133,0 +DA:134,0 +DA:136,0 +DA:137,0 +DA:138,0 +DA:139,0 +DA:140,0 +DA:141,0 +DA:144,0 +DA:145,0 +DA:146,0 +BRDA:136,27,0,0 +BRDA:136,27,1,0 +FN:148,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetNext(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetNext(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +DA:149,0 +DA:150,0 +DA:151,0 +DA:152,0 +DA:153,0 +DA:154,0 +FN:156,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IsValid(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IsValid(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +DA:157,0 +DA:158,0 +DA:159,0 +DA:160,0 +DA:161,0 +DA:162,0 +LF:79 +LH:0 +BRF:4 +BRH:0 +FNF:12 +FNH:0 +end_of_record +SF:\src\ClingoSharp.NativeWrapper\SymbolModuleImpl.cs +FN:119,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateSignature(System.String,System.UInt32,System.Boolean,ClingoSharp.CoreServices.Types.Signature&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateSignature(System.String,System.UInt32,System.Boolean,ClingoSharp.CoreServices.Types.Signature&) +DA:120,0 +DA:121,0 +DA:123,0 +DA:124,0 +DA:126,0 +DA:127,0 +FN:129,System.String ClingoSharp.NativeWrapper.SymbolModuleImpl::GetName(ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.String ClingoSharp.NativeWrapper.SymbolModuleImpl::GetName(ClingoSharp.CoreServices.Types.Signature) +DA:130,0 +DA:131,0 +DA:132,0 +FN:134,System.UInt32 ClingoSharp.NativeWrapper.SymbolModuleImpl::GetArity(ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.UInt32 ClingoSharp.NativeWrapper.SymbolModuleImpl::GetArity(ClingoSharp.CoreServices.Types.Signature) +DA:135,0 +DA:136,0 +DA:137,0 +FN:139,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsPositive(ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsPositive(ClingoSharp.CoreServices.Types.Signature) +DA:140,0 +DA:141,0 +DA:142,0 +FN:144,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsNegative(ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsNegative(ClingoSharp.CoreServices.Types.Signature) +DA:145,0 +DA:146,0 +DA:147,0 +FN:149,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsEqualTo(ClingoSharp.CoreServices.Types.Signature,ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsEqualTo(ClingoSharp.CoreServices.Types.Signature,ClingoSharp.CoreServices.Types.Signature) +DA:150,0 +DA:151,0 +DA:152,0 +FN:154,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsLessThan(ClingoSharp.CoreServices.Types.Signature,ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsLessThan(ClingoSharp.CoreServices.Types.Signature,ClingoSharp.CoreServices.Types.Signature) +DA:155,0 +DA:156,0 +DA:157,0 +FN:159,System.UIntPtr ClingoSharp.NativeWrapper.SymbolModuleImpl::GetHash(ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.UIntPtr ClingoSharp.NativeWrapper.SymbolModuleImpl::GetHash(ClingoSharp.CoreServices.Types.Signature) +DA:160,0 +DA:161,0 +DA:162,0 +FN:168,System.Void ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateNumber(System.Int32,ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Void ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateNumber(System.Int32,ClingoSharp.CoreServices.Types.Symbol&) +DA:169,0 +DA:170,0 +DA:171,0 +DA:172,0 +DA:173,0 +FN:175,System.Void ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateSupremum(ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Void ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateSupremum(ClingoSharp.CoreServices.Types.Symbol&) +DA:176,0 +DA:177,0 +DA:178,0 +DA:179,0 +DA:180,0 +FN:182,System.Void ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateInfimum(ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Void ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateInfimum(ClingoSharp.CoreServices.Types.Symbol&) +DA:183,0 +DA:184,0 +DA:185,0 +DA:186,0 +DA:187,0 +FN:189,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateString(System.String,ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateString(System.String,ClingoSharp.CoreServices.Types.Symbol&) +DA:190,0 +DA:191,0 +DA:192,0 +DA:193,0 +DA:194,0 +DA:195,0 +FN:197,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateId(System.String,System.Boolean,ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateId(System.String,System.Boolean,ClingoSharp.CoreServices.Types.Symbol&) +DA:198,0 +DA:199,0 +DA:200,0 +DA:201,0 +DA:202,0 +DA:203,0 +FN:205,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateFunction(System.String,ClingoSharp.CoreServices.Types.Symbol[],System.Boolean,ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateFunction(System.String,ClingoSharp.CoreServices.Types.Symbol[],System.Boolean,ClingoSharp.CoreServices.Types.Symbol&) +DA:206,0 +DA:207,0 +DA:208,0 +DA:210,0 +DA:212,0 +DA:213,0 +DA:215,0 +DA:216,0 +BRDA:208,47,0,0 +BRDA:208,47,1,0 +FN:222,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetNumber(ClingoSharp.CoreServices.Types.Symbol,System.Int32&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetNumber(ClingoSharp.CoreServices.Types.Symbol,System.Int32&) +DA:223,0 +DA:224,0 +DA:226,0 +DA:227,0 +DA:229,0 +DA:230,0 +FN:232,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetName(ClingoSharp.CoreServices.Types.Symbol,System.String&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetName(ClingoSharp.CoreServices.Types.Symbol,System.String&) +DA:233,0 +DA:234,0 +DA:236,0 +DA:237,0 +DA:239,0 +DA:240,0 +FN:242,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetString(ClingoSharp.CoreServices.Types.Symbol,System.String&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetString(ClingoSharp.CoreServices.Types.Symbol,System.String&) +DA:243,0 +DA:244,0 +DA:246,0 +DA:247,0 +DA:249,0 +DA:250,0 +FN:252,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsPositive(ClingoSharp.CoreServices.Types.Symbol,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsPositive(ClingoSharp.CoreServices.Types.Symbol,System.Boolean&) +DA:253,0 +DA:254,0 +DA:256,0 +DA:257,0 +DA:259,0 +DA:260,0 +FN:262,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsNegative(ClingoSharp.CoreServices.Types.Symbol,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsNegative(ClingoSharp.CoreServices.Types.Symbol,System.Boolean&) +DA:263,0 +DA:264,0 +DA:266,0 +DA:267,0 +DA:269,0 +DA:270,0 +FN:272,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetArguments(ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.Symbol[]&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetArguments(ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.Symbol[]&) +DA:273,0 +DA:274,0 +DA:275,0 +DA:277,0 +DA:280,0 +DA:281,0 +DA:282,0 +DA:285,0 +DA:286,0 +DA:287,0 +DA:288,0 +DA:289,0 +DA:291,0 +DA:292,0 +BRDA:286,124,1,0 +BRDA:286,124,0,0 +FN:294,ClingoSharp.CoreServices.Enums.SymbolType ClingoSharp.NativeWrapper.SymbolModuleImpl::GetType(ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,ClingoSharp.CoreServices.Enums.SymbolType ClingoSharp.NativeWrapper.SymbolModuleImpl::GetType(ClingoSharp.CoreServices.Types.Symbol) +DA:295,0 +DA:296,0 +DA:297,0 +FN:299,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::ToString(ClingoSharp.CoreServices.Types.Symbol,System.String&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::ToString(ClingoSharp.CoreServices.Types.Symbol,System.String&) +DA:300,0 +DA:301,0 +DA:303,0 +DA:305,0 +DA:306,0 +DA:307,0 +DA:309,0 +DA:311,0 +DA:312,0 +DA:314,0 +DA:317,0 +DA:318,0 +DA:319,0 +BRDA:305,27,0,0 +BRDA:305,27,1,0 +FN:325,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsEqualTo(ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsEqualTo(ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.Symbol) +DA:326,0 +DA:327,0 +DA:328,0 +FN:330,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsLessThan(ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsLessThan(ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.Symbol) +DA:331,0 +DA:332,0 +DA:333,0 +FN:335,System.UIntPtr ClingoSharp.NativeWrapper.SymbolModuleImpl::GetHash(ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,System.UIntPtr ClingoSharp.NativeWrapper.SymbolModuleImpl::GetHash(ClingoSharp.CoreServices.Types.Symbol) +DA:336,0 +DA:337,0 +DA:338,0 +LF:131 +LH:0 +BRF:6 +BRH:0 +FNF:25 +FNH:0 +end_of_record diff --git a/docfx.json b/docfx.json new file mode 100644 index 0000000..55a4491 --- /dev/null +++ b/docfx.json @@ -0,0 +1,65 @@ +{ + "metadata": [ + { + "src": [ + { + "files": [ + "src/ClingoSharp/ClingoSharp.csproj", + "src/ClingoSharp.CoreServices/ClingoSharp.CoreServices.csproj" + ] + } + ], + "dest": "api", + "disableGitFeatures": false, + "disableDefaultFilter": false + } + ], + "build": { + "content": [ + { + "files": [ + "api/**.yml", + "api/index.md" + ] + }, + { + "files": [ + "articles/**.md", + "articles/**/toc.yml", + "toc.yml", + "*.md" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "overwrite": [ + { + "files": [ + "apidoc/**.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "dest": "_site", + "globalMetadataFiles": [], + "fileMetadataFiles": [], + "template": [ + "default" + ], + "postProcessors": [], + "markdownEngineName": "markdig", + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": false + } +} \ No newline at end of file diff --git a/examples/ClingoSharp.Application.csproj b/examples/ClingoSharp.Application.csproj new file mode 100644 index 0000000..ba7032b --- /dev/null +++ b/examples/ClingoSharp.Application.csproj @@ -0,0 +1,13 @@ + + + + Exe + netcoreapp3.1 + ClingoSharpApp.Program + + + + + + + diff --git a/examples/Program.cs b/examples/Program.cs new file mode 100644 index 0000000..2401219 --- /dev/null +++ b/examples/Program.cs @@ -0,0 +1,41 @@ +using ClingoSharp; +using System; +using System.Collections.Generic; + +namespace ClingoSharpApp +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine($"Clingo {Clingo.Version}\n"); + + Control ctl = new Control(new List() { "0" }); + ctl.Add("base", new List() { }, "{a; b}."); + var parts = new List>>() + { + new Tuple>("base", new List() {}), + }; + + ctl.Ground(parts); + + // Using lockable call + //ctl.Solve(onModel: m => { Console.WriteLine($"Answer: {m}"); return true; }); + + // Using yieldable call + //SolveHandle handle = ctl.Solve(yield: true); + //foreach (var m in handle) + //{ + // Console.WriteLine($"Answer: {m}"); + // handle.Get(); + //} + + // Using async call + SolveHandle handle = ctl.Solve(onModel: m => { Console.WriteLine($"Answer: {m}"); return true; }, async: true); + while (!handle.Wait(0)) + { + continue; + } + } + } +} diff --git a/index.md b/index.md new file mode 100644 index 0000000..3ae2506 --- /dev/null +++ b/index.md @@ -0,0 +1,4 @@ +# This is the **HOMEPAGE**. +Refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files. +## Quick Start Notes: +1. Add images to the *images* folder if the file is referencing an image. diff --git a/source/ClingoSharp/Api/CClingo.cs b/source/ClingoSharp/Api/CClingo.cs deleted file mode 100644 index c8f7722..0000000 --- a/source/ClingoSharp/Api/CClingo.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System; -using System.IO; -using System.Runtime.InteropServices; - -namespace ClingoSharp.Api -{ - /// - /// - /// - internal static class CClingo - { - #region Clingo constants - - internal const string ClingoLib = "clingo.dll"; - - #endregion - - #region Clingo library loader - - static IntPtr _clingoLibPtr = IntPtr.Zero; - - internal static void LoadClingoLibrary() - { - if (_clingoLibPtr == IntPtr.Zero) - { - // Gets assembly path file - var assemblyPath = new Uri(typeof(CClingo).Assembly.CodeBase).LocalPath; - // Gets assembly folder - var assemblyFolder = Path.GetDirectoryName(assemblyPath); - // Gets arch process - var arch = Environment.Is64BitProcess ? "lib" : "lib32"; - - // Loads clingo library - _clingoLibPtr = LoadLibrary(Path.Combine(assemblyFolder, arch, ClingoLib)); - if (_clingoLibPtr == IntPtr.Zero) - { - throw new System.ComponentModel.Win32Exception(); - } - } - } - - /// - /// Loads the specified module into the address space of the calling process. The specified module may cause other modules to be loaded. - /// - /// The name of the module. - /// - /// If the function succeeds, the return value is a handle to the module. - /// If the function fails, the return value is NULL.To get extended error information, call GetLastError. - /// - [DllImport("kernel32.dll")] - static extern IntPtr LoadLibrary(string LibFileName); - - #endregion - - #region Clingo utils - - public class CClingoError : Exception - { - public CClingoError(string clingoError) : base(clingoError) - { - } - } - - #endregion - - static CClingo() - { - LoadClingoLibrary(); - } - - #region Basic Data Types and Functions - - /// - /// Represents a source code location marking its beginnig and end. - /// - [StructLayout(LayoutKind.Sequential)] - public class Location - { - string BeginFile; - string EndFile; - UIntPtr BeginLine; - UIntPtr EndLine; - UIntPtr BeginColumn; - UIntPtr EndColumn; - } - - private enum Error - { - Success = 0, - RuntimeError = 1, - LogicError = 2, - BadAlloc = 3, - Unknown = 4 - } - - public enum Warning - { - OperationUndefined = 0, - RuntimeError = 1, - AtomUndefined = 2, - FileIncluded = 3, - VariableUnbounded = 4, - GlobalVariable = 5, - Other = 6 - } - - /// - /// Callback to intercept warning messages. - /// - /// associated warning code - /// warning message - /// user data for callback - public delegate void LoggerCallback(Warning code, string message, IntPtr data); - - [DllImport(ClingoLib, EntryPoint = "clingo_error_code", CallingConvention = CallingConvention.Cdecl)] - private static extern int GetLastError(); - - /// - /// Get the last error message set if an API call fails. - /// - /// error message or NULL - [DllImport(ClingoLib, EntryPoint = "clingo_error_message", CallingConvention = CallingConvention.Cdecl)] - private static extern string GetLastErrorMessage(); - - public static void CallProcedureModule(Func procedure) - { - if (procedure() == 0) - { - Error code = (Error)GetLastError(); - string message = GetLastErrorMessage(); - - throw new CClingoError(string.Format("Clingo error: {0} ({1})", code.ToString(), message)); - } - } - - public static void CallProcedureModule(string name, Func procedure) - { - int result = procedure(); - Console.WriteLine(string.Format("{0}: {1}", name, result)); - if (result == 0) - { - Error code = (Error)GetLastError(); - string message = GetLastErrorMessage(); - - throw new CClingoError(string.Format("Clingo error: {0} ({1})", code.ToString(), message)); - } - } - - /// - /// Obtain the clingo version. - /// - /// major version number - /// minor version number - /// revision number - [DllImport(ClingoLib, EntryPoint = "clingo_version", CallingConvention = CallingConvention.Cdecl)] - public static extern void GetVersion([Out] IntPtr major, [Out] IntPtr minor, [Out] IntPtr revision); - - #endregion - } -} diff --git a/source/ClingoSharp/Api/CControl.cs b/source/ClingoSharp/Api/CControl.cs deleted file mode 100644 index 27e2f3b..0000000 --- a/source/ClingoSharp/Api/CControl.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace ClingoSharp.Api -{ - /// - /// Functions to control the grounding and solving process. - /// - internal static class CControl - { - static CControl() - { - CClingo.LoadClingoLibrary(); - } - - #region Grounding and Solving - - /// - /// Struct used to specify the program parts that have to be grounded. - /// - [StructLayout(LayoutKind.Sequential)] - public class Part - { - public string Name; - public ulong[] Params; - public UIntPtr Size; - } - - [Flags] - public enum SolveResult - { - Satisfiable = 1, - Unsatisfiable = 2, - Exhausted = 4, - Interrupted = 8 - } - - /// - /// Callback function to implement external functions. - /// - /// location from which the external function was called - /// name of the called external function - /// arguments of the called external function - /// number of arguments - /// user data of the callback - /// function to inject symbols - /// user data for the symbol callback (must be passed untouched) - /// - public delegate int GroundCallback(CClingo.Location location, string name, int[] arguments, UIntPtr arguments_size, UIntPtr data, CSymbolicAtoms.SymbolCallback symbol_callback, UIntPtr symbol_callback_data); - - /// - /// Create a new control object. - /// - /// C string array of command line arguments - /// size of the arguments array - /// callback functions for warnings and info messages - /// user data for the logger callback - /// maximum number of times the logger callback is called - /// resulting control object - [DllImport(CClingo.ClingoLib, EntryPoint = "clingo_control_new", CallingConvention = CallingConvention.Cdecl)] - public static extern int New(string[] arguments, UIntPtr arguments_size, CClingo.LoggerCallback logger, IntPtr logger_data, uint message_limit, [Out] IntPtr[] control); - - /// - /// Free a control object created with . - /// - /// the target. - [DllImport(CClingo.ClingoLib, EntryPoint = "clingo_control_free", CallingConvention = CallingConvention.Cdecl)] - public static extern void Free(IntPtr control); - - /// - /// Extend the logic program with the given non-ground logic program in string form. - /// This function puts the given program into a block of form: #program name(parameters). - /// After extending the logic program, the corresponding program parts are typically grounded with - /// - /// - /// - /// - /// - /// - /// - [DllImport(CClingo.ClingoLib, EntryPoint = "clingo_control_add", CallingConvention = CallingConvention.Cdecl)] - public static extern int Add(IntPtr control, string name, string[] parameters, UIntPtr parameters_size, string program); - - /// - /// Ground the selected parts of the current (non-ground) logic program. - /// After grounding, logic programs can be solved with clingo_control_solve(). - /// - /// the target - /// array of parts to ground - /// size of the parts array - /// callback to implement external functions - /// user data for ground_callback - /// - [DllImport(CClingo.ClingoLib, EntryPoint = "clingo_control_ground", CallingConvention = CallingConvention.Cdecl)] - public static extern int Ground(IntPtr control, Part[] parts, UIntPtr parts_size, GroundCallback ground_callback, IntPtr ground_callback_data); - - [DllImport(CClingo.ClingoLib, EntryPoint = "clingo_control_solve", CallingConvention = CallingConvention.Cdecl)] - public static extern int Solve(IntPtr control, int mode, int[] assumptions, UIntPtr assumptions_size, CSolveHandle.SolveEventCallback notify, IntPtr data, [Out] IntPtr[] handler); - - #endregion - } -} diff --git a/source/ClingoSharp/Api/CModel.cs b/source/ClingoSharp/Api/CModel.cs deleted file mode 100644 index 36ae0b7..0000000 --- a/source/ClingoSharp/Api/CModel.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace ClingoSharp.Api -{ - internal static class CModel - { - static CModel() - { - CClingo.LoadClingoLibrary(); - } - - #region Inspection of models and a high-level interface to add constraints during solving. - - - - #endregion - } -} diff --git a/source/ClingoSharp/Api/CSolveHandle.cs b/source/ClingoSharp/Api/CSolveHandle.cs deleted file mode 100644 index 6d48974..0000000 --- a/source/ClingoSharp/Api/CSolveHandle.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace ClingoSharp.Api -{ - internal static class CSolveHandle - { - static CSolveHandle() - { - CClingo.LoadClingoLibrary(); - } - - #region Interact with a running search. - - /// - /// Callback function called during search to notify when the search is finished or a model is ready. - /// - /// Enumeration of solve events - /// the current event - /// user data of the callback - /// - /// - public delegate int SolveEventCallback(int eventType, IntPtr eventData, IntPtr data, int[] goon); - - /// - /// Enumeration of solve modes. - /// - public enum Mode - { - Async = 1, - Yield = 2 - } - - /// - /// Enumeration of solve events - /// - public enum EventType - { - Model = 0, - Statistics = 1, - Finish = 2 - } - - [DllImport(CClingo.ClingoLib, EntryPoint = "clingo_solve_handle_resume", CallingConvention = CallingConvention.Cdecl)] - public static extern int Resume(IntPtr handle); - - [DllImport(CClingo.ClingoLib, EntryPoint = "clingo_solve_handle_resume", CallingConvention = CallingConvention.Cdecl)] - public static extern int Model(IntPtr handle, [Out] IntPtr[] model); - - [DllImport(CClingo.ClingoLib, EntryPoint = "clingo_solve_handle_get", CallingConvention = CallingConvention.Cdecl)] - public static extern int Get(IntPtr handle, [Out] CControl.SolveResult[] result); - - [DllImport(CClingo.ClingoLib, EntryPoint = "clingo_solve_handle_close", CallingConvention = CallingConvention.Cdecl)] - public static extern int Close(IntPtr handle); - - #endregion - } -} diff --git a/source/ClingoSharp/Api/CSymbolicAtoms.cs b/source/ClingoSharp/Api/CSymbolicAtoms.cs deleted file mode 100644 index e004562..0000000 --- a/source/ClingoSharp/Api/CSymbolicAtoms.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace ClingoSharp.Api -{ - internal static class CSymbolicAtoms - { - static CSymbolicAtoms() - { - CClingo.LoadClingoLibrary(); - } - - #region Inspection of atoms occurring in ground logic programs. - - public delegate int SymbolCallback(int[] symbols, UIntPtr symbols_size, UIntPtr data); - - #endregion - } -} diff --git a/source/ClingoSharp/Assumption.cs b/source/ClingoSharp/Assumption.cs deleted file mode 100644 index b4c9dff..0000000 --- a/source/ClingoSharp/Assumption.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; - -namespace ClingoSharp -{ - /// - /// Represents a union of a literal or a (atom, bool) tuple. - /// - public class Assumption - { - /// - /// Represents the assumption type - /// - public enum Type { Literal = 1, Tuple = 2 } - - private Type _currentValue; - private int _intValue; - private Tuple _tupleValue; - - /// - /// Creates an assumption of a program literal - /// - /// the literal value - public Assumption(int value) - { - SetValue(value); - } - - /// - /// Creates an assumption of an (atom, bool) tuple. - /// - /// the tuple value - public Assumption(Tuple value) - { - SetValue(value); - } - - /// - /// Sets the assumptions as a program literal. - /// - /// the literal value - public void SetValue(int value) - { - _intValue = value; - _currentValue = Type.Literal; - } - - /// - /// Sets the assumptions as an (atom, bool) tuple. - /// - /// the tuple value - public void SetValue(Tuple value) - { - _tupleValue = value; - _currentValue = Type.Tuple; - } - - /// - /// Gets the literal value - /// - /// the literal value - public int GetLiteralValue() - { - if (!IsLiteral()) - { - throw new FieldAccessException("Assumption have not a Literal value"); - } - - return _intValue; - } - - /// - /// Gets the tuple value - /// - /// the tuple value - public Tuple GetTupleValue() - { - if (!IsTuple()) - { - throw new FieldAccessException("Assumption have not a Tuple value"); - } - - return _tupleValue; - } - - /// - /// Checks if the assumption has a literal value - /// - /// true if the assumption is a literal, false otherwise - public bool IsLiteral() - { - return _currentValue == Type.Literal; - } - - /// - /// Checks if the assumption has a tuple value - /// - /// true if the assumption is a tuple, false otherwise - public bool IsTuple() - { - return _currentValue == Type.Tuple; - } - } -} diff --git a/source/ClingoSharp/Clingo.cs b/source/ClingoSharp/Clingo.cs deleted file mode 100644 index 0672ad7..0000000 --- a/source/ClingoSharp/Clingo.cs +++ /dev/null @@ -1,34 +0,0 @@ -using ClingoSharp.Api; -using System; - -namespace ClingoSharp -{ - public class Clingo - { - private static string _version = null; - - public static string Version - { - get - { - if (_version == null) - { - int major, minor, revision = 0; - - unsafe - { - IntPtr majorPtr = new IntPtr((void*) &major); - IntPtr minorPtr = new IntPtr((void*) &minor); - IntPtr revisionPtr = new IntPtr((void*) &revision); - - CClingo.GetVersion(majorPtr, minorPtr, revisionPtr); - } - - _version = string.Format("{0}.{1}.{2}", major, minor, revision); - } - - return _version; - } - } - } -} diff --git a/source/ClingoSharp/ClingoException.cs b/source/ClingoSharp/ClingoException.cs deleted file mode 100644 index 4725da1..0000000 --- a/source/ClingoSharp/ClingoException.cs +++ /dev/null @@ -1,13 +0,0 @@ -using ClingoSharp.Api; -using System; - -namespace ClingoSharp -{ - [Serializable] - public class ClingoException : Exception - { - public ClingoException(string clingoError) : base(clingoError) - { - } - } -} diff --git a/source/ClingoSharp/ClingoSharp.csproj b/source/ClingoSharp/ClingoSharp.csproj deleted file mode 100644 index 338b728..0000000 --- a/source/ClingoSharp/ClingoSharp.csproj +++ /dev/null @@ -1,84 +0,0 @@ - - - - - Debug - AnyCPU - {CA41D45B-D389-4681-A36D-D9E7AF2E0217} - Library - Properties - ClingoSharp - ClingoSharp - v4.8 - 512 - true - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - 7.3 - prompt - MinimumRecommendedRules.ruleset - true - - - bin\x64\Release\ - TRACE - true - pdbonly - x64 - 7.3 - prompt - MinimumRecommendedRules.ruleset - true - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/source/ClingoSharp/Control.cs b/source/ClingoSharp/Control.cs deleted file mode 100644 index 7fcee3f..0000000 --- a/source/ClingoSharp/Control.cs +++ /dev/null @@ -1,166 +0,0 @@ -using ClingoSharp.Api; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; - -namespace ClingoSharp -{ - public class Control - { - private IntPtr _c_control; - internal IntPtr CControlPointer { get { return _c_control; } } - - public delegate void Logger(MessageCode code, string message); - - /// - /// Control object to the grounding/solving process. - /// - /// Arguments to the grounder and solver - /// Function to intercept messages normally printed to standard error - /// The maximum number of messages passed to the logger - public Control(List arguments = null, Logger logger = null, int messageLimit = 20) - { - try - { - // Wrappers the clingo logger function - void LoggerWrapper(CClingo.Warning code, string message, IntPtr data) - { - if (logger != null) - { - MessageCode codeEnum = MessageCode.Unknown; - if (Enum.IsDefined(typeof(MessageCode), code)) - { - codeEnum = (MessageCode)code; - } - - logger(codeEnum, message); - } - } - - // Creates pointers - string[] argsPtr = (arguments != null) ? arguments.ToArray() : Array.Empty(); - UIntPtr argsSize = new UIntPtr((uint)argsPtr.Length); - IntPtr[] controlPtr = new IntPtr[1]; - - // Creates control object - CClingo.CallProcedureModule("Control.New", () => CControl.New(argsPtr, argsSize, LoggerWrapper, IntPtr.Zero, (uint)messageLimit, controlPtr)); - _c_control = controlPtr[0]; - } - catch (CClingo.CClingoError err) - { - throw new ClingoException(err.Message); - } - } - - ~Control() - { - Console.WriteLine("Free"); - CControl.Free(_c_control); - } - - /// - /// Extend the logic program with the given non-ground logic program in string form. - /// - /// The name of program block to add - /// The parameters of the program block to add - /// The non-ground program in string form - public void Add(string name, List parameters, string program) - { - try - { - // Creates pointers - string[] paramsPtr = (parameters != null) ? parameters.ToArray() : Array.Empty(); - UIntPtr paramsSize = new UIntPtr((uint)paramsPtr.Length); - - // Call add procedure - CClingo.CallProcedureModule("Control.Add", () => CControl.Add(_c_control, name, paramsPtr, paramsSize, program)); - } - catch (CClingo.CClingoError err) - { - throw new ClingoException(err.Message); - } - } - - /// - /// Ground the given list of program parts specified by tuples of names and arguments. - /// - /// List of tuples of program names and program arguments to ground. - public void Ground(List>> parts) - { - try - { - // Wrappers the clingo ground_callback - int GroundCallbackWrapper(CClingo.Location location, string name, int[] arguments, UIntPtr arguments_size, UIntPtr data, CSymbolicAtoms.SymbolCallback symbol_callback, UIntPtr symbol_callback_data) - { - Console.WriteLine(string.Format("ground wrapper: {0}, {1}", name, arguments)); - return 1; - } - - // Creates the list of program parts - CControl.Part[] partsPtr = (parts != null) ? - parts.Select(p => { - ulong[] paramList = (p.Item2 != null) ? p.Item2.Select(s => s.CSymbol).ToArray() : Array.Empty(); - - return new CControl.Part() - { - Name = p.Item1, - Params = paramList, - Size = new UIntPtr((uint)paramList.Length) - }; - }).ToArray() - : Array.Empty(); - - // Calls ground procedure - CClingo.CallProcedureModule("Control.Ground", () => CControl.Ground(_c_control, partsPtr, new UIntPtr((uint)partsPtr.Length), GroundCallbackWrapper, IntPtr.Zero)); - } - catch (CClingo.CClingoError err) - { - throw new ClingoException(err.Message); - } - } - - /// - /// Starts a search. - /// - /// List of (atom, boolean) tuples or program literals that serve as assumptions for the solve call, e.g., solving under assumptions [(Function("a"), True)] only admits answer sets that contain atom a. - public void Solve(List assumptions = null, bool async = false) - { - try - { - // Wrappers the clingo solve event - int SolveEventWrapper(int eventType, IntPtr eventData, IntPtr data, int[] goon) - { - Console.WriteLine("solve wrapper: " + eventType); - return 1; - } - - // Creates pointers - IntPtr[] handlerPtr = new IntPtr[1]; - // Calls solve clingo result - CClingo.CallProcedureModule("Control.Solve", () => CControl.Solve(_c_control, 2, Array.Empty(), UIntPtr.Zero, null, IntPtr.Zero, handlerPtr)); - - // Aquí hago tampas - while (true) - { - CClingo.CallProcedureModule("SolveHandler.Resume", () => CSolveHandle.Resume(handlerPtr[0])); - - // Gets the model - IntPtr[] modelPtr = new IntPtr[1]; - CClingo.CallProcedureModule("SolveHandler.Model", () => CSolveHandle.Model(handlerPtr[0], modelPtr)); - - if (modelPtr[0] == IntPtr.Zero) break; - } - - CControl.SolveResult[] solveResultPtr = new CControl.SolveResult[1]; - CClingo.CallProcedureModule("SolveHandler.Get", () => CSolveHandle.Get(handlerPtr[0], solveResultPtr)); - CClingo.CallProcedureModule("SolveHandler.Close", () => CSolveHandle.Close(handlerPtr[0])); - } - catch (CClingo.CClingoError err) - { - throw new ClingoException(err.Message); - } - } - } -} diff --git a/source/ClingoSharp/MessageCode.cs b/source/ClingoSharp/MessageCode.cs deleted file mode 100644 index 4c7bce7..0000000 --- a/source/ClingoSharp/MessageCode.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace ClingoSharp -{ - public enum MessageCode - { - OperationUndefined = 0, - RuntimeError = 1, - AtomUndefined = 2, - FileIncluded = 3, - VariableUnbounded = 4, - GlobalVariable = 5, - Other = 6, - Unknown, - } -} diff --git a/source/ClingoSharp/Properties/AssemblyInfo.cs b/source/ClingoSharp/Properties/AssemblyInfo.cs deleted file mode 100644 index 8ee4dca..0000000 --- a/source/ClingoSharp/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// La información general de un ensamblado se controla mediante el siguiente -// conjunto de atributos. Cambie estos valores de atributo para modificar la información -// asociada con un ensamblado. -[assembly: AssemblyTitle("ClingoSharp")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ClingoSharp")] -[assembly: AssemblyCopyright("Copyright © 2020")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles -// para los componentes COM. Si es necesario obtener acceso a un tipo en este ensamblado desde -// COM, establezca el atributo ComVisible en true en este tipo. -[assembly: ComVisible(false)] - -// El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM. -[assembly: Guid("ca41d45b-d389-4681-a36d-d9e7af2e0217")] - -// La información de versión de un ensamblado consta de los cuatro valores siguientes: -// -// Versión principal -// Versión secundaria -// Número de compilación -// Revisión -// -// Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión -// utilizando el carácter "*", como se muestra a continuación: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/source/ClingoSharp/Symbol.cs b/source/ClingoSharp/Symbol.cs deleted file mode 100644 index 52ce851..0000000 --- a/source/ClingoSharp/Symbol.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace ClingoSharp -{ - public class Symbol - { - private ulong _c_symbol; - internal ulong CSymbol { get { return _c_symbol; } } - } -} diff --git a/source/ClingoSharpApp/App.config b/source/ClingoSharpApp/App.config deleted file mode 100644 index 193aecc..0000000 --- a/source/ClingoSharpApp/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/source/ClingoSharpApp/ClingoSharpApp.csproj b/source/ClingoSharpApp/ClingoSharpApp.csproj deleted file mode 100644 index c4b9af2..0000000 --- a/source/ClingoSharpApp/ClingoSharpApp.csproj +++ /dev/null @@ -1,104 +0,0 @@ - - - - - Debug - AnyCPU - {1A137938-8A13-48AB-A4C5-360EE31F7A37} - Exe - ClingoSharpApp - ClingoSharpApp - v4.8 - 512 - true - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - ClingoSharpApp.Program - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - 7.3 - prompt - MinimumRecommendedRules.ruleset - true - - - bin\x64\Release\ - TRACE - true - pdbonly - x64 - 7.3 - prompt - MinimumRecommendedRules.ruleset - true - - - - - - - - - - - - - - - - - - - - - - {ca41d45b-d389-4681-a36d-d9e7af2e0217} - ClingoSharp - - - - - IF NOT EXIST "$(SolutionDir)Clingo\build\x86\bin\Release\clingo.dll" ( - cmake "$(SolutionDir)Clingo" -B"$(SolutionDir)Clingo\build\x86" -DCLINGO_BUILD_SHARED=ON -DCLINGO_BUILD_WITH_PYTHON=OFF -DCLINGO_BUILD_WITH_LUA=OFF -DCLINGO_BUILD_APPS=OFF -G "Visual Studio 16 2019" -A Win32 - cmake --build "$(SolutionDir)Clingo\build\x86" --config Release -) - -IF NOT EXIST "$(SolutionDir)Clingo\build\x64\bin\Release\clingo.dll" ( - cmake "$(SolutionDir)Clingo" -B"$(SolutionDir)Clingo\build\x64" -DCLINGO_BUILD_SHARED=ON -DCLINGO_BUILD_WITH_PYTHON=OFF -DCLINGO_BUILD_WITH_LUA=OFF -DCLINGO_BUILD_APPS=OFF -G "Visual Studio 16 2019" -A x64 - cmake --build "$(SolutionDir)Clingo\build\x64" --config Release -) - -IF NOT EXIST "$(TargetDir)\lib32" mkdir "$(TargetDir)\lib32" -xcopy /y "$(SolutionDir)Clingo\build\x86\bin\Release\clingo.dll" "$(TargetDir)\lib32" - -IF NOT EXIST "$(TargetDir)\lib" mkdir "$(TargetDir)\lib" -xcopy /y "$(SolutionDir)Clingo\build\x64\bin\Release\clingo.dll" "$(TargetDir)\lib" - -xcopy /y /e "$(ProjectDir)Examples" "$(TargetDir)" - - \ No newline at end of file diff --git a/source/ClingoSharpApp/Examples/file.lp b/source/ClingoSharpApp/Examples/file.lp deleted file mode 100644 index 0bb2278..0000000 --- a/source/ClingoSharpApp/Examples/file.lp +++ /dev/null @@ -1 +0,0 @@ -a. \ No newline at end of file diff --git a/source/ClingoSharpApp/Program.cs b/source/ClingoSharpApp/Program.cs deleted file mode 100644 index 0c3aa0b..0000000 --- a/source/ClingoSharpApp/Program.cs +++ /dev/null @@ -1,22 +0,0 @@ -using ClingoSharp; -using System; -using System.Collections.Generic; - -namespace ClingoSharpApp -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello world from clingo " + Clingo.Version); - Console.WriteLine(); - - Control control = new Control(); - control.Add("base", null, "p."); - control.Ground(new List>>()); - control.Solve(); - - Console.ReadKey(); - } - } -} diff --git a/source/ClingoSharpApp/Properties/AssemblyInfo.cs b/source/ClingoSharpApp/Properties/AssemblyInfo.cs deleted file mode 100644 index b320961..0000000 --- a/source/ClingoSharpApp/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// La información general de un ensamblado se controla mediante el siguiente -// conjunto de atributos. Cambie estos valores de atributo para modificar la información -// asociada a un ensamblado. -[assembly: AssemblyTitle("ClingoSharp.Application")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ClingoSharp.Application")] -[assembly: AssemblyCopyright("Copyright © 2020")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles -// para los componentes COM. Si es necesario obtener acceso a un tipo en este ensamblado desde -// COM, establezca el atributo ComVisible en true en este tipo. -[assembly: ComVisible(false)] - -// El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM. -[assembly: Guid("1a137938-8a13-48ab-a4c5-360ee31f7a37")] - -// La información de versión de un ensamblado consta de los cuatro valores siguientes: -// -// Versión principal -// Versión secundaria -// Número de compilación -// Revisión -// -// Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión -// utilizando el carácter "*", como se muestra a continuación: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/ClingoSharp.CoreServices/Callbacks/GroundCallback.cs b/src/ClingoSharp.CoreServices/Callbacks/GroundCallback.cs new file mode 100644 index 0000000..cdaab71 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Callbacks/GroundCallback.cs @@ -0,0 +1,20 @@ +using ClingoSharp.CoreServices.Enums; +using ClingoSharp.CoreServices.Types; +using System; + +namespace ClingoSharp.CoreServices.Callbacks +{ + /// + /// Callback function to implement external functions. + /// If an external function of form @name(parameters) occurs in a logic program, then this function is called with its location, name, parameters, and a callback to inject symbols as arguments.The callback can be called multiple times; all symbols passed are injected. + /// If a (non-recoverable) clingo API function fails in this callback, for example, the symbol callback, the callback must return false. In case of errors not related to clingo, this function can set error and return false to stop grounding with an error. + /// + /// location from which the external function was called + /// name of the called external function + /// arguments of the called external function + /// user data of the callback + /// function to inject symbols + /// user data for the symbol callback (must be passed untouched) + /// true if the function is success, false otherwise + public delegate bool GroundCallback(Location location, string name, Symbol[] arguments, IntPtr data, SymbolCallback callback, IntPtr callbackData); +} diff --git a/src/ClingoSharp.CoreServices/Callbacks/LoggerCallback.cs b/src/ClingoSharp.CoreServices/Callbacks/LoggerCallback.cs new file mode 100644 index 0000000..589361e --- /dev/null +++ b/src/ClingoSharp.CoreServices/Callbacks/LoggerCallback.cs @@ -0,0 +1,13 @@ +using ClingoSharp.CoreServices.Enums; +using System; + +namespace ClingoSharp.CoreServices.Callbacks +{ + /// + /// Callback to intercept warning messages. + /// + /// associated warning code + /// warning message + /// user data for callback + public delegate void LoggerCallback(WarningCode code, string message, IntPtr data); +} diff --git a/src/ClingoSharp.CoreServices/Callbacks/SymbolCallback.cs b/src/ClingoSharp.CoreServices/Callbacks/SymbolCallback.cs new file mode 100644 index 0000000..3b25713 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Callbacks/SymbolCallback.cs @@ -0,0 +1,13 @@ +using ClingoSharp.CoreServices.Types; +using System; + +namespace ClingoSharp.CoreServices.Callbacks +{ + /// + /// Callback function to inject symbols + /// + /// array of symbols + /// user data of the callback + /// true if the function is success, false otherwise + public delegate bool SymbolCallback(Symbol[] symbols, IntPtr data); +} diff --git a/src/ClingoSharp.CoreServices/ClingoSharp.CoreServices.csproj b/src/ClingoSharp.CoreServices/ClingoSharp.CoreServices.csproj new file mode 100644 index 0000000..266aeca --- /dev/null +++ b/src/ClingoSharp.CoreServices/ClingoSharp.CoreServices.csproj @@ -0,0 +1,17 @@ + + + + netcoreapp3.1 + 0.0.1 + 0.0.1 + Rafael Alcalde Azpiazu <rafael.alcalde.azpiazu@udc.es> + University of A Coruña + Copyright© Rafael Alcalde Azpiazu - 2019 + ClingoSharp.CoreServices + + + + + + + diff --git a/src/ClingoSharp.CoreServices/Constants.cs b/src/ClingoSharp.CoreServices/Constants.cs new file mode 100644 index 0000000..02368a6 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Constants.cs @@ -0,0 +1,11 @@ +namespace ClingoSharp.CoreServices +{ + /// + /// Represents a set of shared constants + /// + public static class Constants + { + public const string ClingoLib = "clingo"; + public const string NativeWrapper = "ClingoSharp.NativeWrapper"; + } +} diff --git a/src/ClingoSharp.CoreServices/Enums/ErrorCode.cs b/src/ClingoSharp.CoreServices/Enums/ErrorCode.cs new file mode 100644 index 0000000..148a73d --- /dev/null +++ b/src/ClingoSharp.CoreServices/Enums/ErrorCode.cs @@ -0,0 +1,36 @@ +namespace ClingoSharp.CoreServices.Enums +{ + /// + /// Enumeration of error codes. + /// + /// + /// Errors can only be recovered from if explicitly mentioned; most functions do not provide strong exception guarantees. This means that in case of errors associated objects cannot be used further. If such an object has a free function, this function can and should still be called. + /// + public enum ErrorCode + { + /// + /// successful API calls + /// + Success = 0, + + /// + /// errors only detectable at runtime like invalid input + /// + RuntimeError = 1, + + /// + /// wrong usage of the clingo API + /// + LogicError = 2, + + /// + /// memory could not be allocated + /// + BadAlloc = 3, + + /// + /// errors unrelated to clingo + /// + Unknown = 4 + } +} diff --git a/src/ClingoSharp.CoreServices/Enums/ModelType.cs b/src/ClingoSharp.CoreServices/Enums/ModelType.cs new file mode 100644 index 0000000..eab4e50 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Enums/ModelType.cs @@ -0,0 +1,23 @@ +namespace ClingoSharp.CoreServices.Enums +{ + /// + /// Enumeration for the different model types. + /// + public enum ModelType + { + /// + /// The model represents a stable model + /// + StableModel = 0, + + /// + /// The model represents a set of brave consequences + /// + BraveConsequences = 1, + + /// + /// The model represents a set of cautious consequences + /// + CautiousConsequences = 2 + } +} diff --git a/src/ClingoSharp.CoreServices/Enums/ShowType.cs b/src/ClingoSharp.CoreServices/Enums/ShowType.cs new file mode 100644 index 0000000..0c86588 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Enums/ShowType.cs @@ -0,0 +1,41 @@ +using System; + +namespace ClingoSharp.CoreServices.Enums +{ + /// + /// Enumeration of bit flags to select symbols in models + /// + [Flags] + public enum ShowType + { + /// + /// Select CSP assignments + /// + CSP = 1, + + /// + /// Select shown atoms and terms + /// + Shown = 2, + + /// + /// Select all atoms + /// + Atoms = 4, + + /// + /// Select all terms + /// + Terms = 8, + + /// + /// Select everything + /// + All = 15, + + /// + /// Select false instead of true atoms () or terms (). + /// + Complement = 16 + } +} diff --git a/src/ClingoSharp.CoreServices/Enums/SolveEventType.cs b/src/ClingoSharp.CoreServices/Enums/SolveEventType.cs new file mode 100644 index 0000000..b62cf20 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Enums/SolveEventType.cs @@ -0,0 +1,23 @@ +namespace ClingoSharp.CoreServices.Enums +{ + /// + /// Enumeration of solve events + /// + public enum SolveEventType + { + /// + /// Issued if a model is found + /// + Model = 0, + + /// + /// Issued when the statistics can be updated + /// + Statistics = 1, + + /// + /// Issued if the search has completed + /// + Finish = 2 + } +} diff --git a/src/ClingoSharp.CoreServices/Enums/SolveMode.cs b/src/ClingoSharp.CoreServices/Enums/SolveMode.cs new file mode 100644 index 0000000..4a4e95e --- /dev/null +++ b/src/ClingoSharp.CoreServices/Enums/SolveMode.cs @@ -0,0 +1,22 @@ + +using System; + +namespace ClingoSharp.CoreServices.Enums +{ + /// + /// Enumeration of solve modes. + /// + [Flags] + public enum SolveMode + { + /// + /// Enable non-blocking search + /// + Async = 1, + + /// + /// Yield models in calls to clingo_solve_handle_model + /// + Yield = 2 + } +} diff --git a/src/ClingoSharp.CoreServices/Enums/SolveResult.cs b/src/ClingoSharp.CoreServices/Enums/SolveResult.cs new file mode 100644 index 0000000..987b2e3 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Enums/SolveResult.cs @@ -0,0 +1,35 @@ +using ClingoSharp.CoreServices.Interfaces.Modules; +using System; + +namespace ClingoSharp.CoreServices.Enums +{ + /// + /// Enumeration of bit masks for solve call results. + /// + /// + /// Neither nor is set if the search is interrupted and no model was found. + /// + [Flags] + public enum SolveResult + { + /// + /// The last solve call found a solution + /// + Satisfiable = 1, + + /// + /// The last solve call did not find a solution + /// + Unsatisfiable = 2, + + /// + /// The last solve call completely exhausted the search space + /// + Exhausted = 4, + + /// + /// The last solve call was interrupted + /// + Interrupted = 8 + } +} diff --git a/src/ClingoSharp.CoreServices/Enums/SymbolType.cs b/src/ClingoSharp.CoreServices/Enums/SymbolType.cs new file mode 100644 index 0000000..585305e --- /dev/null +++ b/src/ClingoSharp.CoreServices/Enums/SymbolType.cs @@ -0,0 +1,33 @@ +namespace ClingoSharp.CoreServices.Enums +{ + /// + /// Enumeration of available symbol types + /// + public enum SymbolType + { + /// + /// the #inf symbol + /// + Infimum = 0, + + /// + /// a numeric symbol, e.g., 1 + /// + Number = 1, + + /// + /// a numeric symbol, e.g., "a" + /// + String = 4, + + /// + /// a function symbol, e.g., c, (1, "a"), or f(1,"a") + /// + Function = 5, + + /// + /// the #sup symbol + /// + Supremum = 7 + } +} diff --git a/src/ClingoSharp.CoreServices/Enums/TruthValueType.cs b/src/ClingoSharp.CoreServices/Enums/TruthValueType.cs new file mode 100644 index 0000000..f2afbee --- /dev/null +++ b/src/ClingoSharp.CoreServices/Enums/TruthValueType.cs @@ -0,0 +1,15 @@ +namespace ClingoSharp.CoreServices.Enums +{ + /// + /// Represents three-valued truth values + /// + public enum TruthValueType + { + /// + /// no truth value + /// + Free, + True, + False + } +} diff --git a/src/ClingoSharp.CoreServices/Enums/WarningCode.cs b/src/ClingoSharp.CoreServices/Enums/WarningCode.cs new file mode 100644 index 0000000..b74c110 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Enums/WarningCode.cs @@ -0,0 +1,43 @@ +namespace ClingoSharp.CoreServices.Enums +{ + /// + /// Enumeration of warning codes + /// + public enum WarningCode + { + /// + /// undefined arithmetic operation or weight of aggregate + /// + OperationUndefined = 0, + + /// + /// to report multiple errors; a corresponding runtime error is raised later + /// + RuntimeError = 1, + + /// + /// undefined atom in program + /// + AtomUndefined = 2, + + /// + /// same file included multiple times + /// + FileIncluded = 3, + + /// + /// CSP variable with unbounded domain + /// + VariableUnbounded = 4, + + /// + /// global variable in tuple of aggregate element + /// + GlobalVariable = 5, + + /// + /// other kinds of warnings + /// + Other = 6 + } +} diff --git a/src/ClingoSharp.CoreServices/EventHandlers/SolveEventHandler.cs b/src/ClingoSharp.CoreServices/EventHandlers/SolveEventHandler.cs new file mode 100644 index 0000000..a538ee5 --- /dev/null +++ b/src/ClingoSharp.CoreServices/EventHandlers/SolveEventHandler.cs @@ -0,0 +1,19 @@ +using ClingoSharp.CoreServices.Enums; +using System; + +namespace ClingoSharp.CoreServices.EventHandlers +{ + /// + /// Callback function called during search to notify when the search is finished or a model is ready. + /// If a(non-recoverable) clingo API function fails in this callback, it must return false. In case of errors not related to clingo, set error code clingo_error_unknown and return false to stop solving with an error. + /// The event is either a pointer to a model, a pointer to two statistics objects (per step and accumulated statistics), or a solve result. + /// + /// + /// If the search is finished, the model is null. + /// + /// the current event + /// user data of the callback + /// can be set to false to stop solving + /// whether the call was successful + public delegate bool SolveEventHandler(SolveEventType type, IntPtr eventData, out bool goon); +} diff --git a/src/ClingoSharp.CoreServices/Interfaces/IClingoContext.cs b/src/ClingoSharp.CoreServices/Interfaces/IClingoContext.cs new file mode 100644 index 0000000..a276a65 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Interfaces/IClingoContext.cs @@ -0,0 +1,24 @@ +using System; + +namespace ClingoSharp.CoreServices.Interfaces +{ + /// + /// This interface defines the main functions to get a implementation of clingo module + /// + internal interface IClingoContext + { + /// + /// Gets a implementation module of a any type + /// + /// The type of the module to find the implementation. It must be a subtype of + /// A class that is the implementation of that module. + IClingoModule GetModule(Type moduleType); + + /// + /// Gets a implementation module of a any type + /// + /// The type of the module to find the implementation. + /// A class that is the implementation of that module. + T GetModule() where T : IClingoModule; + } +} diff --git a/src/ClingoSharp.CoreServices/Interfaces/IClingoModule.cs b/src/ClingoSharp.CoreServices/Interfaces/IClingoModule.cs new file mode 100644 index 0000000..5670945 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Interfaces/IClingoModule.cs @@ -0,0 +1,7 @@ +namespace ClingoSharp.CoreServices.Interfaces +{ + /// + /// Main interface that represents a module object + /// + public interface IClingoModule { } +} diff --git a/src/ClingoSharp.CoreServices/Interfaces/IClingoObject.cs b/src/ClingoSharp.CoreServices/Interfaces/IClingoObject.cs new file mode 100644 index 0000000..fffc860 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Interfaces/IClingoObject.cs @@ -0,0 +1,7 @@ +namespace ClingoSharp.CoreServices.Interfaces +{ + /// + /// Main interface that represents a clingo type object + /// + public interface IClingoObject { } +} diff --git a/src/ClingoSharp.CoreServices/Interfaces/Modules/IControlModule.cs b/src/ClingoSharp.CoreServices/Interfaces/Modules/IControlModule.cs new file mode 100644 index 0000000..7254625 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Interfaces/Modules/IControlModule.cs @@ -0,0 +1,108 @@ +using ClingoSharp.CoreServices.Callbacks; +using ClingoSharp.CoreServices.Enums; +using ClingoSharp.CoreServices.EventHandlers; +using ClingoSharp.CoreServices.Types; +using System; + +namespace ClingoSharp.CoreServices.Interfaces.Modules +{ + /// + /// Functions to control the grounding and solving process. + /// + public interface IControlModule : Interfaces.IClingoModule + { + #region Functions + + /// + /// Creates a new control object. + /// + /// An array of command line arguments + /// callback functions for warnings and info messages + /// maximum number of times the logger callback is called + /// resulting control object + /// true if the function is success and false otherwise + bool New(string[] arguments, LoggerCallback logger, uint messageLimit, out Control control); + + /// + /// Frees a control object created with + /// + /// a control pointer + void Free(Control control); + + #endregion + + #region Grounding Functions + + /// + /// Extend the logic program with the given non-ground logic program in string form. + /// This function puts the given program into a block of form: #program name(parameters). + /// After extending the logic program, the corresponding program parts are typically grounded with + /// + /// a control ponter + /// name of the program block + /// string array of parameters of the program block + /// string representation of the program + /// true if the function is success and false otherwise + bool Add(Control control, string name, string[] parameters, string program); + + /// + /// Ground the selected parts of the current (non-ground) logic program. + /// After grounding, logic programs can be solved with . + /// + /// Parts of a logic program without an explicit #program specification are by default put into a program called base without arguments. + /// + /// + /// a control ponter + /// array of parts to ground + /// callback to implement external functions + /// true if the function is success and false otherwise + bool Ground(Control control, Part[] parts, GroundCallback callback); + + #endregion + + #region Solving Functions + + /// + /// Solve the currently grounded logic program enumerating its models. + /// + /// a control ponter + /// configures the search mode + /// array of assumptions to solve under + /// the event handler to register + /// handle to the current search to enumerate models + /// true if the function is success and false otherwise + bool Solve(Control control, SolveMode mode, Literal[] assumptions, SolveEventHandler callback, out SolveHandle handle); + + #endregion + + #region Program Inspection Functions + + /// + /// Return the symbol for a constant definition of form: #const name = symbol. + /// + /// the target + /// the name of the constant + /// the resulting symbol + /// true if the function is success and false otherwise + bool GetConst(Control control, string name, out Symbol symbol); + + /// + /// Check if there is a constant definition for the given constant. + /// + /// the target + /// the name of the constant + /// whether a matching constant definition exists + /// true if the function is success and false otherwise + bool HasConst(Control control, string name, out bool exists); + + /// + /// Get an object to inspect symbolic atoms (the relevant Herbrand base) used for grounding + /// + /// the target + /// the symbolic atoms object + /// true if the function is success and false otherwise + bool GetSymbolicAtoms(Control control, out SymbolicAtoms symbolicAtoms); + + #endregion + } +} diff --git a/src/ClingoSharp.CoreServices/Interfaces/Modules/IMainModule.cs b/src/ClingoSharp.CoreServices/Interfaces/Modules/IMainModule.cs new file mode 100644 index 0000000..d8296b4 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Interfaces/Modules/IMainModule.cs @@ -0,0 +1,28 @@ +using ClingoSharp.CoreServices.Enums; + +namespace ClingoSharp.CoreServices.Interfaces.Modules +{ + /// + /// Functions used throughout all modules and version information + /// + public interface IMainModule : IClingoModule + { + /// + /// Obtains the clingo version as string + /// + /// A string in format mayor.minor.revision + string GetVersion(); + + /// + /// Gets the last error code set by a clingo API call + /// + /// A enumeration + ErrorCode GetErrorCode(); + + /// + /// Gets the last error message set if an API call fails. + /// + /// An error message or null + string GetErrorMessage(); + } +} diff --git a/src/ClingoSharp.CoreServices/Interfaces/Modules/IModelModule.cs b/src/ClingoSharp.CoreServices/Interfaces/Modules/IModelModule.cs new file mode 100644 index 0000000..f0e1fa3 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Interfaces/Modules/IModelModule.cs @@ -0,0 +1,125 @@ +using ClingoSharp.CoreServices.Enums; +using ClingoSharp.CoreServices.Types; + +namespace ClingoSharp.CoreServices.Interfaces.Modules +{ + /// + /// Inspection of models and a high-level interface to add constraints during solving. + /// + public interface IModelModule : Interfaces.IClingoModule + { + #region Functions for Inspecting Models + + /// + /// Constant time lookup to test whether an atom is in a model. + /// + /// a model object + /// the atom to lookup + /// whether the atom is contained + /// true if the function is success, false otherwise + bool Contains(Model model, Symbol atom, out bool contained); + + /// + /// Add symbols to the model. + /// + /// a model object + /// the symbols to add + /// true if the function is success, false otherwise + bool Extends(Model model, Symbol[] atoms); + + /// + /// Get the type of the model. + /// + /// a model object + /// the type of the model + /// true if the function is success, false otherwise + bool GetType(Model model, out ModelType type); + + /// + /// Check if a program literal is true in a model. + /// + /// a model object + /// the literal to lookup + /// whether the literal is true + /// true if the function is success, false otherwise + bool IsTrue(Model model, Literal literal, out bool result); + + /// + /// Get the running number of the model. + /// + /// a model object + /// the number of the model + /// true if the function is success, false otherwise + bool GetNumber(Model model, out ulong number); + + /// + /// Whether the optimality of a model has been proven. + /// + /// a model object + /// whether the optimality has been proven + /// true if the function is success, false otherwise + bool IsOptimalityProven(Model model, out bool proven); + + /// + /// Get the id of the solver thread that found the model. + /// + /// a model object + /// the resulting thread id + /// true if the function is success, false otherwise + bool GetThreadId(Model model, out Id id); + + /// + /// Get the cost vector of a model + /// + /// a model object + /// the resulting costs + /// true if the function is success, false otherwise + bool GetCosts(Model model, out long[] costs); + + /// + /// Get the symbols of the selected types in the model. + /// + /// + /// CSP assignments are represented using functions with name $ where the first argument is the name of the CSP variable and the second one its value. + /// + /// a model object + /// which symbols to select + /// the resulting symbols + /// true if the function is success, false otherwise + bool GetSymbols(Model model, ShowType showType, out Symbol[] symbols); + + #endregion + + #region Functions for Adding Clauses + + /// + /// Get the associated solve control object of a model. + /// This object allows for adding clauses during model enumeration. + /// + /// a model object + /// the resulting solve control object + /// true if the function is success, false otherwise + bool GetContext(Model model, out SolveControl context); + + /// + /// Get an object to inspect the symbolic atoms. + /// + /// the target + /// the resulting object + /// true if the function is success, false otherwise + bool GetSymbolicAtoms(SolveControl control, out SymbolicAtoms atoms); + + /// + /// Add a clause that applies to the current solving step during model enumeration. + /// + /// + /// The Theory Propagation module provides a more sophisticated interface to add clauses - even on partial assignments. + /// + /// the target + /// array of literals representing the clause + /// true if the function is success, false otherwise + bool AddClause(SolveControl control, Literal[] clause); + + #endregion + } +} diff --git a/src/ClingoSharp.CoreServices/Interfaces/Modules/ISolveHandleModule.cs b/src/ClingoSharp.CoreServices/Interfaces/Modules/ISolveHandleModule.cs new file mode 100644 index 0000000..ab54ec5 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Interfaces/Modules/ISolveHandleModule.cs @@ -0,0 +1,60 @@ +using ClingoSharp.CoreServices.Enums; +using ClingoSharp.CoreServices.Types; +using System; + +namespace ClingoSharp.CoreServices.Interfaces.Modules +{ + /// + /// Interact with a running search. + /// + public interface ISolveHandleModule : Interfaces.IClingoModule + { + /// + /// Get the next solve result. + /// Blocks until the result is ready. When yielding partial solve results can be obtained, i.e., when a model is ready, the result will be satisfiable but neither the search exhausted nor the optimality proven. + /// + /// a handle object + /// the solve result + /// true if the function is success, false otherwise + bool Get(SolveHandle handle, out SolveResult result); + + /// + /// Wait for the specified amount of time to check if the next result is ready. + /// + /// a handle object + /// the maximum time to wait + /// true if the function is success, false otherwise + void Wait(SolveHandle handle, double timeout, out bool result); + + /// + /// Get the next model (or zero if there are no more models). + /// + /// a handle object + /// the model (it is if there are no more models) + /// true if the function is success, false otherwise + bool Model(SolveHandle handle, out Model model); + + /// + /// Discards the last model and starts the search for the next one. + /// + /// If the search has been started asynchronously, this function continues the search in the background. + /// a handle object + /// true if the function is success, false otherwise + bool Resume(SolveHandle handle); + + /// + /// Stop the running search and block until done. + /// + /// a handle object + /// true if the function is success, false otherwise + bool Cancel(SolveHandle handle); + + /// + /// Stop the running search and block until done. + /// + /// Blocks until the search is stopped (as if an implicit cancel was called before the handle is released). + /// a handle object + /// true if the function is success, false otherwise + bool Close(SolveHandle handle); + } +} diff --git a/src/ClingoSharp.CoreServices/Interfaces/Modules/ISymbolModule.cs b/src/ClingoSharp.CoreServices/Interfaces/Modules/ISymbolModule.cs new file mode 100644 index 0000000..4db12a2 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Interfaces/Modules/ISymbolModule.cs @@ -0,0 +1,224 @@ +using ClingoSharp.CoreServices.Enums; +using ClingoSharp.CoreServices.Types; +using System; + +namespace ClingoSharp.CoreServices.Interfaces.Modules +{ + /// + /// Working with (evaluated) ground terms and related functions. + /// + public interface ISymbolModule : Interfaces.IClingoModule + { + #region Signature Functions + + /// + /// Create a new signature. + /// + /// name of the signature + /// arity of the signature + /// false if the signature has a classical negation sign + /// the resulting signature + /// true if the function is success, false otherwise + bool CreateSignature(string name, uint arity, bool positive, out Signature signature); + + /// + /// Get the name of a signature. + /// + /// the target signature + /// the name of the signature + string GetName(Signature signature); + + /// + /// Get the arity of a signature. + /// + /// the target signature + /// the arity of the signature + uint GetArity(Signature signature); + + /// + /// Whether the signature is positive (is not classically negated). + /// + /// the target signature + /// whether the signature has no sign + bool IsPositive(Signature signature); + + /// + /// Whether the signature is negative (is classically negated). + /// + /// the target signature + /// whether the signature has a sign + bool IsNegative(Signature signature); + + /// + /// Check if two signatures are equal. + /// + /// first signature + /// second signature + /// whether a == b + bool IsEqualTo(Signature signatureA, Signature signatureB); + + /// + /// Check if a signature is less than another signature. + /// + /// Signatures are compared first by sign (unsigned < signed), then by arity, then by name. + /// first signature + /// second signature + /// whether a < b + bool IsLessThan(Signature signatureA, Signature signatureB); + + /// + /// Calculate a hash code of a signature. + /// + /// the target signature + /// the hash code of the signature + UIntPtr GetHash(Signature signature); + + #endregion + + #region Symbol Construction + + /// + /// Construct a symbol representing a number. + /// + /// the number + /// the resulting symbol + void CreateNumber(int number, out Symbol symbol); + + /// + /// Construct a symbol representing #sup. + /// + /// the resulting symbol + void CreateSupremum(out Symbol symbol); + + /// + /// Construct a symbol representing #inf. + /// + /// the resulting symbol + void CreateInfimum(out Symbol symbol); + + /// + /// Construct a symbol representing a string. + /// + /// the string + /// the resulting symbol + /// true if the function is success, false otherwise + bool CreateString(string value, out Symbol symbol); + + /// + /// Construct a symbol representing an id. + /// + /// This is just a shortcut for with empty arguments. + /// the name + /// whether the symbol has a classical negation sign + /// the resulting symbol + /// true if the function is success, false otherwise + bool CreateId(string name, bool positive, out Symbol symbol); + + /// + /// Construct a symbol representing a function or tuple. + /// + /// the name of the function + /// the arguments of the function + /// whether the symbol has a classical negation sign + /// the resulting symbol + /// true if the function is success, false otherwise + bool CreateFunction(string name, Symbol[] arguments, bool positive, out Symbol symbol); + + #endregion + + #region Symbol Inspection + + /// + /// Get the number of a symbol. + /// + /// the target symbol + /// the resulting number + /// true if the function is success, false otherwise + bool GetNumber(Symbol symbol, out int number); + + /// + /// Get the name of a symbol. + /// + /// the target symbol + /// the resulting name + /// true if the function is success, false otherwise + bool GetName(Symbol symbol, out string name); + + /// + /// Get the string of a symbol. + /// + /// the target symbol + /// the resulting string + /// true if the function is success, false otherwise + bool GetString(Symbol symbol, out string value); + + /// + /// Check if a function is positive (does not have a sign). + /// + /// the target symbol + /// the result + /// true if the function is success, false otherwise + bool IsPositive(Symbol symbol, out bool positive); + + /// + /// Check if a function is negative (has a sign). + /// + /// the target symbol + /// the result + /// true if the function is success, false otherwise + bool IsNegative(Symbol symbol, out bool negative); + + /// + /// Get the arguments of a symbol. + /// + /// the target symbol + /// the resulting arguments + /// true if the function is success, false otherwise + bool GetArguments(Symbol symbol, out Symbol[] arguments); + + /// + /// Get the type of a symbol. + /// + /// the target symbol + /// the type of the symbol + SymbolType GetType(Symbol symbol); + + /// + /// Get the string representation of a symbol. + /// + /// the target symbol + /// the resulting string + /// true if the function is success, false otherwise + bool ToString(Symbol symbol, out string value); + + #endregion + + #region Symbol Comparasion + + /// + /// Check if two symbols are equal. + /// + /// first symbol + /// second symbol + /// whether a == b + bool IsEqualTo(Symbol symbolA, Symbol symbolB); + + /// + /// Check if a symbol is less than another symbol. + /// Symbols are first compared by type. If the types are equal, the values are compared (where strings are compared using strcmp). Functions are first compared by signature and then lexicographically by arguments. + /// + /// first symbol + /// second symbol + /// whether a < b + bool IsLessThan(Symbol symbolA, Symbol symbolB); + + /// + /// Calculate a hash code of a symbol. + /// + /// the target symbol + /// the hash code of the symbol + UIntPtr GetHash(Symbol symbol); + + #endregion + } +} diff --git a/src/ClingoSharp.CoreServices/Interfaces/Modules/ISymbolicAtomsModule.cs b/src/ClingoSharp.CoreServices/Interfaces/Modules/ISymbolicAtomsModule.cs new file mode 100644 index 0000000..7dc5a6b --- /dev/null +++ b/src/ClingoSharp.CoreServices/Interfaces/Modules/ISymbolicAtomsModule.cs @@ -0,0 +1,122 @@ +using ClingoSharp.CoreServices.Types; +using System; + +namespace ClingoSharp.CoreServices.Interfaces.Modules +{ + /// + /// Inspection of atoms occurring in ground logic programs + /// + public interface ISymbolicAtomsModule : Interfaces.IClingoModule + { + /// + /// Get the number of different atoms occurring in a logic program. + /// + /// the target + /// the number of atoms + /// true if the function is success, false otherwise + bool GetSize(SymbolicAtoms atoms, out UIntPtr size); + + /// + /// Get a forward iterator to the beginning of the sequence of all symbolic atoms optionally restricted to a given signature. + /// + /// the target + /// optional signature + /// the resulting iterator + /// true if the function is success, false otherwise + bool GetBeginIterator(SymbolicAtoms atoms, Signature signature, out SymbolicAtomIterator iterator); + + /// + /// Iterator pointing to the end of the sequence of symbolic atoms. + /// + /// the target + /// the resulting iterator + /// true if the function is success, false otherwise + bool GetEndIterator(SymbolicAtoms atoms, out SymbolicAtomIterator iterator); + + /// + /// Find a symbolic atom given its symbolic representation. + /// + /// the target + /// the symbol to lookup + /// iterator pointing to the symbolic atom or to the end of the sequence if no corresponding atom is found + /// true if the function is success, false otherwise + bool Find(SymbolicAtoms atoms, Symbol symbol, out SymbolicAtomIterator iterator); + + /// + /// Check if two iterators point to the same element (or end of the sequence). + /// + /// the target + /// the first iterator + /// the second iterator + /// whether the two iterators are equal + /// true if the function is success, false otherwise + bool IteratorIsEqualTo(SymbolicAtoms atoms, SymbolicAtomIterator iteratorA, SymbolicAtomIterator iteratorB, out bool equal); + + /// + /// Check whether an atom is external. + /// An atom is external if it has been defined using an external directive and has not been released or defined by a rule. + /// + /// the target + /// iterator to the atom + /// whether the atom is a external + /// true if the function is success, false otherwise + bool GetSymbol(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out Symbol symbol); + + /// + /// Check whether an atom is a fact. + /// + /// + /// This does not determine if an atom is a cautious consequence. The grounding or solving component's simplifications can only detect this in some cases. + /// + /// the target + /// iterator to the atom + /// whether the atom is a fact + /// true if the function is success, false otherwise + bool IsFact(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out bool fact); + + /// + /// Get the symbolic representation of an atom. + /// + /// the target + /// iterator to the atom + /// the resulting symbol + /// true if the function is success, false otherwise + bool IsExternal(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out bool external); + + /// + /// Returns the (numeric) aspif literal corresponding to the given symbolic atom. + /// Such a literal can be mapped to a solver literal (see the Theory Propagation module) or be used in rules in aspif format (see the Program Building module). + /// + /// the target + /// iterator to the atom + /// the associated literal + /// true if the function is success, false otherwise + bool GetLiteral(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out Literal literal); + + /// + /// Get the predicate signatures occurring in a logic program. + /// + /// the target + /// the resulting signatures + /// true if the function is success, false otherwise + bool GetSignatures(SymbolicAtoms atoms, out Signature[] signatures); + + /// + /// Get an iterator to the next element in the sequence of symbolic atoms. + /// + /// the target + /// the current iterator + /// the succeeding iterator + /// true if the function is success, false otherwise + bool GetNext(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out SymbolicAtomIterator next); + + /// + /// Check whether the given iterator points to some element with the sequence of symbolic atoms or to the end of the sequence. + /// + /// the target + /// the iterator + /// whether the iterator points to some element within the sequence + /// true if the function is success, false otherwise + bool IsValid(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out bool valid); + } +} diff --git a/src/ClingoSharp.CoreServices/Shared/ClingoContext.cs b/src/ClingoSharp.CoreServices/Shared/ClingoContext.cs new file mode 100644 index 0000000..0020ea5 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Shared/ClingoContext.cs @@ -0,0 +1,84 @@ +using ClingoSharp.CoreServices.Interfaces; +using System; +using System.IO; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Runtime.Loader; + +namespace ClingoSharp.CoreServices.Shared +{ + internal sealed class ClingoContext : AssemblyLoadContext, IClingoContext + { + #region Assembly load context methods + + protected override Assembly Load(AssemblyName assemblyName) + { + if (assemblyName.Name.Equals(Constants.NativeWrapper)) + { + // Gets assembly path file + var assemblyPath = new Uri(typeof(ClingoContext).Assembly.CodeBase).LocalPath; + // Gets assembly folder + var assemblyFolder = Path.GetDirectoryName(assemblyPath); + + return LoadFromAssemblyPath(Path.Combine(assemblyFolder, $"{Constants.NativeWrapper}.dll")); + } + + return null; + } + + protected override IntPtr LoadUnmanagedDll(string unmanagedDllName) + { + if (unmanagedDllName.Contains(Constants.ClingoLib)) + { + return LoadNativeClingoLibrary(); + } + + return base.LoadUnmanagedDll(unmanagedDllName); + } + + private IntPtr LoadNativeClingoLibrary() + { + // Gets assembly path file + var assemblyPath = new Uri(typeof(ClingoContext).Assembly.CodeBase).LocalPath; + // Gets assembly folder + var assemblyFolder = Path.GetDirectoryName(assemblyPath); + // Gets arch process + string path = Environment.Is64BitProcess ? "lib" : "lib32"; + // Gets extension name + string extension; + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + extension = "dll"; + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + extension = "dylib"; + } + else + { + extension = "so"; + } + + // Loads clingo library + return LoadUnmanagedDllFromPath(Path.Combine(assemblyFolder, path, $"clingo.{extension}")); + } + + #endregion + + #region Clingo context methods + + public IClingoModule GetModule(Type moduleType) + { + var nativeWrapperAssembly = LoadFromAssemblyName(new AssemblyName(Constants.NativeWrapper)); + var type = nativeWrapperAssembly.GetType($"{Constants.NativeWrapper}.{moduleType.Name.Substring(1)}Impl", true); + return (IClingoModule)Activator.CreateInstance(type); + } + + public T GetModule() where T : IClingoModule + { + return (T)GetModule(typeof(T)); + } + + #endregion + } +} diff --git a/src/ClingoSharp.CoreServices/Shared/Repository.cs b/src/ClingoSharp.CoreServices/Shared/Repository.cs new file mode 100644 index 0000000..540e7e4 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Shared/Repository.cs @@ -0,0 +1,54 @@ +using ClingoSharp.CoreServices.Interfaces; +using ClingoSharp.CoreServices.Shared; +using System; + +namespace ClingoSharp.CoreServices +{ + /// + /// This class represents a repository of clingo modules + /// + public static class Repository + { + #region Attributes + + private static readonly IClingoContext m_clingoContext; + + #endregion + + #region Constructors + + /// + /// Loads the main context + /// + static Repository() + { + m_clingoContext = new ClingoContext(); + } + + #endregion + + #region Class Methods + + /// + /// Gets a clingo module + /// + /// A module type + /// The module implementation + public static T GetModule() where T : IClingoModule + { + return m_clingoContext.GetModule(); + } + + /// + /// Gets a clingo module + /// + /// A module type + /// The module implementation + public static IClingoModule GetModule(Type moduleType) + { + return m_clingoContext.GetModule(moduleType); + } + + #endregion + } +} diff --git a/src/ClingoSharp.CoreServices/Types/Atom.cs b/src/ClingoSharp.CoreServices/Types/Atom.cs new file mode 100644 index 0000000..a2d68d5 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/Atom.cs @@ -0,0 +1,30 @@ +using ClingoSharp.CoreServices.Interfaces; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Unsigned integer type used for aspif atoms. + /// + public sealed class Atom : IClingoObject + { + public uint Value { get; set; } + + /// + /// Convert a atom object into the basic type. + /// + /// + public static implicit operator uint(Atom atom) + { + return atom.Value; + } + + /// + /// Convert a basic type into a atom object. + /// + /// + public static implicit operator Atom(uint value) + { + return new Atom() { Value = value }; + } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/Control.cs b/src/ClingoSharp.CoreServices/Types/Control.cs new file mode 100644 index 0000000..c1f6e27 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/Control.cs @@ -0,0 +1,13 @@ +using ClingoSharp.CoreServices.Interfaces; +using System; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Control object holding grounding and solving state + /// + public sealed class Control : IClingoObject + { + public IntPtr Object { get; set; } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/Id.cs b/src/ClingoSharp.CoreServices/Types/Id.cs new file mode 100644 index 0000000..3a5207e --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/Id.cs @@ -0,0 +1,30 @@ +using ClingoSharp.CoreServices.Interfaces; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Unsigned integer type used in various places. + /// + public sealed class Id : IClingoObject + { + public uint Value { get; set; } + + /// + /// Convert a id object into the basic type. + /// + /// + public static implicit operator uint(Id id) + { + return id.Value; + } + + /// + /// Convert a basic type into a id object. + /// + /// + public static implicit operator Id(uint value) + { + return new Id() { Value = value }; + } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/Literal.cs b/src/ClingoSharp.CoreServices/Types/Literal.cs new file mode 100644 index 0000000..bb11dcc --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/Literal.cs @@ -0,0 +1,30 @@ +using ClingoSharp.CoreServices.Interfaces; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Signed integer type used for aspif and solver literals. + /// + public sealed class Literal : IClingoObject + { + public int Value { get; set; } + + /// + /// Convert a literal object into the basic type. + /// + /// + public static implicit operator int(Literal literal) + { + return literal.Value; + } + + /// + /// Convert a basic type into a literal object. + /// + /// + public static implicit operator Literal(int value) + { + return new Literal() { Value = value }; + } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/Location.cs b/src/ClingoSharp.CoreServices/Types/Location.cs new file mode 100644 index 0000000..93c8740 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/Location.cs @@ -0,0 +1,43 @@ +using ClingoSharp.CoreServices.Interfaces; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Represents a source code location marking its beginnig and end. + /// + /// + /// Not all locations refer to physical files. By convention, such locations use a name put in angular brackets as filename. + /// + public sealed class Location : IClingoObject + { + /// + /// the file where the location begins + /// + public string BeginFile { get; set; } + + /// + /// the file where the location ends + /// + public string EndFile { get; set; } + + /// + /// the line where the location begins + /// + public uint BeginLine { get; set; } + + /// + /// the line where the location ends + /// + public uint BeginColumn { get; set; } + + /// + /// the column where the location begins + /// + public uint EndLine { get; set; } + + /// + /// the column where the location ends + /// + public uint EndColumn { get; set; } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/Model.cs b/src/ClingoSharp.CoreServices/Types/Model.cs new file mode 100644 index 0000000..8ad3653 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/Model.cs @@ -0,0 +1,13 @@ +using ClingoSharp.CoreServices.Interfaces; +using System; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Object representing a model. + /// + public sealed class Model : IClingoObject + { + public IntPtr Object { get; set; } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/Part.cs b/src/ClingoSharp.CoreServices/Types/Part.cs new file mode 100644 index 0000000..c10dd62 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/Part.cs @@ -0,0 +1,25 @@ +using ClingoSharp.CoreServices.Interfaces; +using ClingoSharp.CoreServices.Interfaces.Modules; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Struct used to specify the program parts that have to be grounded. + /// Programs may be structured into parts, which can be grounded independently with . Program parts are mainly interesting for incremental grounding and multi-shot solving. For single-shot solving, program parts are not needed. + /// + /// + /// Parts of a logic program without an explicit #program specification are by default put into a program called base without arguments + /// + public sealed class Part : IClingoObject + { + /// + /// name of the program part + /// + public string Name { get; set; } + + /// + /// array of parameters + /// + public Symbol[] Params { get; set; } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/Signature.cs b/src/ClingoSharp.CoreServices/Types/Signature.cs new file mode 100644 index 0000000..cb2f902 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/Signature.cs @@ -0,0 +1,31 @@ +using ClingoSharp.CoreServices.Interfaces; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Represents a predicate signature. + /// Signatures have a name and an arity, and can be positive or negative(to represent classical negation). + /// + public sealed class Signature : IClingoObject + { + public ulong Value { get; set; } + + /// + /// Convert a signature object into the basic type. + /// + /// + public static implicit operator ulong(Signature signature) + { + return signature.Value; + } + + /// + /// Convert a basic type into a signature object. + /// + /// + public static implicit operator Signature(ulong value) + { + return new Signature() { Value = value }; + } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/SolveControl.cs b/src/ClingoSharp.CoreServices/Types/SolveControl.cs new file mode 100644 index 0000000..ded5db2 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/SolveControl.cs @@ -0,0 +1,13 @@ +using ClingoSharp.CoreServices.Interfaces; +using System; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Object to add clauses during search. + /// + public sealed class SolveControl : IClingoObject + { + public IntPtr Object { get; set; } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/SolveHandle.cs b/src/ClingoSharp.CoreServices/Types/SolveHandle.cs new file mode 100644 index 0000000..305b105 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/SolveHandle.cs @@ -0,0 +1,13 @@ +using ClingoSharp.CoreServices.Interfaces; +using System; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Search handle to a solve call. + /// + public sealed class SolveHandle : IClingoObject + { + public IntPtr Object { get; set; } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/Symbol.cs b/src/ClingoSharp.CoreServices/Types/Symbol.cs new file mode 100644 index 0000000..4eac05d --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/Symbol.cs @@ -0,0 +1,31 @@ +using ClingoSharp.CoreServices.Interfaces; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Represents a symbol. + /// This includes numbers, strings, functions (including constants when arguments are empty and tuples when the name is empty), #inf and #sup. + /// + public sealed class Symbol : IClingoObject + { + public ulong Value { get; set; } + + /// + /// Convert a symbol object into the basic type. + /// + /// + public static implicit operator ulong(Symbol symbol) + { + return symbol.Value; + } + + /// + /// Convert a basic type into a symbol object. + /// + /// + public static implicit operator Symbol(ulong value) + { + return new Symbol() { Value = value }; + } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/SymbolicAtomIterator.cs b/src/ClingoSharp.CoreServices/Types/SymbolicAtomIterator.cs new file mode 100644 index 0000000..fc1f057 --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/SymbolicAtomIterator.cs @@ -0,0 +1,35 @@ +using ClingoSharp.CoreServices.Interfaces; +using ClingoSharp.CoreServices.Interfaces.Modules; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Object to iterate over symbolic atoms. + /// Such an iterator either points to a symbolic atom within a sequence of symbolic atoms or to the end of the sequence. + /// + /// + /// Iterators are valid as long as the underlying sequence is not modified. Operations that can change this sequence are , clingo_control_cleanup(), and functions that modify the underlying non-ground program. + /// + public sealed class SymbolicAtomIterator : IClingoObject + { + public ulong Value { get; set; } + + /// + /// Convert a symbolic atom iterator object into the basic type. + /// + /// + public static implicit operator ulong(SymbolicAtomIterator iterator) + { + return iterator.Value; + } + + /// + /// Convert a basic type into a symbolic atom iterator object. + /// + /// + public static implicit operator SymbolicAtomIterator(ulong value) + { + return new SymbolicAtomIterator() { Value = value }; + } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/SymbolicAtoms.cs b/src/ClingoSharp.CoreServices/Types/SymbolicAtoms.cs new file mode 100644 index 0000000..f7c248d --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/SymbolicAtoms.cs @@ -0,0 +1,13 @@ +using ClingoSharp.CoreServices.Interfaces; +using System; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Object to inspect symbolic atoms in a program—the relevant Herbrand base gringo uses to instantiate programs. + /// + public sealed class SymbolicAtoms : IClingoObject + { + public IntPtr Object { get; set; } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/TruthValue.cs b/src/ClingoSharp.CoreServices/Types/TruthValue.cs new file mode 100644 index 0000000..5c2740c --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/TruthValue.cs @@ -0,0 +1,31 @@ +using ClingoSharp.CoreServices.Enums; +using ClingoSharp.CoreServices.Interfaces; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Corresponding type to + /// + public sealed class TruthValue : IClingoObject + { + public int Value { get; set; } + + /// + /// Convert a truth value object into the basic type. + /// + /// + public static implicit operator int(TruthValue literal) + { + return literal.Value; + } + + /// + /// Convert a basic type into a truth value object. + /// + /// + public static implicit operator TruthValue(int value) + { + return new TruthValue() { Value = value }; + } + } +} diff --git a/src/ClingoSharp.CoreServices/Types/Weight.cs b/src/ClingoSharp.CoreServices/Types/Weight.cs new file mode 100644 index 0000000..007e2ce --- /dev/null +++ b/src/ClingoSharp.CoreServices/Types/Weight.cs @@ -0,0 +1,30 @@ +using ClingoSharp.CoreServices.Interfaces; + +namespace ClingoSharp.CoreServices.Types +{ + /// + /// Signed integer type for weights in sum aggregates and minimize constraints. + /// + public sealed class Weight : IClingoObject + { + public int Value { get; set; } + + /// + /// Convert a weight object into the basic type. + /// + /// + public static implicit operator int(Weight literal) + { + return literal.Value; + } + + /// + /// Convert a basic type into a weight object. + /// + /// + public static implicit operator Weight(int value) + { + return new Weight() { Value = value }; + } + } +} diff --git a/src/ClingoSharp.NativeWrapper/Callbacks/GroundCallback.cs b/src/ClingoSharp.NativeWrapper/Callbacks/GroundCallback.cs new file mode 100644 index 0000000..94ee29d --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/Callbacks/GroundCallback.cs @@ -0,0 +1,7 @@ +using ClingoSharp.NativeWrapper.Types; +using System; + +namespace ClingoSharp.NativeWrapper.Callbacks +{ + internal delegate int clingo_ground_callback(clingo_location[] location, string name, ulong[] arguments, UIntPtr arguments_size, IntPtr data, clingo_symbol_callback symbol_callback, IntPtr symbol_callback_data); +} diff --git a/src/ClingoSharp.NativeWrapper/Callbacks/LoggerCallback.cs b/src/ClingoSharp.NativeWrapper/Callbacks/LoggerCallback.cs new file mode 100644 index 0000000..9357662 --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/Callbacks/LoggerCallback.cs @@ -0,0 +1,7 @@ +using ClingoSharp.NativeWrapper.Enums; +using System; + +namespace ClingoSharp.NativeWrapper.Callbacks +{ + internal delegate void clingo_logger(clingo_warning code, string mesage, IntPtr data); +} diff --git a/src/ClingoSharp.NativeWrapper/Callbacks/SymbolCallback.cs b/src/ClingoSharp.NativeWrapper/Callbacks/SymbolCallback.cs new file mode 100644 index 0000000..b7cc079 --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/Callbacks/SymbolCallback.cs @@ -0,0 +1,6 @@ +using System; + +namespace ClingoSharp.NativeWrapper.Callbacks +{ + internal delegate int clingo_symbol_callback(ulong[] symbols, UIntPtr symbols_size, IntPtr data); +} diff --git a/src/ClingoSharp.NativeWrapper/ClingoSharp.NativeWrapper.csproj b/src/ClingoSharp.NativeWrapper/ClingoSharp.NativeWrapper.csproj new file mode 100644 index 0000000..407e5a8 --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/ClingoSharp.NativeWrapper.csproj @@ -0,0 +1,15 @@ + + + + netcoreapp3.1 + + + + + + + + + + + diff --git a/src/ClingoSharp.NativeWrapper/ControlModuleImpl.cs b/src/ClingoSharp.NativeWrapper/ControlModuleImpl.cs new file mode 100644 index 0000000..3f1777b --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/ControlModuleImpl.cs @@ -0,0 +1,229 @@ +using AutoMapper; +using ClingoSharp.CoreServices; +using ClingoSharp.CoreServices.Callbacks; +using ClingoSharp.CoreServices.Enums; +using ClingoSharp.CoreServices.EventHandlers; +using ClingoSharp.CoreServices.Interfaces.Modules; +using ClingoSharp.CoreServices.Types; +using ClingoSharp.NativeWrapper.Callbacks; +using ClingoSharp.NativeWrapper.Enums; +using ClingoSharp.NativeWrapper.EventHandlers; +using ClingoSharp.NativeWrapper.Types; +using System; +using System.Linq; +using System.Runtime.InteropServices; + +namespace ClingoSharp.NativeWrapper +{ + /// + /// Functions to control the grounding and solving process. + /// + class ControlModuleImpl : IControlModule + { + private readonly IMapper m_mapper; + + #region Constructor + + public ControlModuleImpl() + { + var config = new MapperConfiguration(cfg => + { + cfg.CreateMap() + .ForMember(dest => dest.name, opt => opt.MapFrom(src => src.Name)) + .ForMember(dest => dest.params_list, opt => opt.MapFrom(src => src.Params)) + .ForMember(dest => dest.size, opt => opt.MapFrom(src => new UIntPtr(Convert.ToUInt32(src.Params.Length)))) + .ReverseMap(); + + cfg.CreateMap() + .ForMember(dest => dest.begin_file, opt => opt.MapFrom(src => src.BeginFile)) + .ForMember(dest => dest.begin_line, opt => opt.MapFrom(src => src.BeginLine)) + .ForMember(dest => dest.begin_column, opt => opt.MapFrom(src => new UIntPtr(Convert.ToUInt32(src.BeginColumn)))) + .ForMember(dest => dest.end_file, opt => opt.MapFrom(src => new UIntPtr(Convert.ToUInt32(src.EndFile)))) + .ForMember(dest => dest.end_line, opt => opt.MapFrom(src => new UIntPtr(Convert.ToUInt32(src.EndLine)))) + .ForMember(dest => dest.end_column, opt => opt.MapFrom(src => new UIntPtr(Convert.ToUInt32(src.EndColumn)))) + .ReverseMap(); + }); + + m_mapper = config.CreateMapper(); + } + + #endregion + + #region Clingo C API Functions + + #region Functions + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_control_new(string[] arguments, UIntPtr arguments_size, clingo_logger logger, IntPtr logger_data, uint message_limit, [Out] IntPtr[] control); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern void clingo_control_free(IntPtr control); + + #endregion + + #region Grounding Functions + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_control_add(IntPtr control, string name, string[] parameters, UIntPtr parameters_size, string program); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_control_ground(IntPtr control, clingo_part[] parts, UIntPtr parts_size, clingo_ground_callback ground_callback, IntPtr ground_callback_data); + + #endregion + + #region Solving Functions + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_control_solve(IntPtr control, clingo_solve_mode mode, int[] assumptions, UIntPtr assumptions_size, clingo_solve_event_callback notify, IntPtr data, [Out] IntPtr[] handle); + + #endregion + + #region Program Inspection Functions + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_control_get_const(IntPtr control, string name, [Out] ulong[] symbol); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_control_has_const(IntPtr control, string name, [Out] bool[] exists); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_control_symbolic_atoms(IntPtr control, [Out] IntPtr[] atoms); + + #endregion + + #endregion + + #region Module implementation + + #region Functions + + public bool New(string[] arguments, LoggerCallback logger, uint messageLimit, out Control control) + { + void clingoLoggerCallback(clingo_warning code, string message, IntPtr data) + { + logger((WarningCode)code, message, data); + } + + UIntPtr argumentsSize = new UIntPtr(Convert.ToUInt32(arguments == null ? 0 : arguments.Length)); + + IntPtr[] controlPtr = new IntPtr[1]; + + var success = clingo_control_new(arguments, argumentsSize, (logger == null) ? null : (clingo_logger)clingoLoggerCallback, IntPtr.Zero, messageLimit, controlPtr); + control = new Control() { Object = controlPtr[0] }; + + return success != 0; + } + + public void Free(Control control) + { + clingo_control_free(control.Object); + } + + #endregion + + #region Grounding Functions + + public bool Add(Control control, string name, string[] parameters, string program) + { + UIntPtr parametersSize = new UIntPtr(Convert.ToUInt32(parameters == null ? 0 : parameters.Length)); + + var success = clingo_control_add(control.Object, name, parameters, parametersSize, program); + + return success != 0; + } + + public bool Ground(Control control, Part[] parts, GroundCallback callback) + { + int clingoGroundCallback(clingo_location[] clingoLocation, string name, ulong[] clingoArguments, UIntPtr arguments_size, IntPtr data, clingo_symbol_callback symbol_callback, IntPtr symbol_callback_data) + { + bool symbolCallback(Symbol[] symbols, IntPtr data) + { + ulong[] clingoSymbols = symbols?.Select(s => (ulong)s).ToArray(); + UIntPtr clingoSymbolsSize = new UIntPtr(Convert.ToUInt32(symbols == null ? 0 : symbols.Length)); + + var success = symbol_callback(clingoSymbols, new UIntPtr(Convert.ToUInt32(symbols.Length)), data); + + return success != 0; + } + + Location location = clingoLocation == null ? null : m_mapper.Map(clingoLocation[0]); + + Symbol[] arguments = clingoArguments?.Select(arg => (Symbol)arg).ToArray(); + + var success = callback(location, name, arguments, data, symbolCallback, symbol_callback_data); + + return success ? 1 : 0; + } + + clingo_part[] clingoParts = parts == null ? null : m_mapper.Map(parts); + UIntPtr clingoPartsSize = new UIntPtr(Convert.ToUInt32(parts == null ? 0 : parts.Length)); + + var success = clingo_control_ground(control.Object, clingoParts, clingoPartsSize, (callback == null) ? null : (clingo_ground_callback)clingoGroundCallback, IntPtr.Zero); + + return success != 0; + } + + #endregion + + #region Solving Functions + + public bool Solve(Control control, SolveMode mode, Literal[] assumptions, SolveEventHandler callback, out SolveHandle handler) + { + int clingoSolveEventCallback(clingo_solve_event_type type, IntPtr eventData, IntPtr data, out bool[] goon) + { + SolveEventType solveEventType = (SolveEventType)type; + + var success = callback(solveEventType, eventData, out bool doneValue); + + goon = new bool[1] { doneValue }; + + return success ? 1 : 0; + } + + clingo_solve_mode cligoSolveMode = (clingo_solve_mode)mode; + + int[] clingoAssumptions = assumptions?.Select(ass => (int)ass).ToArray(); + UIntPtr clingoAssumptionsSize = new UIntPtr(Convert.ToUInt32(assumptions == null ? 0 : assumptions.Length)); + + IntPtr[] handlerPtr = new IntPtr[1]; + + var success = clingo_control_solve(control.Object, cligoSolveMode, clingoAssumptions, clingoAssumptionsSize, (callback == null) ? null : (clingo_solve_event_callback)clingoSolveEventCallback, IntPtr.Zero, handlerPtr); + + handler = new SolveHandle() { Object = handlerPtr[0] }; + + return success != 0; + } + + #endregion + + #region Program Inspection Functions + + public bool GetConst(Control control, string name, out Symbol symbol) + { + ulong[] symbolPtr = new ulong[1]; + var success = clingo_control_get_const(control.Object, name, symbolPtr); + symbol = symbolPtr[0]; + return success != 0; + } + + public bool HasConst(Control control, string name, out bool exists) + { + bool[] existsPtr = new bool[1]; + var success = clingo_control_has_const(control.Object, name, existsPtr); + exists = existsPtr[0]; + return success != 0; + } + + public bool GetSymbolicAtoms(Control control, out SymbolicAtoms symbolicAtoms) + { + IntPtr[] symbolicAtomsPtr = new IntPtr[1]; + var success = clingo_control_symbolic_atoms(control.Object, symbolicAtomsPtr); + symbolicAtoms = new SymbolicAtoms() { Object = symbolicAtomsPtr[0] }; + return success != 0; + } + + #endregion + + #endregion + } +} diff --git a/src/ClingoSharp.NativeWrapper/Enums/ErrorCode.cs b/src/ClingoSharp.NativeWrapper/Enums/ErrorCode.cs new file mode 100644 index 0000000..0de0266 --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/Enums/ErrorCode.cs @@ -0,0 +1,11 @@ +namespace ClingoSharp.NativeWrapper.Enums +{ + internal enum clingo_error + { + clingo_error_success = 0, + clingo_error_runtime = 1, + clingo_error_logic = 2, + clingo_error_bad_alloc = 3, + clingo_error_unknown = 4 + } +} diff --git a/src/ClingoSharp.NativeWrapper/Enums/ModelType.cs b/src/ClingoSharp.NativeWrapper/Enums/ModelType.cs new file mode 100644 index 0000000..1dee28f --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/Enums/ModelType.cs @@ -0,0 +1,8 @@ +namespace ClingoSharp.NativeWrapper.Enums +{ + internal enum clingo_model_type { + clingo_model_type_stable_model = 0, + clingo_model_type_brave_consequences = 1, + clingo_model_type_cautious_consequences = 2 + } +} diff --git a/src/ClingoSharp.NativeWrapper/Enums/ShowType.cs b/src/ClingoSharp.NativeWrapper/Enums/ShowType.cs new file mode 100644 index 0000000..1202b7b --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/Enums/ShowType.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClingoSharp.NativeWrapper.Enums +{ + [Flags] + internal enum clingo_show_type + { + clingo_show_type_none = 0, + clingo_show_type_csp = 1, + clingo_show_type_shown = 2, + clingo_show_type_atoms = 4, + clingo_show_type_terms = 8, + clingo_show_type_all = 15, + clingo_show_type_complement = 16 + } +} diff --git a/src/ClingoSharp.NativeWrapper/Enums/SolveEventType.cs b/src/ClingoSharp.NativeWrapper/Enums/SolveEventType.cs new file mode 100644 index 0000000..6df28fb --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/Enums/SolveEventType.cs @@ -0,0 +1,9 @@ +namespace ClingoSharp.NativeWrapper.Enums +{ + internal enum clingo_solve_event_type + { + clingo_solve_event_type_model = 0, + clingo_solve_event_type_statistics = 1, + clingo_solve_event_type_finish = 2 + } +} diff --git a/src/ClingoSharp.NativeWrapper/Enums/SolveMode.cs b/src/ClingoSharp.NativeWrapper/Enums/SolveMode.cs new file mode 100644 index 0000000..8913d7a --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/Enums/SolveMode.cs @@ -0,0 +1,12 @@ +using System; + +namespace ClingoSharp.NativeWrapper.Enums +{ + [Flags] + internal enum clingo_solve_mode + { + clingo_solve_mode_none = 0, + clingo_solve_mode_async = 1, + clingo_solve_mode_yield = 2 + } +} diff --git a/src/ClingoSharp.NativeWrapper/Enums/SolveResult.cs b/src/ClingoSharp.NativeWrapper/Enums/SolveResult.cs new file mode 100644 index 0000000..199efaa --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/Enums/SolveResult.cs @@ -0,0 +1,13 @@ +using System; + +namespace ClingoSharp.NativeWrapper.Enums +{ + [Flags] + internal enum clingo_solve_result + { + clingo_solve_result_satisfiable = 1, + clingo_solve_result_unsatisfiable = 2, + clingo_solve_result_exhausted = 4, + clingo_solve_result_interrupted = 8 + } +} diff --git a/src/ClingoSharp.NativeWrapper/Enums/SymbolType.cs b/src/ClingoSharp.NativeWrapper/Enums/SymbolType.cs new file mode 100644 index 0000000..e1bfeba --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/Enums/SymbolType.cs @@ -0,0 +1,11 @@ +namespace ClingoSharp.NativeWrapper.Enums +{ + internal enum clingo_symbol_type + { + clingo_symbol_type_infimum = 0, + clingo_symbol_type_number = 1, + clingo_symbol_type_string = 4, + clingo_symbol_type_function = 5, + clingo_symbol_type_supremum = 7 + } +} diff --git a/src/ClingoSharp.NativeWrapper/Enums/WarningCode.cs b/src/ClingoSharp.NativeWrapper/Enums/WarningCode.cs new file mode 100644 index 0000000..dda7159 --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/Enums/WarningCode.cs @@ -0,0 +1,12 @@ +namespace ClingoSharp.NativeWrapper.Enums +{ + internal enum clingo_warning { + operation_undefined = 0, + runtime_error = 1, + atom_undefined = 2, + file_included = 3, + variable_unbounded = 4, + global_variable = 5, + other = 6 + } +} diff --git a/src/ClingoSharp.NativeWrapper/EventHandlers/SolveEventHandler.cs b/src/ClingoSharp.NativeWrapper/EventHandlers/SolveEventHandler.cs new file mode 100644 index 0000000..26d238a --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/EventHandlers/SolveEventHandler.cs @@ -0,0 +1,7 @@ +using ClingoSharp.NativeWrapper.Enums; +using System; + +namespace ClingoSharp.NativeWrapper.EventHandlers +{ + internal delegate int clingo_solve_event_callback(clingo_solve_event_type type, IntPtr event_data, IntPtr data, out bool[] goon); +} diff --git a/src/ClingoSharp.NativeWrapper/MainModuleImpl.cs b/src/ClingoSharp.NativeWrapper/MainModuleImpl.cs new file mode 100644 index 0000000..8495486 --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/MainModuleImpl.cs @@ -0,0 +1,61 @@ +using ClingoSharp.CoreServices; +using ClingoSharp.CoreServices.Enums; +using ClingoSharp.CoreServices.Interfaces.Modules; +using ClingoSharp.NativeWrapper.Enums; +using System; +using System.Runtime.InteropServices; + +namespace ClingoSharp.NativeWrapper +{ + /// + /// Data types and functions used throughout all modules and version information + /// + public class MainModuleImpl : IMainModule + { + #region Clingo C API Functions + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern void clingo_version([Out] IntPtr major, [Out] IntPtr minor, [Out] IntPtr revision); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern clingo_error clingo_error_code(); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern string clingo_error_message(); + + #endregion + + #region Module implementation + + public string GetVersion() + { + IntPtr majorRef = Marshal.AllocHGlobal(sizeof(int)); + IntPtr minorRef = Marshal.AllocHGlobal(sizeof(int)); + IntPtr revisionRef = Marshal.AllocHGlobal(sizeof(int)); + + clingo_version(majorRef, minorRef, revisionRef); + + int major = Marshal.ReadInt32(majorRef); + int minor = Marshal.ReadInt32(minorRef); + int revision = Marshal.ReadInt32(revisionRef); + + Marshal.FreeHGlobal(majorRef); + Marshal.FreeHGlobal(minorRef); + Marshal.FreeHGlobal(revisionRef); + + return $"{major}.{minor}.{revision}"; + } + + public ErrorCode GetErrorCode() + { + return (ErrorCode)clingo_error_code(); + } + + public string GetErrorMessage() + { + return clingo_error_message(); + } + + #endregion + } +} diff --git a/src/ClingoSharp.NativeWrapper/ModelModuleImpl.cs b/src/ClingoSharp.NativeWrapper/ModelModuleImpl.cs new file mode 100644 index 0000000..a936802 --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/ModelModuleImpl.cs @@ -0,0 +1,194 @@ +using AutoMapper; +using ClingoSharp.CoreServices; +using ClingoSharp.CoreServices.Enums; +using ClingoSharp.CoreServices.Interfaces.Modules; +using ClingoSharp.CoreServices.Types; +using ClingoSharp.NativeWrapper.Enums; +using System; +using System.Linq; +using System.Runtime.InteropServices; + +namespace ClingoSharp.NativeWrapper +{ + public class ModelModuleImpl : IModelModule + { + #region Clingo C API Functions + + #region Functions for Inspecting Models + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_model_type(IntPtr model, [Out] clingo_model_type[] type); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_model_number(IntPtr model, [Out] ulong[] number); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_model_symbols_size(IntPtr model, clingo_show_type show, [Out] UIntPtr[] size); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_model_symbols(IntPtr model, clingo_show_type show, [Out] ulong[] symbols, UIntPtr size); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_model_is_true(IntPtr model, int literal, [Out] bool[] result); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_model_cost_size(IntPtr model, [Out] UIntPtr[] size); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_model_cost(IntPtr model, [Out] long[] costs, UIntPtr size); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_model_optimality_proven(IntPtr model, [Out] bool[] proven); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_model_thread_id(IntPtr model, [Out] uint[] id); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_model_contains(IntPtr model, ulong atom, [Out] bool[] contained); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_model_extend(IntPtr model, ulong[] symbols, UIntPtr size); + + #endregion + + #region Functions for Adding Clauses + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_model_context(IntPtr model, [Out] IntPtr[] control); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_solve_control_add_clause(IntPtr control, int[] clause, UIntPtr size); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_solve_control_symbolic_atoms(IntPtr control, [Out] IntPtr[] atoms); + + #endregion + + #endregion + + #region Module implementation + + #region Functions for Inspecting Models + + public bool Contains(Model model, Symbol atom, out bool contained) + { + bool[] containedPtr = new bool[1]; + var success = clingo_model_contains(model.Object, atom.Value, containedPtr); + contained = containedPtr[0]; + return success != 0; + } + + public bool Extends(Model model, Symbol[] atoms) + { + ulong[] clingoSymbols = atoms?.Select(atom => (ulong)atom).ToArray(); + UIntPtr clingoSymbolsSize = new UIntPtr(Convert.ToUInt32(atoms == null ? 0 : atoms.Length)); + var success = clingo_model_extend(model.Object, clingoSymbols, clingoSymbolsSize); + return success != 0; + } + + public bool GetCosts(Model model, out long[] costs) + { + UIntPtr[] costSizePtr = new UIntPtr[1]; + var success = clingo_model_cost_size(model.Object, costSizePtr); + + if (success != 0) + { + costs = new long[costSizePtr[0].ToUInt64()]; + success = clingo_model_cost(model.Object, costs, costSizePtr[0]); + return success != 0; + } + + costs = null; + return false; + } + + public bool GetNumber(Model model, out ulong number) + { + ulong[] numberPtr = new ulong[1]; + var success = clingo_model_number(model.Object, numberPtr); + number = numberPtr[0]; + return success != 0; + } + + public bool GetSymbols(Model model, ShowType showType, out Symbol[] symbols) + { + UIntPtr[] symbolsSizePtr = new UIntPtr[1]; + var success = clingo_model_symbols_size(model.Object, (clingo_show_type)showType, symbolsSizePtr); + + if (success != 0) + { + ulong[] clingoSymbols = new ulong[symbolsSizePtr[0].ToUInt64()]; + success = clingo_model_symbols(model.Object, (clingo_show_type)showType, clingoSymbols, symbolsSizePtr[0]); + symbols = clingoSymbols.Select(symbol => (Symbol)symbol).ToArray(); + return success != 0; + } + + symbols = null; + return false; + } + + public bool GetThreadId(Model model, out Id id) + { + uint[] idPtr = new uint[1]; + var success = clingo_model_thread_id(model.Object, idPtr); + id = idPtr[0]; + return success != 0; + } + + public bool GetType(Model model, out ModelType type) + { + clingo_model_type[] typePtr = new clingo_model_type[1]; + var success = clingo_model_type(model.Object, typePtr); + type = (ModelType)typePtr[0]; + return success != 0; + } + + public bool IsOptimalityProven(Model model, out bool proven) + { + bool[] provenPtr = new bool[1]; + var success = clingo_model_optimality_proven(model.Object, provenPtr); + proven = provenPtr[0]; + return success != 0; + } + + public bool IsTrue(Model model, Literal literal, out bool result) + { + bool[] resultPtr = new bool[1]; + var success = clingo_model_is_true(model.Object, literal, resultPtr); + result = resultPtr[0]; + return success != 0; + } + + #endregion + + #region Functions for Adding Clauses + + public bool GetContext(Model model, out SolveControl context) + { + IntPtr[] contextPtr = new IntPtr[1]; + var success = clingo_model_context(model.Object, contextPtr); + context = new SolveControl() { Object = contextPtr[0] }; + return success != 0; + } + + public bool GetSymbolicAtoms(SolveControl control, out SymbolicAtoms atoms) + { + IntPtr[] symbolicAtomsPtr = new IntPtr[1]; + var success = clingo_solve_control_symbolic_atoms(control.Object, symbolicAtomsPtr); + atoms = new SymbolicAtoms() { Object = symbolicAtomsPtr[0] }; + return success != 0; + } + + public bool AddClause(SolveControl control, Literal[] clause) + { + int[] clingoClause = clause?.Select(literal => (int)literal).ToArray(); + UIntPtr size = new UIntPtr(Convert.ToUInt32(clause != null ? clause.Length : 0)); + var success = clingo_solve_control_add_clause(control.Object, clingoClause, size); + return success != 0; + } + + #endregion + + #endregion + } +} diff --git a/src/ClingoSharp.NativeWrapper/SolveHandleModuleImpl.cs b/src/ClingoSharp.NativeWrapper/SolveHandleModuleImpl.cs new file mode 100644 index 0000000..0f63288 --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/SolveHandleModuleImpl.cs @@ -0,0 +1,80 @@ +using ClingoSharp.CoreServices; +using ClingoSharp.CoreServices.Enums; +using ClingoSharp.CoreServices.Interfaces.Modules; +using ClingoSharp.CoreServices.Types; +using ClingoSharp.NativeWrapper.Enums; +using System; +using System.Runtime.InteropServices; + +namespace ClingoSharp.NativeWrapper +{ + public class SolveHandleModuleImpl : ISolveHandleModule + { + #region Clingo C API Functions + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_solve_handle_get(IntPtr handle, [Out] clingo_solve_result[] result); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern void clingo_solve_handle_wait(IntPtr handle, double timeout, [Out] bool[] result); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_solve_handle_model(IntPtr handle, [Out] IntPtr[] model); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_solve_handle_resume(IntPtr handle); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_solve_handle_cancel(IntPtr handle); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_solve_handle_close(IntPtr handle); + + #endregion + + #region Module implementation + + public bool Get(SolveHandle handle, out SolveResult result) + { + clingo_solve_result[] resultPtr = new clingo_solve_result[1]; + var success = clingo_solve_handle_get(handle.Object, resultPtr); + result = (SolveResult)resultPtr[0]; + return success != 0; + } + + public void Wait(SolveHandle handle, double timeout, out bool result) + { + bool[] resultPtr = new bool[1]; + clingo_solve_handle_wait(handle.Object, timeout, resultPtr); + result = resultPtr[0]; + } + + public bool Model(SolveHandle handle, out Model model) + { + IntPtr[] modelPtr = new IntPtr[1]; + var success = clingo_solve_handle_model(handle.Object, modelPtr); + model = new Model() { Object = modelPtr[0] }; + return success != 0; + } + + public bool Resume(SolveHandle handle) + { + var success = clingo_solve_handle_resume(handle.Object); + return success != 0; + } + + public bool Cancel(SolveHandle handle) + { + var success = clingo_solve_handle_cancel(handle.Object); + return success != 0; + } + + public bool Close(SolveHandle handle) + { + var success = clingo_solve_handle_close(handle.Object); + return success != 0; + } + + #endregion + } +} diff --git a/src/ClingoSharp.NativeWrapper/SymbolModuleImpl.cs b/src/ClingoSharp.NativeWrapper/SymbolModuleImpl.cs new file mode 100644 index 0000000..8baf45e --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/SymbolModuleImpl.cs @@ -0,0 +1,344 @@ +using AutoMapper; +using ClingoSharp.CoreServices; +using ClingoSharp.CoreServices.Enums; +using ClingoSharp.CoreServices.Interfaces.Modules; +using ClingoSharp.CoreServices.Types; +using ClingoSharp.NativeWrapper.Enums; +using System; +using System.Runtime.InteropServices; +using clingo_symbol = System.UInt64; +using clingo_signature = System.UInt64; +using System.Linq; + +namespace ClingoSharp.NativeWrapper +{ + public class SymbolModuleImpl : ISymbolModule + { + #region Clingo C API Functions + + #region Signature Functions + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_signature_create(string name, uint arity, bool positive, [Out] clingo_signature[] signature); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern string clingo_signature_name(clingo_signature signature); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern uint clingo_signature_arity(clingo_signature signature); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern bool clingo_signature_is_positive(clingo_signature signature); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern bool clingo_signature_is_negative(clingo_signature signature); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern bool clingo_signature_is_equal_to(clingo_signature a, clingo_signature b); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern bool clingo_signature_is_less_than(clingo_signature a, clingo_signature b); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern UIntPtr clingo_signature_hash(clingo_signature signature); + + #endregion + + #region Symbol Construction + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern void clingo_symbol_create_number(int number, [Out] clingo_symbol[] symbol); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern void clingo_symbol_create_supremum([Out] clingo_symbol[] symbol); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern void clingo_symbol_create_infimum([Out] clingo_symbol[] symbol); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbol_create_string(string value, [Out] clingo_symbol[] symbol); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbol_create_id(string name, bool positive, [Out] clingo_symbol[] symbol); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbol_create_function(string name, clingo_symbol[] arguments, UIntPtr arguments_size, bool positive, [Out] clingo_symbol[] symbol); + + #endregion + + #region Symbol Inspection + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbol_number(clingo_symbol symbol, [Out] int[] number); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbol_name(clingo_symbol symbol, [Out] string[] name); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbol_string(clingo_symbol symbol, [Out] string[] value); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbol_is_positive(clingo_symbol symbol, [Out] bool[] positive); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbol_is_negative(clingo_symbol symbol, [Out] bool[] negative); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbol_arguments(clingo_symbol symbol, [Out] IntPtr arguments, [Out] UIntPtr[] arguments_size); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern clingo_symbol_type clingo_symbol_type(clingo_symbol symbol); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbol_to_string_size(clingo_symbol symbol, [Out] UIntPtr[] size); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbol_to_string(clingo_symbol symbol, [Out] char[] value, UIntPtr size); + + #endregion + + #region Symbol Comparasion + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern bool clingo_symbol_is_equal_to(clingo_symbol a, clingo_symbol b); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern bool clingo_symbol_is_less_than(clingo_symbol a, clingo_symbol b); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern UIntPtr clingo_symbol_hash(clingo_symbol symbol); + + #endregion + + #endregion + + #region Module implementation + + #region Signature Functions + + public bool CreateSignature(string name, uint arity, bool positive, out Signature signature) + { + clingo_signature[] signaturePtr = new clingo_signature[1]; + + var result = clingo_signature_create(name, arity, positive, signaturePtr); + signature = new Signature() { Value = signaturePtr[0] }; + + return result != 0; + } + + public string GetName(Signature signature) + { + return clingo_signature_name(signature.Value); + } + + public uint GetArity(Signature signature) + { + return clingo_signature_arity(signature.Value); + } + + public bool IsPositive(Signature signature) + { + return clingo_signature_is_positive(signature.Value); + } + + public bool IsNegative(Signature signature) + { + return clingo_signature_is_negative(signature.Value); + } + + public bool IsEqualTo(Signature signatureA, Signature signatureB) + { + return clingo_signature_is_equal_to(signatureA.Value, signatureB.Value); + } + + public bool IsLessThan(Signature signatureA, Signature signatureB) + { + return clingo_signature_is_less_than(signatureA.Value, signatureB.Value); + } + + public UIntPtr GetHash(Signature signature) + { + return clingo_signature_hash(signature.Value); + } + + #endregion + + #region Symbol Construction + + public void CreateNumber(int number, out Symbol symbol) + { + clingo_symbol[] symbolPtr = new clingo_symbol[1]; + clingo_symbol_create_number(number, symbolPtr); + symbol = new Symbol() { Value = symbolPtr[0] }; + } + + public void CreateSupremum(out Symbol symbol) + { + clingo_symbol[] symbolPtr = new clingo_symbol[1]; + clingo_symbol_create_supremum(symbolPtr); + symbol = new Symbol() { Value = symbolPtr[0] }; + } + + public void CreateInfimum(out Symbol symbol) + { + clingo_symbol[] symbolPtr = new clingo_symbol[1]; + clingo_symbol_create_infimum(symbolPtr); + symbol = new Symbol() { Value = symbolPtr[0] }; + } + + public bool CreateString(string value, out Symbol symbol) + { + clingo_symbol[] symbolPtr = new clingo_symbol[1]; + var result = clingo_symbol_create_string(value, symbolPtr); + symbol = new Symbol() { Value = symbolPtr[0] }; + return result != 0; + } + + public bool CreateId(string name, bool positive, out Symbol symbol) + { + clingo_symbol[] symbolPtr = new clingo_symbol[1]; + var result = clingo_symbol_create_id(name, positive, symbolPtr); + symbol = new Symbol() { Value = symbolPtr[0] }; + return result != 0; + } + + public bool CreateFunction(string name, Symbol[] arguments, bool positive, out Symbol symbol) + { + clingo_symbol[] clingoArguments = arguments.Select(arg => (clingo_symbol)arg).ToArray(); + UIntPtr argumentsSize = new UIntPtr(Convert.ToUInt32(arguments != null ? arguments.Length : 0)); + + clingo_symbol[] symbolPtr = new clingo_symbol[1]; + + var result = clingo_symbol_create_function(name, clingoArguments, argumentsSize, positive, symbolPtr); + symbol = new Symbol() { Value = symbolPtr[0] }; + + return result != 0; + } + + #endregion + + #region Symbol Inspection + + public bool GetNumber(Symbol symbol, out int number) + { + int[] numberPtr = new int[1]; + + var result = clingo_symbol_number(symbol.Value, numberPtr); + number = numberPtr[0]; + + return result != 0; + } + + public bool GetName(Symbol symbol, out string name) + { + string[] namePtr = new string[1]; + + var result = clingo_symbol_name(symbol.Value, namePtr); + name = namePtr[0]; + + return result != 0; + } + + public bool GetString(Symbol symbol, out string value) + { + string[] stringPtr = new string[1]; + + var result = clingo_symbol_string(symbol.Value, stringPtr); + value = stringPtr[0]; + + return result != 0; + } + + public bool IsPositive(Symbol symbol, out bool positive) + { + bool[] positivePtr = new bool[1]; + + var result = clingo_symbol_is_positive(symbol.Value, positivePtr); + positive = positivePtr[0]; + + return result != 0; + } + + public bool IsNegative(Symbol symbol, out bool negative) + { + bool[] negativePtr = new bool[1]; + + var result = clingo_symbol_is_negative(symbol.Value, negativePtr); + negative = negativePtr[0]; + + return result != 0; + } + + public bool GetArguments(Symbol symbol, out Symbol[] arguments) + { + IntPtr argumentsPtr = new IntPtr(); + UIntPtr[] argumentsSizePtr = new UIntPtr[1]; + + var result = clingo_symbol_arguments(symbol.Value, argumentsPtr, argumentsSizePtr); + + // Copies all symbols in a managed array + int argumentsSize = Convert.ToInt32(argumentsSizePtr[0].ToUInt32()); + long[] clingoArguments = new long[argumentsSize]; + Marshal.Copy(argumentsPtr, clingoArguments, 0, argumentsSize); + + // Converts all clingo_symbol in a Symbol object + arguments = new Symbol[argumentsSize]; + for (int i = 0; i < argumentsSize; i++) + { + arguments[i] = new Symbol() { Value = Convert.ToUInt64(clingoArguments[i]) }; + } + + return result != 0; + } + + public SymbolType GetType(Symbol symbol) + { + return (SymbolType)clingo_symbol_type(symbol.Value); + } + + public bool ToString(Symbol symbol, out string value) + { + UIntPtr[] stringSizePtr = new UIntPtr[1]; + + var success = clingo_symbol_to_string_size(symbol.Value, stringSizePtr); + + if (success != 0) + { + char[] stringPtr = new char[stringSizePtr[0].ToUInt32()]; + + success = clingo_symbol_to_string(symbol.Value, stringPtr, stringSizePtr[0]); + + value = new string(stringPtr); + value = value.Replace("\0", string.Empty).Trim(); + + return success != 0; + } + + value = null; + return false; + } + + #endregion + + #region Symbol Comparasion + + public bool IsEqualTo(Symbol symbolA, Symbol symbolB) + { + return clingo_symbol_is_equal_to(symbolA.Value, symbolB.Value); + } + + public bool IsLessThan(Symbol symbolA, Symbol symbolB) + { + return clingo_symbol_is_less_than(symbolA.Value, symbolB.Value); + } + + public UIntPtr GetHash(Symbol symbol) + { + return clingo_symbol_hash(symbol.Value); + } + + #endregion + + #endregion + } +} diff --git a/src/ClingoSharp.NativeWrapper/SymbolicAtomsModuleImpl.cs b/src/ClingoSharp.NativeWrapper/SymbolicAtomsModuleImpl.cs new file mode 100644 index 0000000..770ee3f --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/SymbolicAtomsModuleImpl.cs @@ -0,0 +1,166 @@ +using ClingoSharp.CoreServices; +using ClingoSharp.CoreServices.Interfaces.Modules; +using ClingoSharp.CoreServices.Types; +using System; +using System.Linq; +using System.Runtime.InteropServices; + +namespace ClingoSharp.NativeWrapper +{ + public class SymbolicAtomsModuleImpl : ISymbolicAtomsModule + { + + #region Clingo C API Functions + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbolic_atoms_size(IntPtr atoms, [Out] UIntPtr[] size); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbolic_atoms_begin(IntPtr atoms, ulong[] signature, [Out] ulong[] iterator); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbolic_atoms_end(IntPtr atoms, [Out] ulong[] iterator); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbolic_atoms_find(IntPtr atoms, ulong symbol, [Out] ulong[] iterator); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbolic_atoms_iterator_is_equal_to(IntPtr atoms, ulong a, ulong b, [Out] bool[] equal); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbolic_atoms_symbol(IntPtr atoms, ulong iterator, [Out] ulong[] symbol); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbolic_atoms_is_fact(IntPtr atoms, ulong iterator, [Out] bool[] fact); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbolic_atoms_is_external(IntPtr atoms, ulong iterator, [Out] bool[] external); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbolic_atoms_literal(IntPtr atoms, ulong iterator, int[] literal); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbolic_atoms_signatures_size(IntPtr atoms, [Out] UIntPtr[] size); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbolic_atoms_signatures(IntPtr atoms, [Out] ulong[] signatures, UIntPtr size); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbolic_atoms_next(IntPtr atoms, ulong iterator, [Out] ulong[] next); + + [DllImport(Constants.ClingoLib, CallingConvention = CallingConvention.Cdecl)] + private static extern int clingo_symbolic_atoms_is_valid(IntPtr atoms, ulong iterator, [Out] bool[] valid); + + #endregion + + #region Module implementation + + public bool GetSize(SymbolicAtoms atoms, out UIntPtr size) + { + UIntPtr[] sizePtr = new UIntPtr[1]; + var success = clingo_symbolic_atoms_size(atoms.Object, sizePtr); + size = sizePtr[0]; + return success != 0; + } + + public bool GetBeginIterator(SymbolicAtoms atoms, Signature signature, out SymbolicAtomIterator iterator) + { + ulong[] iteratorPtr = new ulong[1]; + ulong[] signaturePtr = signature == null ? null : new ulong[] { signature }; + var success = clingo_symbolic_atoms_begin(atoms.Object, signaturePtr, iteratorPtr); + iterator = iteratorPtr[0]; + return success != 0; + } + + public bool GetEndIterator(SymbolicAtoms atoms, out SymbolicAtomIterator iterator) + { + ulong[] iteratorPtr = new ulong[1]; + var success = clingo_symbolic_atoms_end(atoms.Object, iteratorPtr); + iterator = iteratorPtr[0]; + return success != 0; + } + + public bool Find(SymbolicAtoms atoms, Symbol symbol, out SymbolicAtomIterator iterator) + { + ulong[] iteratorPtr = new ulong[1]; + var success = clingo_symbolic_atoms_find(atoms.Object, symbol, iteratorPtr); + iterator = iteratorPtr[0]; + return success != 0; + } + + public bool IteratorIsEqualTo(SymbolicAtoms atoms, SymbolicAtomIterator iteratorA, SymbolicAtomIterator iteratorB, out bool equal) + { + bool[] equalPtr = new bool[1]; + var success = clingo_symbolic_atoms_iterator_is_equal_to(atoms.Object, iteratorA, iteratorB, equalPtr); + equal = equalPtr[0]; + return success != 0; + } + + public bool GetSymbol(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out Symbol symbol) + { + ulong[] symbolPtr = new ulong[1]; + var success = clingo_symbolic_atoms_symbol(atoms.Object, iterator, symbolPtr); + symbol = symbolPtr[0]; + return success != 0; + } + + public bool IsFact(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out bool fact) + { + bool[] factPtr = new bool[1]; + var success = clingo_symbolic_atoms_is_fact(atoms.Object, iterator, factPtr); + fact = factPtr[0]; + return success != 0; + } + + public bool IsExternal(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out bool external) + { + bool[] externalPtr = new bool[1]; + var success = clingo_symbolic_atoms_is_external(atoms.Object, iterator, externalPtr); + external = externalPtr[0]; + return success != 0; + } + + public bool GetLiteral(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out Literal literal) + { + int[] literalPtr = new int[1]; + var success = clingo_symbolic_atoms_literal(atoms.Object, iterator, literalPtr); + literal = literalPtr[0]; + return success != 0; + } + + public bool GetSignatures(SymbolicAtoms atoms, out Signature[] signatures) + { + UIntPtr[] size = new UIntPtr[1]; + var success = clingo_symbolic_atoms_signatures_size(atoms.Object, size); + + if (success != 0) + { + ulong[] clingoSingnatures = new ulong[Convert.ToInt32(size[0].ToUInt32())]; + success = clingo_symbolic_atoms_signatures(atoms.Object, clingoSingnatures, size[0]); + signatures = clingoSingnatures.Select(s => (Signature)s).ToArray(); + return success != 0; + } + + signatures = null; + return false; + } + + public bool GetNext(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out SymbolicAtomIterator next) + { + ulong[] nextIteratorPtr = new ulong[1]; + var success = clingo_symbolic_atoms_next(atoms.Object, iterator, nextIteratorPtr); + next = nextIteratorPtr[0]; + return success != 0; + } + + public bool IsValid(SymbolicAtoms atoms, SymbolicAtomIterator iterator, out bool valid) + { + bool[] validPtr = new bool[1]; + var success = clingo_symbolic_atoms_is_valid(atoms.Object, iterator, validPtr); + valid = validPtr[0]; + return success != 0; + } + + #endregion + } +} diff --git a/src/ClingoSharp.NativeWrapper/Types/Location.cs b/src/ClingoSharp.NativeWrapper/Types/Location.cs new file mode 100644 index 0000000..261f8b8 --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/Types/Location.cs @@ -0,0 +1,16 @@ +using System; +using System.Runtime.InteropServices; + +namespace ClingoSharp.NativeWrapper.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal struct clingo_location + { + public string begin_file; + public string end_file; + public UIntPtr begin_line; + public UIntPtr end_line; + public UIntPtr begin_column; + public UIntPtr end_column; + } +} diff --git a/src/ClingoSharp.NativeWrapper/Types/Part.cs b/src/ClingoSharp.NativeWrapper/Types/Part.cs new file mode 100644 index 0000000..5c62235 --- /dev/null +++ b/src/ClingoSharp.NativeWrapper/Types/Part.cs @@ -0,0 +1,13 @@ +using System; +using System.Runtime.InteropServices; + +namespace ClingoSharp.NativeWrapper.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal struct clingo_part + { + public string name; + public ulong[] params_list; + public UIntPtr size; + } +} diff --git a/src/ClingoSharp/Clingo.cs b/src/ClingoSharp/Clingo.cs new file mode 100644 index 0000000..89c0db6 --- /dev/null +++ b/src/ClingoSharp/Clingo.cs @@ -0,0 +1,106 @@ +using ClingoSharp.CoreServices; +using ClingoSharp.CoreServices.Enums; +using ClingoSharp.CoreServices.Interfaces; +using ClingoSharp.CoreServices.Interfaces.Modules; +using ClingoSharp.Exceptions; +using System; + +namespace ClingoSharp +{ + /// + /// The clingo-5.4.0 module. + /// This module provides functions and classes to control the grounding and solving process. + /// + public static class Clingo + { + #region Attributes + + private static string m_version = null; + private static readonly IMainModule m_module; + + #endregion + + #region Properties + + /// + /// Version of the clingo module ('5.4.0') + /// + public static string Version + { + get + { + if (m_version == null) + { + m_version = m_module.GetVersion(); + } + + return m_version; + } + } + + #endregion + + #region Constructors + + static Clingo() + { + m_module = Repository.GetModule(); + } + + #endregion + + #region Class Methods + + /// + /// Gets the error message and the code that returns clingo and creates a new exception + /// + /// false to check clingo error + /// + /// + /// + /// + /// + internal static void HandleClingoError(bool success) + { + if (!success) + { + string message = m_module.GetErrorMessage(); + if (message == null) { message = "no message"; } + + switch(m_module.GetErrorCode()) + { + case ErrorCode.RuntimeError: + throw new RuntimeException(message); + case ErrorCode.LogicError: + throw new LogicException(message); + case ErrorCode.BadAlloc: + throw new BadAllocationException(message); + case ErrorCode.Unknown: + throw new UnknownException(message); + case ErrorCode.Success: + throw new Exception(message); + } + } + } + + /// + /// Gets the asociated API module in clingo + /// + /// The asociated module + public static IClingoModule GetModule() + { + return m_module; + } + + /// + /// Gets the main module in clingo + /// + /// The the main module + public static IMainModule GetMainModule() + { + return m_module; + } + + #endregion + } +} diff --git a/src/ClingoSharp/ClingoSharp.csproj b/src/ClingoSharp/ClingoSharp.csproj new file mode 100644 index 0000000..05cb977 --- /dev/null +++ b/src/ClingoSharp/ClingoSharp.csproj @@ -0,0 +1,12 @@ + + + + netcoreapp3.1 + + + + + + + + diff --git a/src/ClingoSharp/Control.cs b/src/ClingoSharp/Control.cs new file mode 100644 index 0000000..1b23bb3 --- /dev/null +++ b/src/ClingoSharp/Control.cs @@ -0,0 +1,317 @@ +using ClingoSharp.CoreServices; +using ClingoSharp.CoreServices.Callbacks; +using ClingoSharp.CoreServices.Enums; +using ClingoSharp.CoreServices.EventHandlers; +using ClingoSharp.CoreServices.Interfaces; +using ClingoSharp.CoreServices.Interfaces.Modules; +using ClingoSharp.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; +using ClingoControl = ClingoSharp.CoreServices.Types.Control; +using ClingoLiteral = ClingoSharp.CoreServices.Types.Literal; +using ClingoLocation = ClingoSharp.CoreServices.Types.Location; +using ClingoModel = ClingoSharp.CoreServices.Types.Model; +using ClingoPart = ClingoSharp.CoreServices.Types.Part; +using ClingoSolveHandle = ClingoSharp.CoreServices.Types.SolveHandle; +using ClingoSymbol = ClingoSharp.CoreServices.Types.Symbol; +using ClingoSymbolicAtoms = ClingoSharp.CoreServices.Types.SymbolicAtoms; + +namespace ClingoSharp +{ + /// + /// Control object for the grounding/solving process. + /// + public sealed class Control : IDisposable + { + #region Attributes + + private static readonly IControlModule m_module; + private ClingoControl m_clingoControl; + // Track whether Dispose has been called. + private bool disposed = false; + + #endregion + + #region Properties + + public SymbolicAtoms SymbolicAtoms + { + get + { + Clingo.HandleClingoError(m_module.GetSymbolicAtoms(this, out ClingoSymbolicAtoms symbolicAtoms)); + return new SymbolicAtoms(symbolicAtoms); + } + } + + #endregion + + #region Constructors + + static Control() + { + m_module = Repository.GetModule(); + } + + public Control(ClingoControl clingoControl) + { + m_clingoControl = clingoControl; + } + + /// + /// Create a new object + /// + /// Arguments to the grounder and solver. + /// Function to intercept messages normally printed to standard error. + /// The maximum number of messages passed to the logger. + public Control(List args = null, Action logger = null, int messageLimit = 20) + { + void loggerCallback(WarningCode code, string message, IntPtr data) + { + if (logger != null) + { + MessageCode messageCode = Enumeration.GetValue((int)code) as MessageCode; + logger(messageCode, message); + } + } + + Clingo.HandleClingoError(m_module.New(args?.ToArray(), loggerCallback, Convert.ToUInt32(messageLimit), out ClingoControl controlPtr)); + + m_clingoControl = controlPtr; + } + + #endregion Constructors + + #region Destructors + + ~Control() + { + m_module.Free(m_clingoControl); + } + + #endregion + + #region Class Methods + + /// + /// Gets the asociated API module in clingo + /// + /// The asociated module + public static IClingoModule GetModule() + { + return m_module; + } + + /// + /// Gets the control module in clingo + /// + /// The control module + public static IControlModule GetControlModule() + { + return m_module; + } + + public static implicit operator ClingoControl(Control control) + { + return control.m_clingoControl; + } + + public static implicit operator Control(ClingoControl clingoControl) + { + return new Control(clingoControl); + } + + #endregion + + #region Instance Methods + + /// + public void Dispose() + { + if (!disposed) + { + m_module.Free(this); + m_clingoControl = null; + disposed = true; + } + + GC.SuppressFinalize(this); + } + + /// + /// Extend the logic program with the given non-ground logic program in string form. + /// + /// The name of program block to add. + /// The parameters of the program block to add. + /// The non-ground program in string form. + public void Add(string name, List parameters, string program) + { + Clingo.HandleClingoError(m_module.Add(this, name, parameters?.ToArray(), program)); + } + + /// + /// Ground the given list of program parts specified by tuples of names and arguments. + /// + /// List of tuples of program names and program arguments to ground. + public void Ground(List>> parts, object context = null) + { + // Creates a wrapper from the context object to a ground callback + bool groundCallback(ClingoLocation location, string name, ClingoSymbol[] arguments, IntPtr data, SymbolCallback symbolCallback, IntPtr callbackData) + { + try + { + // Get the method + MethodInfo method = context.GetType().GetMethod(name); + object result = method.Invoke(context, arguments); + + // Convert return value in symbol object + var newSymbols = new List(); + if (result is Symbol) + { + + newSymbols.Add(((Symbol)result)); + } + else if (result is IEnumerable) + { + foreach (var symbol in (result as IEnumerable)) + { + newSymbols.Add(symbol); + } + } + else + { + return false; + } + + return symbolCallback(newSymbols.ToArray(), callbackData); + } + catch + { + return false; + } + } + + // Converts the tuple list into a Part array + ClingoPart[] partArray = parts?.Select(p => new ClingoPart() + { + Name = p.Item1, + Params = p.Item2.Select(s => (ClingoSymbol)s).ToArray() + }).ToArray(); + + Clingo.HandleClingoError(m_module.Ground(this, partArray, (context != null) ? (GroundCallback)groundCallback : null)); + } + + /// + /// Starts a search + /// + /// List of (atom, boolean) tuples or program literals that serve as assumptions for the solve call, e.g., solving under assumptions [(Function("a"), True)] only admits answer sets that contain atom a. + /// Optional callback for intercepting models. A object is passed to the callback. The search can be interruped from the model callback by returning . + /// Optional callback to update statistics. The step and accumulated statistics are passed as arguments. + /// Optional callback called once search has finished. A also indicating whether the solve call has been interrupted is passed to the callback. + /// The resulting is iterable yielding objects. + /// The solve call and the method of the returned handle are non-blocking. + /// The return value depends on the parameters. If either yield or async is true, then a is returned. Otherwise, a is returned. + public Union Solve(List, int>> assumptions = null, Func onModel = null, Action onStatistics = null, Action onFinish = null, bool yield = false, bool async = false) + { + // Creates a wrapper between the argument callbacks and the solve event notify callback + bool notifyCallback(SolveEventType type, IntPtr eventPtr, out bool goon) + { + goon = true; + + try + { + switch (type) + { + case SolveEventType.Model: + if (onModel != null) + { + var model = new Model(new ClingoModel() { Object = eventPtr }); + goon = onModel(model); + } + + return true; + + case SolveEventType.Statistics: + if (onStatistics != null) + { + IntPtr[] statistics = new IntPtr[2]; + Marshal.Copy(eventPtr, statistics, 0, 2); + + var stepStatistics = new StatisticsMap(); + var acumulatedStatistics = new StatisticsMap(); + onStatistics(stepStatistics, acumulatedStatistics); + } + + return true; + + case SolveEventType.Finish: + if (onFinish != null) + { + var solveResult = new SolveResult(); + onFinish(solveResult); + } + + return true; + + default: + return false; + } + } + catch + { + // If a (non-recoverable) clingo API function fails in this callback, it must return false. + return false; + } + } + + // Converts the asumptions into a literals list + var symbolicAtoms = SymbolicAtoms; + List literals = new List(); + if (assumptions != null) + { + foreach (var assumption in assumptions) + { + if (assumption.IsType()) + { + literals.Add(assumption.Get()); + } + else + { + var symbolicLiteral = assumption.Get>(); + if (symbolicAtoms.TryGetValue(symbolicLiteral.Item1, out SymbolicAtom symbolicAtom)) + { + var literal = symbolicAtom.Literal; + if (!symbolicLiteral.Item2) literal = -literal; + literals.Add(literal); + } + else if (symbolicLiteral.Item2) + { + literals.Add(1); + literals.Add(-1); + } + } + } + } + + SolveMode mode = 0; + if (yield) { mode |= SolveMode.Yield; } + if (async) { mode |= SolveMode.Async; } + + Clingo.HandleClingoError(m_module.Solve(this, mode, literals.ToArray(), (onModel == null) && (onStatistics == null) && (onFinish == null) ? null : (SolveEventHandler)notifyCallback, out ClingoSolveHandle handlePtr)); + + var handle = new SolveHandle(handlePtr); + + // If neither yield nor async is true, returns a SolveResult + if (!yield && !async) + { + return handle.Get(); + } + + return handle; + } + + #endregion + } +} diff --git a/src/ClingoSharp/Enums/Enumeration.cs b/src/ClingoSharp/Enums/Enumeration.cs new file mode 100644 index 0000000..d7fb669 --- /dev/null +++ b/src/ClingoSharp/Enums/Enumeration.cs @@ -0,0 +1,220 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace ClingoSharp.Enums +{ + /// + /// Represents a Enumeration class + /// + public abstract class Enumeration : IEnumeration, IComparable, IEquatable + { + #region Properties + + /// + /// The value of the enumeration + /// + public int Value { get; } + + /// + /// The string value of the enumeration + /// + public string Name => throw new NotImplementedException(); + + #endregion + + #region Constructors + + protected Enumeration(int value) + { + Value = value; + } + + #endregion + + #region Enumeration methods + + /// + /// Gets a iterator of the names of the constants in the enumeration + /// + /// A string iterator with the names of the constants in the enumeration + public static IEnumerable GetNames() + { + throw new NotImplementedException(); + } + + /// + /// Gets a iterator of the constants in the enumeration + /// + /// A iterator with the constants in the enumeration + public static IEnumerable GetValues() + { + throw new NotImplementedException(); + } + + /// + /// Gets the value that has the specified value + /// + /// The value of a particular enumerated constant in terms + /// The containing the value of the enumerated constant + public static Enumeration GetValue(int value) + { + return GetValues().FirstOrDefault(enumeration => enumeration.Value == value); + } + + /// + /// Converts the string representation of the name to an equivalent enumerated object + /// + /// A string containing the name or value to convert + /// true to ignore case; false to regard case. + /// An object whose value is represented by + public static Enumeration Parse(string name, bool ignoreCase) + { + if (string.IsNullOrWhiteSpace(name)) + { + if (name == null) + { + throw new ArgumentNullException(); + } + else + { + throw new ArgumentException(); + } + } + + if (!TryParse(name, ignoreCase, out Enumeration enumeration)) + { + throw new ArgumentException(); + } + + return enumeration; + } + + /// + /// Converts the string representation of the name to an equivalent enumerated object + /// + /// A string containing the name or value to convert + /// An object whose value is represented by + public static Enumeration Parse(string name) + { + return Parse(name, false); + } + + /// + /// Converts the string representation of the name to an equivalent enumerated object + /// + /// The enumeration type to which to convert + /// A string containing the name or value to convert + /// true to ignore case; false to regard case. + /// An object whose value is represented by + public static TEnum Parse(string name, bool ignoreCase) where TEnum : Enumeration + { + return (TEnum)Parse(name, ignoreCase); + } + + /// + /// Converts the string representation of the name to an equivalent enumerated object + /// + /// The enumeration type to which to convert + /// A string containing the name or value to convert + /// An object whose value is represented by + public static TEnum Parse(string name) where TEnum : Enumeration + { + return (TEnum)Parse(name, false); + } + + /// + /// Converts the string representation of the name to an equivalent enumerated object + /// + /// A string containing the name or value to convert + /// true to ignore case; false to regard case. + /// When this method returns true, an object containing an enumeration constant representing the parsed value. + /// true if the conversion succeeded; false otherwise. + public static bool TryParse(string name, bool ignoreCase, out Enumeration result) + { + result = GetValues().FirstOrDefault(symbolType => symbolType.Name.Equals(name, ignoreCase ? StringComparison.InvariantCultureIgnoreCase : StringComparison.InvariantCulture)); + return result == default; + } + + /// + /// Converts the string representation of the name to an equivalent enumerated object + /// + /// A string containing the name or value to convert + /// When this method returns true, an object containing an enumeration constant representing the parsed value. + /// true if the conversion succeeded; false otherwise. + public static bool TryParse(string name, out Enumeration result) + { + return TryParse(name, false, out result); + } + + /// + /// Converts the string representation of the name to an equivalent enumerated object + /// + /// The enumeration type to which to convert + /// A string containing the name or value to convert + /// true to ignore case; false to regard case. + /// When this method returns true, an object containing an enumeration constant representing the parsed value. + /// + public static bool TryParse(string name, bool ignoreCase, out TEnum result) where TEnum : Enumeration + { + if (TryParse(name, ignoreCase, out Enumeration enumeration)) + { + result = (TEnum)enumeration; + return true; + } + + result = default; + return false; + } + + /// + /// Converts the string representation of the name to an equivalent enumerated object + /// + /// The enumeration type to which to convert + /// A string containing the name or value to convert + /// When this method returns true, an object containing an enumeration constant representing the parsed value. + /// + public static bool TryParse(string name, out TEnum result) where TEnum : Enumeration + { + return TryParse(name, false, out result); + } + + #endregion + + #region Equatable interface methods + + /// + public abstract bool Equals(Enumeration other); + + #endregion + + #region Comparable interface methods + + /// + public abstract int CompareTo(Enumeration other); + + #endregion + + #region object methods + + /// + public override bool Equals(object obj) + { + if (!(obj is Enumeration)) + { + return false; + } + + var other = obj as Enumeration; + return Equals(other); + } + + /// + public override int GetHashCode() + { + return Value.GetHashCode() ^ Name.GetHashCode(); + } + + #endregion + } +} diff --git a/src/ClingoSharp/Enums/IEnumeration.cs b/src/ClingoSharp/Enums/IEnumeration.cs new file mode 100644 index 0000000..18bf893 --- /dev/null +++ b/src/ClingoSharp/Enums/IEnumeration.cs @@ -0,0 +1,8 @@ +namespace ClingoSharp.Enums +{ + public interface IEnumeration + { + int Value { get; } + string Name { get; } + } +} diff --git a/src/ClingoSharp/Exceptions/BadAllocationException.cs b/src/ClingoSharp/Exceptions/BadAllocationException.cs new file mode 100644 index 0000000..c8aab76 --- /dev/null +++ b/src/ClingoSharp/Exceptions/BadAllocationException.cs @@ -0,0 +1,13 @@ +using System; + +namespace ClingoSharp.Exceptions +{ + /// + /// From c++: Type of the exceptions thrown by the standard definitions of operator new and operator new[] when they fail to allocate the requested storage space. + /// + class BadAllocationException : Exception + { + public BadAllocationException() : base() { } + public BadAllocationException(string message) : base(message) { } + } +} diff --git a/src/ClingoSharp/Exceptions/LogicException.cs b/src/ClingoSharp/Exceptions/LogicException.cs new file mode 100644 index 0000000..4af133b --- /dev/null +++ b/src/ClingoSharp/Exceptions/LogicException.cs @@ -0,0 +1,13 @@ +using System; + +namespace ClingoSharp.Exceptions +{ + /// + /// From c++: This class defines the type of objects thrown as exceptions to report errors in the internal logical of the program, such as violation of logical preconditions or class invariants. + /// + class LogicException : Exception + { + public LogicException() : base() { } + public LogicException(string message) : base(message) { } + } +} diff --git a/src/ClingoSharp/Exceptions/RuntimeException.cs b/src/ClingoSharp/Exceptions/RuntimeException.cs new file mode 100644 index 0000000..cee63c0 --- /dev/null +++ b/src/ClingoSharp/Exceptions/RuntimeException.cs @@ -0,0 +1,13 @@ +using System; + +namespace ClingoSharp.Exceptions +{ + /// + /// From c++: This class defines the type of objects thrown as exceptions to report errors that can only be detected during runtime. + /// + public class RuntimeException : Exception + { + public RuntimeException() : base() { } + public RuntimeException(string message) : base(message) { } + } +} diff --git a/src/ClingoSharp/Exceptions/UnknownException.cs b/src/ClingoSharp/Exceptions/UnknownException.cs new file mode 100644 index 0000000..1a267b7 --- /dev/null +++ b/src/ClingoSharp/Exceptions/UnknownException.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClingoSharp.Exceptions +{ + class UnknownException : Exception + { + public UnknownException() : base() { } + public UnknownException(string message) : base(message) { } + } +} diff --git a/src/ClingoSharp/MessageCode.cs b/src/ClingoSharp/MessageCode.cs new file mode 100644 index 0000000..b565f0d --- /dev/null +++ b/src/ClingoSharp/MessageCode.cs @@ -0,0 +1,98 @@ +using ClingoSharp.Enums; +using System.Collections.Generic; + +namespace ClingoSharp +{ + /// + /// Enumeration of the different types of messages. + /// + public sealed class MessageCode : Enumeration + { + #region Class attributes + + private static readonly string[] MessageCodeNames = new string[] + { + "OperationUndefined", + "RuntimeError", + "AtomUndefined", + "FileIncluded", + "VariableUnbounded", + "GlobalVariable", + "Other" + }; + + #endregion + + #region Class Properties + + public static MessageCode OperationUndefined => new MessageCode(0); + public static MessageCode RuntimeError => new MessageCode(1); + public static MessageCode AtomUndefined => new MessageCode(2); + public static MessageCode FileIncluded => new MessageCode(3); + public static MessageCode VariableUnbounded => new MessageCode(4); + public static MessageCode GlobalVariable => new MessageCode(5); + public static MessageCode Other => new MessageCode(6); + + #endregion + + #region Instance Properties + + public new string Name => MessageCodeNames[Value]; + + #endregion + + #region Constructors + + private MessageCode(int value) : base(value) { } + + #endregion + + #region Class methods + + /// + public new static IEnumerable GetNames() + { + return (string[])MessageCodeNames.Clone(); + } + + /// + public new static IEnumerable GetValues() + { + return new MessageCode[] { OperationUndefined, RuntimeError, AtomUndefined, FileIncluded, VariableUnbounded, GlobalVariable, Other }; + } + + #endregion + + #region Instance methods + + /// + public override int CompareTo(Enumeration other) + { + if ((other == null) || !(other is MessageCode)) + { + return 1; + } + + return Value.CompareTo(other.Value); + } + + /// + public override bool Equals(Enumeration other) + { + if ((other == null) || !(other is MessageCode)) + { + return false; + } + + return Value.Equals(other.Value); + } + + /// + public override string ToString() + { + return $"CligoSharp.MessageCode<{Name}>"; + } + + #endregion + } +} diff --git a/src/ClingoSharp/Model.cs b/src/ClingoSharp/Model.cs new file mode 100644 index 0000000..487ded2 --- /dev/null +++ b/src/ClingoSharp/Model.cs @@ -0,0 +1,246 @@ +using ClingoSharp.CoreServices; +using ClingoSharp.CoreServices.Interfaces.Modules; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ClingoId = ClingoSharp.CoreServices.Types.Id; +using ClingoLiteral = ClingoSharp.CoreServices.Types.Literal; +using ClingoModel = ClingoSharp.CoreServices.Types.Model; +using ClingoModelType = ClingoSharp.CoreServices.Enums.ModelType; +using ClingoShowType = ClingoSharp.CoreServices.Enums.ShowType; +using ClingoSymbol = ClingoSharp.CoreServices.Types.Symbol; +using ClingoSolveControl = ClingoSharp.CoreServices.Types.SolveControl; + +namespace ClingoSharp +{ + /// + /// Provides access to a model during a solve call and provides a object to provided limited support to influence the running search. + /// + public sealed class Model + { + #region Attributes + + private static readonly IModelModule m_module; + private readonly ClingoModel m_clingoModel; + + #endregion + + #region Properties + + /// + /// Object that allows for controlling the running search. + /// + public SolveControl Context + { + get + { + Clingo.HandleClingoError(m_module.GetContext(this, out ClingoSolveControl context)); + return new SolveControl(context); + } + } + + /// + /// Return the list of integer cost values of the model. + /// + /// The return values correspond to clasp's cost output. + public List Cost + { + get + { + Clingo.HandleClingoError(m_module.GetCosts(this, out long[] costs)); + return costs.Select(cost => Convert.ToInt32(cost)).ToList(); + } + } + + /// + /// The running number of the model. + /// + public int Number + { + get + { + Clingo.HandleClingoError(m_module.GetNumber(this, out ulong number)); + return Convert.ToInt32(number); + } + } + + /// + /// Whether the optimality of the model has been proven. + /// + public bool OptimalityProven + { + get + { + Clingo.HandleClingoError(m_module.IsOptimalityProven(this, out bool proven)); + return proven; + } + } + + /// + /// The id of the thread which found the model. + /// + public int ThreadId + { + get + { + Clingo.HandleClingoError(m_module.GetThreadId(this, out ClingoId id)); + return Convert.ToInt32(id); + } + } + + /// + /// The type of the model. + /// + public ModelType Type + { + get + { + Clingo.HandleClingoError(m_module.GetType(this, out var type)); + + return type switch + { + ClingoModelType.StableModel => ModelType.StableModel, + ClingoModelType.BraveConsequences => ModelType.BraveConsequences, + ClingoModelType.CautiousConsequences => ModelType.CautiousConsequences, + _ => null + }; + } + } + + #endregion + + #region Constructors + + static Model() + { + m_module = Repository.GetModule(); + } + + public Model(ClingoModel clingoModel) + { + m_clingoModel = clingoModel; + } + + #endregion + + #region Class Methods + + public static implicit operator ClingoModel(Model model) + { + return model.m_clingoModel; + } + + public static implicit operator Model(ClingoModel clingoModel) + { + return new Model(clingoModel); + } + + #endregion + + #region Instance Methods + + /// + /// Efficiently check if an atom is contained in the model. + /// + /// The atom to lookup + /// Whether the given atom is contained in the model. + /// The atom must be represented using a function symbol. + public bool Contains(Symbol atom) + { + Clingo.HandleClingoError(m_module.Contains(this, atom, out bool contained)); + return contained; + } + + /// + /// Extend a model with the given symbols. + /// + /// The symbols to add to the model. + public void Extend(List symbols) + { + var atoms = symbols.Select(symbol => (ClingoSymbol)symbol).ToArray(); + Clingo.HandleClingoError(m_module.Extends(this, atoms)); + } + + /// + /// Check if the given program literal is true. + /// + /// The given program literal. + /// Whether the given program literal is true. + public bool IsTrue(int literal) + { + var literalValue = new ClingoLiteral() + { + Value = literal + }; + + Clingo.HandleClingoError(m_module.IsTrue(this, literalValue, out bool result)); + + return result; + } + + /// + /// Return the list of atoms, terms, or CSP assignments in the model. + /// + /// Select all atoms in the model (independent of #show statements). + /// Select all terms displayed with #show statements in the model. + /// Select all atoms and terms as outputted by clingo. + /// Select all csp assignments (independent of #show statements). + /// Return the complement of the answer set w.r.t. to the atoms known to the grounder. (Does not affect csp assignments.) + /// The selected symbols. + public List GetSymbols(bool atoms = false, bool terms = false, bool shown = false, bool csp = false, bool complement = false) + { + ClingoShowType atomset = 0; + if (atoms) { atomset |= ClingoShowType.Atoms; } + if (terms) { atomset |= ClingoShowType.Terms; } + if (shown) { atomset |= ClingoShowType.Shown; } + if (csp) { atomset |= ClingoShowType.CSP; } + if (complement) { atomset |= ClingoShowType.Complement; } + + Clingo.HandleClingoError(m_module.GetSymbols(m_clingoModel, atomset, out var symbols)); + + return symbols.Select(symbol => new Symbol(symbol)).ToList(); + } + + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + List ret = GetSymbols(shown: true); + + bool comma = false; + foreach (Symbol symbol in ret) + { + if (comma) + { + sb.Append(" "); + } + else + { + comma = true; + } + + if (symbol.Type == SymbolType.Function) + { + string name = symbol.Name; + List args = symbol.Arguments; + if (args.Count == 2 && name.Equals("$")) + { + sb.Append($"{args[0]}={args[1]}"); + } + else + { + sb.Append($"{symbol}"); + } + } + else + { + sb.Append($"{symbol}"); + } + } + + return sb.ToString(); + } + + #endregion + } +} diff --git a/src/ClingoSharp/ModelType.cs b/src/ClingoSharp/ModelType.cs new file mode 100644 index 0000000..2ce49f4 --- /dev/null +++ b/src/ClingoSharp/ModelType.cs @@ -0,0 +1,101 @@ +using ClingoSharp.Enums; +using System.Collections.Generic; + +namespace ClingoSharp +{ + /// + /// Enumeration of the different types of models. + /// + public sealed class ModelType : Enumeration + { + #region Class attributes + + private static readonly string[] ModelTypeNames = new string[] + { + "StableModel", + "BraveConsequences", + "CautiousConsequences" + }; + + #endregion + + #region Class Properties + + /// + /// The model captures a stable model + /// + public static ModelType StableModel => new ModelType(0); + + /// + /// The model stores the set of brave consequences + /// + public static ModelType BraveConsequences => new ModelType(1); + + /// + /// The model stores the set of cautious consequences + /// + public static ModelType CautiousConsequences => new ModelType(2); + + #endregion + + #region Instance Properties + + public new string Name => ModelTypeNames[Value]; + + #endregion + + #region Constructors + + private ModelType(int value) : base(value) { } + + #endregion + + #region Class methods + + /// + public new static IEnumerable GetNames() + { + return (string[])ModelTypeNames.Clone(); + } + + /// + public new static IEnumerable GetValues() + { + return new ModelType[] { StableModel, BraveConsequences, CautiousConsequences }; + } + + #endregion + + #region Instance methods + + /// + public override int CompareTo(Enumeration other) + { + if ((other == null) || !(other is ModelType)) + { + return 1; + } + + return Value.CompareTo(other.Value); + } + + /// + public override bool Equals(Enumeration other) + { + if ((other == null) || !(other is ModelType)) + { + return false; + } + + return Value.Equals(other.Value); + } + + /// + public override string ToString() + { + return $"CligoSharp.ModelType<{Name}>"; + } + + #endregion + } +} \ No newline at end of file diff --git a/src/ClingoSharp/SolveControl.cs b/src/ClingoSharp/SolveControl.cs new file mode 100644 index 0000000..ba6f066 --- /dev/null +++ b/src/ClingoSharp/SolveControl.cs @@ -0,0 +1,23 @@ +namespace ClingoSharp +{ + /// + /// Object that allows for controlling a running search. + /// + public sealed class SolveControl + { + #region Attributes + + private CoreServices.Types.SolveControl m_clingoSolveControl; + + #endregion + + #region Constructors + + internal SolveControl(CoreServices.Types.SolveControl clingoSolveControl) + { + m_clingoSolveControl = clingoSolveControl; + } + + #endregion + } +} \ No newline at end of file diff --git a/src/ClingoSharp/SolveHandle.cs b/src/ClingoSharp/SolveHandle.cs new file mode 100644 index 0000000..b85575f --- /dev/null +++ b/src/ClingoSharp/SolveHandle.cs @@ -0,0 +1,118 @@ +using ClingoSharp.CoreServices; +using ClingoSharp.CoreServices.Interfaces.Modules; +using System; +using System.Collections; +using System.Collections.Generic; +using ClingoModel = ClingoSharp.CoreServices.Types.Model; +using ClingoSolveHandle = ClingoSharp.CoreServices.Types.SolveHandle; +using ClingoSolveResult = ClingoSharp.CoreServices.Enums.SolveResult; + +namespace ClingoSharp +{ + /// + /// Handle for solve calls. + /// + public sealed class SolveHandle : IEnumerable + { + #region Attributes + + private static readonly ISolveHandleModule m_module; + private readonly ClingoSolveHandle m_clingoSolveHandle; + + #endregion + + #region Constructors + + static SolveHandle() + { + m_module = Repository.GetModule(); + } + + public SolveHandle(ClingoSolveHandle clingoSolveHandle) + { + m_clingoSolveHandle = clingoSolveHandle; + } + + #endregion + + #region Class Methods + + public static implicit operator ClingoSolveHandle(SolveHandle solveHandle) + { + return solveHandle.m_clingoSolveHandle; + } + + public static implicit operator SolveHandle(ClingoSolveHandle clingoSolveHandle) + { + return new SolveHandle(clingoSolveHandle); + } + + #endregion + + #region Instance Methods + + public void Cancel() + { + Clingo.HandleClingoError(m_module.Cancel(this)); + } + + public SolveResult Get() + { + Clingo.HandleClingoError(m_module.Get(this, out ClingoSolveResult result)); + + bool? satisfiable = null; + if (result.HasFlag(ClingoSolveResult.Satisfiable)) + { + satisfiable = true; + } + else if (result.HasFlag(ClingoSolveResult.Unsatisfiable)) + { + satisfiable = false; + } + + return new SolveResult() + { + IsSatisfiable = satisfiable, + IsUnSatisfiable = satisfiable.HasValue ? !satisfiable : null, + IsUnknown = !satisfiable.HasValue, + IsExhausted = result.HasFlag(ClingoSolveResult.Exhausted), + IsInterrupted = result.HasFlag(ClingoSolveResult.Interrupted) + }; + } + + public void Resume() + { + Clingo.HandleClingoError(m_module.Resume(this)); + } + + public bool Wait(float? timeout = null) + { + m_module.Wait(this, Convert.ToDouble(timeout.HasValue ? -timeout : 0.0f), out bool result); + + return result; + } + + public IEnumerator GetEnumerator() + { + ClingoModel modelPtr; + do + { + Clingo.HandleClingoError(m_module.Resume(this)); + Clingo.HandleClingoError(m_module.Model(this, out modelPtr)); + + if (modelPtr.Object != IntPtr.Zero) + { + yield return new Model(modelPtr); + } + } + while (modelPtr.Object != IntPtr.Zero); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + #endregion + } +} diff --git a/src/ClingoSharp/SolveResult.cs b/src/ClingoSharp/SolveResult.cs new file mode 100644 index 0000000..5396b06 --- /dev/null +++ b/src/ClingoSharp/SolveResult.cs @@ -0,0 +1,44 @@ +namespace ClingoSharp +{ + /// + /// Captures the result of a solve call. + /// + public sealed class SolveResult + { + #region Properties + + /// + /// true if the search space was exhausted. + /// + public bool IsExhausted { get; internal set; } + + /// + /// true if the search was interrupted. + /// + public bool IsInterrupted { get; internal set; } + + /// + /// true if the problem is satisfiable, false if the problem is unsatisfiable, or null if the satisfiablity is not known. + /// + public bool? IsSatisfiable { get; internal set; } + + /// + /// true if the satisfiablity is not known. + /// + /// This is equivalent to satisfiable is null + public bool IsUnknown { get; internal set; } + + /// + /// true if the problem is unsatisfiable, false if the problem is satisfiable, or null if the satisfiablity is not known. + /// + public bool? IsUnSatisfiable { get; internal set; } + + #endregion + + #region Constructors + + internal SolveResult() { } + + #endregion + } +} diff --git a/src/ClingoSharp/StatisticsMap.cs b/src/ClingoSharp/StatisticsMap.cs new file mode 100644 index 0000000..e6845de --- /dev/null +++ b/src/ClingoSharp/StatisticsMap.cs @@ -0,0 +1,9 @@ +namespace ClingoSharp +{ + /// + /// Object to capture statistics stored in a map. + /// + public sealed class StatisticsMap + { + } +} diff --git a/src/ClingoSharp/Symbol.cs b/src/ClingoSharp/Symbol.cs new file mode 100644 index 0000000..bf09e81 --- /dev/null +++ b/src/ClingoSharp/Symbol.cs @@ -0,0 +1,360 @@ +using ClingoSharp.CoreServices; +using ClingoSharp.CoreServices.Interfaces; +using ClingoSharp.CoreServices.Interfaces.Modules; +using System; +using System.Collections.Generic; +using System.Linq; +using ClingoSymbol = ClingoSharp.CoreServices.Types.Symbol; +using ClingoSymbolType = ClingoSharp.CoreServices.Enums.SymbolType; + +namespace ClingoSharp +{ + /// + /// Represents a gringo symbol. + /// This includes numbers, strings, functions (including constants with len(arguments) == 0 and tuples with len(name) == 0), #inf and #sup. + /// + public sealed class Symbol : IEquatable, IComparable + { + #region Attributes + + private static readonly ISymbolModule m_module; + private readonly ClingoSymbol m_clingoSymbol; + + #endregion + + #region Class properties + + /// + /// Represents a symbol of type + /// + public static Symbol Infimum + { + get + { + m_module.CreateInfimum(out var symbol); + return new Symbol(symbol); + } + } + + /// + /// Represents a symbol of type + /// + public static Symbol Supremum + { + get + { + m_module.CreateSupremum(out var symbol); + return new Symbol(symbol); + } + } + + #endregion + + #region Instance properties + + /// + /// The arguments of a function. + /// + public List Arguments + { + get + { + Clingo.HandleClingoError(m_module.GetArguments(this, out ClingoSymbol[] arguments)); + return arguments.Select(argument => new Symbol(argument)).ToList(); + } + } + + /// + /// The name of a function. + /// + public string Name + { + get + { + Clingo.HandleClingoError(m_module.GetName(this, out string name)); + return name; + } + } + + /// + /// The inverted sign of a function. + /// + public bool IsNegative + { + get + { + Clingo.HandleClingoError(m_module.IsNegative(this, out bool negative)); + return negative; + } + } + + /// + /// The value of a number. + /// + public int Number + { + get + { + Clingo.HandleClingoError(m_module.GetNumber(this, out int number)); + return number; + } + } + + /// + /// The sign of a function. + /// + public bool IsPositive + { + get + { + Clingo.HandleClingoError(m_module.IsPositive(this, out bool positive)); + return positive; + } + } + + /// + /// The value of a string. + /// + public string String + { + get + { + Clingo.HandleClingoError(m_module.GetString(this, out string value)); + return value; + } + } + + /// + /// The type of the symbol. + /// + public SymbolType Type + { + get + { + var type = m_module.GetType(this); + + return type switch + { + ClingoSymbolType.Infimum => SymbolType.Infimum, + ClingoSymbolType.Number => SymbolType.Number, + ClingoSymbolType.String => SymbolType.String, + ClingoSymbolType.Function => SymbolType.Function, + ClingoSymbolType.Supremum => SymbolType.Supremum, + _ => null + }; + } + } + + #endregion + + #region Constructors + + static Symbol() + { + m_module = Repository.GetModule(); + } + + public Symbol(ClingoSymbol clingoSymbol) + { + m_clingoSymbol = clingoSymbol; + } + + /// + /// Construct a numeric symbol given a number. + /// + /// The given number + public Symbol(int value) + { + m_module.CreateNumber(value, out var symbol); + m_clingoSymbol = symbol; + } + + /// + /// Construct a string symbol given a string. + /// + /// The given string + public Symbol(string value) + { + m_module.CreateString(value, out var symbol); + m_clingoSymbol = symbol; + } + + /// + /// A shortcut for Symbol("", arguments). + /// + /// The arguments in form of a list of symbols. + public Symbol(List arguments) + { + var symbols = arguments.Select(arg => arg.m_clingoSymbol).ToArray(); + m_module.CreateFunction("", symbols, false, out var symbol); + m_clingoSymbol = symbol; + } + + /// + /// Construct a function symbol. + /// + /// This includes constants and tuples. Constants have an empty argument list and tuples have an empty name. Functions can represent classically negated atoms. Argument has to be set to false to represent such atoms. + /// The name of the function (empty for tuples) + /// The arguments in form of a list of symbols + /// The sign of the function (tuples must not have signs) + public Symbol(string name, List arguments = null, bool positive = true) + { + var symbols = arguments.Select(arg => arg.m_clingoSymbol).ToArray(); + m_module.CreateFunction(name, symbols, positive, out var symbol); + m_clingoSymbol = symbol; + } + + #endregion + + #region Class Methods + + /// + /// Gets the asociated API module in clingo + /// + /// The asociated module + public static IClingoModule GetModule() + { + return m_module; + } + + /// + /// Gets the symbol module in clingo + /// + /// The symbol module + public static ISymbolModule GetSymbolModule() + { + return m_module; + } + + public static implicit operator ClingoSymbol(Symbol symbol) + { + return symbol.m_clingoSymbol; + } + + public static implicit operator Symbol(ClingoSymbol clingoSymbol) + { + return new Symbol(clingoSymbol); + } + + /// + /// Construct a numeric symbol given a number. + /// + /// The given number + public static implicit operator Symbol(int value) + { + m_module.CreateNumber(value, out var symbol); + return new Symbol(symbol); + } + + /// + /// Construct a string symbol given a string. + /// + /// The given string + public static implicit operator Symbol(string value) + { + m_module.CreateString(value, out var symbol); + return new Symbol(symbol); + } + + public static bool operator <(Symbol a, Symbol b) + { + return m_module.IsLessThan(a, b); + } + + public static bool operator <=(Symbol a, Symbol b) + { + return !m_module.IsLessThan(b, a); + } + + public static bool operator >(Symbol a, Symbol b) + { + return m_module.IsLessThan(b, a); + } + + public static bool operator >=(Symbol a, Symbol b) + { + return !m_module.IsLessThan(a, b); + } + + public static bool operator ==(Symbol a, Symbol b) + { + return m_module.IsEqualTo(a, b); + } + + public static bool operator !=(Symbol a, Symbol b) + { + return !m_module.IsEqualTo(a, b); + } + + #endregion + + #region Instance Methods + + /// + /// Check if this is a function symbol with the given signature. + /// + /// The name of the function + /// The arity of the function + /// Whether the function matches + public bool Match(string name, int arity) + { + if (Type != SymbolType.Function) { return false; } + if (!string.Equals(Name, name)) { return false; } + if ((Arguments != null && arity != 0) || (Arguments.Count == arity)) { return false; } + return true; + } + + /// + public int CompareTo(Symbol other) + { + if (m_module.IsLessThan(this, other)) + { + return -1; + } + + if (m_module.IsLessThan(other, this)) + { + return 1; + } + + if (m_module.IsEqualTo(this, other)) + { + return 0; + } + + throw new InvalidOperationException($"cannot compare {this} with {other}"); + } + + /// + public bool Equals(Symbol other) + { + return m_module.IsEqualTo(this, other); + } + + /// + public override bool Equals(object obj) + { + if ((obj == null) || !(obj is Symbol)) + { + return false; + } + + return Equals(obj as Symbol); + } + + /// + public override int GetHashCode() + { + return Convert.ToInt32(m_module.GetHash(this).ToUInt32()); + } + + /// + public override string ToString() + { + Clingo.HandleClingoError(m_module.ToString(this, out string value)); + return value; + } + + #endregion + } +} diff --git a/src/ClingoSharp/SymbolType.cs b/src/ClingoSharp/SymbolType.cs new file mode 100644 index 0000000..d602462 --- /dev/null +++ b/src/ClingoSharp/SymbolType.cs @@ -0,0 +1,94 @@ +using ClingoSharp.Enums; +using System.Collections.Generic; + +namespace ClingoSharp +{ + /// + /// Enumeration of the different types of symbols. + /// + public sealed class SymbolType : Enumeration + { + #region Class attributes + + private static string[] SymbolNames => new string[] + { + "Infimun", + "Number", + "String", + "Function", + "Supremum" + }; + + #endregion + + #region Class Properties + + public static SymbolType Infimum => new SymbolType(0); + public static SymbolType Number => new SymbolType(1); + public static SymbolType String => new SymbolType(2); + public static SymbolType Function => new SymbolType(3); + public static SymbolType Supremum => new SymbolType(4); + + #endregion + + #region Instance Properties + + public new string Name => SymbolNames[Value]; + + #endregion + + #region Constructors + + private SymbolType(int value) : base(value) { } + + #endregion + + #region Class Methods + + /// + public new static IEnumerable GetNames() + { + return (string[])SymbolNames.Clone(); + } + + /// + public new static IEnumerable GetValues() + { + return new SymbolType[] { Infimum, Number, String, Function, Supremum }; + } + + #endregion + + #region Instance methods + + /// + public override int CompareTo(Enumeration other) + { + if ((other == null) || !(other is SymbolType)) + { + return 1; + } + + return Value.CompareTo(other.Value); + } + + /// + public override bool Equals(Enumeration other) + { + if ((other == null) || !(other is SymbolType)) + { + return false; + } + + return Value.Equals(other.Value); + } + + /// + public override string ToString() + { + return $"CligoSharp.SymbolType<{Name}>"; + } + + #endregion + } +} \ No newline at end of file diff --git a/src/ClingoSharp/SymbolicAtom.cs b/src/ClingoSharp/SymbolicAtom.cs new file mode 100644 index 0000000..93716cf --- /dev/null +++ b/src/ClingoSharp/SymbolicAtom.cs @@ -0,0 +1,100 @@ +using ClingoLiteral = ClingoSharp.CoreServices.Types.Literal; +using ClingoSymbol = ClingoSharp.CoreServices.Types.Symbol; +using ClingoSymbolicAtomIterator = ClingoSharp.CoreServices.Types.SymbolicAtomIterator; +using ClingoSymbolicAtoms = ClingoSharp.CoreServices.Types.SymbolicAtoms; + +namespace ClingoSharp +{ + public sealed class SymbolicAtom + { + #region Attributes + + private readonly ClingoSymbolicAtoms m_symbolicAtoms; + private readonly ClingoSymbolicAtomIterator m_position; + + #endregion + + #region Properties + + public bool IsExternal + { + get + { + Clingo.HandleClingoError(SymbolicAtoms.GetSymbolicAtomsModule().IsExternal(this, this, out bool external)); + return external; + } + } + + public bool IsFact + { + get + { + Clingo.HandleClingoError(SymbolicAtoms.GetSymbolicAtomsModule().IsFact(this, this, out bool fact)); + return fact; + } + } + + public int Literal + { + get + { + Clingo.HandleClingoError(SymbolicAtoms.GetSymbolicAtomsModule().GetLiteral(this, this, out ClingoLiteral literal)); + return literal; + } + } + + public Symbol Symbol + { + get + { + Clingo.HandleClingoError(SymbolicAtoms.GetSymbolicAtomsModule().GetSymbol(this, this, out ClingoSymbol symbol)); + return new Symbol(symbol); + } + } + + #endregion + + #region Class Methods + + public static implicit operator ClingoSymbolicAtoms(SymbolicAtom symbolicAtom) + { + return symbolicAtom.m_symbolicAtoms; + } + + public static implicit operator ClingoSymbolicAtomIterator(SymbolicAtom symbolicAtom) + { + return symbolicAtom.m_position; + } + + public static implicit operator Symbol(SymbolicAtom symbolicAtom) + { + return symbolicAtom.Symbol; + } + + public static implicit operator int(SymbolicAtom symbolicAtom) + { + return symbolicAtom.Literal; + } + + #endregion + + #region Constructors + + internal SymbolicAtom(ClingoSymbolicAtoms symbolicAtoms, ClingoSymbolicAtomIterator position) + { + m_symbolicAtoms = symbolicAtoms; + m_position = position; + } + + #endregion + + #region Instance Methods + + public bool Match(string name, int arity) + { + return Symbol.Match(name, arity); + } + + #endregion + } +} diff --git a/src/ClingoSharp/SymbolicAtomIterator.cs b/src/ClingoSharp/SymbolicAtomIterator.cs new file mode 100644 index 0000000..ee606ab --- /dev/null +++ b/src/ClingoSharp/SymbolicAtomIterator.cs @@ -0,0 +1,62 @@ +using System.Collections; +using System.Collections.Generic; +using ClingoSymbolicAtoms = ClingoSharp.CoreServices.Types.SymbolicAtoms; +using ClingoSymbolicAtomIterator = ClingoSharp.CoreServices.Types.SymbolicAtomIterator; + +namespace ClingoSharp +{ + public sealed class SymbolicAtomIterator : IEnumerable + { + #region Attributes + + private readonly ClingoSymbolicAtoms m_symbolicAtoms; + private ClingoSymbolicAtomIterator m_currentPosition; + + #endregion + + #region Constructors + + public SymbolicAtomIterator(ClingoSymbolicAtoms symbolicAtoms, ClingoSymbolicAtomIterator startPosition) + { + m_symbolicAtoms = symbolicAtoms; + m_currentPosition = startPosition; + } + + #endregion + + #region Class Methods + + public static implicit operator ClingoSymbolicAtoms(SymbolicAtomIterator iterator) + { + return iterator.m_symbolicAtoms; + } + + public static implicit operator ClingoSymbolicAtomIterator(SymbolicAtomIterator iterator) + { + return iterator.m_currentPosition; + } + + #endregion + + #region Instance Methods + + public IEnumerator GetEnumerator() + { + Clingo.HandleClingoError(SymbolicAtoms.GetSymbolicAtomsModule().IsValid(this, this, out bool valid)); + + while (valid) + { + yield return new SymbolicAtom(this, this); + Clingo.HandleClingoError(SymbolicAtoms.GetSymbolicAtomsModule().GetNext(this, this, out m_currentPosition)); + Clingo.HandleClingoError(SymbolicAtoms.GetSymbolicAtomsModule().IsValid(this, this, out valid)); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + #endregion + } +} diff --git a/src/ClingoSharp/SymbolicAtoms.cs b/src/ClingoSharp/SymbolicAtoms.cs new file mode 100644 index 0000000..afb0873 --- /dev/null +++ b/src/ClingoSharp/SymbolicAtoms.cs @@ -0,0 +1,209 @@ +using ClingoSharp.CoreServices; +using ClingoSharp.CoreServices.Interfaces.Modules; +using System; +using System.Collections; +using System.Collections.Generic; +using ClingoSymbolicAtomIterator = ClingoSharp.CoreServices.Types.SymbolicAtomIterator; +using ClingoSymbolicAtoms = ClingoSharp.CoreServices.Types.SymbolicAtoms; +using ClingoSymbol = ClingoSharp.CoreServices.Types.Symbol; +using ClingoSignature = ClingoSharp.CoreServices.Types.Signature; +using System.Linq; +using ClingoSharp.CoreServices.Interfaces; + +namespace ClingoSharp +{ + public sealed class SymbolicAtoms : IReadOnlyCollection, IReadOnlyDictionary + { + #region Attributes + + private static readonly ISymbolicAtomsModule m_module; + private readonly ClingoSymbolicAtoms m_clingoSymbolicAtoms; + + #endregion + + #region Properties + + /// + /// The list of predicate signatures occurring in the program. + /// The indicates the sign of the signature. + /// + public List> Signatures + { + get + { + Clingo.HandleClingoError(m_module.GetSignatures(this, out ClingoSignature[] signatures)); + return signatures.Select(s => new Tuple( + Symbol.GetSymbolModule().GetName(s), + Convert.ToInt32(Symbol.GetSymbolModule().GetArity(s)), + Symbol.GetSymbolModule().IsPositive(s) + )).ToList(); + } + } + + /// + public SymbolicAtom this[Symbol key] { + get + { + if (!TryGetValue(key, out SymbolicAtom value)) + { + throw new KeyNotFoundException(); + } + + return value; + } + } + + /// + public int Count + { + get + { + Clingo.HandleClingoError(m_module.GetSize(this, out UIntPtr size)); + return Convert.ToInt32(size.ToUInt32()); + } + } + + /// + public IEnumerable Keys + { + get + { + Clingo.HandleClingoError(m_module.GetBeginIterator(this, null, out ClingoSymbolicAtomIterator clingoIterator)); + var iterator = new SymbolicAtomIterator(this, clingoIterator); + + foreach (var symbolicAtom in iterator) + { + yield return symbolicAtom; + } + } + } + + /// + public IEnumerable Values + { + get + { + Clingo.HandleClingoError(m_module.GetBeginIterator(this, null, out ClingoSymbolicAtomIterator iterator)); + return new SymbolicAtomIterator(this, iterator); + } + } + + #endregion + + #region Constructors + + static SymbolicAtoms() + { + m_module = Repository.GetModule(); + } + + public SymbolicAtoms(ClingoSymbolicAtoms clingoSymbolicAtoms) + { + m_clingoSymbolicAtoms = clingoSymbolicAtoms; + } + + #endregion + + #region Class Methods + + /// + /// Gets the asociated API module in clingo + /// + /// The asociated module + public static IClingoModule GetModule() + { + return m_module; + } + + /// + /// Gets the symbolic atoms module in clingo + /// + /// The symbolic atoms module + public static ISymbolicAtomsModule GetSymbolicAtomsModule() + { + return m_module; + } + + public static implicit operator ClingoSymbolicAtoms(SymbolicAtoms symbolicAtoms) + { + return symbolicAtoms.m_clingoSymbolicAtoms; + } + + public static implicit operator SymbolicAtoms(ClingoSymbolicAtoms clingoSymbolicAtoms) + { + return new SymbolicAtoms(clingoSymbolicAtoms); + } + + #endregion + + #region Instance Methods + + + /// + /// Return an iterator over the symbolic atoms with the given signature + /// + /// The name of the signature + /// The arity of the signature + /// The sign of the signature + /// An + public IEnumerator BySignature(string name, int arity, bool positive = true) + { + Clingo.HandleClingoError(Symbol.GetSymbolModule().CreateSignature(name, Convert.ToUInt32(arity), positive, out ClingoSignature signature)); + Clingo.HandleClingoError(m_module.GetBeginIterator(this, signature, out ClingoSymbolicAtomIterator clingoIterator)); + + var iterator = new SymbolicAtomIterator(this, clingoIterator); + foreach (var symbolicAtom in iterator) + { + yield return symbolicAtom; + } + } + + /// + public bool ContainsKey(Symbol key) + { + return TryGetValue(key, out var _); + } + + /// + public IEnumerator GetEnumerator() + { + Clingo.HandleClingoError(m_module.GetBeginIterator(this, null, out ClingoSymbolicAtomIterator iterator)); + return new SymbolicAtomIterator(this, iterator).GetEnumerator(); + } + + /// + public bool TryGetValue(Symbol key, out SymbolicAtom value) + { + if (key != null) + { + throw new ArgumentNullException(); + } + + Clingo.HandleClingoError(m_module.Find(this, key, out ClingoSymbolicAtomIterator iterator)); + Clingo.HandleClingoError(m_module.IsValid(this, iterator, out bool valid)); + + value = valid ? new SymbolicAtom(this, iterator) : null; + return valid; + } + + /// + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + /// + IEnumerator> IEnumerable>.GetEnumerator() + { + Clingo.HandleClingoError(m_module.GetBeginIterator(this, null, out ClingoSymbolicAtomIterator clingoIterator)); + var iterator = new SymbolicAtomIterator(this, clingoIterator); + + foreach (var symbolicAtom in iterator) + { + yield return new KeyValuePair(symbolicAtom, symbolicAtom); + } + } + + #endregion + } +} diff --git a/src/ClingoSharp/Union.cs b/src/ClingoSharp/Union.cs new file mode 100644 index 0000000..fbfd64e --- /dev/null +++ b/src/ClingoSharp/Union.cs @@ -0,0 +1,461 @@ +using System; + +namespace ClingoSharp +{ + /// + /// Represents a union of two types + /// + /// + /// + public struct Union : IEquatable>, IComparable, IComparable>, ICloneable, IFormattable + { + private enum ValueState { Undefined, Value1, Value2 } + + #region Attributes + + private T1 value1; + private T2 value2; + private ValueState state; + + #endregion + + #region Constructors + + /// + /// Creates a union with value. + /// + /// A value + public Union(T1 value) + { + value1 = value; + value2 = default; + state = ValueState.Value1; + } + + /// + /// Creates a union with value. + /// + /// A value + public Union(T2 value) + { + value1 = default; + value2 = value; + state = ValueState.Value2; + } + + #endregion + + #region Methods + + /// + /// Sets the union as value. + /// + /// A value + public void Set(T1 value) + { + value1 = value; + value2 = default; + state = ValueState.Value1; + } + + /// + /// Sets the union as value. + /// + /// A value + public void Set(T2 value) + { + value1 = default; + value2 = value; + state = ValueState.Value2; + } + + /// + /// Checks if the union has the type setted. + /// + /// The type of the union + /// True if the union has the type setted, false otherwise + public bool IsType(Type type) + { + if (type == typeof(T1)) + { + return state == ValueState.Value1; + } + else if (type == typeof(T2)) + { + return state == ValueState.Value2; + } + + return false; + } + + /// + /// Checks if the union has the type setted. + /// + /// The type of the union + /// True if the union has the type setted, false otherwise + public bool IsType() + { + return IsType(typeof(T)); + } + + /// + /// Tries to get a value. + /// + /// The type of the value + /// The result value + /// True if the union has setted the value with type, false otherwise + public bool TryGet(Type type, out object value) + { + if (type == typeof(T1)) + { + if (state == ValueState.Value1) + { + value = value1; + return true; + } + } + + if (type == typeof(T2)) + { + if (state == ValueState.Value2) + { + value = value2; + return true; + } + } + + value = null; + return false; + } + + /// + /// Tries to get a value. + /// + /// The type of the value + /// The result value + /// True if the union has setted the value with type, false otherwise + public bool TryGet(out T value) + { + var success = TryGet(typeof(T), out object val); + value = (T)val; + return success; + } + + /// + /// Gets a value. + /// + /// The type of the value + /// The result value + /// The union is not the type setted + public object Get(Type type) + { + if (TryGet(type, out object value)) + { + return value; + } + else + { + throw new FieldAccessException($"{typeof(Union).Name} is not a {type.Name} value"); + } + } + + /// + /// Gets a value. + /// + /// The type of the value + /// The result value + /// The union have not a value + public T Get() + { + return (T)Get(typeof(T)); + } + + #endregion + + #region Clonable implementation + + /// + /// Converts a value in a + /// + /// The value to convert in a + public static implicit operator Union(T1 value) + { + return new Union(value); + } + + /// + /// Converts a value in a + /// + /// The value to convert in a + public static implicit operator Union(T2 value) + { + return new Union(value); + } + + /// + /// Gets the value + /// + /// A value + /// The union have not a value + public static implicit operator T1(Union union) + { + if (union.state != ValueState.Value1) + { + throw new FieldAccessException($"{typeof(Union).Name} is not a {typeof(T1).Name} value"); + } + + return union.value1; + } + + /// + /// Gets the value + /// + /// A value + /// The union have not a value + public static implicit operator T2(Union union) + { + if (union.state != ValueState.Value2) + { + throw new FieldAccessException($"{typeof(Union).Name} is not a {typeof(T2).Name} value"); + } + + return union.value2; + } + + /// + public object Clone() + { + if (state == ValueState.Value1) + { + T1 value = value1; + if (value is ICloneable) + { + value = (T1)((ICloneable)value).Clone(); + } + + Union newUnion = new Union(value); + return newUnion; + } + else if (state == ValueState.Value2) + { + T2 value = value2; + if (value is ICloneable) + { + value = (T2)((ICloneable)value).Clone(); + } + + Union newUnion = new Union(value); + return newUnion; + } + + throw new InvalidOperationException($"The {typeof(Union).Name} is not initialized"); + } + + #endregion + + #region Equatable implementation + + /// + /// Indicates whether the current is equal to another . + /// + /// The value + /// An object to compare with + /// true if the current is equal to the other ; otherwise, false. + public static bool operator ==(Union union, object other) + { + return union.Equals(other); + } + + /// + /// Indicates whether the current object is not equal to another object of the same type. + /// + /// The value + /// An object to compare with + /// false if the current object is equal to the parameter; otherwise, true. + public static bool operator !=(Union union, object other) + { + return !union.Equals(other); + } + + /// + public override bool Equals(object obj) + { + if ((obj == null) || !(obj is Union)) + { + return false; + } + + return Equals((Union)obj); + } + + /// + /// Indicates whether the current is equal to another . + /// + /// A to compare with this object + /// true if the current is equal to the other ; otherwise, false. + public bool Equals(Union other) + { + if ((state == other.state) && (state == ValueState.Value1)) + { + return value1.Equals(other.value1); + } + else if ((state == other.state) && (state == ValueState.Value2)) + { + return value2.Equals(other.value2); + } + + return false; + } + + /// + public override int GetHashCode() + { + if (state == ValueState.Value1) + { + return value1.GetHashCode(); + } + + if (state == ValueState.Value2) + { + return value2.GetHashCode(); + } + + return base.GetHashCode(); + } + + #endregion + + #region Comparable implementation + + /// + /// if the is not comparable + public int CompareTo(Union other) + { + if ((state == other.state) && (state == ValueState.Value1)) + { + if (value1 is IComparable) + { + return ((IComparable)value1).CompareTo(other.value1); + } + + throw new InvalidOperationException(); + } + else if ((state == other.state) && (state == ValueState.Value2)) + { + if (value2 is IComparable) + { + return ((IComparable)value2).CompareTo(other.value2); + } + + throw new InvalidOperationException(); + } + + throw new InvalidOperationException(); + } + + /// + /// if the is not comparable + public int CompareTo(object obj) + { + if ((obj == null) || !(obj is Union)) + { + throw new ArgumentException($"{obj.GetType().Name} is not {typeof(Union).Name}"); + } + + return CompareTo((Union)obj); + } + + /// + /// Compares the current instance with another object of the same type. + /// + /// The value + /// An object to compare with + /// true if the current instance precedes the parameter; otherwise, false + /// if the is not comparable + public static bool operator <(Union union, object other) + { + return union.CompareTo(other) < 0; + } + + /// + /// Compares the current instance with another object of the same type. + /// + /// The value + /// An object to compare with + /// true if the current instance precedes or is equals to the parameter; otherwise, false + /// if the is not comparable + public static bool operator <=(Union union, object other) + { + return union.CompareTo(other) <= 0; + } + + /// + /// Compares the current instance with another object of the same type. + /// + /// The value + /// An object to compare with + /// true if the current instance follows the parameter; otherwise, false + /// if the is not comparable + public static bool operator >(Union union, object other) + { + return union.CompareTo(other) > 0; + } + + /// + /// Compares the current instance with another object of the same type. + /// + /// The value + /// An object to compare with + /// true if the current instance follows or is equals to the parameter; otherwise, false + /// if the is not comparable + public static bool operator >=(Union union, object other) + { + return union.CompareTo(other) >= 0; + } + + #endregion + + #region Formattable implementation + + /// + public string ToString(string format, IFormatProvider formatProvider) + { + if (state == ValueState.Value1) + { + if (value1 is IFormattable) + { + return ((IFormattable)value1).ToString(format, formatProvider); + } + + return value1.ToString(); + } + else if (state == ValueState.Value2) + { + if (value2 is IFormattable) + { + return ((IFormattable)value2).ToString(format, formatProvider); + } + + return value2.ToString(); + } + + return ToString(); + } + + public override string ToString() + { + if (state == ValueState.Value1) + { + return value1.ToString(); + } + else if (state == ValueState.Value2) + { + return value2.ToString(); + } + + return base.ToString(); + } + + #endregion + } +} diff --git a/tests/ClingoSharp.Tests/ClingoTests.cs b/tests/CingoTests.cs similarity index 100% rename from tests/ClingoSharp.Tests/ClingoTests.cs rename to tests/CingoTests.cs diff --git a/tests/ClingoSharp.Test.csproj b/tests/ClingoSharp.Test.csproj new file mode 100644 index 0000000..e18da9f --- /dev/null +++ b/tests/ClingoSharp.Test.csproj @@ -0,0 +1,23 @@ + + + + netcoreapp3.1 + + false + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + diff --git a/tests/ClingoSharp.Tests/ClingoSharp.Tests.csproj b/tests/ClingoSharp.Tests/ClingoSharp.Tests.csproj deleted file mode 100644 index a463a65..0000000 --- a/tests/ClingoSharp.Tests/ClingoSharp.Tests.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - net48 - - false - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - diff --git a/tests/ClingoSharp.Tests/ControlTests.cs b/tests/ControlTests.cs similarity index 99% rename from tests/ClingoSharp.Tests/ControlTests.cs rename to tests/ControlTests.cs index e37a0bd..8166af1 100644 --- a/tests/ClingoSharp.Tests/ControlTests.cs +++ b/tests/ControlTests.cs @@ -11,4 +11,4 @@ public void NewControl() Control control = new Control(); } } -} +} \ No newline at end of file diff --git a/tests/results/coverage.info b/tests/results/coverage.info new file mode 100644 index 0000000..a15079e --- /dev/null +++ b/tests/results/coverage.info @@ -0,0 +1,2850 @@ +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Shared\Repository.cs +FN:37,T ClingoSharp.CoreServices.Repository::GetModule() +FNDA:2,T ClingoSharp.CoreServices.Repository::GetModule() +DA:38,2 +DA:39,2 +DA:40,2 +FN:47,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.CoreServices.Repository::GetModule(System.Type) +FNDA:0,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.CoreServices.Repository::GetModule(System.Type) +DA:48,0 +DA:49,0 +DA:50,0 +FN:23,System.Void ClingoSharp.CoreServices.Repository::.cctor() +FNDA:1,System.Void ClingoSharp.CoreServices.Repository::.cctor() +DA:24,1 +DA:25,1 +DA:26,1 +LF:9 +LH:6 +BRF:0 +BRH:0 +FNF:3 +FNH:2 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\Atom.cs +FN:9,System.UInt32 ClingoSharp.CoreServices.Types.Atom::get_Value() +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Atom::get_Value() +DA:10,0 +FN:16,System.UInt32 ClingoSharp.CoreServices.Types.Atom::op_Implicit(ClingoSharp.CoreServices.Types.Atom) +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Atom::op_Implicit(ClingoSharp.CoreServices.Types.Atom) +DA:17,0 +DA:18,0 +DA:19,0 +FN:25,ClingoSharp.CoreServices.Types.Atom ClingoSharp.CoreServices.Types.Atom::op_Implicit(System.UInt32) +FNDA:0,ClingoSharp.CoreServices.Types.Atom ClingoSharp.CoreServices.Types.Atom::op_Implicit(System.UInt32) +DA:26,0 +DA:27,0 +DA:28,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\Control.cs +FN:10,System.IntPtr ClingoSharp.CoreServices.Types.Control::get_Object() +FNDA:0,System.IntPtr ClingoSharp.CoreServices.Types.Control::get_Object() +DA:11,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +FNF:1 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\Id.cs +FN:9,System.UInt32 ClingoSharp.CoreServices.Types.Id::get_Value() +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Id::get_Value() +DA:10,0 +FN:16,System.UInt32 ClingoSharp.CoreServices.Types.Id::op_Implicit(ClingoSharp.CoreServices.Types.Id) +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Id::op_Implicit(ClingoSharp.CoreServices.Types.Id) +DA:17,0 +DA:18,0 +DA:19,0 +FN:25,ClingoSharp.CoreServices.Types.Id ClingoSharp.CoreServices.Types.Id::op_Implicit(System.UInt32) +FNDA:0,ClingoSharp.CoreServices.Types.Id ClingoSharp.CoreServices.Types.Id::op_Implicit(System.UInt32) +DA:26,0 +DA:27,0 +DA:28,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\Literal.cs +FN:9,System.Int32 ClingoSharp.CoreServices.Types.Literal::get_Value() +FNDA:0,System.Int32 ClingoSharp.CoreServices.Types.Literal::get_Value() +DA:10,0 +FN:16,System.Int32 ClingoSharp.CoreServices.Types.Literal::op_Implicit(ClingoSharp.CoreServices.Types.Literal) +FNDA:0,System.Int32 ClingoSharp.CoreServices.Types.Literal::op_Implicit(ClingoSharp.CoreServices.Types.Literal) +DA:17,0 +DA:18,0 +DA:19,0 +FN:25,ClingoSharp.CoreServices.Types.Literal ClingoSharp.CoreServices.Types.Literal::op_Implicit(System.Int32) +FNDA:0,ClingoSharp.CoreServices.Types.Literal ClingoSharp.CoreServices.Types.Literal::op_Implicit(System.Int32) +DA:26,0 +DA:27,0 +DA:28,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\Location.cs +FN:15,System.String ClingoSharp.CoreServices.Types.Location::get_BeginFile() +FNDA:0,System.String ClingoSharp.CoreServices.Types.Location::get_BeginFile() +DA:16,0 +FN:20,System.String ClingoSharp.CoreServices.Types.Location::get_EndFile() +FNDA:0,System.String ClingoSharp.CoreServices.Types.Location::get_EndFile() +DA:21,0 +FN:25,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_BeginLine() +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_BeginLine() +DA:26,0 +FN:30,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_BeginColumn() +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_BeginColumn() +DA:31,0 +FN:35,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_EndLine() +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_EndLine() +DA:36,0 +FN:40,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_EndColumn() +FNDA:0,System.UInt32 ClingoSharp.CoreServices.Types.Location::get_EndColumn() +DA:41,0 +LF:6 +LH:0 +BRF:0 +BRH:0 +FNF:6 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\Model.cs +FN:10,System.IntPtr ClingoSharp.CoreServices.Types.Model::get_Object() +FNDA:0,System.IntPtr ClingoSharp.CoreServices.Types.Model::get_Object() +DA:11,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +FNF:1 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\Part.cs +FN:17,System.String ClingoSharp.CoreServices.Types.Part::get_Name() +FNDA:0,System.String ClingoSharp.CoreServices.Types.Part::get_Name() +DA:18,0 +FN:22,ClingoSharp.CoreServices.Types.Symbol[] ClingoSharp.CoreServices.Types.Part::get_Params() +FNDA:0,ClingoSharp.CoreServices.Types.Symbol[] ClingoSharp.CoreServices.Types.Part::get_Params() +DA:23,0 +LF:2 +LH:0 +BRF:0 +BRH:0 +FNF:2 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\Signature.cs +FN:10,System.UInt64 ClingoSharp.CoreServices.Types.Signature::get_Value() +FNDA:0,System.UInt64 ClingoSharp.CoreServices.Types.Signature::get_Value() +DA:11,0 +FN:17,System.UInt64 ClingoSharp.CoreServices.Types.Signature::op_Implicit(ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.UInt64 ClingoSharp.CoreServices.Types.Signature::op_Implicit(ClingoSharp.CoreServices.Types.Signature) +DA:18,0 +DA:19,0 +DA:20,0 +FN:26,ClingoSharp.CoreServices.Types.Signature ClingoSharp.CoreServices.Types.Signature::op_Implicit(System.UInt64) +FNDA:0,ClingoSharp.CoreServices.Types.Signature ClingoSharp.CoreServices.Types.Signature::op_Implicit(System.UInt64) +DA:27,0 +DA:28,0 +DA:29,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\SolveControl.cs +FN:10,System.IntPtr ClingoSharp.CoreServices.Types.SolveControl::get_Object() +FNDA:0,System.IntPtr ClingoSharp.CoreServices.Types.SolveControl::get_Object() +DA:11,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +FNF:1 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\SolveHandle.cs +FN:10,System.IntPtr ClingoSharp.CoreServices.Types.SolveHandle::get_Object() +FNDA:0,System.IntPtr ClingoSharp.CoreServices.Types.SolveHandle::get_Object() +DA:11,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +FNF:1 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\Symbol.cs +FN:10,System.UInt64 ClingoSharp.CoreServices.Types.Symbol::get_Value() +FNDA:0,System.UInt64 ClingoSharp.CoreServices.Types.Symbol::get_Value() +DA:11,0 +FN:17,System.UInt64 ClingoSharp.CoreServices.Types.Symbol::op_Implicit(ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,System.UInt64 ClingoSharp.CoreServices.Types.Symbol::op_Implicit(ClingoSharp.CoreServices.Types.Symbol) +DA:18,0 +DA:19,0 +DA:20,0 +FN:26,ClingoSharp.CoreServices.Types.Symbol ClingoSharp.CoreServices.Types.Symbol::op_Implicit(System.UInt64) +FNDA:0,ClingoSharp.CoreServices.Types.Symbol ClingoSharp.CoreServices.Types.Symbol::op_Implicit(System.UInt64) +DA:27,0 +DA:28,0 +DA:29,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\SymbolicAtomIterator.cs +FN:14,System.UInt64 ClingoSharp.CoreServices.Types.SymbolicAtomIterator::get_Value() +FNDA:0,System.UInt64 ClingoSharp.CoreServices.Types.SymbolicAtomIterator::get_Value() +DA:15,0 +FN:21,System.UInt64 ClingoSharp.CoreServices.Types.SymbolicAtomIterator::op_Implicit(ClingoSharp.CoreServices.Types.SymbolicAtomIterator) +FNDA:0,System.UInt64 ClingoSharp.CoreServices.Types.SymbolicAtomIterator::op_Implicit(ClingoSharp.CoreServices.Types.SymbolicAtomIterator) +DA:22,0 +DA:23,0 +DA:24,0 +FN:30,ClingoSharp.CoreServices.Types.SymbolicAtomIterator ClingoSharp.CoreServices.Types.SymbolicAtomIterator::op_Implicit(System.UInt64) +FNDA:0,ClingoSharp.CoreServices.Types.SymbolicAtomIterator ClingoSharp.CoreServices.Types.SymbolicAtomIterator::op_Implicit(System.UInt64) +DA:31,0 +DA:32,0 +DA:33,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\SymbolicAtoms.cs +FN:10,System.IntPtr ClingoSharp.CoreServices.Types.SymbolicAtoms::get_Object() +FNDA:0,System.IntPtr ClingoSharp.CoreServices.Types.SymbolicAtoms::get_Object() +DA:11,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +FNF:1 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\TruthValue.cs +FN:10,System.Int32 ClingoSharp.CoreServices.Types.TruthValue::get_Value() +FNDA:0,System.Int32 ClingoSharp.CoreServices.Types.TruthValue::get_Value() +DA:11,0 +FN:17,System.Int32 ClingoSharp.CoreServices.Types.TruthValue::op_Implicit(ClingoSharp.CoreServices.Types.TruthValue) +FNDA:0,System.Int32 ClingoSharp.CoreServices.Types.TruthValue::op_Implicit(ClingoSharp.CoreServices.Types.TruthValue) +DA:18,0 +DA:19,0 +DA:20,0 +FN:26,ClingoSharp.CoreServices.Types.TruthValue ClingoSharp.CoreServices.Types.TruthValue::op_Implicit(System.Int32) +FNDA:0,ClingoSharp.CoreServices.Types.TruthValue ClingoSharp.CoreServices.Types.TruthValue::op_Implicit(System.Int32) +DA:27,0 +DA:28,0 +DA:29,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Types\Weight.cs +FN:9,System.Int32 ClingoSharp.CoreServices.Types.Weight::get_Value() +FNDA:0,System.Int32 ClingoSharp.CoreServices.Types.Weight::get_Value() +DA:10,0 +FN:16,System.Int32 ClingoSharp.CoreServices.Types.Weight::op_Implicit(ClingoSharp.CoreServices.Types.Weight) +FNDA:0,System.Int32 ClingoSharp.CoreServices.Types.Weight::op_Implicit(ClingoSharp.CoreServices.Types.Weight) +DA:17,0 +DA:18,0 +DA:19,0 +FN:25,ClingoSharp.CoreServices.Types.Weight ClingoSharp.CoreServices.Types.Weight::op_Implicit(System.Int32) +FNDA:0,ClingoSharp.CoreServices.Types.Weight ClingoSharp.CoreServices.Types.Weight::op_Implicit(System.Int32) +DA:26,0 +DA:27,0 +DA:28,0 +LF:7 +LH:0 +BRF:0 +BRH:0 +FNF:3 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.CoreServices\Shared\ClingoContext.cs +FN:14,System.Reflection.Assembly ClingoSharp.CoreServices.Shared.ClingoContext::Load(System.Reflection.AssemblyName) +FNDA:8,System.Reflection.Assembly ClingoSharp.CoreServices.Shared.ClingoContext::Load(System.Reflection.AssemblyName) +DA:15,8 +DA:16,8 +DA:17,1 +DA:19,1 +DA:21,1 +DA:23,1 +DA:26,7 +DA:27,8 +BRDA:16,19,0,1 +BRDA:16,19,1,7 +FN:29,System.IntPtr ClingoSharp.CoreServices.Shared.ClingoContext::LoadUnmanagedDll(System.String) +FNDA:2,System.IntPtr ClingoSharp.CoreServices.Shared.ClingoContext::LoadUnmanagedDll(System.String) +DA:30,2 +DA:31,2 +DA:32,2 +DA:33,2 +DA:36,0 +DA:37,2 +BRDA:31,14,0,2 +BRDA:31,14,1,0 +FN:39,System.IntPtr ClingoSharp.CoreServices.Shared.ClingoContext::LoadNativeClingoLibrary() +FNDA:2,System.IntPtr ClingoSharp.CoreServices.Shared.ClingoContext::LoadNativeClingoLibrary() +DA:40,2 +DA:42,2 +DA:44,2 +DA:46,2 +DA:49,2 +DA:50,2 +DA:51,2 +DA:52,2 +DA:53,0 +DA:54,0 +DA:55,0 +DA:56,0 +DA:58,0 +DA:59,0 +DA:60,0 +DA:63,2 +DA:64,2 +BRDA:46,44,0,0 +BRDA:46,44,1,2 +BRDA:49,73,0,2 +BRDA:49,73,1,0 +BRDA:53,99,0,0 +BRDA:53,99,1,0 +FN:70,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.CoreServices.Shared.ClingoContext::GetModule(System.Type) +FNDA:2,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.CoreServices.Shared.ClingoContext::GetModule(System.Type) +DA:71,2 +DA:72,2 +DA:73,2 +DA:74,2 +DA:75,2 +FN:77,T ClingoSharp.CoreServices.Shared.ClingoContext::GetModule() +FNDA:2,T ClingoSharp.CoreServices.Shared.ClingoContext::GetModule() +DA:78,2 +DA:79,2 +DA:80,2 +LF:39 +LH:31 +BRF:10 +BRH:5 +FNF:5 +FNH:5 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\Clingo.cs +FN:30,System.String ClingoSharp.Clingo::get_Version() +FNDA:1,System.String ClingoSharp.Clingo::get_Version() +DA:31,1 +DA:32,1 +DA:33,1 +DA:34,1 +DA:35,1 +DA:37,1 +DA:38,1 +BRDA:32,11,0,1 +BRDA:32,11,1,1 +FN:63,System.Void ClingoSharp.Clingo::HandleClingoError(System.Boolean) +FNDA:1,System.Void ClingoSharp.Clingo::HandleClingoError(System.Boolean) +DA:64,1 +DA:65,1 +DA:66,0 +DA:67,0 +DA:68,0 +DA:70,0 +DA:73,0 +DA:75,0 +DA:77,0 +DA:79,0 +DA:81,0 +DA:83,0 +DA:84,1 +BRDA:65,7,0,0 +BRDA:68,27,0,0 +BRDA:68,27,1,0 +BRDA:70,53,2,0 +BRDA:70,53,3,0 +BRDA:70,53,4,0 +BRDA:70,53,5,0 +BRDA:70,53,1,0 +BRDA:70,53,0,0 +BRDA:65,7,1,1 +FN:90,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.Clingo::GetModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.Clingo::GetModule() +DA:91,0 +DA:92,0 +DA:93,0 +FN:99,ClingoSharp.CoreServices.Interfaces.Modules.IMainModule ClingoSharp.Clingo::GetMainModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.Modules.IMainModule ClingoSharp.Clingo::GetMainModule() +DA:100,0 +DA:101,0 +DA:102,0 +FN:17,System.Void ClingoSharp.Clingo::.cctor() +FNDA:1,System.Void ClingoSharp.Clingo::.cctor() +DA:18,1 +DA:46,1 +DA:47,1 +DA:48,1 +LF:30 +LH:14 +BRF:12 +BRH:3 +FNF:5 +FNH:3 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\Control.cs +FN:42,ClingoSharp.SymbolicAtoms ClingoSharp.Control::get_SymbolicAtoms() +FNDA:0,ClingoSharp.SymbolicAtoms ClingoSharp.Control::get_SymbolicAtoms() +DA:43,0 +DA:44,0 +DA:45,0 +DA:46,0 +FN:89,System.Void ClingoSharp.Control::Finalize() +FNDA:0,System.Void ClingoSharp.Control::Finalize() +DA:90,0 +DA:91,0 +DA:92,0 +FN:102,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.Control::GetModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.Control::GetModule() +DA:103,0 +DA:104,0 +DA:105,0 +FN:111,ClingoSharp.CoreServices.Interfaces.Modules.IControlModule ClingoSharp.Control::GetControlModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.Modules.IControlModule ClingoSharp.Control::GetControlModule() +DA:112,0 +DA:113,0 +DA:114,0 +FN:116,ClingoSharp.CoreServices.Types.Control ClingoSharp.Control::op_Implicit(ClingoSharp.Control) +FNDA:0,ClingoSharp.CoreServices.Types.Control ClingoSharp.Control::op_Implicit(ClingoSharp.Control) +DA:117,0 +DA:118,0 +DA:119,0 +FN:121,ClingoSharp.Control ClingoSharp.Control::op_Implicit(ClingoSharp.CoreServices.Types.Control) +FNDA:0,ClingoSharp.Control ClingoSharp.Control::op_Implicit(ClingoSharp.CoreServices.Types.Control) +DA:122,0 +DA:123,0 +DA:124,0 +FN:131,System.Void ClingoSharp.Control::Dispose() +FNDA:0,System.Void ClingoSharp.Control::Dispose() +DA:132,0 +DA:133,0 +DA:134,0 +DA:135,0 +DA:136,0 +DA:137,0 +DA:138,0 +DA:140,0 +DA:141,0 +BRDA:133,12,0,0 +BRDA:133,12,1,0 +FN:149,System.Void ClingoSharp.Control::Add(System.String,System.Collections.Generic.List`1,System.String) +FNDA:0,System.Void ClingoSharp.Control::Add(System.String,System.Collections.Generic.List`1,System.String) +DA:150,0 +DA:151,0 +DA:152,0 +BRDA:151,14,0,0 +BRDA:151,14,1,0 +FN:158,System.Void ClingoSharp.Control::Ground(System.Collections.Generic.List`1>>,System.Object) +FNDA:0,System.Void ClingoSharp.Control::Ground(System.Collections.Generic.List`1>>,System.Object) +DA:159,0 +DA:197,0 +DA:198,0 +DA:199,0 +DA:200,0 +DA:201,0 +DA:203,0 +DA:204,0 +BRDA:197,16,0,0 +BRDA:197,16,1,0 +BRDA:203,82,0,0 +BRDA:203,82,1,0 +FN:216,ClingoSharp.Union`2 ClingoSharp.Control::Solve(System.Collections.Generic.List`1,System.Int32>>,System.Func`2,System.Action`2,System.Action`1,System.Boolean,System.Boolean) +FNDA:0,ClingoSharp.Union`2 ClingoSharp.Control::Solve(System.Collections.Generic.List`1,System.Int32>>,System.Func`2,System.Action`2,System.Action`1,System.Boolean,System.Boolean) +DA:217,0 +DA:270,0 +DA:271,0 +DA:272,0 +DA:273,0 +DA:274,0 +DA:275,0 +DA:276,0 +DA:277,0 +DA:278,0 +DA:279,0 +DA:281,0 +DA:282,0 +DA:283,0 +DA:284,0 +DA:285,0 +DA:286,0 +DA:287,0 +DA:288,0 +DA:289,0 +DA:290,0 +DA:291,0 +DA:292,0 +DA:293,0 +DA:294,0 +DA:295,0 +DA:296,0 +DA:298,0 +DA:299,0 +DA:300,0 +DA:302,0 +DA:304,0 +DA:307,0 +DA:308,0 +DA:309,0 +DA:312,0 +DA:313,0 +BRDA:272,51,0,0 +BRDA:274,246,1,0 +BRDA:276,92,0,0 +BRDA:276,92,1,0 +BRDA:283,146,0,0 +BRDA:286,172,0,0 +BRDA:286,172,1,0 +BRDA:283,146,1,0 +BRDA:289,207,0,0 +BRDA:289,207,1,0 +BRDA:274,246,0,0 +BRDA:272,51,1,0 +BRDA:299,277,0,0 +BRDA:299,277,1,0 +BRDA:300,291,0,0 +BRDA:300,291,1,0 +BRDA:302,323,0,0 +BRDA:302,331,0,0 +BRDA:302,323,1,0 +BRDA:302,331,1,0 +BRDA:302,339,0,0 +BRDA:302,339,1,0 +BRDA:307,380,0,0 +BRDA:307,380,1,0 +BRDA:307,394,0,0 +BRDA:307,394,1,0 +FN:53,System.Void ClingoSharp.Control::.cctor() +FNDA:1,System.Void ClingoSharp.Control::.cctor() +DA:54,1 +DA:55,1 +DA:56,1 +FN:33,System.Void ClingoSharp.Control::.ctor(ClingoSharp.CoreServices.Types.Control) +FNDA:0,System.Void ClingoSharp.Control::.ctor(ClingoSharp.CoreServices.Types.Control) +DA:34,0 +DA:58,0 +DA:59,0 +DA:60,0 +DA:61,0 +FN:68,System.Void ClingoSharp.Control::.ctor(System.Collections.Generic.List`1,System.Action`2,System.Int32) +FNDA:1,System.Void ClingoSharp.Control::.ctor(System.Collections.Generic.List`1,System.Action`2,System.Int32) +DA:69,1 +DA:70,1 +DA:80,1 +DA:82,1 +DA:83,1 +BRDA:80,35,0,1 +BRDA:80,35,1,0 +FN:71,System.Void ClingoSharp.Control/<>c__DisplayClass7_0::<.ctor>g__loggerCallback|0(ClingoSharp.CoreServices.Enums.WarningCode,System.String,System.IntPtr) +FNDA:0,System.Void ClingoSharp.Control/<>c__DisplayClass7_0::<.ctor>g__loggerCallback|0(ClingoSharp.CoreServices.Enums.WarningCode,System.String,System.IntPtr) +DA:72,0 +DA:73,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:78,0 +BRDA:73,12,0,0 +BRDA:73,12,1,0 +FN:161,System.Boolean ClingoSharp.Control/<>c__DisplayClass15_0::g__groundCallback|0(ClingoSharp.CoreServices.Types.Location,System.String,ClingoSharp.CoreServices.Types.Symbol[],System.IntPtr,ClingoSharp.CoreServices.Callbacks.SymbolCallback,System.IntPtr) +FNDA:0,System.Boolean ClingoSharp.Control/<>c__DisplayClass15_0::g__groundCallback|0(ClingoSharp.CoreServices.Types.Location,System.String,ClingoSharp.CoreServices.Types.Symbol[],System.IntPtr,ClingoSharp.CoreServices.Callbacks.SymbolCallback,System.IntPtr) +DA:162,0 +DA:164,0 +DA:166,0 +DA:167,0 +DA:170,0 +DA:171,0 +DA:172,0 +DA:174,0 +DA:175,0 +DA:176,0 +DA:177,0 +DA:178,0 +DA:179,0 +DA:180,0 +DA:181,0 +DA:182,0 +DA:184,0 +DA:185,0 +DA:188,0 +DA:190,0 +DA:191,0 +DA:192,0 +DA:194,0 +BRDA:171,55,0,0 +BRDA:171,55,1,0 +BRDA:176,92,0,0 +BRDA:178,143,1,0 +BRDA:178,143,0,0 +BRDA:176,92,1,0 +FN:219,System.Boolean ClingoSharp.Control/<>c__DisplayClass16_0::g__notifyCallback|0(ClingoSharp.CoreServices.Enums.SolveEventType,System.IntPtr,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.Control/<>c__DisplayClass16_0::g__notifyCallback|0(ClingoSharp.CoreServices.Enums.SolveEventType,System.IntPtr,System.Boolean&) +DA:220,0 +DA:221,0 +DA:224,0 +DA:225,0 +DA:228,0 +DA:229,0 +DA:230,0 +DA:231,0 +DA:232,0 +DA:234,0 +DA:237,0 +DA:238,0 +DA:239,0 +DA:240,0 +DA:242,0 +DA:243,0 +DA:244,0 +DA:245,0 +DA:247,0 +DA:250,0 +DA:251,0 +DA:252,0 +DA:253,0 +DA:254,0 +DA:256,0 +DA:259,0 +DA:262,0 +DA:263,0 +DA:265,0 +DA:267,0 +BRDA:225,10,1,0 +BRDA:228,43,0,0 +BRDA:228,43,1,0 +BRDA:225,10,2,0 +BRDA:237,98,0,0 +BRDA:237,98,1,0 +BRDA:225,10,3,0 +BRDA:250,169,0,0 +BRDA:250,169,1,0 +BRDA:225,10,0,0 +LF:149 +LH:8 +BRF:54 +BRH:1 +FNF:16 +FNH:2 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\MessageCode.cs +FN:27,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_OperationUndefined() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_OperationUndefined() +DA:28,0 +FN:28,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_RuntimeError() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_RuntimeError() +DA:29,0 +FN:29,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_AtomUndefined() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_AtomUndefined() +DA:30,0 +FN:30,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_FileIncluded() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_FileIncluded() +DA:31,0 +FN:31,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_VariableUnbounded() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_VariableUnbounded() +DA:32,0 +FN:32,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_GlobalVariable() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_GlobalVariable() +DA:33,0 +FN:33,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_Other() +FNDA:0,ClingoSharp.MessageCode ClingoSharp.MessageCode::get_Other() +DA:34,0 +FN:39,System.String ClingoSharp.MessageCode::get_Name() +FNDA:0,System.String ClingoSharp.MessageCode::get_Name() +DA:40,0 +FN:53,System.Collections.Generic.IEnumerable`1 ClingoSharp.MessageCode::GetNames() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.MessageCode::GetNames() +DA:54,0 +DA:55,0 +DA:56,0 +FN:59,System.Collections.Generic.IEnumerable`1 ClingoSharp.MessageCode::GetValues() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.MessageCode::GetValues() +DA:60,0 +DA:61,0 +DA:62,0 +FN:69,System.Int32 ClingoSharp.MessageCode::CompareTo(ClingoSharp.Enums.Enumeration) +FNDA:0,System.Int32 ClingoSharp.MessageCode::CompareTo(ClingoSharp.Enums.Enumeration) +DA:70,0 +DA:71,0 +DA:72,0 +DA:73,0 +DA:76,0 +DA:77,0 +BRDA:71,2,0,0 +BRDA:71,2,1,0 +BRDA:71,21,0,0 +BRDA:71,21,1,0 +FN:80,System.Boolean ClingoSharp.MessageCode::Equals(ClingoSharp.Enums.Enumeration) +FNDA:0,System.Boolean ClingoSharp.MessageCode::Equals(ClingoSharp.Enums.Enumeration) +DA:81,0 +DA:82,0 +DA:83,0 +DA:84,0 +DA:87,0 +DA:88,0 +BRDA:82,2,0,0 +BRDA:82,2,1,0 +BRDA:82,21,0,0 +BRDA:82,21,1,0 +FN:91,System.String ClingoSharp.MessageCode::ToString() +FNDA:0,System.String ClingoSharp.MessageCode::ToString() +DA:92,0 +DA:93,0 +DA:94,0 +FN:45,System.Void ClingoSharp.MessageCode::.ctor(System.Int32) +FNDA:0,System.Void ClingoSharp.MessageCode::.ctor(System.Int32) +DA:46,0 +FN:12,System.Void ClingoSharp.MessageCode::.cctor() +FNDA:0,System.Void ClingoSharp.MessageCode::.cctor() +DA:13,0 +DA:14,0 +DA:15,0 +DA:16,0 +DA:17,0 +DA:18,0 +DA:19,0 +DA:20,0 +DA:21,0 +DA:22,0 +LF:40 +LH:0 +BRF:8 +BRH:0 +FNF:15 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\Model.cs +FN:36,ClingoSharp.SolveControl ClingoSharp.Model::get_Context() +FNDA:0,ClingoSharp.SolveControl ClingoSharp.Model::get_Context() +DA:37,0 +DA:38,0 +DA:39,0 +DA:40,0 +FN:49,System.Collections.Generic.List`1 ClingoSharp.Model::get_Cost() +FNDA:0,System.Collections.Generic.List`1 ClingoSharp.Model::get_Cost() +DA:50,0 +DA:51,0 +DA:52,0 +DA:53,0 +FN:61,System.Int32 ClingoSharp.Model::get_Number() +FNDA:0,System.Int32 ClingoSharp.Model::get_Number() +DA:62,0 +DA:63,0 +DA:64,0 +DA:65,0 +FN:73,System.Boolean ClingoSharp.Model::get_OptimalityProven() +FNDA:0,System.Boolean ClingoSharp.Model::get_OptimalityProven() +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +FN:85,System.Int32 ClingoSharp.Model::get_ThreadId() +FNDA:0,System.Int32 ClingoSharp.Model::get_ThreadId() +DA:86,0 +DA:87,0 +DA:88,0 +DA:89,0 +FN:97,ClingoSharp.ModelType ClingoSharp.Model::get_Type() +FNDA:0,ClingoSharp.ModelType ClingoSharp.Model::get_Type() +DA:98,0 +DA:99,0 +DA:101,0 +DA:102,0 +DA:103,0 +DA:104,0 +DA:105,0 +DA:106,0 +DA:107,0 +DA:108,0 +BRDA:101,26,1,0 +BRDA:101,26,2,0 +BRDA:101,26,3,0 +BRDA:101,26,0,0 +FN:129,ClingoSharp.CoreServices.Types.Model ClingoSharp.Model::op_Implicit(ClingoSharp.Model) +FNDA:0,ClingoSharp.CoreServices.Types.Model ClingoSharp.Model::op_Implicit(ClingoSharp.Model) +DA:130,0 +DA:131,0 +DA:132,0 +FN:134,ClingoSharp.Model ClingoSharp.Model::op_Implicit(ClingoSharp.CoreServices.Types.Model) +FNDA:0,ClingoSharp.Model ClingoSharp.Model::op_Implicit(ClingoSharp.CoreServices.Types.Model) +DA:135,0 +DA:136,0 +DA:137,0 +FN:149,System.Boolean ClingoSharp.Model::Contains(ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Model::Contains(ClingoSharp.Symbol) +DA:150,0 +DA:151,0 +DA:152,0 +DA:153,0 +FN:159,System.Void ClingoSharp.Model::Extend(System.Collections.Generic.List`1) +FNDA:0,System.Void ClingoSharp.Model::Extend(System.Collections.Generic.List`1) +DA:160,0 +DA:161,0 +DA:162,0 +DA:163,0 +FN:170,System.Boolean ClingoSharp.Model::IsTrue(System.Int32) +FNDA:0,System.Boolean ClingoSharp.Model::IsTrue(System.Int32) +DA:171,0 +DA:172,0 +DA:173,0 +DA:174,0 +DA:175,0 +DA:177,0 +DA:179,0 +DA:180,0 +FN:191,System.Collections.Generic.List`1 ClingoSharp.Model::GetSymbols(System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean) +FNDA:0,System.Collections.Generic.List`1 ClingoSharp.Model::GetSymbols(System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean) +DA:192,0 +DA:193,0 +DA:194,0 +DA:195,0 +DA:196,0 +DA:197,0 +DA:198,0 +DA:200,0 +DA:202,0 +DA:203,0 +BRDA:194,6,0,0 +BRDA:194,6,1,0 +BRDA:195,17,0,0 +BRDA:195,17,1,0 +BRDA:196,30,0,0 +BRDA:196,30,1,0 +BRDA:197,44,0,0 +BRDA:197,44,1,0 +BRDA:198,58,0,0 +BRDA:198,58,1,0 +FN:205,System.String ClingoSharp.Model::ToString() +FNDA:0,System.String ClingoSharp.Model::ToString() +DA:206,0 +DA:207,0 +DA:208,0 +DA:210,0 +DA:211,0 +DA:212,0 +DA:213,0 +DA:214,0 +DA:215,0 +DA:216,0 +DA:218,0 +DA:219,0 +DA:220,0 +DA:222,0 +DA:223,0 +DA:224,0 +DA:225,0 +DA:226,0 +DA:227,0 +DA:228,0 +DA:229,0 +DA:231,0 +DA:232,0 +DA:233,0 +DA:234,0 +DA:236,0 +DA:237,0 +DA:238,0 +DA:239,0 +DA:241,0 +DA:242,0 +BRDA:211,231,1,0 +BRDA:213,49,0,0 +BRDA:213,49,1,0 +BRDA:222,89,0,0 +BRDA:226,118,0,0 +BRDA:226,118,1,0 +BRDA:226,139,0,0 +BRDA:226,139,1,0 +BRDA:222,89,1,0 +BRDA:211,231,0,0 +FN:115,System.Void ClingoSharp.Model::.cctor() +FNDA:0,System.Void ClingoSharp.Model::.cctor() +DA:116,0 +DA:117,0 +DA:118,0 +FN:119,System.Void ClingoSharp.Model::.ctor(ClingoSharp.CoreServices.Types.Model) +FNDA:0,System.Void ClingoSharp.Model::.ctor(ClingoSharp.CoreServices.Types.Model) +DA:120,0 +DA:121,0 +DA:122,0 +DA:123,0 +LF:100 +LH:0 +BRF:24 +BRH:0 +FNF:15 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\ModelType.cs +FN:26,ClingoSharp.ModelType ClingoSharp.ModelType::get_StableModel() +FNDA:0,ClingoSharp.ModelType ClingoSharp.ModelType::get_StableModel() +DA:27,0 +FN:31,ClingoSharp.ModelType ClingoSharp.ModelType::get_BraveConsequences() +FNDA:0,ClingoSharp.ModelType ClingoSharp.ModelType::get_BraveConsequences() +DA:32,0 +FN:36,ClingoSharp.ModelType ClingoSharp.ModelType::get_CautiousConsequences() +FNDA:0,ClingoSharp.ModelType ClingoSharp.ModelType::get_CautiousConsequences() +DA:37,0 +FN:42,System.String ClingoSharp.ModelType::get_Name() +FNDA:0,System.String ClingoSharp.ModelType::get_Name() +DA:43,0 +FN:56,System.Collections.Generic.IEnumerable`1 ClingoSharp.ModelType::GetNames() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.ModelType::GetNames() +DA:57,0 +DA:58,0 +DA:59,0 +FN:62,System.Collections.Generic.IEnumerable`1 ClingoSharp.ModelType::GetValues() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.ModelType::GetValues() +DA:63,0 +DA:64,0 +DA:65,0 +FN:72,System.Int32 ClingoSharp.ModelType::CompareTo(ClingoSharp.Enums.Enumeration) +FNDA:0,System.Int32 ClingoSharp.ModelType::CompareTo(ClingoSharp.Enums.Enumeration) +DA:73,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:79,0 +DA:80,0 +BRDA:74,2,0,0 +BRDA:74,2,1,0 +BRDA:74,21,0,0 +BRDA:74,21,1,0 +FN:83,System.Boolean ClingoSharp.ModelType::Equals(ClingoSharp.Enums.Enumeration) +FNDA:0,System.Boolean ClingoSharp.ModelType::Equals(ClingoSharp.Enums.Enumeration) +DA:84,0 +DA:85,0 +DA:86,0 +DA:87,0 +DA:90,0 +DA:91,0 +BRDA:85,2,0,0 +BRDA:85,2,1,0 +BRDA:85,21,0,0 +BRDA:85,21,1,0 +FN:94,System.String ClingoSharp.ModelType::ToString() +FNDA:0,System.String ClingoSharp.ModelType::ToString() +DA:95,0 +DA:96,0 +DA:97,0 +FN:48,System.Void ClingoSharp.ModelType::.ctor(System.Int32) +FNDA:0,System.Void ClingoSharp.ModelType::.ctor(System.Int32) +DA:49,0 +FN:12,System.Void ClingoSharp.ModelType::.cctor() +FNDA:0,System.Void ClingoSharp.ModelType::.cctor() +DA:13,0 +DA:14,0 +DA:15,0 +DA:16,0 +DA:17,0 +DA:18,0 +LF:32 +LH:0 +BRF:8 +BRH:0 +FNF:11 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\SolveControl.cs +FN:15,System.Void ClingoSharp.SolveControl::.ctor(ClingoSharp.CoreServices.Types.SolveControl) +FNDA:0,System.Void ClingoSharp.SolveControl::.ctor(ClingoSharp.CoreServices.Types.SolveControl) +DA:16,0 +DA:17,0 +DA:18,0 +DA:19,0 +LF:4 +LH:0 +BRF:0 +BRH:0 +FNF:1 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\SolveHandle.cs +FN:40,ClingoSharp.CoreServices.Types.SolveHandle ClingoSharp.SolveHandle::op_Implicit(ClingoSharp.SolveHandle) +FNDA:0,ClingoSharp.CoreServices.Types.SolveHandle ClingoSharp.SolveHandle::op_Implicit(ClingoSharp.SolveHandle) +DA:41,0 +DA:42,0 +DA:43,0 +FN:45,ClingoSharp.SolveHandle ClingoSharp.SolveHandle::op_Implicit(ClingoSharp.CoreServices.Types.SolveHandle) +FNDA:0,ClingoSharp.SolveHandle ClingoSharp.SolveHandle::op_Implicit(ClingoSharp.CoreServices.Types.SolveHandle) +DA:46,0 +DA:47,0 +DA:48,0 +FN:54,System.Void ClingoSharp.SolveHandle::Cancel() +FNDA:0,System.Void ClingoSharp.SolveHandle::Cancel() +DA:55,0 +DA:56,0 +DA:57,0 +FN:59,ClingoSharp.SolveResult ClingoSharp.SolveHandle::Get() +FNDA:0,ClingoSharp.SolveResult ClingoSharp.SolveHandle::Get() +DA:60,0 +DA:61,0 +DA:63,0 +DA:64,0 +DA:65,0 +DA:66,0 +DA:67,0 +DA:68,0 +DA:69,0 +DA:70,0 +DA:71,0 +DA:73,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:78,0 +DA:79,0 +DA:80,0 +DA:81,0 +BRDA:64,52,0,0 +BRDA:64,52,1,0 +BRDA:68,85,0,0 +BRDA:68,85,1,0 +BRDA:73,118,0,0 +BRDA:73,118,1,0 +BRDA:73,142,0,0 +BRDA:73,142,1,0 +FN:83,System.Void ClingoSharp.SolveHandle::Resume() +FNDA:0,System.Void ClingoSharp.SolveHandle::Resume() +DA:84,0 +DA:85,0 +DA:86,0 +FN:88,System.Boolean ClingoSharp.SolveHandle::Wait(System.Nullable`1) +FNDA:0,System.Boolean ClingoSharp.SolveHandle::Wait(System.Nullable`1) +DA:89,0 +DA:90,0 +DA:92,0 +DA:93,0 +BRDA:90,19,0,0 +BRDA:90,19,1,0 +BRDA:90,42,0,0 +BRDA:90,42,1,0 +FN:111,System.Collections.IEnumerator ClingoSharp.SolveHandle::System.Collections.IEnumerable.GetEnumerator() +FNDA:0,System.Collections.IEnumerator ClingoSharp.SolveHandle::System.Collections.IEnumerable.GetEnumerator() +DA:112,0 +DA:113,0 +DA:114,0 +FN:26,System.Void ClingoSharp.SolveHandle::.cctor() +FNDA:0,System.Void ClingoSharp.SolveHandle::.cctor() +DA:27,0 +DA:28,0 +DA:29,0 +FN:30,System.Void ClingoSharp.SolveHandle::.ctor(ClingoSharp.CoreServices.Types.SolveHandle) +FNDA:0,System.Void ClingoSharp.SolveHandle::.ctor(ClingoSharp.CoreServices.Types.SolveHandle) +DA:31,0 +DA:32,0 +DA:33,0 +DA:34,0 +FN:95,System.Boolean ClingoSharp.SolveHandle/d__10::MoveNext() +FNDA:0,System.Boolean ClingoSharp.SolveHandle/d__10::MoveNext() +DA:96,0 +DA:99,0 +DA:100,0 +DA:101,0 +DA:103,0 +DA:104,0 +DA:105,0 +DA:106,0 +DA:107,0 +DA:108,0 +DA:109,0 +BRDA:96,14,0,0 +BRDA:108,177,1,0 +BRDA:103,116,0,0 +BRDA:96,14,1,0 +BRDA:103,116,1,0 +BRDA:108,177,0,0 +LF:57 +LH:0 +BRF:18 +BRH:0 +FNF:10 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\SolveResult.cs +FN:12,System.Boolean ClingoSharp.SolveResult::get_IsExhausted() +FNDA:0,System.Boolean ClingoSharp.SolveResult::get_IsExhausted() +DA:13,0 +FN:17,System.Boolean ClingoSharp.SolveResult::get_IsInterrupted() +FNDA:0,System.Boolean ClingoSharp.SolveResult::get_IsInterrupted() +DA:18,0 +FN:22,System.Nullable`1 ClingoSharp.SolveResult::get_IsSatisfiable() +FNDA:0,System.Nullable`1 ClingoSharp.SolveResult::get_IsSatisfiable() +DA:23,0 +FN:28,System.Boolean ClingoSharp.SolveResult::get_IsUnknown() +FNDA:0,System.Boolean ClingoSharp.SolveResult::get_IsUnknown() +DA:29,0 +FN:33,System.Nullable`1 ClingoSharp.SolveResult::get_IsUnSatisfiable() +FNDA:0,System.Nullable`1 ClingoSharp.SolveResult::get_IsUnSatisfiable() +DA:34,0 +FN:39,System.Void ClingoSharp.SolveResult::.ctor() +FNDA:0,System.Void ClingoSharp.SolveResult::.ctor() +DA:40,0 +LF:6 +LH:0 +BRF:0 +BRH:0 +FNF:6 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\Symbol.cs +FN:32,ClingoSharp.Symbol ClingoSharp.Symbol::get_Infimum() +FNDA:0,ClingoSharp.Symbol ClingoSharp.Symbol::get_Infimum() +DA:33,0 +DA:34,0 +DA:35,0 +DA:36,0 +FN:44,ClingoSharp.Symbol ClingoSharp.Symbol::get_Supremum() +FNDA:0,ClingoSharp.Symbol ClingoSharp.Symbol::get_Supremum() +DA:45,0 +DA:46,0 +DA:47,0 +DA:48,0 +FN:60,System.Collections.Generic.List`1 ClingoSharp.Symbol::get_Arguments() +FNDA:0,System.Collections.Generic.List`1 ClingoSharp.Symbol::get_Arguments() +DA:61,0 +DA:62,0 +DA:63,0 +DA:64,0 +FN:72,System.String ClingoSharp.Symbol::get_Name() +FNDA:0,System.String ClingoSharp.Symbol::get_Name() +DA:73,0 +DA:74,0 +DA:75,0 +DA:76,0 +FN:84,System.Boolean ClingoSharp.Symbol::get_IsNegative() +FNDA:0,System.Boolean ClingoSharp.Symbol::get_IsNegative() +DA:85,0 +DA:86,0 +DA:87,0 +DA:88,0 +FN:96,System.Int32 ClingoSharp.Symbol::get_Number() +FNDA:0,System.Int32 ClingoSharp.Symbol::get_Number() +DA:97,0 +DA:98,0 +DA:99,0 +DA:100,0 +FN:108,System.Boolean ClingoSharp.Symbol::get_IsPositive() +FNDA:0,System.Boolean ClingoSharp.Symbol::get_IsPositive() +DA:109,0 +DA:110,0 +DA:111,0 +DA:112,0 +FN:120,System.String ClingoSharp.Symbol::get_String() +FNDA:0,System.String ClingoSharp.Symbol::get_String() +DA:121,0 +DA:122,0 +DA:123,0 +DA:124,0 +FN:132,ClingoSharp.SymbolType ClingoSharp.Symbol::get_Type() +FNDA:0,ClingoSharp.SymbolType ClingoSharp.Symbol::get_Type() +DA:133,0 +DA:134,0 +DA:136,0 +DA:137,0 +DA:138,0 +DA:139,0 +DA:140,0 +DA:141,0 +DA:142,0 +DA:143,0 +DA:144,0 +DA:145,0 +BRDA:136,19,1,0 +BRDA:136,19,2,0 +BRDA:136,19,5,0 +BRDA:136,19,6,0 +BRDA:136,19,8,0 +BRDA:136,19,0,0 +BRDA:136,19,3,0 +BRDA:136,19,4,0 +BRDA:136,19,7,0 +FN:215,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.Symbol::GetModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.Symbol::GetModule() +DA:216,0 +DA:217,0 +DA:218,0 +FN:224,ClingoSharp.CoreServices.Interfaces.Modules.ISymbolModule ClingoSharp.Symbol::GetSymbolModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.Modules.ISymbolModule ClingoSharp.Symbol::GetSymbolModule() +DA:225,0 +DA:226,0 +DA:227,0 +FN:229,ClingoSharp.CoreServices.Types.Symbol ClingoSharp.Symbol::op_Implicit(ClingoSharp.Symbol) +FNDA:0,ClingoSharp.CoreServices.Types.Symbol ClingoSharp.Symbol::op_Implicit(ClingoSharp.Symbol) +DA:230,0 +DA:231,0 +DA:232,0 +FN:234,ClingoSharp.Symbol ClingoSharp.Symbol::op_Implicit(ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,ClingoSharp.Symbol ClingoSharp.Symbol::op_Implicit(ClingoSharp.CoreServices.Types.Symbol) +DA:235,0 +DA:236,0 +DA:237,0 +FN:243,ClingoSharp.Symbol ClingoSharp.Symbol::op_Implicit(System.Int32) +FNDA:0,ClingoSharp.Symbol ClingoSharp.Symbol::op_Implicit(System.Int32) +DA:244,0 +DA:245,0 +DA:246,0 +DA:247,0 +FN:253,ClingoSharp.Symbol ClingoSharp.Symbol::op_Implicit(System.String) +FNDA:0,ClingoSharp.Symbol ClingoSharp.Symbol::op_Implicit(System.String) +DA:254,0 +DA:255,0 +DA:256,0 +DA:257,0 +FN:259,System.Boolean ClingoSharp.Symbol::op_LessThan(ClingoSharp.Symbol,ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::op_LessThan(ClingoSharp.Symbol,ClingoSharp.Symbol) +DA:260,0 +DA:261,0 +DA:262,0 +FN:264,System.Boolean ClingoSharp.Symbol::op_LessThanOrEqual(ClingoSharp.Symbol,ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::op_LessThanOrEqual(ClingoSharp.Symbol,ClingoSharp.Symbol) +DA:265,0 +DA:266,0 +DA:267,0 +FN:269,System.Boolean ClingoSharp.Symbol::op_GreaterThan(ClingoSharp.Symbol,ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::op_GreaterThan(ClingoSharp.Symbol,ClingoSharp.Symbol) +DA:270,0 +DA:271,0 +DA:272,0 +FN:274,System.Boolean ClingoSharp.Symbol::op_GreaterThanOrEqual(ClingoSharp.Symbol,ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::op_GreaterThanOrEqual(ClingoSharp.Symbol,ClingoSharp.Symbol) +DA:275,0 +DA:276,0 +DA:277,0 +FN:279,System.Boolean ClingoSharp.Symbol::op_Equality(ClingoSharp.Symbol,ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::op_Equality(ClingoSharp.Symbol,ClingoSharp.Symbol) +DA:280,0 +DA:281,0 +DA:282,0 +FN:284,System.Boolean ClingoSharp.Symbol::op_Inequality(ClingoSharp.Symbol,ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::op_Inequality(ClingoSharp.Symbol,ClingoSharp.Symbol) +DA:285,0 +DA:286,0 +DA:287,0 +FN:299,System.Boolean ClingoSharp.Symbol::Match(System.String,System.Int32) +FNDA:0,System.Boolean ClingoSharp.Symbol::Match(System.String,System.Int32) +DA:300,0 +DA:301,0 +DA:302,0 +DA:303,0 +DA:304,0 +DA:305,0 +BRDA:301,19,0,0 +BRDA:301,19,1,0 +BRDA:302,43,0,0 +BRDA:302,43,1,0 +BRDA:303,56,0,0 +BRDA:303,56,1,0 +BRDA:303,59,0,0 +BRDA:303,59,1,0 +BRDA:303,80,0,0 +BRDA:303,80,1,0 +FN:308,System.Int32 ClingoSharp.Symbol::CompareTo(ClingoSharp.Symbol) +FNDA:0,System.Int32 ClingoSharp.Symbol::CompareTo(ClingoSharp.Symbol) +DA:309,0 +DA:310,0 +DA:311,0 +DA:312,0 +DA:315,0 +DA:316,0 +DA:317,0 +DA:320,0 +DA:321,0 +DA:322,0 +DA:325,0 +DA:326,0 +BRDA:310,25,0,0 +BRDA:310,25,1,0 +BRDA:315,56,0,0 +BRDA:315,56,1,0 +BRDA:320,87,0,0 +BRDA:320,87,1,0 +FN:329,System.Boolean ClingoSharp.Symbol::Equals(ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.Symbol::Equals(ClingoSharp.Symbol) +DA:330,0 +DA:331,0 +DA:332,0 +FN:335,System.Boolean ClingoSharp.Symbol::Equals(System.Object) +FNDA:0,System.Boolean ClingoSharp.Symbol::Equals(System.Object) +DA:336,0 +DA:337,0 +DA:338,0 +DA:339,0 +DA:342,0 +DA:343,0 +BRDA:337,2,0,0 +BRDA:337,2,1,0 +BRDA:337,21,0,0 +BRDA:337,21,1,0 +FN:346,System.Int32 ClingoSharp.Symbol::GetHashCode() +FNDA:0,System.Int32 ClingoSharp.Symbol::GetHashCode() +DA:347,0 +DA:348,0 +DA:349,0 +FN:352,System.String ClingoSharp.Symbol::ToString() +FNDA:0,System.String ClingoSharp.Symbol::ToString() +DA:353,0 +DA:354,0 +DA:355,0 +DA:356,0 +FN:152,System.Void ClingoSharp.Symbol::.cctor() +FNDA:0,System.Void ClingoSharp.Symbol::.cctor() +DA:153,0 +DA:154,0 +DA:155,0 +FN:156,System.Void ClingoSharp.Symbol::.ctor(ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,System.Void ClingoSharp.Symbol::.ctor(ClingoSharp.CoreServices.Types.Symbol) +DA:157,0 +DA:158,0 +DA:159,0 +DA:160,0 +FN:165,System.Void ClingoSharp.Symbol::.ctor(System.Int32) +FNDA:0,System.Void ClingoSharp.Symbol::.ctor(System.Int32) +DA:166,0 +DA:167,0 +DA:168,0 +DA:169,0 +DA:170,0 +FN:175,System.Void ClingoSharp.Symbol::.ctor(System.String) +FNDA:0,System.Void ClingoSharp.Symbol::.ctor(System.String) +DA:176,0 +DA:177,0 +DA:178,0 +DA:179,0 +DA:180,0 +FN:185,System.Void ClingoSharp.Symbol::.ctor(System.Collections.Generic.List`1) +FNDA:0,System.Void ClingoSharp.Symbol::.ctor(System.Collections.Generic.List`1) +DA:186,0 +DA:187,0 +DA:188,0 +DA:189,0 +DA:190,0 +DA:191,0 +FN:199,System.Void ClingoSharp.Symbol::.ctor(System.String,System.Collections.Generic.List`1,System.Boolean) +FNDA:0,System.Void ClingoSharp.Symbol::.ctor(System.String,System.Collections.Generic.List`1,System.Boolean) +DA:200,0 +DA:201,0 +DA:202,0 +DA:203,0 +DA:204,0 +DA:205,0 +LF:145 +LH:0 +BRF:29 +BRH:0 +FNF:33 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\SymbolicAtom.cs +FN:21,System.Boolean ClingoSharp.SymbolicAtom::get_IsExternal() +FNDA:0,System.Boolean ClingoSharp.SymbolicAtom::get_IsExternal() +DA:22,0 +DA:23,0 +DA:24,0 +DA:25,0 +FN:30,System.Boolean ClingoSharp.SymbolicAtom::get_IsFact() +FNDA:0,System.Boolean ClingoSharp.SymbolicAtom::get_IsFact() +DA:31,0 +DA:32,0 +DA:33,0 +DA:34,0 +FN:39,System.Int32 ClingoSharp.SymbolicAtom::get_Literal() +FNDA:0,System.Int32 ClingoSharp.SymbolicAtom::get_Literal() +DA:40,0 +DA:41,0 +DA:42,0 +DA:43,0 +FN:48,ClingoSharp.Symbol ClingoSharp.SymbolicAtom::get_Symbol() +FNDA:0,ClingoSharp.Symbol ClingoSharp.SymbolicAtom::get_Symbol() +DA:49,0 +DA:50,0 +DA:51,0 +DA:52,0 +FN:59,ClingoSharp.CoreServices.Types.SymbolicAtoms ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +FNDA:0,ClingoSharp.CoreServices.Types.SymbolicAtoms ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +DA:60,0 +DA:61,0 +DA:62,0 +FN:64,ClingoSharp.CoreServices.Types.SymbolicAtomIterator ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +FNDA:0,ClingoSharp.CoreServices.Types.SymbolicAtomIterator ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +DA:65,0 +DA:66,0 +DA:67,0 +FN:69,ClingoSharp.Symbol ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +FNDA:0,ClingoSharp.Symbol ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +DA:70,0 +DA:71,0 +DA:72,0 +FN:74,System.Int32 ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +FNDA:0,System.Int32 ClingoSharp.SymbolicAtom::op_Implicit(ClingoSharp.SymbolicAtom) +DA:75,0 +DA:76,0 +DA:77,0 +FN:93,System.Boolean ClingoSharp.SymbolicAtom::Match(System.String,System.Int32) +FNDA:0,System.Boolean ClingoSharp.SymbolicAtom::Match(System.String,System.Int32) +DA:94,0 +DA:95,0 +DA:96,0 +FN:82,System.Void ClingoSharp.SymbolicAtom::.ctor(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator) +FNDA:0,System.Void ClingoSharp.SymbolicAtom::.ctor(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator) +DA:83,0 +DA:84,0 +DA:85,0 +DA:86,0 +DA:87,0 +LF:36 +LH:0 +BRF:0 +BRH:0 +FNF:10 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\SymbolicAtomIterator.cs +FN:29,ClingoSharp.CoreServices.Types.SymbolicAtoms ClingoSharp.SymbolicAtomIterator::op_Implicit(ClingoSharp.SymbolicAtomIterator) +FNDA:0,ClingoSharp.CoreServices.Types.SymbolicAtoms ClingoSharp.SymbolicAtomIterator::op_Implicit(ClingoSharp.SymbolicAtomIterator) +DA:30,0 +DA:31,0 +DA:32,0 +FN:34,ClingoSharp.CoreServices.Types.SymbolicAtomIterator ClingoSharp.SymbolicAtomIterator::op_Implicit(ClingoSharp.SymbolicAtomIterator) +FNDA:0,ClingoSharp.CoreServices.Types.SymbolicAtomIterator ClingoSharp.SymbolicAtomIterator::op_Implicit(ClingoSharp.SymbolicAtomIterator) +DA:35,0 +DA:36,0 +DA:37,0 +FN:55,System.Collections.IEnumerator ClingoSharp.SymbolicAtomIterator::System.Collections.IEnumerable.GetEnumerator() +FNDA:0,System.Collections.IEnumerator ClingoSharp.SymbolicAtomIterator::System.Collections.IEnumerable.GetEnumerator() +DA:56,0 +DA:57,0 +DA:58,0 +FN:18,System.Void ClingoSharp.SymbolicAtomIterator::.ctor(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator) +FNDA:0,System.Void ClingoSharp.SymbolicAtomIterator::.ctor(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator) +DA:19,0 +DA:20,0 +DA:21,0 +DA:22,0 +DA:23,0 +FN:43,System.Boolean ClingoSharp.SymbolicAtomIterator/d__5::MoveNext() +FNDA:0,System.Boolean ClingoSharp.SymbolicAtomIterator/d__5::MoveNext() +DA:44,0 +DA:45,0 +DA:47,0 +DA:48,0 +DA:49,0 +DA:50,0 +DA:51,0 +DA:52,0 +DA:53,0 +BRDA:44,14,0,0 +BRDA:47,233,1,0 +BRDA:44,14,1,0 +BRDA:47,233,0,0 +LF:23 +LH:0 +BRF:4 +BRH:0 +FNF:5 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\SymbolicAtoms.cs +FN:32,System.Collections.Generic.List`1> ClingoSharp.SymbolicAtoms::get_Signatures() +FNDA:0,System.Collections.Generic.List`1> ClingoSharp.SymbolicAtoms::get_Signatures() +DA:33,0 +DA:34,0 +DA:35,0 +DA:36,0 +DA:37,0 +DA:38,0 +DA:39,0 +DA:40,0 +FN:45,ClingoSharp.SymbolicAtom ClingoSharp.SymbolicAtoms::get_Item(ClingoSharp.Symbol) +FNDA:0,ClingoSharp.SymbolicAtom ClingoSharp.SymbolicAtoms::get_Item(ClingoSharp.Symbol) +DA:46,0 +DA:47,0 +DA:48,0 +DA:49,0 +DA:52,0 +DA:53,0 +BRDA:47,15,0,0 +BRDA:47,15,1,0 +FN:59,System.Int32 ClingoSharp.SymbolicAtoms::get_Count() +FNDA:0,System.Int32 ClingoSharp.SymbolicAtoms::get_Count() +DA:60,0 +DA:61,0 +DA:62,0 +DA:63,0 +FN:84,System.Collections.Generic.IEnumerable`1 ClingoSharp.SymbolicAtoms::get_Values() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.SymbolicAtoms::get_Values() +DA:85,0 +DA:86,0 +DA:87,0 +DA:88,0 +FN:113,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.SymbolicAtoms::GetModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.IClingoModule ClingoSharp.SymbolicAtoms::GetModule() +DA:114,0 +DA:115,0 +DA:116,0 +FN:122,ClingoSharp.CoreServices.Interfaces.Modules.ISymbolicAtomsModule ClingoSharp.SymbolicAtoms::GetSymbolicAtomsModule() +FNDA:0,ClingoSharp.CoreServices.Interfaces.Modules.ISymbolicAtomsModule ClingoSharp.SymbolicAtoms::GetSymbolicAtomsModule() +DA:123,0 +DA:124,0 +DA:125,0 +FN:127,ClingoSharp.CoreServices.Types.SymbolicAtoms ClingoSharp.SymbolicAtoms::op_Implicit(ClingoSharp.SymbolicAtoms) +FNDA:0,ClingoSharp.CoreServices.Types.SymbolicAtoms ClingoSharp.SymbolicAtoms::op_Implicit(ClingoSharp.SymbolicAtoms) +DA:128,0 +DA:129,0 +DA:130,0 +FN:132,ClingoSharp.SymbolicAtoms ClingoSharp.SymbolicAtoms::op_Implicit(ClingoSharp.CoreServices.Types.SymbolicAtoms) +FNDA:0,ClingoSharp.SymbolicAtoms ClingoSharp.SymbolicAtoms::op_Implicit(ClingoSharp.CoreServices.Types.SymbolicAtoms) +DA:133,0 +DA:134,0 +DA:135,0 +FN:162,System.Boolean ClingoSharp.SymbolicAtoms::ContainsKey(ClingoSharp.Symbol) +FNDA:0,System.Boolean ClingoSharp.SymbolicAtoms::ContainsKey(ClingoSharp.Symbol) +DA:163,0 +DA:164,0 +DA:165,0 +FN:168,System.Collections.Generic.IEnumerator`1 ClingoSharp.SymbolicAtoms::GetEnumerator() +FNDA:0,System.Collections.Generic.IEnumerator`1 ClingoSharp.SymbolicAtoms::GetEnumerator() +DA:169,0 +DA:170,0 +DA:171,0 +DA:172,0 +FN:175,System.Boolean ClingoSharp.SymbolicAtoms::TryGetValue(ClingoSharp.Symbol,ClingoSharp.SymbolicAtom&) +FNDA:0,System.Boolean ClingoSharp.SymbolicAtoms::TryGetValue(ClingoSharp.Symbol,ClingoSharp.SymbolicAtom&) +DA:176,0 +DA:177,0 +DA:178,0 +DA:179,0 +DA:182,0 +DA:183,0 +DA:185,0 +DA:186,0 +DA:187,0 +BRDA:177,10,0,0 +BRDA:177,10,1,0 +BRDA:185,76,0,0 +BRDA:185,76,1,0 +FN:190,System.Collections.IEnumerator ClingoSharp.SymbolicAtoms::System.Collections.IEnumerable.GetEnumerator() +FNDA:0,System.Collections.IEnumerator ClingoSharp.SymbolicAtoms::System.Collections.IEnumerable.GetEnumerator() +DA:191,0 +DA:192,0 +DA:193,0 +FN:95,System.Void ClingoSharp.SymbolicAtoms::.cctor() +FNDA:0,System.Void ClingoSharp.SymbolicAtoms::.cctor() +DA:96,0 +DA:97,0 +DA:98,0 +FN:99,System.Void ClingoSharp.SymbolicAtoms::.ctor(ClingoSharp.CoreServices.Types.SymbolicAtoms) +FNDA:0,System.Void ClingoSharp.SymbolicAtoms::.ctor(ClingoSharp.CoreServices.Types.SymbolicAtoms) +DA:100,0 +DA:101,0 +DA:102,0 +DA:103,0 +FN:69,System.Boolean ClingoSharp.SymbolicAtoms/d__9::MoveNext() +FNDA:0,System.Boolean ClingoSharp.SymbolicAtoms/d__9::MoveNext() +DA:70,0 +DA:71,0 +DA:72,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:78,0 +BRDA:70,14,0,0 +BRDA:74,203,1,0 +BRDA:70,14,1,0 +BRDA:74,203,0,0 +FN:149,System.Boolean ClingoSharp.SymbolicAtoms/d__18::MoveNext() +FNDA:0,System.Boolean ClingoSharp.SymbolicAtoms/d__18::MoveNext() +DA:150,0 +DA:151,0 +DA:152,0 +DA:154,0 +DA:155,0 +DA:156,0 +DA:157,0 +DA:158,0 +DA:159,0 +BRDA:150,14,0,0 +BRDA:155,253,1,0 +BRDA:150,14,1,0 +BRDA:155,253,0,0 +FN:196,System.Boolean ClingoSharp.SymbolicAtoms/>-GetEnumerator>d__23::MoveNext() +FNDA:0,System.Boolean ClingoSharp.SymbolicAtoms/>-GetEnumerator>d__23::MoveNext() +DA:197,0 +DA:198,0 +DA:199,0 +DA:201,0 +DA:202,0 +DA:203,0 +DA:204,0 +DA:205,0 +BRDA:197,14,0,0 +BRDA:201,214,1,0 +BRDA:197,14,1,0 +BRDA:201,214,0,0 +LF:85 +LH:0 +BRF:18 +BRH:0 +FNF:17 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\SymbolType.cs +FN:12,System.String[] ClingoSharp.SymbolType::get_SymbolNames() +FNDA:0,System.String[] ClingoSharp.SymbolType::get_SymbolNames() +DA:13,0 +DA:14,0 +DA:15,0 +DA:16,0 +DA:17,0 +DA:18,0 +DA:19,0 +DA:20,0 +FN:25,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Infimum() +FNDA:0,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Infimum() +DA:26,0 +FN:26,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Number() +FNDA:0,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Number() +DA:27,0 +FN:27,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_String() +FNDA:0,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_String() +DA:28,0 +FN:28,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Function() +FNDA:0,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Function() +DA:29,0 +FN:29,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Supremum() +FNDA:0,ClingoSharp.SymbolType ClingoSharp.SymbolType::get_Supremum() +DA:30,0 +FN:35,System.String ClingoSharp.SymbolType::get_Name() +FNDA:0,System.String ClingoSharp.SymbolType::get_Name() +DA:36,0 +FN:49,System.Collections.Generic.IEnumerable`1 ClingoSharp.SymbolType::GetNames() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.SymbolType::GetNames() +DA:50,0 +DA:51,0 +DA:52,0 +FN:55,System.Collections.Generic.IEnumerable`1 ClingoSharp.SymbolType::GetValues() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.SymbolType::GetValues() +DA:56,0 +DA:57,0 +DA:58,0 +FN:65,System.Int32 ClingoSharp.SymbolType::CompareTo(ClingoSharp.Enums.Enumeration) +FNDA:0,System.Int32 ClingoSharp.SymbolType::CompareTo(ClingoSharp.Enums.Enumeration) +DA:66,0 +DA:67,0 +DA:68,0 +DA:69,0 +DA:72,0 +DA:73,0 +BRDA:67,2,0,0 +BRDA:67,2,1,0 +BRDA:67,21,0,0 +BRDA:67,21,1,0 +FN:76,System.Boolean ClingoSharp.SymbolType::Equals(ClingoSharp.Enums.Enumeration) +FNDA:0,System.Boolean ClingoSharp.SymbolType::Equals(ClingoSharp.Enums.Enumeration) +DA:77,0 +DA:78,0 +DA:79,0 +DA:80,0 +DA:83,0 +DA:84,0 +BRDA:78,2,0,0 +BRDA:78,2,1,0 +BRDA:78,21,0,0 +BRDA:78,21,1,0 +FN:87,System.String ClingoSharp.SymbolType::ToString() +FNDA:0,System.String ClingoSharp.SymbolType::ToString() +DA:88,0 +DA:89,0 +DA:90,0 +FN:41,System.Void ClingoSharp.SymbolType::.ctor(System.Int32) +FNDA:0,System.Void ClingoSharp.SymbolType::.ctor(System.Int32) +DA:42,0 +LF:36 +LH:0 +BRF:8 +BRH:0 +FNF:13 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\Union.cs +FN:54,System.Void ClingoSharp.Union`2::Set(T1) +FNDA:0,System.Void ClingoSharp.Union`2::Set(T1) +DA:55,0 +DA:56,0 +DA:57,0 +DA:58,0 +DA:59,0 +FN:65,System.Void ClingoSharp.Union`2::Set(T2) +FNDA:0,System.Void ClingoSharp.Union`2::Set(T2) +DA:66,0 +DA:67,0 +DA:68,0 +DA:69,0 +DA:70,0 +FN:77,System.Boolean ClingoSharp.Union`2::IsType(System.Type) +FNDA:0,System.Boolean ClingoSharp.Union`2::IsType(System.Type) +DA:78,0 +DA:79,0 +DA:80,0 +DA:81,0 +DA:83,0 +DA:84,0 +DA:85,0 +DA:88,0 +DA:89,0 +BRDA:79,19,0,0 +BRDA:79,19,1,0 +BRDA:83,52,0,0 +BRDA:83,52,1,0 +FN:96,System.Boolean ClingoSharp.Union`2::IsType() +FNDA:0,System.Boolean ClingoSharp.Union`2::IsType() +DA:97,0 +DA:98,0 +DA:99,0 +FN:107,System.Boolean ClingoSharp.Union`2::TryGet(System.Type,System.Object&) +FNDA:0,System.Boolean ClingoSharp.Union`2::TryGet(System.Type,System.Object&) +DA:108,0 +DA:109,0 +DA:110,0 +DA:111,0 +DA:112,0 +DA:113,0 +DA:114,0 +DA:116,0 +DA:118,0 +DA:119,0 +DA:120,0 +DA:121,0 +DA:122,0 +DA:123,0 +DA:125,0 +DA:127,0 +DA:128,0 +DA:129,0 +BRDA:109,19,0,0 +BRDA:111,33,0,0 +BRDA:111,33,1,0 +BRDA:109,19,1,0 +BRDA:118,72,0,0 +BRDA:120,88,0,0 +BRDA:120,88,1,0 +BRDA:118,72,1,0 +FN:137,System.Boolean ClingoSharp.Union`2::TryGet(T&) +FNDA:0,System.Boolean ClingoSharp.Union`2::TryGet(T&) +DA:138,0 +DA:139,0 +DA:140,0 +DA:141,0 +DA:142,0 +FN:150,System.Object ClingoSharp.Union`2::Get(System.Type) +FNDA:0,System.Object ClingoSharp.Union`2::Get(System.Type) +DA:151,0 +DA:152,0 +DA:153,0 +DA:154,0 +DA:157,0 +DA:158,0 +DA:160,0 +BRDA:152,12,0,0 +BRDA:152,12,1,0 +FN:168,T ClingoSharp.Union`2::Get() +FNDA:0,T ClingoSharp.Union`2::Get() +DA:169,0 +DA:170,0 +DA:171,0 +FN:181,ClingoSharp.Union`2 ClingoSharp.Union`2::op_Implicit(T1) +FNDA:0,ClingoSharp.Union`2 ClingoSharp.Union`2::op_Implicit(T1) +DA:182,0 +DA:183,0 +DA:184,0 +FN:190,ClingoSharp.Union`2 ClingoSharp.Union`2::op_Implicit(T2) +FNDA:0,ClingoSharp.Union`2 ClingoSharp.Union`2::op_Implicit(T2) +DA:191,0 +DA:192,0 +DA:193,0 +FN:200,T1 ClingoSharp.Union`2::op_Implicit(ClingoSharp.Union`2) +FNDA:0,T1 ClingoSharp.Union`2::op_Implicit(ClingoSharp.Union`2) +DA:201,0 +DA:202,0 +DA:203,0 +DA:204,0 +DA:207,0 +DA:208,0 +BRDA:202,15,0,0 +BRDA:202,15,1,0 +FN:215,T2 ClingoSharp.Union`2::op_Implicit(ClingoSharp.Union`2) +FNDA:0,T2 ClingoSharp.Union`2::op_Implicit(ClingoSharp.Union`2) +DA:216,0 +DA:217,0 +DA:218,0 +DA:219,0 +DA:222,0 +DA:223,0 +BRDA:217,15,0,0 +BRDA:217,15,1,0 +FN:226,System.Object ClingoSharp.Union`2::Clone() +FNDA:0,System.Object ClingoSharp.Union`2::Clone() +DA:227,0 +DA:228,0 +DA:229,0 +DA:230,0 +DA:231,0 +DA:232,0 +DA:233,0 +DA:234,0 +DA:236,0 +DA:237,0 +DA:239,0 +DA:240,0 +DA:241,0 +DA:242,0 +DA:243,0 +DA:244,0 +DA:245,0 +DA:247,0 +DA:248,0 +DA:251,0 +DA:252,0 +BRDA:228,12,0,0 +BRDA:231,38,0,0 +BRDA:231,38,1,0 +BRDA:228,12,1,0 +BRDA:239,95,0,0 +BRDA:242,125,0,0 +BRDA:242,125,1,0 +BRDA:239,95,1,0 +FN:264,System.Boolean ClingoSharp.Union`2::op_Equality(ClingoSharp.Union`2,System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::op_Equality(ClingoSharp.Union`2,System.Object) +DA:265,0 +DA:266,0 +DA:267,0 +FN:275,System.Boolean ClingoSharp.Union`2::op_Inequality(ClingoSharp.Union`2,System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::op_Inequality(ClingoSharp.Union`2,System.Object) +DA:276,0 +DA:277,0 +DA:278,0 +FN:281,System.Boolean ClingoSharp.Union`2::Equals(System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::Equals(System.Object) +DA:282,0 +DA:283,0 +DA:284,0 +DA:285,0 +DA:288,0 +DA:289,0 +BRDA:283,2,0,0 +BRDA:283,2,1,0 +BRDA:283,21,0,0 +BRDA:283,21,1,0 +FN:296,System.Boolean ClingoSharp.Union`2::Equals(ClingoSharp.Union`2) +FNDA:0,System.Boolean ClingoSharp.Union`2::Equals(ClingoSharp.Union`2) +DA:297,0 +DA:298,0 +DA:299,0 +DA:300,0 +DA:302,0 +DA:303,0 +DA:304,0 +DA:307,0 +DA:308,0 +BRDA:298,13,0,0 +BRDA:298,13,1,0 +BRDA:298,29,0,0 +BRDA:298,29,1,0 +BRDA:302,75,0,0 +BRDA:302,75,1,0 +BRDA:302,91,0,0 +BRDA:302,91,1,0 +FN:311,System.Int32 ClingoSharp.Union`2::GetHashCode() +FNDA:0,System.Int32 ClingoSharp.Union`2::GetHashCode() +DA:312,0 +DA:313,0 +DA:314,0 +DA:315,0 +DA:318,0 +DA:319,0 +DA:320,0 +DA:323,0 +DA:324,0 +BRDA:313,12,0,0 +BRDA:313,12,1,0 +BRDA:318,46,0,0 +BRDA:318,46,1,0 +FN:332,System.Int32 ClingoSharp.Union`2::CompareTo(ClingoSharp.Union`2) +FNDA:0,System.Int32 ClingoSharp.Union`2::CompareTo(ClingoSharp.Union`2) +DA:333,0 +DA:334,0 +DA:335,0 +DA:336,0 +DA:337,0 +DA:338,0 +DA:341,0 +DA:343,0 +DA:344,0 +DA:345,0 +DA:346,0 +DA:347,0 +DA:350,0 +DA:353,0 +DA:354,0 +BRDA:334,13,0,0 +BRDA:334,13,1,0 +BRDA:334,29,0,0 +BRDA:336,53,0,0 +BRDA:336,53,1,0 +BRDA:334,29,1,0 +BRDA:343,109,0,0 +BRDA:343,109,1,0 +BRDA:343,125,0,0 +BRDA:345,151,0,0 +BRDA:345,151,1,0 +BRDA:343,125,1,0 +FN:358,System.Int32 ClingoSharp.Union`2::CompareTo(System.Object) +FNDA:0,System.Int32 ClingoSharp.Union`2::CompareTo(System.Object) +DA:359,0 +DA:360,0 +DA:361,0 +DA:362,0 +DA:365,0 +DA:366,0 +BRDA:360,2,0,0 +BRDA:360,2,1,0 +BRDA:360,21,0,0 +BRDA:360,21,1,0 +FN:375,System.Boolean ClingoSharp.Union`2::op_LessThan(ClingoSharp.Union`2,System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::op_LessThan(ClingoSharp.Union`2,System.Object) +DA:376,0 +DA:377,0 +DA:378,0 +FN:387,System.Boolean ClingoSharp.Union`2::op_LessThanOrEqual(ClingoSharp.Union`2,System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::op_LessThanOrEqual(ClingoSharp.Union`2,System.Object) +DA:388,0 +DA:389,0 +DA:390,0 +FN:399,System.Boolean ClingoSharp.Union`2::op_GreaterThan(ClingoSharp.Union`2,System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::op_GreaterThan(ClingoSharp.Union`2,System.Object) +DA:400,0 +DA:401,0 +DA:402,0 +FN:411,System.Boolean ClingoSharp.Union`2::op_GreaterThanOrEqual(ClingoSharp.Union`2,System.Object) +FNDA:0,System.Boolean ClingoSharp.Union`2::op_GreaterThanOrEqual(ClingoSharp.Union`2,System.Object) +DA:412,0 +DA:413,0 +DA:414,0 +FN:421,System.String ClingoSharp.Union`2::ToString(System.String,System.IFormatProvider) +FNDA:0,System.String ClingoSharp.Union`2::ToString(System.String,System.IFormatProvider) +DA:422,0 +DA:423,0 +DA:424,0 +DA:425,0 +DA:426,0 +DA:427,0 +DA:430,0 +DA:432,0 +DA:433,0 +DA:434,0 +DA:435,0 +DA:436,0 +DA:439,0 +DA:442,0 +DA:443,0 +BRDA:423,12,0,0 +BRDA:425,36,0,0 +BRDA:425,36,1,0 +BRDA:423,12,1,0 +BRDA:432,96,0,0 +BRDA:434,122,0,0 +BRDA:434,122,1,0 +BRDA:432,96,1,0 +FN:445,System.String ClingoSharp.Union`2::ToString() +FNDA:0,System.String ClingoSharp.Union`2::ToString() +DA:446,0 +DA:447,0 +DA:448,0 +DA:449,0 +DA:451,0 +DA:452,0 +DA:453,0 +DA:456,0 +DA:457,0 +BRDA:447,12,0,0 +BRDA:447,12,1,0 +BRDA:451,46,0,0 +BRDA:451,46,1,0 +FN:28,System.Void ClingoSharp.Union`2::.ctor(T1) +FNDA:0,System.Void ClingoSharp.Union`2::.ctor(T1) +DA:29,0 +DA:30,0 +DA:31,0 +DA:32,0 +DA:33,0 +FN:39,System.Void ClingoSharp.Union`2::.ctor(T2) +FNDA:0,System.Void ClingoSharp.Union`2::.ctor(T2) +DA:40,0 +DA:41,0 +DA:42,0 +DA:43,0 +DA:44,0 +LF:191 +LH:0 +BRF:70 +BRH:0 +FNF:28 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\Exceptions\BadAllocationException.cs +FN:9,System.Void ClingoSharp.Exceptions.BadAllocationException::.ctor() +FNDA:0,System.Void ClingoSharp.Exceptions.BadAllocationException::.ctor() +DA:10,0 +FN:10,System.Void ClingoSharp.Exceptions.BadAllocationException::.ctor(System.String) +FNDA:0,System.Void ClingoSharp.Exceptions.BadAllocationException::.ctor(System.String) +DA:11,0 +LF:2 +LH:0 +BRF:0 +BRH:0 +FNF:2 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\Exceptions\LogicException.cs +FN:9,System.Void ClingoSharp.Exceptions.LogicException::.ctor() +FNDA:0,System.Void ClingoSharp.Exceptions.LogicException::.ctor() +DA:10,0 +FN:10,System.Void ClingoSharp.Exceptions.LogicException::.ctor(System.String) +FNDA:0,System.Void ClingoSharp.Exceptions.LogicException::.ctor(System.String) +DA:11,0 +LF:2 +LH:0 +BRF:0 +BRH:0 +FNF:2 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\Exceptions\RuntimeException.cs +FN:9,System.Void ClingoSharp.Exceptions.RuntimeException::.ctor() +FNDA:0,System.Void ClingoSharp.Exceptions.RuntimeException::.ctor() +DA:10,0 +FN:10,System.Void ClingoSharp.Exceptions.RuntimeException::.ctor(System.String) +FNDA:0,System.Void ClingoSharp.Exceptions.RuntimeException::.ctor(System.String) +DA:11,0 +LF:2 +LH:0 +BRF:0 +BRH:0 +FNF:2 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\Exceptions\UnknownException.cs +FN:6,System.Void ClingoSharp.Exceptions.UnknownException::.ctor() +FNDA:0,System.Void ClingoSharp.Exceptions.UnknownException::.ctor() +DA:7,0 +FN:7,System.Void ClingoSharp.Exceptions.UnknownException::.ctor(System.String) +FNDA:0,System.Void ClingoSharp.Exceptions.UnknownException::.ctor(System.String) +DA:8,0 +LF:2 +LH:0 +BRF:0 +BRH:0 +FNF:2 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp\Enums\Enumeration.cs +FN:16,System.Int32 ClingoSharp.Enums.Enumeration::get_Value() +FNDA:0,System.Int32 ClingoSharp.Enums.Enumeration::get_Value() +DA:17,0 +FN:21,System.String ClingoSharp.Enums.Enumeration::get_Name() +FNDA:0,System.String ClingoSharp.Enums.Enumeration::get_Name() +DA:22,0 +FN:41,System.Collections.Generic.IEnumerable`1 ClingoSharp.Enums.Enumeration::GetNames() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.Enums.Enumeration::GetNames() +DA:42,0 +DA:43,0 +FN:50,System.Collections.Generic.IEnumerable`1 ClingoSharp.Enums.Enumeration::GetValues() +FNDA:0,System.Collections.Generic.IEnumerable`1 ClingoSharp.Enums.Enumeration::GetValues() +DA:51,0 +DA:52,0 +FN:60,ClingoSharp.Enums.Enumeration ClingoSharp.Enums.Enumeration::GetValue(System.Int32) +FNDA:0,ClingoSharp.Enums.Enumeration ClingoSharp.Enums.Enumeration::GetValue(System.Int32) +DA:61,0 +DA:62,0 +DA:63,0 +FN:71,ClingoSharp.Enums.Enumeration ClingoSharp.Enums.Enumeration::Parse(System.String,System.Boolean) +FNDA:0,ClingoSharp.Enums.Enumeration ClingoSharp.Enums.Enumeration::Parse(System.String,System.Boolean) +DA:72,0 +DA:73,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:80,0 +DA:81,0 +DA:85,0 +DA:86,0 +DA:87,0 +DA:90,0 +DA:91,0 +BRDA:73,9,0,0 +BRDA:75,18,0,0 +BRDA:75,18,1,0 +BRDA:73,9,1,0 +BRDA:85,48,0,0 +BRDA:85,48,1,0 +FN:98,ClingoSharp.Enums.Enumeration ClingoSharp.Enums.Enumeration::Parse(System.String) +FNDA:0,ClingoSharp.Enums.Enumeration ClingoSharp.Enums.Enumeration::Parse(System.String) +DA:99,0 +DA:100,0 +DA:101,0 +FN:110,TEnum ClingoSharp.Enums.Enumeration::Parse(System.String,System.Boolean) +FNDA:0,TEnum ClingoSharp.Enums.Enumeration::Parse(System.String,System.Boolean) +DA:111,0 +DA:112,0 +DA:113,0 +FN:121,TEnum ClingoSharp.Enums.Enumeration::Parse(System.String) +FNDA:0,TEnum ClingoSharp.Enums.Enumeration::Parse(System.String) +DA:122,0 +DA:123,0 +DA:124,0 +FN:133,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,System.Boolean,ClingoSharp.Enums.Enumeration&) +FNDA:0,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,System.Boolean,ClingoSharp.Enums.Enumeration&) +DA:134,0 +DA:135,0 +DA:136,0 +DA:137,0 +BRDA:135,18,0,0 +BRDA:135,18,1,0 +FN:145,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,ClingoSharp.Enums.Enumeration&) +FNDA:0,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,ClingoSharp.Enums.Enumeration&) +DA:146,0 +DA:147,0 +DA:148,0 +FN:158,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,System.Boolean,TEnum&) +FNDA:0,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,System.Boolean,TEnum&) +DA:159,0 +DA:160,0 +DA:161,0 +DA:162,0 +DA:163,0 +DA:166,0 +DA:167,0 +DA:168,0 +BRDA:160,12,0,0 +BRDA:160,12,1,0 +FN:177,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,TEnum&) +FNDA:0,System.Boolean ClingoSharp.Enums.Enumeration::TryParse(System.String,TEnum&) +DA:178,0 +DA:179,0 +DA:180,0 +FN:201,System.Boolean ClingoSharp.Enums.Enumeration::Equals(System.Object) +FNDA:0,System.Boolean ClingoSharp.Enums.Enumeration::Equals(System.Object) +DA:202,0 +DA:203,0 +DA:204,0 +DA:205,0 +DA:208,0 +DA:209,0 +DA:210,0 +BRDA:203,15,0,0 +BRDA:203,15,1,0 +FN:213,System.Int32 ClingoSharp.Enums.Enumeration::GetHashCode() +FNDA:0,System.Int32 ClingoSharp.Enums.Enumeration::GetHashCode() +DA:214,0 +DA:215,0 +DA:216,0 +FN:27,System.Void ClingoSharp.Enums.Enumeration::.ctor(System.Int32) +FNDA:0,System.Void ClingoSharp.Enums.Enumeration::.ctor(System.Int32) +DA:28,0 +DA:29,0 +DA:30,0 +DA:31,0 +LF:63 +LH:0 +BRF:12 +BRH:0 +FNF:16 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.NativeWrapper\ControlModuleImpl.cs +FN:100,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::New(System.String[],ClingoSharp.CoreServices.Callbacks.LoggerCallback,System.UInt32,ClingoSharp.CoreServices.Types.Control&) +FNDA:1,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::New(System.String[],ClingoSharp.CoreServices.Callbacks.LoggerCallback,System.UInt32,ClingoSharp.CoreServices.Types.Control&) +DA:101,1 +DA:107,1 +DA:109,1 +DA:111,1 +DA:112,1 +DA:114,1 +DA:115,1 +BRDA:107,18,0,0 +BRDA:107,18,1,1 +BRDA:111,51,0,1 +BRDA:111,51,1,0 +FN:117,System.Void ClingoSharp.NativeWrapper.ControlModuleImpl::Free(ClingoSharp.CoreServices.Types.Control) +FNDA:0,System.Void ClingoSharp.NativeWrapper.ControlModuleImpl::Free(ClingoSharp.CoreServices.Types.Control) +DA:118,0 +DA:119,0 +DA:120,0 +FN:126,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::Add(ClingoSharp.CoreServices.Types.Control,System.String,System.String[],System.String) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::Add(ClingoSharp.CoreServices.Types.Control,System.String,System.String[],System.String) +DA:127,0 +DA:128,0 +DA:130,0 +DA:132,0 +DA:133,0 +BRDA:128,4,0,0 +BRDA:128,4,1,0 +FN:135,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::Ground(ClingoSharp.CoreServices.Types.Control,ClingoSharp.CoreServices.Types.Part[],ClingoSharp.CoreServices.Callbacks.GroundCallback) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::Ground(ClingoSharp.CoreServices.Types.Control,ClingoSharp.CoreServices.Types.Part[],ClingoSharp.CoreServices.Callbacks.GroundCallback) +DA:136,0 +DA:158,0 +DA:159,0 +DA:161,0 +DA:163,0 +DA:164,0 +BRDA:158,23,0,0 +BRDA:158,23,1,0 +BRDA:159,44,0,0 +BRDA:159,44,1,0 +BRDA:161,76,0,0 +BRDA:161,76,1,0 +FN:170,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::Solve(ClingoSharp.CoreServices.Types.Control,ClingoSharp.CoreServices.Enums.SolveMode,ClingoSharp.CoreServices.Types.Literal[],ClingoSharp.CoreServices.EventHandlers.SolveEventHandler,ClingoSharp.CoreServices.Types.SolveHandle&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::Solve(ClingoSharp.CoreServices.Types.Control,ClingoSharp.CoreServices.Enums.SolveMode,ClingoSharp.CoreServices.Types.Literal[],ClingoSharp.CoreServices.EventHandlers.SolveEventHandler,ClingoSharp.CoreServices.Types.SolveHandle&) +DA:171,0 +DA:183,0 +DA:185,0 +DA:186,0 +DA:188,0 +DA:190,0 +DA:192,0 +DA:194,0 +DA:195,0 +BRDA:185,19,0,0 +BRDA:185,19,1,0 +BRDA:186,70,0,0 +BRDA:186,70,1,0 +BRDA:190,111,0,0 +BRDA:190,111,1,0 +FN:201,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::GetConst(ClingoSharp.CoreServices.Types.Control,System.String,ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::GetConst(ClingoSharp.CoreServices.Types.Control,System.String,ClingoSharp.CoreServices.Types.Symbol&) +DA:202,0 +DA:203,0 +DA:204,0 +DA:205,0 +DA:206,0 +DA:207,0 +FN:209,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::HasConst(ClingoSharp.CoreServices.Types.Control,System.String,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::HasConst(ClingoSharp.CoreServices.Types.Control,System.String,System.Boolean&) +DA:210,0 +DA:211,0 +DA:212,0 +DA:213,0 +DA:214,0 +DA:215,0 +FN:217,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::GetSymbolicAtoms(ClingoSharp.CoreServices.Types.Control,ClingoSharp.CoreServices.Types.SymbolicAtoms&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ControlModuleImpl::GetSymbolicAtoms(ClingoSharp.CoreServices.Types.Control,ClingoSharp.CoreServices.Types.SymbolicAtoms&) +DA:218,0 +DA:219,0 +DA:220,0 +DA:221,0 +DA:222,0 +DA:223,0 +FN:26,System.Void ClingoSharp.NativeWrapper.ControlModuleImpl::.ctor() +FNDA:1,System.Void ClingoSharp.NativeWrapper.ControlModuleImpl::.ctor() +DA:27,1 +DA:28,1 +DA:29,1 +DA:30,2 +DA:31,2 +DA:32,3 +DA:33,3 +DA:34,3 +DA:35,2 +DA:36,1 +DA:37,2 +DA:38,3 +DA:39,3 +DA:40,3 +DA:41,3 +DA:42,3 +DA:43,3 +DA:44,2 +DA:45,2 +DA:47,1 +DA:48,1 +FN:140,System.UInt64 ClingoSharp.NativeWrapper.ControlModuleImpl/<>c::b__13_3(ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,System.UInt64 ClingoSharp.NativeWrapper.ControlModuleImpl/<>c::b__13_3(ClingoSharp.CoreServices.Types.Symbol) +DA:141,0 +BRDA:141,2,0,0 +BRDA:141,2,1,0 +FN:150,ClingoSharp.CoreServices.Types.Symbol ClingoSharp.NativeWrapper.ControlModuleImpl/<>c::b__13_2(System.UInt64) +FNDA:0,ClingoSharp.CoreServices.Types.Symbol ClingoSharp.NativeWrapper.ControlModuleImpl/<>c::b__13_2(System.UInt64) +DA:151,0 +BRDA:151,47,0,0 +BRDA:151,47,1,0 +FN:102,System.Void ClingoSharp.NativeWrapper.ControlModuleImpl/<>c__DisplayClass10_0::g__clingoLoggerCallback|0(ClingoSharp.NativeWrapper.Enums.clingo_warning,System.String,System.IntPtr) +FNDA:0,System.Void ClingoSharp.NativeWrapper.ControlModuleImpl/<>c__DisplayClass10_0::g__clingoLoggerCallback|0(ClingoSharp.NativeWrapper.Enums.clingo_warning,System.String,System.IntPtr) +DA:103,0 +DA:104,0 +DA:105,0 +FN:172,System.Int32 ClingoSharp.NativeWrapper.ControlModuleImpl/<>c__DisplayClass14_0::g__clingoSolveEventCallback|0(ClingoSharp.NativeWrapper.Enums.clingo_solve_event_type,System.IntPtr,System.IntPtr,System.Boolean[]&) +FNDA:0,System.Int32 ClingoSharp.NativeWrapper.ControlModuleImpl/<>c__DisplayClass14_0::g__clingoSolveEventCallback|0(ClingoSharp.NativeWrapper.Enums.clingo_solve_event_type,System.IntPtr,System.IntPtr,System.Boolean[]&) +DA:173,0 +DA:174,0 +DA:176,0 +DA:178,0 +DA:180,0 +DA:181,0 +BRDA:180,33,0,0 +BRDA:180,33,1,0 +LF:80 +LH:28 +BRF:24 +BRH:2 +FNF:13 +FNH:2 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.NativeWrapper\MainModuleImpl.cs +FN:30,System.String ClingoSharp.NativeWrapper.MainModuleImpl::GetVersion() +FNDA:1,System.String ClingoSharp.NativeWrapper.MainModuleImpl::GetVersion() +DA:31,1 +DA:32,1 +DA:33,1 +DA:34,1 +DA:36,1 +DA:38,1 +DA:39,1 +DA:40,1 +DA:42,1 +DA:43,1 +DA:44,1 +DA:46,1 +DA:47,1 +FN:49,ClingoSharp.CoreServices.Enums.ErrorCode ClingoSharp.NativeWrapper.MainModuleImpl::GetErrorCode() +FNDA:0,ClingoSharp.CoreServices.Enums.ErrorCode ClingoSharp.NativeWrapper.MainModuleImpl::GetErrorCode() +DA:50,0 +DA:51,0 +DA:52,0 +FN:54,System.String ClingoSharp.NativeWrapper.MainModuleImpl::GetErrorMessage() +FNDA:0,System.String ClingoSharp.NativeWrapper.MainModuleImpl::GetErrorMessage() +DA:55,0 +DA:56,0 +DA:57,0 +LF:19 +LH:13 +BRF:0 +BRH:0 +FNF:3 +FNH:1 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.NativeWrapper\ModelModuleImpl.cs +FN:73,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::Contains(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Symbol,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::Contains(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Symbol,System.Boolean&) +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:78,0 +DA:79,0 +FN:81,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::Extends(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Symbol[]) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::Extends(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Symbol[]) +DA:82,0 +DA:83,0 +DA:84,0 +DA:85,0 +DA:86,0 +DA:87,0 +BRDA:83,2,0,0 +BRDA:83,2,1,0 +BRDA:84,53,0,0 +BRDA:84,53,1,0 +FN:89,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetCosts(ClingoSharp.CoreServices.Types.Model,System.Int64[]&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetCosts(ClingoSharp.CoreServices.Types.Model,System.Int64[]&) +DA:90,0 +DA:91,0 +DA:92,0 +DA:94,0 +DA:95,0 +DA:96,0 +DA:97,0 +DA:98,0 +DA:101,0 +DA:102,0 +DA:103,0 +BRDA:94,27,0,0 +BRDA:94,27,1,0 +FN:105,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetNumber(ClingoSharp.CoreServices.Types.Model,System.UInt64&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetNumber(ClingoSharp.CoreServices.Types.Model,System.UInt64&) +DA:106,0 +DA:107,0 +DA:108,0 +DA:109,0 +DA:110,0 +DA:111,0 +FN:113,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetSymbols(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Enums.ShowType,ClingoSharp.CoreServices.Types.Symbol[]&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetSymbols(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Enums.ShowType,ClingoSharp.CoreServices.Types.Symbol[]&) +DA:114,0 +DA:115,0 +DA:116,0 +DA:118,0 +DA:119,0 +DA:120,0 +DA:121,0 +DA:122,0 +DA:123,0 +DA:126,0 +DA:127,0 +DA:128,0 +BRDA:118,28,0,0 +BRDA:118,28,1,0 +FN:130,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetThreadId(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Id&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetThreadId(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Id&) +DA:131,0 +DA:132,0 +DA:133,0 +DA:134,0 +DA:135,0 +DA:136,0 +FN:138,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetType(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Enums.ModelType&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetType(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Enums.ModelType&) +DA:139,0 +DA:140,0 +DA:141,0 +DA:142,0 +DA:143,0 +DA:144,0 +FN:146,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::IsOptimalityProven(ClingoSharp.CoreServices.Types.Model,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::IsOptimalityProven(ClingoSharp.CoreServices.Types.Model,System.Boolean&) +DA:147,0 +DA:148,0 +DA:149,0 +DA:150,0 +DA:151,0 +DA:152,0 +FN:154,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::IsTrue(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Literal,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::IsTrue(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.Literal,System.Boolean&) +DA:155,0 +DA:156,0 +DA:157,0 +DA:158,0 +DA:159,0 +DA:160,0 +FN:166,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetContext(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.SolveControl&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetContext(ClingoSharp.CoreServices.Types.Model,ClingoSharp.CoreServices.Types.SolveControl&) +DA:167,0 +DA:168,0 +DA:169,0 +DA:170,0 +DA:171,0 +DA:172,0 +FN:174,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetSymbolicAtoms(ClingoSharp.CoreServices.Types.SolveControl,ClingoSharp.CoreServices.Types.SymbolicAtoms&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::GetSymbolicAtoms(ClingoSharp.CoreServices.Types.SolveControl,ClingoSharp.CoreServices.Types.SymbolicAtoms&) +DA:175,0 +DA:176,0 +DA:177,0 +DA:178,0 +DA:179,0 +DA:180,0 +FN:182,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::AddClause(ClingoSharp.CoreServices.Types.SolveControl,ClingoSharp.CoreServices.Types.Literal[]) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.ModelModuleImpl::AddClause(ClingoSharp.CoreServices.Types.SolveControl,ClingoSharp.CoreServices.Types.Literal[]) +DA:183,0 +DA:184,0 +DA:185,0 +DA:186,0 +DA:187,0 +DA:188,0 +BRDA:184,2,0,0 +BRDA:184,2,1,0 +BRDA:185,53,0,0 +BRDA:185,53,1,0 +LF:83 +LH:0 +BRF:12 +BRH:0 +FNF:12 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.NativeWrapper\SolveHandleModuleImpl.cs +FN:37,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Get(ClingoSharp.CoreServices.Types.SolveHandle,ClingoSharp.CoreServices.Enums.SolveResult&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Get(ClingoSharp.CoreServices.Types.SolveHandle,ClingoSharp.CoreServices.Enums.SolveResult&) +DA:38,0 +DA:39,0 +DA:40,0 +DA:41,0 +DA:42,0 +DA:43,0 +FN:45,System.Void ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Wait(ClingoSharp.CoreServices.Types.SolveHandle,System.Double,System.Boolean&) +FNDA:0,System.Void ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Wait(ClingoSharp.CoreServices.Types.SolveHandle,System.Double,System.Boolean&) +DA:46,0 +DA:47,0 +DA:48,0 +DA:49,0 +DA:50,0 +FN:52,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Model(ClingoSharp.CoreServices.Types.SolveHandle,ClingoSharp.CoreServices.Types.Model&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Model(ClingoSharp.CoreServices.Types.SolveHandle,ClingoSharp.CoreServices.Types.Model&) +DA:53,0 +DA:54,0 +DA:55,0 +DA:56,0 +DA:57,0 +DA:58,0 +FN:60,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Resume(ClingoSharp.CoreServices.Types.SolveHandle) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Resume(ClingoSharp.CoreServices.Types.SolveHandle) +DA:61,0 +DA:62,0 +DA:63,0 +DA:64,0 +FN:66,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Cancel(ClingoSharp.CoreServices.Types.SolveHandle) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Cancel(ClingoSharp.CoreServices.Types.SolveHandle) +DA:67,0 +DA:68,0 +DA:69,0 +DA:70,0 +FN:72,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Close(ClingoSharp.CoreServices.Types.SolveHandle) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SolveHandleModuleImpl::Close(ClingoSharp.CoreServices.Types.SolveHandle) +DA:73,0 +DA:74,0 +DA:75,0 +DA:76,0 +LF:29 +LH:0 +BRF:0 +BRH:0 +FNF:6 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.NativeWrapper\SymbolicAtomsModuleImpl.cs +FN:58,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetSize(ClingoSharp.CoreServices.Types.SymbolicAtoms,System.UIntPtr&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetSize(ClingoSharp.CoreServices.Types.SymbolicAtoms,System.UIntPtr&) +DA:59,0 +DA:60,0 +DA:61,0 +DA:62,0 +DA:63,0 +DA:64,0 +FN:66,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetBeginIterator(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.Signature,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetBeginIterator(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.Signature,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +DA:67,0 +DA:68,0 +DA:69,0 +DA:70,0 +DA:71,0 +DA:72,0 +DA:73,0 +BRDA:69,9,0,0 +BRDA:69,9,1,0 +FN:75,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetEndIterator(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetEndIterator(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +DA:76,0 +DA:77,0 +DA:78,0 +DA:79,0 +DA:80,0 +DA:81,0 +FN:83,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::Find(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::Find(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +DA:84,0 +DA:85,0 +DA:86,0 +DA:87,0 +DA:88,0 +DA:89,0 +FN:91,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IteratorIsEqualTo(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IteratorIsEqualTo(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +DA:92,0 +DA:93,0 +DA:94,0 +DA:95,0 +DA:96,0 +DA:97,0 +FN:99,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetSymbol(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetSymbol(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.Symbol&) +DA:100,0 +DA:101,0 +DA:102,0 +DA:103,0 +DA:104,0 +DA:105,0 +FN:107,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IsFact(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IsFact(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +DA:108,0 +DA:109,0 +DA:110,0 +DA:111,0 +DA:112,0 +DA:113,0 +FN:115,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IsExternal(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IsExternal(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +DA:116,0 +DA:117,0 +DA:118,0 +DA:119,0 +DA:120,0 +DA:121,0 +FN:123,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetLiteral(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.Literal&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetLiteral(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.Literal&) +DA:124,0 +DA:125,0 +DA:126,0 +DA:127,0 +DA:128,0 +DA:129,0 +FN:131,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetSignatures(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.Signature[]&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetSignatures(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.Signature[]&) +DA:132,0 +DA:133,0 +DA:134,0 +DA:136,0 +DA:137,0 +DA:138,0 +DA:139,0 +DA:140,0 +DA:141,0 +DA:144,0 +DA:145,0 +DA:146,0 +BRDA:136,27,0,0 +BRDA:136,27,1,0 +FN:148,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetNext(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::GetNext(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,ClingoSharp.CoreServices.Types.SymbolicAtomIterator&) +DA:149,0 +DA:150,0 +DA:151,0 +DA:152,0 +DA:153,0 +DA:154,0 +FN:156,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IsValid(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolicAtomsModuleImpl::IsValid(ClingoSharp.CoreServices.Types.SymbolicAtoms,ClingoSharp.CoreServices.Types.SymbolicAtomIterator,System.Boolean&) +DA:157,0 +DA:158,0 +DA:159,0 +DA:160,0 +DA:161,0 +DA:162,0 +LF:79 +LH:0 +BRF:4 +BRH:0 +FNF:12 +FNH:0 +end_of_record +SF:D:\Users\neker\source\repos\ClingoSharp\src\ClingoSharp.NativeWrapper\SymbolModuleImpl.cs +FN:119,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateSignature(System.String,System.UInt32,System.Boolean,ClingoSharp.CoreServices.Types.Signature&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateSignature(System.String,System.UInt32,System.Boolean,ClingoSharp.CoreServices.Types.Signature&) +DA:120,0 +DA:121,0 +DA:123,0 +DA:124,0 +DA:126,0 +DA:127,0 +FN:129,System.String ClingoSharp.NativeWrapper.SymbolModuleImpl::GetName(ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.String ClingoSharp.NativeWrapper.SymbolModuleImpl::GetName(ClingoSharp.CoreServices.Types.Signature) +DA:130,0 +DA:131,0 +DA:132,0 +FN:134,System.UInt32 ClingoSharp.NativeWrapper.SymbolModuleImpl::GetArity(ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.UInt32 ClingoSharp.NativeWrapper.SymbolModuleImpl::GetArity(ClingoSharp.CoreServices.Types.Signature) +DA:135,0 +DA:136,0 +DA:137,0 +FN:139,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsPositive(ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsPositive(ClingoSharp.CoreServices.Types.Signature) +DA:140,0 +DA:141,0 +DA:142,0 +FN:144,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsNegative(ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsNegative(ClingoSharp.CoreServices.Types.Signature) +DA:145,0 +DA:146,0 +DA:147,0 +FN:149,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsEqualTo(ClingoSharp.CoreServices.Types.Signature,ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsEqualTo(ClingoSharp.CoreServices.Types.Signature,ClingoSharp.CoreServices.Types.Signature) +DA:150,0 +DA:151,0 +DA:152,0 +FN:154,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsLessThan(ClingoSharp.CoreServices.Types.Signature,ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsLessThan(ClingoSharp.CoreServices.Types.Signature,ClingoSharp.CoreServices.Types.Signature) +DA:155,0 +DA:156,0 +DA:157,0 +FN:159,System.UIntPtr ClingoSharp.NativeWrapper.SymbolModuleImpl::GetHash(ClingoSharp.CoreServices.Types.Signature) +FNDA:0,System.UIntPtr ClingoSharp.NativeWrapper.SymbolModuleImpl::GetHash(ClingoSharp.CoreServices.Types.Signature) +DA:160,0 +DA:161,0 +DA:162,0 +FN:168,System.Void ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateNumber(System.Int32,ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Void ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateNumber(System.Int32,ClingoSharp.CoreServices.Types.Symbol&) +DA:169,0 +DA:170,0 +DA:171,0 +DA:172,0 +DA:173,0 +FN:175,System.Void ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateSupremum(ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Void ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateSupremum(ClingoSharp.CoreServices.Types.Symbol&) +DA:176,0 +DA:177,0 +DA:178,0 +DA:179,0 +DA:180,0 +FN:182,System.Void ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateInfimum(ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Void ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateInfimum(ClingoSharp.CoreServices.Types.Symbol&) +DA:183,0 +DA:184,0 +DA:185,0 +DA:186,0 +DA:187,0 +FN:189,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateString(System.String,ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateString(System.String,ClingoSharp.CoreServices.Types.Symbol&) +DA:190,0 +DA:191,0 +DA:192,0 +DA:193,0 +DA:194,0 +DA:195,0 +FN:197,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateId(System.String,System.Boolean,ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateId(System.String,System.Boolean,ClingoSharp.CoreServices.Types.Symbol&) +DA:198,0 +DA:199,0 +DA:200,0 +DA:201,0 +DA:202,0 +DA:203,0 +FN:205,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateFunction(System.String,ClingoSharp.CoreServices.Types.Symbol[],System.Boolean,ClingoSharp.CoreServices.Types.Symbol&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::CreateFunction(System.String,ClingoSharp.CoreServices.Types.Symbol[],System.Boolean,ClingoSharp.CoreServices.Types.Symbol&) +DA:206,0 +DA:207,0 +DA:208,0 +DA:210,0 +DA:212,0 +DA:213,0 +DA:215,0 +DA:216,0 +BRDA:208,47,0,0 +BRDA:208,47,1,0 +FN:222,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetNumber(ClingoSharp.CoreServices.Types.Symbol,System.Int32&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetNumber(ClingoSharp.CoreServices.Types.Symbol,System.Int32&) +DA:223,0 +DA:224,0 +DA:226,0 +DA:227,0 +DA:229,0 +DA:230,0 +FN:232,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetName(ClingoSharp.CoreServices.Types.Symbol,System.String&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetName(ClingoSharp.CoreServices.Types.Symbol,System.String&) +DA:233,0 +DA:234,0 +DA:236,0 +DA:237,0 +DA:239,0 +DA:240,0 +FN:242,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetString(ClingoSharp.CoreServices.Types.Symbol,System.String&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetString(ClingoSharp.CoreServices.Types.Symbol,System.String&) +DA:243,0 +DA:244,0 +DA:246,0 +DA:247,0 +DA:249,0 +DA:250,0 +FN:252,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsPositive(ClingoSharp.CoreServices.Types.Symbol,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsPositive(ClingoSharp.CoreServices.Types.Symbol,System.Boolean&) +DA:253,0 +DA:254,0 +DA:256,0 +DA:257,0 +DA:259,0 +DA:260,0 +FN:262,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsNegative(ClingoSharp.CoreServices.Types.Symbol,System.Boolean&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsNegative(ClingoSharp.CoreServices.Types.Symbol,System.Boolean&) +DA:263,0 +DA:264,0 +DA:266,0 +DA:267,0 +DA:269,0 +DA:270,0 +FN:272,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetArguments(ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.Symbol[]&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::GetArguments(ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.Symbol[]&) +DA:273,0 +DA:274,0 +DA:275,0 +DA:277,0 +DA:280,0 +DA:281,0 +DA:282,0 +DA:285,0 +DA:286,0 +DA:287,0 +DA:288,0 +DA:289,0 +DA:291,0 +DA:292,0 +BRDA:286,124,1,0 +BRDA:286,124,0,0 +FN:294,ClingoSharp.CoreServices.Enums.SymbolType ClingoSharp.NativeWrapper.SymbolModuleImpl::GetType(ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,ClingoSharp.CoreServices.Enums.SymbolType ClingoSharp.NativeWrapper.SymbolModuleImpl::GetType(ClingoSharp.CoreServices.Types.Symbol) +DA:295,0 +DA:296,0 +DA:297,0 +FN:299,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::ToString(ClingoSharp.CoreServices.Types.Symbol,System.String&) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::ToString(ClingoSharp.CoreServices.Types.Symbol,System.String&) +DA:300,0 +DA:301,0 +DA:303,0 +DA:305,0 +DA:306,0 +DA:307,0 +DA:309,0 +DA:311,0 +DA:312,0 +DA:314,0 +DA:317,0 +DA:318,0 +DA:319,0 +BRDA:305,27,0,0 +BRDA:305,27,1,0 +FN:325,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsEqualTo(ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsEqualTo(ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.Symbol) +DA:326,0 +DA:327,0 +DA:328,0 +FN:330,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsLessThan(ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,System.Boolean ClingoSharp.NativeWrapper.SymbolModuleImpl::IsLessThan(ClingoSharp.CoreServices.Types.Symbol,ClingoSharp.CoreServices.Types.Symbol) +DA:331,0 +DA:332,0 +DA:333,0 +FN:335,System.UIntPtr ClingoSharp.NativeWrapper.SymbolModuleImpl::GetHash(ClingoSharp.CoreServices.Types.Symbol) +FNDA:0,System.UIntPtr ClingoSharp.NativeWrapper.SymbolModuleImpl::GetHash(ClingoSharp.CoreServices.Types.Symbol) +DA:336,0 +DA:337,0 +DA:338,0 +LF:131 +LH:0 +BRF:6 +BRH:0 +FNF:25 +FNH:0 +end_of_record \ No newline at end of file diff --git a/toc.yml b/toc.yml new file mode 100644 index 0000000..59f8010 --- /dev/null +++ b/toc.yml @@ -0,0 +1,5 @@ +- name: Articles + href: articles/ +- name: Api Documentation + href: api/ + homepage: api/index.md