File: bool_typing.ott

package info (click to toggle)
ott 0.32%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,420 kB
  • sloc: ml: 25,065; makefile: 1,393; awk: 736; lisp: 183; sh: 14; sed: 4
file content (27 lines) | stat: -rw-r--r-- 484 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% TAPL [bool typing]  Typed booleans

grammar
T {{ hol Typ }}, S, U :: Ty ::=                       {{ com types: }}
  | Bool                         ::   :: Bool          {{ com type of booleans }}


defns
Jtype :: '' ::= 

defn
G |- t : T :: :: typing :: T_ {{ com Typing }} by


----------------- :: True
G |- true : Bool
    
----------------- :: False
G |- false : Bool

G |- t1:Bool
G |- t2:T
G |- t3:T
------------------------------ :: If
G |- if t1 then t2 else t3 : T