equal
deleted
inserted
replaced
464 |
464 |
465 definition cps_not :: "unit cps => unit cps" |
465 definition cps_not :: "unit cps => unit cps" |
466 where |
466 where |
467 "cps_not n = (%c. case n (%u. Some []) of None => c () | Some _ => None)" |
467 "cps_not n = (%c. case n (%u. Some []) of None => c () | Some _ => None)" |
468 |
468 |
469 type_synonym 'a pos_bound_cps = "('a => term list option) => code_numeral => term list option" |
469 type_synonym 'a pos_bound_cps = "('a => (bool * term list) option) => code_numeral => (bool * term list) option" |
470 |
470 |
471 definition pos_bound_cps_empty :: "'a pos_bound_cps" |
471 definition pos_bound_cps_empty :: "'a pos_bound_cps" |
472 where |
472 where |
473 "pos_bound_cps_empty = (%cont i. None)" |
473 "pos_bound_cps_empty = (%cont i. None)" |
474 |
474 |
513 where |
513 where |
514 "neg_bound_cps_if b = (if b then neg_bound_cps_single () else neg_bound_cps_empty)" |
514 "neg_bound_cps_if b = (if b then neg_bound_cps_single () else neg_bound_cps_empty)" |
515 |
515 |
516 definition neg_bound_cps_not :: "unit pos_bound_cps => unit neg_bound_cps" |
516 definition neg_bound_cps_not :: "unit pos_bound_cps => unit neg_bound_cps" |
517 where |
517 where |
518 "neg_bound_cps_not n = (%c i. case n (%u. Some []) i of None => c (Known ()) | Some _ => No_value)" |
518 "neg_bound_cps_not n = (%c i. case n (%u. Some (True, [])) i of None => c (Known ()) | Some _ => No_value)" |
519 |
519 |
520 definition pos_bound_cps_not :: "unit neg_bound_cps => unit pos_bound_cps" |
520 definition pos_bound_cps_not :: "unit neg_bound_cps => unit pos_bound_cps" |
521 where |
521 where |
522 "pos_bound_cps_not n = (%c i. case n (%u. Value []) i of No_value => c () | Value _ => None | Unknown_value => None)" |
522 "pos_bound_cps_not n = (%c i. case n (%u. Value []) i of No_value => c () | Value _ => None | Unknown_value => None)" |
523 |
523 |