1/* <module> logicmoo_plarkc - special module hooks into the logicmoo engine allow
    2%   clif syntax to be recocogized via our CycL/KIF handlers 
    3% 
    4% Logicmoo Project: A LarKC Server written in Prolog
    5% Maintainer: Douglas Miles
    6% Dec 13, 2035
    7%
    8*/

    9:- module(logicmoo_motel,[]).
   10/*
   11:- module(logicmoo_motel,[kif_to_motelog/2]).            
   12
   13:- reexport(library(logicmoo/motel/mpred_motel)).
   14
   15
   16kif_to_motelog(Kif,MLog):- as_mlog(Kif,Motel), translate(Motel,MLog).
   17
   18:- sanity(dehyphenize_const('a-b','aB')).
   19:- must(dehyphenize_const('a-2b','a_2b')).
   20:- must(dehyphenize_const('uitype-ProductDescriptionTemplate','uitypeProductDescriptionTemplate')).
   21
   22as_mlog(X,FmlO):- as_dlog(X,Fml),
   23  subsT_each(Fml,['=>'='implies','v'='or','&'='and','~'='not','<=>'='equivalent','all'='forall'],FmlM),
   24  as_mlog_pt2(FmlM,FmlO).
   25
   26as_mlog_pt2(Fml,Fml):- \+ compound(Fml),!.
   27as_mlog_pt2(Fml,Fml):- is_ftVar(Fml),!.
   28as_mlog_pt2(Fml,FmlO):- Fml =..[F|List],maplist(as_mlog_pt2,List,ListO)->as_mlog_pt3(F,ListO,FmlO),!.
   29
   30as_mlog_pt3(or,List,or(List)).
   31as_mlog_pt3(and,List,and(List)).
   32as_mlog_pt3(F,List,Fml):- Fml=..[F|List].
   33  
   34      
   35:- fixup_exports.
   36
   37*/