sigma.data.SigmaPropCodes.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sigma-state_2.12 Show documentation
Show all versions of sigma-state_2.12 Show documentation
Interpreter of a Sigma-State language
The newest version!
package sigma.data
import sigma.ast.TypeCodes.LastConstantCode
import supertagged.TaggedType
/** Opcodes of sigma proposition nodes.
*
* @see SigmaBoolean.opCode
*/
object SigmaPropCodes {
object SPCode extends TaggedType[Byte]
type SPCode = SPCode.Type
private def newOpCode(shift: Short): SPCode = SPCode @@ (LastConstantCode + shift).toByte
val AndCode : SPCode = newOpCode(38)
val OrCode : SPCode = newOpCode(39)
val AtLeastCode : SPCode = newOpCode(40)
val ProveDlogCode : SPCode = newOpCode(93)
val ProveDiffieHellmanTupleCode: SPCode = newOpCode(94)
val TrivialPropFalseCode : SPCode = newOpCode(98)
val TrivialPropTrueCode : SPCode = newOpCode(99)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy