FOLint
FOLint is a linting tool for FO(·). Its functionality can be split up in four parts:
- Detection of syntax errors
- Detection of type errors
- Detection of typical formalization errors
- Enforcing a style guide
This project was initially started by Lars Vermeulen during his master thesis: https://github.com/larsver/folint
Installation
pip install folint
CLI usage
folint file.idp
FOLint in editors
FOLint can be integrated in many editors. A collection of guides are kept in the folint-in-editors folder.
Build new version
python setup.py bdist_wheel sdist
Don't forget to update the version number of FOLint + the version number of IDP in the dependency!
Appendix: Full list of functionality
For a full list, see "Vermeulen, L. (2022). Statische Code Analyse voor FO(·). KU Leuven. Faculteit Industriële Ingenieurswetenschappen."
Type Checking
- Typing of comparisons (
f = g,f > g, …) - Typing of mathematical operators (
x + y,x - y, …) - Warning for untyped quantifiers
- Verifying the types of the elements in symbol interpretations
Common mistake checking
- Warning when using a conjunction with universal quantification (e.g.,
!x in Person: age(x) > 18 & adult(x)) - Warning when using an implication with existential quantification (e.g.,
?x in Person: driving_license(x) => sober(x)) - Worning when variable is only on one side of an equivalence (e.g.,
!x,y: phi(x) <=> psi(x, y))
Style guide
- Use brackets with negated
instatement - Warn against redundant brackets
- Naming conventions: Type starting with capital letter, other symbols in snake_case
- Highlight unused quantification variables
- Warn when not using
pretty_print
Other
- Wrong number of arguments for predicate/function
- Wrong number of arguments for
model_checkor using unknown block names - Checking if types are defined in voc or struct
- Checking totality of functions
- Checking for duplicate entries in interpretations
- Checking corretness of entries in interpretations
- Other minor linting such as "no double spaces", "spaces around connectives", ...
Metadata
Release files for folint 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| folint-1.1.0.tar.gz | 23.8 kB | Without provenance | Details for folint-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| folint-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for folint-1.1.0-py3-none-any.whl |
Total release size: 48.4 kB
Release files / folint-1.1.0.tar.gz
| Download URL | folint-1.1.0.tar.gz |
|---|---|
| Size | 23.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e552d47925481c31af7d6a8aaf87f13b3239899ef93701e407bfd345e67be943
|
|
BLAKE2b-256 checksum How to use checksums |
d8b91713fe707a2afd71221be1ec2adeffc1e2b9a4ca254f4377d2a714e1ec07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.7
|
Release files / folint-1.1.0-py3-none-any.whl
| Download URL | folint-1.1.0-py3-none-any.whl |
|---|---|
| Size | 24.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a9278cc924b78a4e45b821dc70aa0e1a904f3caa85ed63e1c7167d1e81dd084
|
|
BLAKE2b-256 checksum How to use checksums |
216bef6426d3078b92d8cd9650dd017af2654a6d787ea76043ee852961b14418
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.7
|
Security for folint 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.