• C 91.5%
  • Makefile 6%
  • Shell 2.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-22 17:24:34 +02:00
src Add feature to output result in a file 2026-10-22 17:15:31 +02:00
.gitignore Rewrite .gitignore 2026-10-22 16:16:14 +02:00
makefile Rewrite makefile 2026-10-22 16:16:04 +02:00
PKGBUILD Fix PKGBUILD 2026-10-22 17:24:34 +02:00
README.fr.md Update READMEs 2026-10-22 17:21:29 +02:00
README.md Update READMEs 2026-10-22 17:21:29 +02:00

Assert checker

This is a simple assertion checker written in C.

Installation

This is the english version of the documentation. Go to README.fr.md to get the french version)

Follow the installation steps for your platform :

MacOS is not listed here, because I never tried it. Please propose changes if you tested the installation on MacOS

Linux

  1. Install dependencies, that are : git, gcc and make. For example, on debian-based distributions : sudo apt install git gcc make
  2. Get source code (using git) : git clone https://git.greensky.tf/Greensky/assert-checker && cd assert-checker
  3. Compile the code to an executable : make
  4. You can now use the bin/main.uwu file, by following the usage instructions

Run the command listed above in a terminal

Windows

  1. Install dependencies : git, gcc and make through regular installation, or using winget :
winget install -e --id Arm.GnuArmEmbeddedToolchain
winget install -e --id GnuWin32.Make
winget install -e --id Git.Git
  1. Get source code (using git) : git clone https://git.greensky.tf/Greensky/assert-checker && cd assert-checker
  2. Compile the code to an executable : make
  3. Rename binary so windows decides that the file can be executed : cd bin && ren main.uwu main.exe
  4. You can now use the bin/main.exe file, by following the usage instructions

Use the above commands in a terminal (windows + R, type cmd and enter)

Usage

Once you have the main.uwu file executable, you can use it by launching the script. It will ask you to enter an expression. An expression is composed of :

  • Variables, represented by single letters
  • Operators
  • Parenthesis, that create groups

Options

You can launch the program with options, such as :

  • -o [file name] : outputs the results in a file, for example if you want to analyse them afterwards

Using -h will display the help page

Operators list

Operator Symbol Syntax
Logical and & X&Y
Logical or | X|Y
Logical not ! !X
Logical implication - X-Y
Group of expression ( and ) (X)

In the above syntax description, a X, Y means a valid assertion, so it is at least a variable, and at most one or two assertions, joined by operator

Examples

All the below examples are valid expressions to the program to parse (one per line)

a
B&c
(a&c)-d
(a|(b&d))|c-d
(a|b)-(c&(d|v)|a)
(((!p&s)|(g|!s))|(!t&!g))&((s|!g)&(r|s))

Program complexity

If n is the number of different variables, the program has a complexity of O(2^n).

Since it is written in native C, it is very fast anyway.

Contributors