s7contract: Behavioral Contracts and Generative Laws for 'S7'

Contract helpers built with 'S7' for expressing runtime protocols around ordinary 'S7' dispatch. Structural interfaces describe small sets of required 'S7' generics, while explicit traits record registered implementations with optional default methods and associated metadata. Optional runtime checks can validate argument and return specifications in contract-scoped evaluation. Generative laws combine generators, deterministic shrinking, and one-result 'tinytest' expectations.

Version: 0.2.3
Depends: R (≥ 4.3.0)
Imports: S7, stats
Suggests: knitr, rmarkdown, tinytest
Published: 2026-09-09
DOI: 10.32614/CRAN.package.s7contract
Author: Sounkou Mahamane Toure [aut, cre]
Maintainer: Sounkou Mahamane Toure <sounkoutoure at gmail.com>
BugReports: https://github.com/sounkou-bioinfo/s7contract/issues
License: GPL (≥ 3)
URL: https://github.com/sounkou-bioinfo/s7contract, https://sounkou-bioinfo.github.io/s7contract/
NeedsCompilation: no
Materials: NEWS
CRAN checks: s7contract results

Documentation:

Reference manual: s7contract.html , s7contract.pdf
Vignettes: Bioinformatics Containers as Interfaces (source, R code)
Laws for Calendar Intervals (source, R code)
A Maybe Dictionary on S7 (source, R code)
Generative Laws with tinytest (source, R code)
Reusable Laws for a Vector Protocol (source, R code)
Behavioral Contracts on S7 (source, R code)
Testing Stateful S7 Protocols (source, R code)

Downloads:

Package source: s7contract_0.2.3.tar.gz
Windows binaries: r-devel: s7contract_0.1.0.zip, r-release: s7contract_0.1.0.zip, r-oldrel: s7contract_0.1.0.zip
macOS binaries: r-release (arm64): s7contract_0.1.0.tgz, r-oldrel (arm64): s7contract_0.2.3.tgz, r-release (x86_64): s7contract_0.2.3.tgz, r-oldrel (x86_64): s7contract_0.2.3.tgz
Old sources: s7contract archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=s7contract to link to this page.