Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mithrandyr/simplytruth
PowerShell module for generating truth tables and evaluating whether a sentence in SL is TF-true, TF-false or TF-indeterminate
https://github.com/mithrandyr/simplytruth
Last synced: 6 days ago
JSON representation
PowerShell module for generating truth tables and evaluating whether a sentence in SL is TF-true, TF-false or TF-indeterminate
- Host: GitHub
- URL: https://github.com/mithrandyr/simplytruth
- Owner: mithrandyr
- License: mit
- Created: 2023-08-26T18:10:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-07T20:47:06.000Z (about 1 year ago)
- Last Synced: 2023-09-07T23:30:50.388Z (about 1 year ago)
- Language: PowerShell
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SimplyTruth
PowerShell module for generating truth tables and evaluating whether a sentence in SL is TF-true, TF-false or TF-indeterminate# Sentential Logic
## Language
- Grouping delimeters: () or [] or {}
- Sentence Tokens: UpperCase A-Z
- Spaces are ignored
- Outter Delimeter(s) is stripped.
- "(AvB)" becomes "AvB"
- "[(A>B) & C]" becomes "(A>B) & C"
- "(((A = B)))" becomes "A=B"
- Sentential Connectives|in Module|Connective| English|
|-|-|-|
| ~ | Negation ('tilde')| "Not" |
| & | Conjunction ('ampersand') | "And" |
| v | Disjunction ('wedge') | "Or" |
| > | Material Conditional ('horseshoe') | "If Then" |
| = | Material Biconditional ('triple bar') | "If and Only If" |- Example Sentences
- A v B
- (A v B)
- A > B
- A & B
- A = B
- ~B & A## Commands
- Test-SLSentence -- basic evaluation of whether expression is valid
- Get-SLSentence -- converts expression to SLSentence object (parses it)
- Invoke-SLSentence -- takes SLSentence or expression and determines its truth-value based upon the supplied values for the Sentence Tokens
- Get-SLTruthTable -- generates a truthtable for an expression or SLSentence.# TODO
- Rename repo to "SimplyLogic"
- Update TruthTable output to show as T or F instead of True or False
- Update TruthTable output to show all subconnectives and their values
- Add help to commands
- Improve Validation (too many delimeters for connectives, etc)