fn define_sort(&mut self, id: &Ident, def: &smt2::DataTypeDeclaration<Self>) -> Result<()> {
		match self.sorts.get(id) {
			Some(sort) => {
				let mut sort_def = sort.def.write().unwrap();
				*sort_def = Some(def.clone());
				for (i, cons) in def.constructors.iter().enumerate() {
					self.functions.insert(cons.id.clone(), Function::Constructor(sort.clone(), i));
				}
			},
			None => {
				panic!("sort is undefined")
			}
		}

		Ok(())
	}
/// Define the structure of a ADT sort.
Define the structure of a ADT sort.
Define the structure of a ADT sort .
fn define_sort(&mut self, id: &Ident, def: &smt2::DataTypeDeclaration<Self>) -> Result<()> {
		match self.sorts.get(id) {
			Some(sort) => {
				let mut sort_def = sort.def.write().unwrap();
				*sort_def = Some(def.clone());
				for (i, cons) in def.constructors.iter().enumerate() {
					self.functions.insert(cons.id.clone(), Function::Constructor(sort.clone(), i));
				}
			},
			None => {
				panic!("sort is undefined")
			}
		}
		Ok(())
	}
fn define_sort ( & mut self , id : & Ident , def : & smt2 :: DataTypeDeclaration < Self > ) -> Result < ( ) > { match self . sorts . get ( id ) { Some ( sort ) => { let mut sort_def = sort . def . write ( ) . unwrap ( ) ; * sort_def = Some ( def . clone ( ) ) ; for ( i , cons ) in def . constructors . iter ( ) . enumerate ( ) { self . functions . insert ( cons . id . clone ( ) , Function :: Constructor ( sort . clone ( ) , i ) ) ; } } , None => { panic ! ( " " ) } } Ok ( ( ) ) }
Define the structure of a ADT sort.
Define the structure of a ADT sort .
&mut self
id
&Ident
def
&smt2::DataTypeDeclaration<Self>
&mut self
id
&Ident
def
&smt2::DataTypeDeclaration<Self>