Commit 5a773a38 authored by Frontull Samuel's avatar Frontull Samuel
Browse files

commented last functions

parent 50b7e255
......@@ -232,20 +232,25 @@ pcp = \x -> ycomb (\f x y ->
-- PCP Problems
-- [(a, ab), (bb, b)]
problem_1 :: ListStrPairs
problem_1 = cons (pair a ab) (cons (pair bb b) nil)
-- [(a, abbb), (bb, b)]
problem_2 :: ListStrPairs
problem_2 = cons (pair a abbb) (cons (pair bb b) nil)
-- [(bba, b), (b, ab), (a, bba)]
problem_3 :: ListStrPairs -- undecidable
problem_3 = cons (pair bba b) (cons (pair b ab) (cons (pair a bba) nil))
-- PARSE LC ENCODINGS TO STRINGS
-- string encoding to String
lcstr_tostr :: LCStr -> String
lcstr_tostr = \s -> unString s (\a -> "a" ++ a) (\b -> "b" ++ b) ("")
-- bool encoding to String
lcbool_tostr :: LCBool -> String
lcbool_tostr = \b -> ite b "True" "False"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment