Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: Formal Verification

on:
push:
branches: [ master, main, 'claude/**' ]
pull_request:
branches: [ master, main ]

jobs:
verify:
runs-on: ubuntu-22.04
timeout-minutes: 90

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Cache OPAM
uses: actions/cache@v4
with:
path: ~/.opam
key: ${{ runner.os }}-opam-${{ hashFiles('**/*.opam') }}
restore-keys: |
${{ runner.os }}-opam-

- name: Cache binaries
uses: actions/cache@v4
with:
path: ~/bin
key: ${{ runner.os }}-bin-v2

- name: Install system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y \
aspcud \
libgnomecanvas2-dev \
libgtk2.0-dev \
libgtksourceview2.0-dev \
libgtk-3-dev \
libgtksourceview-3.0-dev \
z3 \
build-essential

- name: Setup binary directory
run: |
mkdir -p $HOME/bin
echo "$HOME/bin" >> $GITHUB_PATH

- name: Install cvc5
run: |
if [ ! -f $HOME/bin/cvc5 ]; then
wget --quiet https://github.com/cvc5/cvc5/releases/download/cvc5-1.1.2/cvc5-Linux-x86_64-static.zip
unzip -q cvc5-Linux-x86_64-static.zip
mv cvc5-Linux-x86_64-static/bin/cvc5 $HOME/bin/cvc5
chmod +x $HOME/bin/cvc5
rm -rf cvc5-Linux-x86_64-static cvc5-Linux-x86_64-static.zip
fi

- name: Install OPAM
run: |
if [ ! -f $HOME/bin/opam ]; then
wget --quiet https://github.com/ocaml/opam/releases/download/2.2.1/opam-2.2.1-x86_64-linux
mv opam-2.2.1-x86_64-linux $HOME/bin/opam
chmod +x $HOME/bin/opam
fi

- name: Install E-Prover
run: |
if [ ! -f $HOME/bin/eprover ]; then
wget --quiet https://github.com/eprover/eprover/archive/refs/tags/E-3.1.tar.gz
tar xzf E-3.1.tar.gz
cd eprover-E-3.1
./configure --prefix=$HOME
make -j$(nproc)
make install
cd ..
rm -rf eprover-E-3.1 E-3.1.tar.gz
fi

- name: Initialize OPAM
run: |
if [ ! -d ~/.opam ]; then
opam init --auto-setup --disable-sandboxing --compiler=4.14.2 --yes
fi
opam install --yes depext

- name: Install Frama-C and verification tools
run: |
eval $(opam env)
opam repo add ispras https://forge.ispras.ru/git/astraver.opam-repository.git || true
opam update
opam upgrade --yes
opam depext --yes --noninteractive --install frama-c astraver why3 alt-ergo || true
rm -fr ~/.opam/log

- name: Configure Why3
run: |
eval $(opam env)
why3 config --detect

- name: Set Why3 max processes
run: |
sed -i -e 's/running_provers_max = [[:digit:]]/running_provers_max = 1/' $HOME/.why3.conf

- name: Run build
run: make run

- name: Run RTE analysis
run: make rte

- name: Run value analysis
run: make val

- name: Run sprove on proved functions
run: make sprove-proved-separatedly

- name: Replay proved functions
run: make replay-proved-separatedly

- name: Upload verification results
if: failure()
uses: actions/upload-artifact@v4
with:
name: verification-sessions
path: sessions/
retention-days: 7
117 changes: 117 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Changelog

All notable changes to the VerKer project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- GitHub Actions CI/CD workflow to replace Travis CI (.github/workflows/verify.yml)
- CONTRIBUTING.md with comprehensive guidelines for contributors
- CHANGELOG.md to track project changes
- Support for cvc5 solver (successor to CVC4) in verification strategy
- Caching for OPAM and binary dependencies in CI

### Changed
- **BREAKING**: CI/CD migrated from Travis CI to GitHub Actions
- Updated CI base OS from Ubuntu 18.04 (EOL) to Ubuntu 22.04 LTS
- Updated OPAM command in Makefile from `opam config env` to `opam env` (modern syntax)
- Updated recommended OCaml version from 4.10.0 to 4.14.2 in CI
- Updated E-Prover from 2.5 to 3.1 in CI
- Updated OPAM from 2.0.8 to 2.2.1 in CI
- Replaced CVC4 1.7 with cvc5 1.1.2 in CI (CVC4 is deprecated)
- Enhanced verification strategy to try cvc5 alongside CVC4 for backward compatibility

### Deprecated
- Travis CI configuration (.travis.yml) - still present but GitHub Actions is preferred

### Improved
- CI now uploads verification session artifacts on failure for debugging
- CI timeout increased to 90 minutes for thorough verification
- Better caching strategy reduces CI build times

## [Previous Releases]

### Recent Commits (Before Changelog)

#### 2023-11-18 - Update opam version
- Version bump for opam package

#### 2023-10-15 - Update sessions
- Updated verification session files

#### 2023-09-20 - stpcpy: session update
- Updated stpcpy verification session

#### 2023-08-15 - travis: bump eprover version
- Bumped E-Prover version in Travis CI configuration

#### 2023-08-01 - stpcpy added
- Added stpcpy function verification
- Status: proved

### Historic Milestones

#### 2018 - ISoLA Publication
- Published paper: "Deductive Verification of Unmodified Linux Kernel Library Functions"
- 30+ functions formally verified

#### 2017 - Initial Publication
- Published paper in ISP RAS Proceedings (in Russian)
- First formal specifications for Linux kernel functions

#### 2016 - Project Start
- Initial repository creation
- First ACSL specifications developed

---

## Version Guidelines

This project tracks Linux kernel function verification. Version semantics:

- **Major**: Significant methodology changes or tool chain updates
- **Minor**: New functions verified or major specification improvements
- **Patch**: Bug fixes, session updates, minor improvements

## Migration Notes

### Migrating from Travis CI to GitHub Actions

If you have local CI dependencies:

1. **Update solver references**: Replace CVC4 references with cvc5
2. **Update OPAM**: Use `opam env` instead of `opam config env`
3. **Check OCaml version**: Ensure compatibility with OCaml 4.14.2+
4. **Update Why3 config**: Run `why3 config --detect` to detect new solvers

### Tool Version Requirements

Minimum versions for development:

- **OCaml**: 4.14.2+ (older versions may work but not guaranteed)
- **OPAM**: 2.2.0+
- **Frama-C**: As provided by AstraVer repository
- **Why3**: As provided by AstraVer repository
- **cvc5**: 1.1.0+ (recommended) or CVC4 1.7+ (legacy)
- **Alt-Ergo**: 2.2.0+
- **E-Prover**: 3.0+

---

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for details on:
- How to add new verified functions
- Specification guidelines
- Testing procedures
- Pull request process

## Related Links

- [Project Repository](https://github.com/evdenis/verker)
- [AstraVer Toolchain](https://forge.ispras.ru/projects/astraver)
- [Frama-C](https://frama-c.com/)
- [ACSL Reference](http://frama-c.com/acsl.html)
Loading
Loading