pub fn new<E: 'static + engine::Abstract<GroundSort<Arc<Sort>>, TypedConstructor, Rc<Predicate>>>(engine: E) -> Environment {
		let sort_bool = Sort::new("Bool", 0, Some(DataTypeDeclaration {
			parameters: Vec::new(),
			constructors: vec![
				ConstructorDeclaration::simple("true"),
				ConstructorDeclaration::simple("false")
			]
		}));

		// pre-defined functions.
		let mut functions = HashMap::new();
		functions.insert("=".to_string(), Function::Eq);
		functions.insert("!=".to_string(), Function::Neq);
		functions.insert("not".to_string(), Function::Not);
		functions.insert("and".to_string(), Function::And);
		functions.insert("or".to_string(), Function::Or);
		functions.insert("=>".to_string(), Function::Implies);
		functions.insert("<=".to_string(), Function::ImpliedBy);
		functions.insert("<=>".to_string(), Function::Equiv);
		functions.insert("true".to_string(), Function::Constructor(sort_bool.clone(), 0));
		functions.insert("false".to_string(), Function::Constructor(sort_bool.clone(), 1));

		let mut env = Environment {
			sorts: HashMap::new(),
			sort_bool: GroundSort {
				sort: sort_bool.clone(),
				parameters: Vec::new()
			},
			functions: functions,
			engine: Box::new(engine),
			print_benchmark: false
		};

		// define Bool.
		env.register_sort(sort_bool);

		env
	}
/// Create a new environment.
/// At first, only the sort Bool is defined.
Create a new environment.
At first, only the sort Bool is defined.
Create a new environment . At first only the sort Bool is defined .
pub fn new<E: 'static + engine::Abstract<GroundSort<Arc<Sort>>, TypedConstructor, Rc<Predicate>>>(engine: E) -> Environment {
		let sort_bool = Sort::new("Bool", 0, Some(DataTypeDeclaration {
			parameters: Vec::new(),
			constructors: vec![
				ConstructorDeclaration::simple("true"),
				ConstructorDeclaration::simple("false")
			]
		}));
		// pre-defined functions.
		let mut functions = HashMap::new();
		functions.insert("=".to_string(), Function::Eq);
		functions.insert("!=".to_string(), Function::Neq);
		functions.insert("not".to_string(), Function::Not);
		functions.insert("and".to_string(), Function::And);
		functions.insert("or".to_string(), Function::Or);
		functions.insert("=>".to_string(), Function::Implies);
		functions.insert("<=".to_string(), Function::ImpliedBy);
		functions.insert("<=>".to_string(), Function::Equiv);
		functions.insert("true".to_string(), Function::Constructor(sort_bool.clone(), 0));
		functions.insert("false".to_string(), Function::Constructor(sort_bool.clone(), 1));
		let mut env = Environment {
			sorts: HashMap::new(),
			sort_bool: GroundSort {
				sort: sort_bool.clone(),
				parameters: Vec::new()
			},
			functions: functions,
			engine: Box::new(engine),
			print_benchmark: false
		};
		// define Bool.
		env.register_sort(sort_bool);
		env
	}
pub fn new < E : ' static + engine :: Abstract < GroundSort < Arc < Sort > > , TypedConstructor , Rc < Predicate > > > ( engine : E ) -> Environment { let sort_bool = Sort :: new ( " " , 0 , Some ( DataTypeDeclaration { parameters : Vec :: new ( ) , constructors : vec ! [ ConstructorDeclaration simple ( " " ) ConstructorDeclaration simple ( " " ) ] } ) ) ; // pre-defined functions. let mut functions = HashMap :: new ( ) ; functions . insert ( " " . to_string ( ) , Function :: Eq ) ; functions . insert ( " " . to_string ( ) , Function :: Neq ) ; functions . insert ( " " . to_string ( ) , Function :: Not ) ; functions . insert ( " " . to_string ( ) , Function :: And ) ; functions . insert ( " " . to_string ( ) , Function :: Or ) ; functions . insert ( " " . to_string ( ) , Function :: Implies ) ; functions . insert ( " " . to_string ( ) , Function :: ImpliedBy ) ; functions . insert ( " " . to_string ( ) , Function :: Equiv ) ; functions . insert ( " " . to_string ( ) , Function :: Constructor ( sort_bool . clone ( ) , 0 ) ) ; functions . insert ( " " . to_string ( ) , Function :: Constructor ( sort_bool . clone ( ) , 1 ) ) ; let mut env = Environment { sorts : HashMap :: new ( ) , sort_bool : GroundSort { sort : sort_bool . clone ( ) , parameters : Vec :: new ( ) } , functions : functions , engine : Box :: new ( engine ) , print_benchmark : false } ; // define Bool. env . register_sort ( sort_bool ) ; env }
Create a new environment.
Create a new environment .
engine
E
engine
E