Skip to main content

Module constraints

Module constraints 

Source
Expand description

Constraints that affect program generation

Defines specific configurations that are not allowed, causing programs or program fragments to be rejected during the generation process.

The motivation for these constraints are in producing a good quality hash function by avoiding hazards that affect timing or hash mixing. However, they also form an integral part of the program generation model. Generating correct HashX output depends on applying exactly the right constraints.

ModulesΒ§

model πŸ”’
The model attempts to document what the HashX constraints are, separate from the process of implementing those constraints.

StructsΒ§

DstRegisterChecker πŸ”’
State information returned by Validator::dst_registers_allowed
RegisterWriterMap πŸ”’
Map each RegisterId to an RegisterWriter
Validator πŸ”’
Stateful program constraint checker

FunctionsΒ§

opcode_pair_allowed πŸ”’
Should proposed be allowed as an opcode selector output immediately following an output of previous?
src_registers_allowed πŸ”’
Figure out the allowed register set for an operation, given what’s available in the schedule.