fn dot_var(&mut self, base: &Term, field: &Term) -> VarName {
        // handle nested dot ops.
        let sym = self.symbolize(base);
        let field_str = field.as_string().unwrap();

        match self
            .field_relationships
            .iter()
            .find_map(|(p, f, c)| (*p == sym && f == field_str).then(|| c))
        {
            Some(var) => var.clone(),
            _ => {
                let new_var = sym!(&format!(
                    "_{}_dot_{}_{}",
                    sym.0,
                    field_str,
                    self.counter.next()
                ));

                // Record the relationship between the vars.
                self.field_relationships
                    .push((sym, field_str.to_string(), new_var.clone()));

                new_var
            }
        }
    }
/// convert a binary dot expression into a symbol.
convert a binary dot expression into a symbol.
convert a binary dot expression into a symbol .
fn dot_var(&mut self, base: &Term, field: &Term) -> VarName {
        // handle nested dot ops.
        let sym = self.symbolize(base);
        let field_str = field.as_string().unwrap();
        match self
            .field_relationships
            .iter()
            .find_map(|(p, f, c)| (*p == sym && f == field_str).then(|| c))
        {
            Some(var) => var.clone(),
            _ => {
                let new_var = sym!(&format!(
                    "_{}_dot_{}_{}",
                    sym.0,
                    field_str,
                    self.counter.next()
                ));
                // Record the relationship between the vars.
                self.field_relationships
                    .push((sym, field_str.to_string(), new_var.clone()));
                new_var
            }
        }
    }
fn dot_var ( & mut self , base : & Term , field : & Term ) -> VarName { // handle nested dot ops. let sym = self . symbolize ( base ) ; let field_str = field . as_string ( ) . unwrap ( ) ; match self . field_relationships . iter ( ) . find_map ( | ( p , f , c ) | ( * p == sym && f == field_str ) . then ( | | c ) ) { Some ( var ) => var . clone ( ) , _ => { let new_var = sym ! ( format ( " " sym 0 field_str self counter next ( ) ) ) ; // Record the relationship between the vars. self . field_relationships . push ( ( sym , field_str . to_string ( ) , new_var . clone ( ) ) ) ; new_var } } }
convert a binary dot expression into a symbol.
convert a binary dot expression into a symbol .
&mut self
base
&Term
field
&Term
&mut self
base
&Term
field
&Term