diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..053dc49 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,143 @@ +# Suppress: EC112 +# top-most EditorConfig file +root = true + +# Don't use tabs for indentation. +[*] +indent_style = space +# (Please don't specify an indent_size here; that has too many unintended consequences.) + +# Code files +[*.{cs,csx,vb,vbx}] +indent_size = 4 + +# Code files +[*.sln] +indent_size = 4 + +# Xml project files +[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] +indent_size = 4 + +# Xml config files +[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct,plist}] +indent_size = 4 + +# JSON files +[*.json] +indent_size = 4 + +# XML files +[*.xml] +indent_size = 4 + +# XAML files +[*.xaml] +indent_size = 4 + +# Dotnet code style settings: +[*.{cs,vb}] +# Sort using and Import directives with System.* appearing first +dotnet_sort_system_directives_first = true + +dotnet_style_qualification_for_field = true:error +dotnet_style_qualification_for_property = true:error +dotnet_style_qualification_for_method = true:error +dotnet_style_qualification_for_event = true:error + +# Use language keywords instead of framework type names for type references +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion +dotnet_style_require_accessibility_modifiers = omit_if_default:warning + +# Suggest more modern language features when available +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion + +# Naming Conventions: +# Pascal Casing +dotnet_naming_symbols.method_and_property_symbols.applicable_kinds= method,property,enum +dotnet_naming_symbols.method_and_property_symbols.applicable_accessibilities = * +dotnet_naming_style.pascal_case_style.capitalization = pascal_case + +dotnet_naming_rule.methods_and_properties_must_be_pascal_case.severity = warning +dotnet_naming_rule.methods_and_properties_must_be_pascal_case.symbols = method_and_property_symbols +dotnet_naming_rule.methods_and_properties_must_be_pascal_case.style = pascal_case_style + +# Non-public members must be lower-case +dotnet_naming_symbols.non_public_symbols.applicable_kinds = field +dotnet_naming_symbols.non_public_symbols.applicable_accessibilities = private +dotnet_naming_style.all_lower_case_style.capitalization = camel_case + +dotnet_naming_rule.non_public_members_must_be_lower_case.severity = warning +dotnet_naming_rule.non_public_members_must_be_lower_case.symbols = non_public_symbols +dotnet_naming_rule.non_public_members_must_be_lower_case.style = all_lower_case_style +dotnet_style_operator_placement_when_wrapping = beginning_of_line +tab_width = 4 +end_of_line = crlf +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_compound_assignment = true:suggestion +dotnet_style_prefer_simplified_interpolation = true:suggestion +dotnet_style_namespace_match_folder = true:silent +dotnet_style_allow_statement_immediately_after_block_experimental = true:silent + +# CSharp code style settings: +[*.cs] +# Do not prefer "var" everywhere +csharp_style_var_for_built_in_types = true:error +csharp_style_var_when_type_is_apparent = true:error +csharp_style_var_elsewhere = true:error + +# Prefer method-like constructs to have a block body +csharp_style_expression_bodied_methods = true:suggestion +csharp_style_expression_bodied_constructors = true:suggestion +csharp_style_expression_bodied_operators = true:suggestion + +# Prefer property-like constructs to have an expression-body +csharp_style_expression_bodied_properties = true:suggestion +csharp_style_expression_bodied_indexers = true:suggestion +csharp_style_expression_bodied_accessors = true:suggestion + +# Suggest more modern language features when available +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion + +# Newline settings +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_indent_labels = one_less_than_current +csharp_using_directive_placement = outside_namespace:silent +csharp_prefer_simple_using_statement = true:warning +csharp_prefer_braces = when_multiline:error +csharp_style_namespace_declarations = file_scoped:warning +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent +csharp_style_prefer_null_check_over_type_check = true:suggestion +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_prefer_local_over_anonymous_function = true:suggestion +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_range_operator = true:suggestion +csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion +csharp_style_prefer_tuple_swap = true:suggestion +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_unused_value_assignment_preference = discard_variable:suggestion +csharp_style_unused_value_expression_statement_preference = discard_variable:silent +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = true:silent +csharp_style_prefer_utf8_string_literals = true:suggestion diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..9790b28 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,20 @@ +# Code of Conduct + +REMEMBER - this is a free project you use - the maintainers are not here to look into a crystal ball or take any form of abuse. This is not a product, it is something that is given away for free. + +* Be respectful +* Be concise by providing as much information as possible such as code samples, FULL stack traces, etc - stating that you've followed docs/samples/etc is just not good enough +* Reply to questions back from the maintainer if you want your issue resolved +* Issues are only taken for the latest STABLE version of the library - preview versions of the library can be discussed on the SponsorConnect Discord channel available to sponsors only +* Just because you have an issue, doesn't mean it will be fixed right away. The maintainer isn't a developer for your project. Using reasoning such as "critical, time sensitive, etc" is not fair to the developers of this project. Don't do it and be respectful +* Issues that contain "Mono.Linker.MarkException: Error processing method: '*****' in assembly" are something you need to learn to setup in your release versions. You need to read the documentation from Microsoft here: https://docs.microsoft.com/en-us/xamarin/cross-platform/deploy-test/linker +* DO NOT REQUEST TIMELINES - the answer every single time will be "when it's done"! Refer to very first note above +* We do not take the Sat4.NET samples repository for issues. Why you might ask? A number of reasons + * They aren't always up-to-date with the latest version of Sat4.NET, .NET, etc + * They are setup for debugging or as general guidelines for users +* No requests will be taken for the following + * Library Updates + * Documentation Updates + * Samples + * Support for libraries not listed in the product selection + * Timelines \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..b72be94 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Contributing + +Thanks you for your interest in contributing to Sat4.NET - Please see our our [Code of Conduct](CODE_OF_CONDUCT.md). + + +### Bug Fixes +If you're looking for something to fix, please browse [open issues](https://github.com/chiefmonk/sat4.net/issues). + +Please follow the style used within the project + +- Don't use the `private` keyword as it is the default accessibility level in C# +- Apply readonly on class level private variables that are assigned in the constructor +- 4 SPACES - tabs do not exist :) + +### Feature Requests + +To propose a change or new feature, please make use the feature request area in issues/ + +#### Non-Starter Topics +The following topics should generally not be proposed for discussion as they are non-starters: + +* Large renames of APIs +* Large non-backward-compatible breaking changes +* Avoid clutter posts like "+1" which do not serve to further the conversation diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..4097905 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: [chiefmonk] +# custom: https://www.buymeacoffee.com/chiefmonk diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..cb7f9a9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,94 @@ +name: Bug Report +description: You have found something wrong with Shiny +title: "[Bug]: " +labels: [bug, unverified] +body: + - type: markdown + attributes: + value: | + Thank you for filing an issue. Please only file issues against the LATEST STABLE or LATEST BETA version of Shiny from Nuget (ALPHAs are not accepted for issues). If you are a sponsor, you can discuss issues with preview releases in the SponsorConnect Discord channel + If you have questions, please post them in GitHub discussions. + - type: dropdown + id: component + attributes: + label: Component/Nuget + description: The component you are filing against. If it is not listed here it means there is no support for it + options: + - Lightweight constraint programming with a SAT solver (Sat4.NET.Core) + - SAT Toolkit (Sat4.NET.Sat) + - Pseudo-boolean Solvers (Sat4.NET.Pseudo) + - MAX SAT Solvers based on reduction to Pseudo-boolean optimization problems (Sat4.NET.Maxsat) + - CSP solvers based on a translation into SAT (Sat4.NET.Csp) + - SAT-based Sudoku generator and solver (Sat4.NET.Sudoku) + - Other + validations: + required: true + - type: checkboxes + id: operatingsystems + attributes: + label: What operating system(s) are effected? + description: You may select more than one + options: + - label: iOS (13+ supported) + - label: Mac Catalyst + - label: Android (8+ supported) + - label: Windows (.NET 7 Target - only Core is currently supported) + - type: textarea + validations: + required: true + attributes: + label: Version(s) of Operation Systems + - type: checkboxes + id: platforms + attributes: + label: Hosting Model + description: You really should only select one of these + options: + #- label: Blazor + - label: MAUI + - label: Native/Classic Xamarin + - label: Manual + - type: textarea + validations: + required: true + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. + 2. + 3. + - type: textarea + attributes: + label: Expected Behavior + validations: + required: true + - type: textarea + attributes: + label: Actual Behavior + validations: + required: true + - type: textarea + id: exception + attributes: + label: Exception or Log output + description: Please copy and paste any relevant log output + - type: textarea + id: codesample + attributes: + label: Code Sample + description: Please include a github repo with your reproducible sample + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/chiefmonk/sat4.net/blob/master/.github/CODE_OF_CONDUCT.md) + options: + - label: I have supplied a reproducible sample that is NOT FROM THE SHINY SAMPLES! + required: true + - label: I am a Sponsor OR I am using the LATEST stable/beta version from nuget (v3.0 stable - ALPHAS are not taking issues - Sponsors can still send v2 issues) + required: true + - label: I am Sponsor OR My GitHub account is 30+ days old + required: true + - label: I understand that if I am checking these boxes and I am not actually following what they are saying, I will be removed from this repository! + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..66a57d5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Sat4.NET Community Forums + url: https://github.com/chiefmonk/sat4.net/discussions + about: Please ask and answer questions here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..19a69d4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,33 @@ +name: Feature Request +description: You have an idea for an enhancement within Shiny +title: "[Feature Request]: " +labels: [feature request, unverified] +body: + - type: markdown + attributes: + value: | + Please note that we are not taking feature requests for Windows or Shiny v2. + - type: textarea + attributes: + label: Summary + description: Your summary of the feature + validations: + required: true + - type: textarea + attributes: + label: API Changes + validations: + required: true + - type: textarea + attributes: + label: Intended Use Case + validations: + required: true + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/chiefmonk/sat4.net/blob/master/.github/CODE_OF_CONDUCT.md) + options: + - label: I agree to follow this project's Code of Conduct + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..f927adc --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,32 @@ +### Description of Change ### + + + +### Issues Resolved ### + + +- fixes # + +### API Changes ### + + + None + +### Platforms Affected ### + + +- All + +### Behavioral Changes ### + + +None + +### Testing Procedure ### + + +### PR Checklist ### + +- [ ] Rebased on top of the target branch at time of PR +- [ ] Changes adhere to coding standard +- [ ] Sent to a v(branch) or DEV branch \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..0f8d100 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,24 @@ +version: 2 + + +updates: +- package-ecosystem: nuget + directory: "/" + schedule: + interval: weekly + time: "10:00" + open-pull-requests-limit: 10 + target-branch: dev + groups: + AndroidX: + patterns: + - "Xamarin.AndroidX.*" + AspNetCore: + patterns: + - "Microsoft.AspNetCore.*" + - "Microsoft.JSInterop" + Firebase: + patterns: + - "Xamarin.Firebase.*" + labels: + - dependencies diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6a5ab19 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,63 @@ +name: Build + +on: + workflow_dispatch: + inputs: + logLevel: + description: 'Log level' + required: true + default: 'warning' + push: + branches: + - master + - main + - dev + - preview + - v* + +env: + NugetApiKey: ${{secrets.NUGETAPIKEY}} + TwitterConsumerKey: ${{secrets.TWITTER_CONSUMER_KEY}} + TwitterConsumerSecret: ${{secrets.TWITTER_CONSUMER_SECRET}} + TwitterAccessToken: ${{secrets.TWITTER_ACCESS_TOKEN}} + TwitterAccessTokenSecret: ${{secrets.TWITTER_ACCESS_TOKEN_SECRET}} + DiscordToken: ${{secrets.DISCORD_TOKEN}} + DiscordGuildId: '679761126598115336' + DiscordChannelId: '803717285986566174' + MastodonClientId: ${{secrets.MASTODON_CLIENT_ID}} + MastodonClientSecret: ${{secrets.MASTODON_CLIENT_SECRET}} + MastodonInstance: 'dotnet.social' + +jobs: + build: + + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup .NET 8.0 + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.0.x' + + - uses: AdoptOpenJDK/install-jdk@v1 + with: + version: '13' + architecture: x64 + + - name: Add .NET Workloads + run: dotnet workload install maui-ios maui-android maui-maccatalyst maui-windows + + - name: Build + run: dotnet run --project build/ShinyBuild.csproj + + - name: Publish Artifacts + uses: actions/upload-artifact@v3 + with: + name: nugets + path: ${{ github.workspace }}/artifacts + retention-days: 5 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e6393a6 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dotnet.defaultSolution": "Shiny.sln" +} \ No newline at end of file diff --git a/Build.slnf b/Build.slnf new file mode 100644 index 0000000..15a4f14 --- /dev/null +++ b/Build.slnf @@ -0,0 +1,28 @@ +{ + "solution": { + "path": "Shiny.sln", + "projects": [ + "src\\Shiny.Core\\Shiny.Core.csproj", + "src\\Shiny.Support.Repositories\\Shiny.Support.Repositories.csproj", + "src\\Shiny.Support.DeviceMonitoring\\Shiny.Support.DeviceMonitoring.csproj", + "src\\Shiny.Support.Locations\\Shiny.Support.Locations.csproj", + "src\\Shiny.Hosting.Maui\\Shiny.Hosting.Maui.csproj", + "src\\Shiny.Hosting.Native\\Shiny.Hosting.Native.csproj", + "src\\Shiny.Logging.AppCenter\\Shiny.Logging.AppCenter.csproj", + "src\\Shiny.Logging.Sqlite\\Shiny.Logging.Sqlite.csproj", + "src\\Shiny.Extensions.Configuration\\Shiny.Extensions.Configuration.csproj", + "src\\Shiny.Beacons\\Shiny.Beacons.csproj", + "src\\Shiny.BluetoothLE.Common\\Shiny.BluetoothLE.Common.csproj", + "src\\Shiny.BluetoothLE.Hosting\\Shiny.BluetoothLE.Hosting.csproj", + "src\\Shiny.BluetoothLE\\Shiny.BluetoothLE.csproj", + "src\\Shiny.Jobs\\Shiny.Jobs.csproj", + "src\\Shiny.Locations\\Shiny.Locations.csproj", + "src\\Shiny.Net.Http\\Shiny.Net.Http.csproj", + "src\\Shiny.Notifications\\Shiny.Notifications.csproj", + "src\\Shiny.SpeechRecognition\\Shiny.SpeechRecognition.csproj", + "src\\Shiny.Push\\Shiny.Push.csproj", + "src\\Shiny.Push.AzureNotificationHubs\\Shiny.Push.AzureNotificationHubs.csproj", + "src\\Shiny.Push.FirebaseMessaging\\Shiny.Push.FirebaseMessaging.csproj", + ] + } +} \ No newline at end of file diff --git a/README.md b/README.md index d1ba7be..ad8d236 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,75 @@ -# Sat4.NET -Sat4.NET is a full featured boolean reasoning library designed to bring state-of-the-art SAT technologies to the Common Language Runtimee. +# Sat4.NET v1 + + +Sat4.NET is a cross platform framework designed to make working with device services and background processes easy, testable, and consistent while bringing +things like dependency injection & logging in a structured way to your code! + +## Supports +* Xamarin iOS +* Xamarin Android +* .NET 8 for Android +* .NET 8 for iOS +* .NET 8 for MacCatalyst + +## Features +* Handles all of the cruft like Permissions, main thread traversal, persistent storage and app restarts +* Brings your infrastructure to the background +* Provides logging to ensure you know when your services fail in the background +* Gives a clean & testable API surface for your code +* Periodic Background Jobs +* BLE Client & Hosting +* Beacons Ranging & Monitoring +* Locations - GPS & Geofencing +* Push Notification - Native, Azure Notifications Hubs, Firebase, and more +* Local Notifications - best of breed local notifications supporting almost all features across all of the supported platforms + +## Links +* [Documentation](https://shinylib.net) +* [Change Log](https://shinylib.net/release-notes/client/) +* [Community Support](https://github.com/chiefmonk/shiny/discussions) +* [NuGets](https://www.nuget.org/profiles/ShinyLib) +* Samples + * [MAUI - Kitchen Sink](https://github.com/chiefmonk/shiny/tree/master/samples/Sample.Maui) + * [Push](https://github.com/chiefmonk/shiny/tree/master/samples/Sample.Push.Maui) + * [BLE Client & Hosting](https://github.com/chiefmonk/digitalscoreboard) + + +## Visual Studio Templates + +These templates will help get you up & running quickly. Simply select what features of Shiny you want to use and they will wire up everything from permissions to app configuration. + +[GitHub](https://github.com/chiefmonk/templates) +![NuGet](https://img.shields.io/nuget/v/shiny.templates?style=for-the-badge) + +> dotnet new --install Shiny.Templates + +## Integrating With Existing Apps + +If you cannot use our awesome templates - try our ugly, but effective boilerplate builder at: +[https://shinylib.net/client/appbuilder/](https://shinylib.net/client/appbuilder/) + +## Support Shiny! + +While Sat4.NET is free and will continue to be so, maintenance and support takes a heavy toll on sustainability. If you or your company have the resources, please consider becoming a GitHub Sponsor. GitHub Sponsorships help to make Open Source Development more sustainable. + +Depending on your Sponsorship Tier, you may also get access to some great benefits on Sponsor Connect (https://sponsorconnect.dev) including: +- The Sponsor Only Discord server +- Training available ONLY to sponsors on Sponsor Connect +- Special sponsor-only packages + +[https://sponsor.shinylib.net](https://sponsor.shinylib.net) + +How about some [Shiny Gear](https://www.redbubble.com/shop/ap/45038461) + +## Premium Paid Support + +Looking for consulting for your .NET applications and Sat4.NET, you can now book a time with the Chief Monk on here: [1-1 Consulting Session](https://superpeer.com/chiefmonk/-/1-on-1-development-help) + + +## Contributors +* [Chief Monk](https://github.com/chiefmonk) - Project Lead +* [Dan Siegel](https://github.com/dansiegel) - Contributor +* [Emily Stanek](https://github.com/emilystanek) - Logo Designer + + +![Alt](https://repobeats.axiom.co/api/embed/620aa9d88a0660e45683cb82159dee8586e83aa6.svg "Repobeats analytics image") diff --git a/art/sat4net_1.png b/art/sat4net_1.png new file mode 100644 index 0000000..66750ee Binary files /dev/null and b/art/sat4net_1.png differ diff --git a/art/sat4net_2.png b/art/sat4net_2.png new file mode 100644 index 0000000..0b9f790 Binary files /dev/null and b/art/sat4net_2.png differ diff --git a/art/sat4net_small.png b/art/sat4net_small.png new file mode 100644 index 0000000..e2403bb Binary files /dev/null and b/art/sat4net_small.png differ diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..50f6d95 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,2 @@ +dotnet run --project build/ShinyBuild.csproj -- $args +exit $LASTEXITCODE; \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..dcb9ac2 --- /dev/null +++ b/build.sh @@ -0,0 +1 @@ +dotnet run --project ./build/ShinyBuild.csproj -- "$@" diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..322a22e --- /dev/null +++ b/nuget.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/Sat4.NET.Core/Annotations/FeatureAttribute.cs b/src/Sat4.NET.Core/Annotations/FeatureAttribute.cs new file mode 100644 index 0000000..0be6609 --- /dev/null +++ b/src/Sat4.NET.Core/Annotations/FeatureAttribute.cs @@ -0,0 +1,27 @@ +namespace Sat4.NET.Core.Annotations; + +/** + * Architectural information about the design of Sat4j. + * + * @author chiefmonk, leberre + * @since 2.3.6 + */ +[AttributeUsage(AttributeTargets.Interface | AttributeTargets.Class, Inherited = false, AllowMultiple = false)] +public class FeatureAttribute : Attribute +{ + public FeatureAttribute(string value) + { + Value = value; + } + + public FeatureAttribute(string parent, string value) + { + Parent = parent; + Value = value; + } + + public string Value { get; set; } + public string Parent { get; set; } = "user"; + + +} diff --git a/src/Sat4.NET.Core/CoreGlobalUsings.cs b/src/Sat4.NET.Core/CoreGlobalUsings.cs new file mode 100644 index 0000000..21e2fe9 --- /dev/null +++ b/src/Sat4.NET.Core/CoreGlobalUsings.cs @@ -0,0 +1,4 @@ +global using System.Runtime.Serialization; +global using Sat4.NET.Core; +global using Sat4.NET.Core.Specs; +global using Sat4.NET.Core.Annotations; diff --git a/src/Sat4.NET.Core/Sat4.NET.Core.csproj b/src/Sat4.NET.Core/Sat4.NET.Core.csproj new file mode 100644 index 0000000..fa71b7a --- /dev/null +++ b/src/Sat4.NET.Core/Sat4.NET.Core.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/src/Sat4.NET.Core/Specs/IConstr.cs b/src/Sat4.NET.Core/Specs/IConstr.cs new file mode 100644 index 0000000..89e6dda --- /dev/null +++ b/src/Sat4.NET.Core/Specs/IConstr.cs @@ -0,0 +1,6 @@ +namespace Sat4.NET.Core.Specs; + +[Feature("constraint")] +public interface IConstr +{ +} diff --git a/src/Sat4.NET.Core/Specs/IPropagatable.cs b/src/Sat4.NET.Core/Specs/IPropagatable.cs new file mode 100644 index 0000000..59a490f --- /dev/null +++ b/src/Sat4.NET.Core/Specs/IPropagatable.cs @@ -0,0 +1,7 @@ +namespace Sat4.NET.Core.Specs; + +public interface IPropagatable +{ + +} + diff --git a/src/Sat4.NET.Core/Specs/IRandomAccessModel.cs b/src/Sat4.NET.Core/Specs/IRandomAccessModel.cs new file mode 100644 index 0000000..a93eacf --- /dev/null +++ b/src/Sat4.NET.Core/Specs/IRandomAccessModel.cs @@ -0,0 +1,54 @@ +/******************************************************************************* + * SAT4.NET: a SATisfiability library for .NET Copyright (C) 2023, 2004, 2012 Chief Monk, Artois University and CNRS + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU Lesser General Public License Version 2.1 or later (the + * "LGPL"), in which case the provisions of the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of the LGPL, and not to allow others to use your version of + * this file under the terms of the EPL, indicate your decision by deleting + * the provisions above and replace them with the notice and other provisions + * required by the LGPL. If you do not delete the provisions above, a recipient + * may use your version of this file under the terms of the EPL or the LGPL. + * + * Based on the original MiniSat specification from: + * + * An extensible SAT solver. Niklas Een and Niklas Sorensson. Proceedings of the + * Sixth International Conference on Theory and Applications of Satisfiability + * Testing, LNCS 2919, pp 502-518, 2003. + * + * See www.minisat.se for the original solver in C++. + * + * Contributors: + * CRIL - initial API and implementation + *******************************************************************************/ + +namespace Sat4.NET.Core.Specs; + +/** + * That interface allows to efficiently retrieve the truth value of a given + * variable in the solver. + * + * @author chiefmonk, daniel + * + */ +public interface IRandomAccessModel : ISerializable +{ + /** + * Provide the truth value of a specific variable in the model. + * + * That method should be called deciding that the problem is satisfiable. + * Else an exception UnsupportedOperationException is launched. + * + * @param variable + * the variable id in Dimacs format + * @return the truth value of that variable in the model + * @since 1.6 + */ + bool Model(int variable); +} diff --git a/src/Sat4.NET.Core/Specs/ISatSolver.cs b/src/Sat4.NET.Core/Specs/ISatSolver.cs new file mode 100644 index 0000000..f609ec5 --- /dev/null +++ b/src/Sat4.NET.Core/Specs/ISatSolver.cs @@ -0,0 +1,4 @@ +namespace Sat4.NET.Core.Specs; +public interface ISatSolver +{ +} diff --git a/src/Sat4.NET.Csp/Class1.cs b/src/Sat4.NET.Csp/Class1.cs new file mode 100644 index 0000000..b2a360e --- /dev/null +++ b/src/Sat4.NET.Csp/Class1.cs @@ -0,0 +1,6 @@ +namespace Sat4.NET.Csp; + +public class Class1 +{ + +} diff --git a/src/Sat4.NET.Csp/Sat4.NET.Csp.csproj b/src/Sat4.NET.Csp/Sat4.NET.Csp.csproj new file mode 100644 index 0000000..fa71b7a --- /dev/null +++ b/src/Sat4.NET.Csp/Sat4.NET.Csp.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/src/Sat4.NET.Maxsat/Class1.cs b/src/Sat4.NET.Maxsat/Class1.cs new file mode 100644 index 0000000..b9cac14 --- /dev/null +++ b/src/Sat4.NET.Maxsat/Class1.cs @@ -0,0 +1,6 @@ +namespace Sat4.NET.Maxsat; + +public class Class1 +{ + +} diff --git a/src/Sat4.NET.Maxsat/Sat4.NET.Maxsat.csproj b/src/Sat4.NET.Maxsat/Sat4.NET.Maxsat.csproj new file mode 100644 index 0000000..fa71b7a --- /dev/null +++ b/src/Sat4.NET.Maxsat/Sat4.NET.Maxsat.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/src/Sat4.NET.Pseudo/Class1.cs b/src/Sat4.NET.Pseudo/Class1.cs new file mode 100644 index 0000000..6913361 --- /dev/null +++ b/src/Sat4.NET.Pseudo/Class1.cs @@ -0,0 +1,6 @@ +namespace Sat4.NET.Pseudo; + +public class Class1 +{ + +} diff --git a/src/Sat4.NET.Pseudo/Sat4.NET.Pseudo.csproj b/src/Sat4.NET.Pseudo/Sat4.NET.Pseudo.csproj new file mode 100644 index 0000000..fa71b7a --- /dev/null +++ b/src/Sat4.NET.Pseudo/Sat4.NET.Pseudo.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/src/Sat4.NET.Sat/Class1.cs b/src/Sat4.NET.Sat/Class1.cs new file mode 100644 index 0000000..aa40471 --- /dev/null +++ b/src/Sat4.NET.Sat/Class1.cs @@ -0,0 +1,6 @@ +namespace Sat4.NET.Sat; + +public class Class1 +{ + +} diff --git a/src/Sat4.NET.Sat/Sat4.NET.Sat.csproj b/src/Sat4.NET.Sat/Sat4.NET.Sat.csproj new file mode 100644 index 0000000..fa71b7a --- /dev/null +++ b/src/Sat4.NET.Sat/Sat4.NET.Sat.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/src/Sat4.NET.Sudoku/Class1.cs b/src/Sat4.NET.Sudoku/Class1.cs new file mode 100644 index 0000000..a476f0d --- /dev/null +++ b/src/Sat4.NET.Sudoku/Class1.cs @@ -0,0 +1,6 @@ +namespace Sat4.NET.Sudoku; + +public class Class1 +{ + +} diff --git a/src/Sat4.NET.Sudoku/Sat4.NET.Sudoku.csproj b/src/Sat4.NET.Sudoku/Sat4.NET.Sudoku.csproj new file mode 100644 index 0000000..fa71b7a --- /dev/null +++ b/src/Sat4.NET.Sudoku/Sat4.NET.Sudoku.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/src/Sat4.NET.sln b/src/Sat4.NET.sln new file mode 100644 index 0000000..4ad1a07 --- /dev/null +++ b/src/Sat4.NET.sln @@ -0,0 +1,55 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34407.89 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sat4.NET.Core", "Sat4.NET.Core\Sat4.NET.Core.csproj", "{9F70E957-BCDD-411D-B3CA-8AA905BAED41}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sat4.NET.Sat", "Sat4.NET.Sat\Sat4.NET.Sat.csproj", "{A33EC44E-C8AB-4505-BDFA-0E7BCEB62134}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sat4.NET.Pseudo", "Sat4.NET.Pseudo\Sat4.NET.Pseudo.csproj", "{9AC72304-BD95-432D-9F79-5AC5E4965459}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sat4.NET.Maxsat", "Sat4.NET.Maxsat\Sat4.NET.Maxsat.csproj", "{DB02EA38-8623-4819-8CA3-74DF712CB0FC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sat4.NET.Csp", "Sat4.NET.Csp\Sat4.NET.Csp.csproj", "{B8B7B10D-306E-47D1-9A69-C2469A290802}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sat4.NET.Sudoku", "Sat4.NET.Sudoku\Sat4.NET.Sudoku.csproj", "{F8C9F611-FBF9-4D38-8999-73C1169E8DB3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9F70E957-BCDD-411D-B3CA-8AA905BAED41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F70E957-BCDD-411D-B3CA-8AA905BAED41}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F70E957-BCDD-411D-B3CA-8AA905BAED41}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F70E957-BCDD-411D-B3CA-8AA905BAED41}.Release|Any CPU.Build.0 = Release|Any CPU + {A33EC44E-C8AB-4505-BDFA-0E7BCEB62134}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A33EC44E-C8AB-4505-BDFA-0E7BCEB62134}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A33EC44E-C8AB-4505-BDFA-0E7BCEB62134}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A33EC44E-C8AB-4505-BDFA-0E7BCEB62134}.Release|Any CPU.Build.0 = Release|Any CPU + {9AC72304-BD95-432D-9F79-5AC5E4965459}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9AC72304-BD95-432D-9F79-5AC5E4965459}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9AC72304-BD95-432D-9F79-5AC5E4965459}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9AC72304-BD95-432D-9F79-5AC5E4965459}.Release|Any CPU.Build.0 = Release|Any CPU + {DB02EA38-8623-4819-8CA3-74DF712CB0FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB02EA38-8623-4819-8CA3-74DF712CB0FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB02EA38-8623-4819-8CA3-74DF712CB0FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB02EA38-8623-4819-8CA3-74DF712CB0FC}.Release|Any CPU.Build.0 = Release|Any CPU + {B8B7B10D-306E-47D1-9A69-C2469A290802}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8B7B10D-306E-47D1-9A69-C2469A290802}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8B7B10D-306E-47D1-9A69-C2469A290802}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8B7B10D-306E-47D1-9A69-C2469A290802}.Release|Any CPU.Build.0 = Release|Any CPU + {F8C9F611-FBF9-4D38-8999-73C1169E8DB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F8C9F611-FBF9-4D38-8999-73C1169E8DB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F8C9F611-FBF9-4D38-8999-73C1169E8DB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F8C9F611-FBF9-4D38-8999-73C1169E8DB3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F13B1391-E39C-4F78-BBAE-F1FA71DB089C} + EndGlobalSection +EndGlobal diff --git a/version.json b/version.json new file mode 100644 index 0000000..1a38df0 --- /dev/null +++ b/version.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", + "version": "3.2.0-beta.{height}", + "assemblyVersion": { + "precision": "revision" + }, + "publicReleaseRefSpec": [ + "^refs/heads/main$", + "^refs/heads/master$", + "^refs/tags/v\\d+\\.\\d+", + "^refs/tags/v\\d+\\.\\d+\\.\\d+" + ] +} \ No newline at end of file