rust_lstar/knowledge_base/active.rs
1/// Active knowledge base trait
2/// Extends the base knowledge base with the ability to actively query a target system
3use crate::{knowledge_base::KnowledgeBaseTrait, word::Word};
4
5/// Trait representing an active knowledge base that can submit queries to a target
6pub trait ActiveKnowledgeBase: KnowledgeBaseTrait {
7 /// Starts the target system for querying
8 fn start_target(&mut self) -> Result<(), String>;
9
10 /// Stops the target system after querying
11 fn stop_target(&mut self) -> Result<(), String>;
12
13 /// Submits a word to the target and returns the output
14 fn submit_word(&mut self, word: &Word) -> Result<Word, String>;
15
16 /// Gets the current state of the target (started or stopped)
17 fn is_target_running(&self) -> bool;
18}