AgentElement / alchemy-reimplemented

A reimplementation of Walter Fontana's Algorithmic Chemistry (AlChemy)
0 stars 0 forks source link

Build fails, no methods for `Term` #1

Closed colemathis closed 1 week ago

colemathis commented 1 week ago

Build on Ubuntu fails with these errors

error[E0599]: no method named `has_free_variables` found for reference `&Term` in the current scope
  --> src/soup.rs:85:59
   |
85 |             .extend(expressions.into_iter().filter(|e| !e.has_free_variables()));
   |                                                           ^^^^^^^^^^^^^^^^^^ method not found in `&Term`

error[E0599]: no method named `is_isomorphic_to` found for enum `Term` in the current scope
  --> src/soup.rs:99:17
   |
99 |         if expr.is_isomorphic_to(&identity) && self.discard_identity {
   |                 ^^^^^^^^^^^^^^^^ method not found in `Term`

error[E0599]: no method named `is_isomorphic_to` found for enum `Term` in the current scope
   --> src/soup.rs:103:35
    |
103 |         let is_copy_action = expr.is_isomorphic_to(&left) || expr.is_isomorphic_to(&right);
    |                                   ^^^^^^^^^^^^^^^^ method not found in `Term`

error[E0599]: no method named `is_isomorphic_to` found for enum `Term` in the current scope
   --> src/soup.rs:103:67
    |
103 |         let is_copy_action = expr.is_isomorphic_to(&left) || expr.is_isomorphic_to(&right);
    |                                                                   ^^^^^^^^^^^^^^^^ method not found in `Term`

error[E0599]: no method named `has_free_variables` found for enum `Term` in the current scope
   --> src/soup.rs:108:17
    |
108 |         if expr.has_free_variables() && self.discard_free_variable_expressions {
    |                 ^^^^^^^^^^^^^^^^^^ method not found in `Term`
colemathis commented 1 week ago

Also there are no modules for analysis.rs and generators.rs so those have been commented out in main.

AgentElement commented 1 week ago

The issue was the git dependency in Cargo.toml pointing to my fork of lambda_calculus. There were a few changes I made from upstream, all of which have now been pushed upstream. Changing the dependency to v0.3.3 fixes the first issue.

I've including prototypes for analysis and generators to fix the second issue.