use std::path::PathBuf;
use crate::verify::Verification;
#[derive(Debug, Clone)]
pub struct TaskContract {
pub goal: String,
pub file: PathBuf,
pub constraints: Vec<String>,
pub verify: Verification,
pub max_steps: u32,
}
impl TaskContract {
pub fn new(goal: impl Into<String>, file: impl Into<PathBuf>, verify: Verification) -> Self {
Self {
goal: goal.into(),
file: file.into(),
constraints: Vec::new(),
verify,
max_steps: 8,
}
}
pub fn with_max_steps(mut self, max_steps: u32) -> Self {
self.max_steps = max_steps;
self
}
pub fn with_constraint(mut self, constraint: impl Into<String>) -> Self {
self.constraints.push(constraint.into());
self
}
}