使用マシン
- OS: Ubuntu 18.04
- opam : 2.0.0
使用ディレクトリ
- ~/tezos-mainnet/ : main1 のコードベース
- ~/tezos/ : main2 開始のためのコードベース
- /sandisk/ : 内蔵SSD 1.8 TB
| open SCaml | |
| type parameter = nat * unit contract * unit | |
| type storage = nat | |
| let main (param: parameter) (storage: storage) = | |
| let (counter, contr, sigs) = param in | |
| (* let counter = counter in *) (* If this line is available then the typecheck will be passed. *) | |
| if counter <> Nat 1 then failwith "0" else |
| Parameter nat : Set. | |
| Parameter int : Set. | |
| Parameter int_plus : int -> int -> int. | |
| Parameter int_sub : int -> int -> int. | |
| Infix "+" := int_plus. | |
| Infix "-" := int_sub. | |
| Parameter nat_plus : nat -> nat -> nat. | |
| Parameter nat_sub : nat -> nat -> nat. |
| open SCaml | |
| type action = | |
| | Transfer of {amount: tz; dest: unit contract} | |
| | Delegate of key_hash option | |
| | ChangeKeys of {threshold : nat; keys : key list} | |
| type parameter = | |
| {counter: nat; action: action; sigs : signature option list} |
| Require Export ExtrOcamlBasic. | |
| Require Import SCaml. | |
| Extract Inlined Constant int => "SCaml.int". | |
| Extract Inlined Constant operation => "Scaml.operation". | |
| Extract Inlined Constant int_plus => "SCaml.(+)". | |
| Extract Inlined Constant int_sub => "SCaml.(-)". |
| module OrderedTree | |
| type elem = int | |
| type tree = | |
| | Leaf | |
| | Node of (tree * elem * tree) | |
| let rec all_tree pred t = | |
| match t with |
gh_pages の設定方法
id_rsa_circleci.pub を登録する
| module Fact | |
| open FStar.Mul | |
| val factorial : x:int{x>=0} -> Tot int | |
| let rec factorial n = | |
| if n = 0 then 1 | |
| else n * factorial (n - 1) | |
| val fact_tlrec_aux : int -> x:int{x>=0} -> Tot int (decreases x) |