Package: s7contract 0.2.3.9000

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.

Authors:Sounkou Mahamane Toure [aut, cre]

s7contract_0.2.3.9000.tar.gz
s7contract_0.2.3.9000.zip(r-4.7-any)s7contract_0.2.3.9000.zip(r-4.6-any)s7contract_0.2.3.9000.zip(r-4.5-any)
s7contract_0.2.3.9000.tgz(r-4.6-any)s7contract_0.2.3.9000.tgz(r-4.5-any)
s7contract_0.2.3.9000.tar.gz(r-4.7-any)s7contract_0.2.3.9000.tar.gz(r-4.6-any)
s7contract_0.2.3.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
s7contract/json (API)

# Install 's7contract' in R:
install.packages('s7contract', repos = c('https://sounkou-bioinfo.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/sounkou-bioinfo/s7contract/issues

Pkgdown/docs site:https://sounkou-bioinfo.github.io

On CRAN:

Conda:

interfacess7

7.34 score 8 stars 4 packages 13 scripts 588 downloads 44 exports 1 dependencies

Last updated from:41dce50d48. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK132
source / vignettesOK213
linux-releaseOK130
macos-releaseOK125
macos-oldrelOK110
windows-develOK98
windows-releaseOK78
windows-oldrelOK101
wasm-releaseOK85

Exports:%::%as_interfaceassert_implementsassert_traitassumecheck_lawexpect_lawformat_check_resultgen_bindgen_choicegen_commandsgen_constantgen_doublegen_elementgen_examplegen_integergen_mapgen_no_shrinkgen_productgen_recursivegen_resizegen_samplegen_sizedgen_subsequencegen_vectorhas_traitimpl_traitimplementsinterface_reportinterface_requirementinterface_requirementsmissing_requirementsnew_commandnew_generatornew_interfacenew_lawnew_state_lawnew_traittrait_assoc_consttrait_assoc_typetrait_calltrait_methodtrait_methodstrait_report

Dependencies:S7

Behavioral Contracts on S7
A vector protocol | Composing contracts | Declaring an implementation | Testing behavior

Last update: 2026-09-14
Started: 2026-05-04

Generative Laws with tinytest
A tinytest property | Laws over an S7 interface | Inspecting and replaying a failure | Composition and shrinking | Dependent inputs | Choices and recursive values | Relationship to Hedgehog

Last update: 2026-09-09
Started: 2026-09-02

A Maybe Dictionary on S7
The dictionary | Generated values and functions | Three laws, one suite | A default that breaks the laws

Last update: 2026-09-07
Started: 2026-09-07

Bioinformatics Containers as Interfaces
Introduction | Background | A toy assay container | Operations and a consumer-owned interface | When an explicit trait helps | Design cautions | References

Last update: 2026-09-07
Started: 2026-05-04

Laws for Calendar Intervals
Whole days from integer offsets | An inclusive interval protocol | An end date accidentally excluded

Last update: 2026-09-07
Started: 2026-09-07

Reusable Laws for a Vector Protocol
Vector-like behavior | One protocol, several implementations | Which cases were tested? | Structural conformance and a behavioral failure | A bug hidden by integer inputs

Last update: 2026-09-07
Started: 2026-09-07

Testing Stateful S7 Protocols
The protocol and its implementations | Commands and a reference model | One law, two fixtures | A put that truncates keys | A reset that leaves data behind | Commands that return handles

Last update: 2026-09-07
Started: 2026-09-07

Readme and manuals

Help Manual

Help pageTopics
Evaluate an S7 call under an interface or trait contract%::% contract_syntax
Compose dependent, sized, and recursive generatorsgen_bind gen_recursive gen_resize gen_sized
Generate and shrink model-valid command sequencesgen_commands
Basic property-based test generatorsgen_constant gen_integer gen_map gen_product gen_vector
Generate finite double valuesgen_double
Choose values or generatorsgen_choice gen_element
Inspect a generator or disable its shrinkinggen_example gen_no_shrink
Sample source positions without replacementgen_sample gen_subsequence
Inspect or check a Go-like structural interfaceassert_implements as_interface implements interface_report interface_requirements missing_requirements
Describe a command for a stateful protocolnew_command
Construct a property-based test generatornew_generator
Build a Go-like structural interface on top of S7interface_requirement new_interface
Define and check a generative lawassume check_law expect_law format_check_result new_law
Define a generative law for a stateful protocolnew_state_law
Build a Rust-like explicit trait on top of S7new_trait trait_method
s7contract: Behavioral Contracts and Generative Laws for S7s7contract-package s7contract
Inspect or use a Rust-like explicit traitassert_trait has_trait impl_trait trait_assoc_const trait_assoc_type trait_call trait_methods trait_report