use crate::Primitives;
pub trait Shape<P: Primitives> {
fn target_class(&self) -> &P::String;
type PropertyConstraint: PropertyConstraint<P>;
fn required_property(&self) -> &[Self::PropertyConstraint];
}
pub trait PropertyConstraint<P: Primitives> {
fn constraint_property(&self) -> &P::String;
fn constraint_range(&self) -> &P::String;
fn min_count(&self) -> P::NonNegativeInteger;
fn max_count(&self) -> P::NonNegativeInteger;
}
pub trait QuantumLevelShape<P: Primitives>: Shape<P> {}
pub trait EffectShape<P: Primitives>: Shape<P> {}
pub trait ParallelShape<P: Primitives>: Shape<P> {}
pub trait StreamShape<P: Primitives>: Shape<P> {}
pub trait DispatchShape<P: Primitives>: Shape<P> {}
pub trait LeaseShape<P: Primitives>: Shape<P> {}
pub trait GroundingShape<P: Primitives>: Shape<P> {}
pub trait ValidationResult<P: Primitives> {
type Shape: Shape<P>;
fn validation_shape(&self) -> &Self::Shape;
fn validation_target(&self) -> &P::String;
fn conforms(&self) -> P::Boolean;
}
pub trait PredicateShape<P: Primitives>: Shape<P> {}
pub mod compile_unit_shape {
pub const REQUIRED_PROPERTY: &[&str] = &[
"https://uor.foundation/conformance/compileUnit_rootTerm_constraint",
"https://uor.foundation/conformance/compileUnit_unitQuantumLevel_constraint",
"https://uor.foundation/conformance/compileUnit_thermodynamicBudget_constraint",
"https://uor.foundation/conformance/compileUnit_targetDomains_constraint",
];
pub const TARGET_CLASS: &str = "https://uor.foundation/cascade/CompileUnit";
}
pub mod compile_unit_root_term_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/cascade/rootTerm";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/schema/Term";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
}
pub mod compile_unit_unit_quantum_level_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/cascade/unitQuantumLevel";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/schema/QuantumLevel";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
}
pub mod compile_unit_thermodynamic_budget_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/cascade/thermodynamicBudget";
pub const CONSTRAINT_RANGE: &str = "http://www.w3.org/2001/XMLSchema#decimal";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
}
pub mod compile_unit_target_domains_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/cascade/targetDomains";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/op/VerificationDomain";
pub const MAX_COUNT: i64 = 0;
pub const MIN_COUNT: i64 = 1;
}