s7contract: s7contract: Behavioral Contracts and Generative Laws for S7

s7contractR Documentation

s7contract: Behavioral Contracts and Generative Laws for S7

Description

s7contract makes behavioral protocols explicit and testable around ordinary S7 dispatch:

Details

  • Go-like structural interfaces defined by required generics.

  • Rust-like explicit traits with default methods and associated metadata.

  • Optional argument and return specifications checked at the point of use.

  • Property-based laws with integrated shrinking and tinytest expectations.

implements() checks method availability and has_trait() checks declared implementation. check_law() tests behavior over generated cases. Protocol authors can reuse laws across implementations by writing functions that construct lists of laws; see vignette("protocol-laws"). new_state_law() tests sequences of commands against a reference model with fresh fixtures.

Author(s)

Maintainer: Sounkou Mahamane Toure sounkoutoure@gmail.com

See Also

Useful links:


s7contract documentation built on Sept. 10, 2026, 1:09 a.m.