<commit_before>
import Jana.Ast

fib = [ Proc { procname = "fib"
             , params = [ (Int, "x1"), (Int, "x2"), (Int, "n") ]
             , body = [ If (BinOp Eq (LV $ Scalar "n")
                                     (Number 0))
                           [ Assign AddEq (Scalar "x1") (Number 1)
                           , Assign AddEq (Scalar "x2") (Number 1) ]
                           [ Call "fib" [ "x1", "x2", "n" ]
                           , Assign AddEq (Scalar "x1") (LV $ Scalar "x2")
                           , Swap "x1" "x2" ]
                           (BinOp Eq (LV $ Scalar "x1")
                                     (LV $ Scalar "x2")) ] }

      ] :: Program

main :: IO ()
main = print fib<commit_msg>Add rest of fib program<commit_after>
import Jana.Ast

fib = [ Proc { procname = "fib"
             , params = [ (Int, "x1"), (Int, "x2"), (Int, "n") ]
             , body = [ If (BinOp Eq (LV $ Scalar "n")
                                     (Number 0))
                           [ Assign AddEq (Scalar "x1") (Number 1)
                           , Assign AddEq (Scalar "x2") (Number 1) ]
                           [ Call "fib" [ "x1", "x2", "n" ]
                           , Assign AddEq (Scalar "x1") (LV $ Scalar "x2")
                           , Swap "x1" "x2" ]
                           (BinOp Eq (LV $ Scalar "x1")
                                     (LV $ Scalar "x2")) ] }

      , Proc { procname = "fib_fwd"
             , params = [ (Int, "x1"), (Int, "x2"), (Int, "n") ]
             , body = [ Assign AddEq (Scalar "n") (Number 4)
                      , Call "fib" [ "x1", "x2", "n" ] ] }
      , Proc { procname = "fib_bwd"
             , params = [ (Int, "x1"), (Int, "x2"), (Int, "n") ]
             , body = [ Assign AddEq (Scalar "x1") (Number 5)
                      , Assign AddEq (Scalar "x2") (Number 8)
                      , Uncall "fib" [ "x1", "x2", "n" ] ] }
      ] :: Program

main :: IO ()
main = print fib
{'fraction_non_alphanumeric': 0.16422435573521982, 'fraction_numerical': 0.021728145528044467, 'mean_word_length': 1.0886075949367089, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6288237', 'n_tokens_mistral': 674, 'n_tokens_neox': 631, 'n_words': 181}