# Add header to explain how the destination MeTTa file has been # obtained echo ";; Auto-generated by suo-kif-to-metta.sh" echo "" # 1. Replace `?` by `$`, so that regular SUO-KIF variables become # MeTTa variables. # # 2. Replace `and` by `∧` so that `(and x y)` does not get # spontanously reduced by the MeTTa interpreter. # # 3. Replace `or` by `∨` so that `(or x y)` does not get spontanously # reduced by the MeTTa interpreter. # # 4. Replace `not` by `¬` so that `(not x)` does not get spontanously # reduced by the MeTTa interpreter. # # 5. Replace `=>` by `⟹`. # # 6. Replace `forall` by `∀`. # # 7. Replace `exists` by `∃`. # # Also make sure to not replace `and`, `or` and `not` willy-nilly so # that `orientation` does not turn into `∨ientation`. sed -E \ -e 's/\?/\$/g' \ -e 's/\(and([[:space:]]+|$)/(∧\1/g' \ -e 's/\(or([[:space:]]+|$)/(∨\1/g' \ -e 's/\(not([[:space:]]+|$)/(¬\1/g' \ -e 's/\(=>([[:space:]]+|$)/(⟹\1/g' \ -e 's/\(forall([[:space:]]+|$)/(∀\1/g' \ -e 's/\(exists([[:space:]]+|$)/(∃\1/g' \ "$1"