Skip to content
Snippets Groups Projects
Commit 79c4b11b authored by Thorsten Wißmann's avatar Thorsten Wißmann :guitar:
Browse files

Add cool2tatl.sh utility script

parent c16fd631
Branches
No related tags found
No related merge requests found
#!/bin/bash
cat \
| sed 's:True:(p \\/ ~p):g' \
| sed 's:False:(p /\\ ~p):g' \
| sed 's:\&:/\\:g' \
| sed 's:=>:->:g' \
| sed 's:|:\\/:g' \
| sed 's:<{[ ]*:<<:g' \
| sed 's:[ ]*}>:>>:g' \
| sed 's:\[{[ ]*:~<<:g' \
| sed 's:[ ]*}\]:>>~:g' \
| sed -e :a -e 's:<<\([^ >]*\) [ ]*:<<\1,:g;ta' \
| cat
# Top -> tatlFm $ Dis p (Neg p)
# Bot -> tatlFm $ Con p (Neg p)
# Pro q -> BS.lazyByteString q
# Neg a -> c '~' <> tatlFm a
# Con a b -> mconcat [c '(', tatlFm a, s " /\\ ", tatlFm b, c ')']
# Dis a b -> mconcat [c '(', tatlFm a, s " \\/ ", tatlFm b, c ')']
# Imp a b -> mconcat [c '(', tatlFm a, s " -> ", tatlFm b, c ')']
# Dia g a -> s "<<" <> (mconcat $ intersperse (c ',') $ map i g) <> s ">>X" <> tatlFm a
# Box g a -> tatlFm (Neg $ Dia g $ Neg a)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment