Skip to content

Instantly share code, notes, and snippets.

Avatar
😸

Katsuyoshi Ozaki moratori

😸
View GitHub Profile
@moratori
moratori / results.md
Last active Nov 21, 2021
Results of the Knuth-Bendix completion algorithm implemented in the tool Clover https://github.com/moratori/clover
View results.md

Summary

title number
Completion Succeeded 65
Completion failed 6
Completion timeouted(over 30 seconds) 44
total 115

Detail

View dagger.lisp
(set-macro-character #\DOUBLE_DAGGER
(get-macro-character #\) ))
(set-macro-character #\DAGGER
(lambda (stream char)
(declare (ignore char))
(read-delimited-list #\DOUBLE_DAGGER stream t)))
defun fact † n‡
View plus.v
Inductive nat : Type :=
| O : nat
| S : nat -> nat.
Inductive bool : Type :=
| true : bool
| false: bool.
Fixpoint lessthan (n : nat) (m : nat) : bool :=
@moratori
moratori / yacc.lisp
Created Jul 25, 2014
example of cl-yacc
View yacc.lisp
(use :yacc)
(defun integer? (ch)
(handler-case
(progn
(parse-integer (string ch))
t)
(error (c) (declare (ignore c))
nil)))
View app5.lisp
(in-package :cl-user)
(ql:quickload :clx)
(ql:quickload :mcclim)
(defpackage app
(:use :clim
:clim-lisp))
(in-package :app)
View app4.lisp
(in-package :cl-user)
(ql:quickload :clx)
(ql:quickload :mcclim)
(defpackage app
(:use :clim
:clim-lisp))
View app3.lisp
(in-package :cl-user)
(ql:quickload :clx)
(ql:quickload :mcclim)
(defpackage app
(:use :clim
:clim-lisp))
View app2.lisp
(in-package :cl-user)
(ql:quickload :clx)
(ql:quickload :mcclim)
(defpackage app
(:use :clim
:clim-lisp))
View app1.lisp
(in-package :cl-user)
(ql:quickload :clx)
(ql:quickload :mcclim)
(defpackage app
(:use :clim
:clim-lisp))
@moratori
moratori / defgrammer.lisp
Created Jun 6, 2014
generate text automatically
View defgrammer.lisp
(setf *random-state* (make-random-state t))
(defun make-function-name (sym)
(let ((fname
(string-upcase (concatenate 'string "MAKE-" (symbol-name sym)))))
(multiple-value-bind (sym pack) (find-package fname)
(declare (ignore pack))
(if sym sym (intern fname)))))