Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nzbr/vlogsolv
vlogsolv is a small command line program that calculates value tables for logical expressions
https://github.com/nzbr/vlogsolv
logic v vlang
Last synced: about 1 month ago
JSON representation
vlogsolv is a small command line program that calculates value tables for logical expressions
- Host: GitHub
- URL: https://github.com/nzbr/vlogsolv
- Owner: nzbr
- License: isc
- Created: 2019-10-11T14:09:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T14:56:57.000Z (about 1 year ago)
- Last Synced: 2024-11-07T01:45:14.611Z (3 months ago)
- Topics: logic, v, vlang
- Language: V
- Homepage:
- Size: 39.1 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
vlogsolvvlogsolv is a small command line program that calculates value tables for logical expressions.
It is completely written in [V](https://github.com/vlang/v)## Building
1. Install V
2. run `v .`To get an optimized build you can use `v -prod .`
## Usage
`./vlogsolv `
The following operators are available
- `!` Not
- `&` And
- `|` Or
- `=` Equivalence
- `(a & b) | (!a & !b)`
- `>` Implication
- `!a | b`
- `<` Converse Implication
- `b > a`
- `^` Exclusive Or
- `(a | b) & !(a & b)`
- `1` or `T` True
- `0` or `F` FalseAll other symbols are interpreted as variables
You may need to escape some of the symbols depending on your shell. Spaces are ignored## Example
`./vlogsolv '(a | !b) & c'`
```none
Input: (a | !b) & c
Prefix: &|a!bc
Atoms: ["a", "b", "c"]a | b | c | value
---+---+---+-------
1 | 1 | 1 | true
1 | 1 | 0 | false
1 | 0 | 1 | true
1 | 0 | 0 | false
0 | 1 | 1 | false
0 | 1 | 0 | false
0 | 0 | 1 | true
0 | 0 | 0 | false
```