fialyzer の開発環境を構築する方法 2019
- opam 2.0.3
- ocaml 4.07.1
- dune 1.7.1
fialyzer の開発環境を構築する方法 2019
Scala | Erlang | |
---|---|---|
変数 | x |
X |
関数適用 | f(x, y) |
f(X, Y) |
無名関数 | (x) => x+1 |
fun(x) -> x+1 end |
変数定義 | val x = 1 |
X = 1 |
if式 | if(x < 1) 100 else 200 |
if N < 10 -> 100; true -> 200 end |
パターンマッチング | "1" match { case 1 => 100 case 2 => 200 } |
case 1 of 1 -> 100; 2 -> 200 end |
注意: こちらもご参照ください fialyzer環境開発構築2019.md
fialyzer の開発環境を構築する方法 2018
Require Import JMeq. | |
Section Vec. | |
Variable A:Set. | |
Inductive Vec : nat -> Set := | |
| VNil : Vec O | |
| VCons : forall n, A -> Vec n -> Vec (S n). | |
Lemma Vec0_is_JMeq_to_VNil : forall n (v : Vec n), | |
n = 0 -> JMeq v VNil. |
$ opam install coqide
The following actions will be performed:
∗ install conf-pkg-config 1.1 [required by conf-gtksourceview]
↗ upgrade coq 8.8.0 to 8.8.1 [required by coqide]
∗ install conf-gtksourceview 2 [required by coqide]
∗ install lablgtk 2.18.5 [required by coqide]
∗ install coqide 8.8.1
https://tabelog.com/tokyo/A1301/A130101/13151302/
https://tabelog.com/tokyo/A1313/A131301/13121289/
https://tabelog.com/tokyo/A1301/A130101/13108047/
/** | |
* 準備。Elem型 | |
*/ | |
abstract trait Elem { | |
def <=(other : Elem) : Boolean | |
} | |
case class IntElem(val i : Int) extends Elem { | |
override def <=(other : Elem) = other match { | |
case (o: IntElem) => i <= o.i | |
case _ => false |