Skip to content

Instantly share code, notes, and snippets.

@jtpaasch
jtpaasch / Qemu-quickstart.md
Last active November 5, 2025 15:31
A quick cheatsheet/tutorial for using QEMU (on macOS, but should work on Linux too).
@jtpaasch
jtpaasch / primus_evaluator_example.ml
Last active February 4, 2019 15:47
An example of a BAP/Primus component that evaluates assignments and jump targets.
(**
MAKEFILE:
plugin = primus_evaluator_example
all: clean build install
build:
bapbuild -pkg bap-primus -tags 'warn(A)' $(plugin).plugin
@jtpaasch
jtpaasch / Bap.BIL.notes.md
Created January 17, 2019 18:22
Bap BIL notes
@jtpaasch
jtpaasch / functors.ml
Created January 14, 2019 13:24
Functors in OCaml
(*********************************************************)
(** Simple functor example. *)
(** A simple signature. *)
module type X = sig
val x : int
end
(** Here's a fuctor.
* It takes an input: [M], which is an implementation
@jtpaasch
jtpaasch / json.ml
Last active August 30, 2018 16:45
Simple JSON parser (OCaml)
module Token = struct
type t =
| L_array_bracket
| R_array_bracket
| L_object_bracket
| R_object_bracket
| Colon
| Comma
@jtpaasch
jtpaasch / OCaml_Compiling_and_Running.md
Last active December 17, 2022 13:35
Tutorial/cheat sheet for compiling/running OCaml programs.
@jtpaasch
jtpaasch / Option_tutorial_for_Jane_Street_Core.md
Last active January 22, 2023 05:48
Tutorial/cheat sheet for Jane Street Core's Option.

Option (from Jane Street Core)

Convert a value to an optional something:

let some_message = Option.some "goodbye";;

Suppose you have some data:

@jtpaasch
jtpaasch / Sequence_Tutorial_for_Jane_Street_Core.md
Created August 16, 2018 17:05
Tutorial/cheat sheet for using Jane Street Core's Sequences.

Sequence (from Jane Street Core)

Suppose you have a list.

let x = ["a"; "b"; "c"];;

Convert it to a sequence:

@jtpaasch
jtpaasch / software-foundations-lf-Tactics.v
Created July 25, 2018 11:34
Software Foundations, Logical Foundations, Tactics.v
(** * Tactics: More Basic Tactics *)
(** This chapter introduces several additional proof strategies
and tactics that allow us to begin proving more interesting
properties of functional programs. We will see:
- how to use auxiliary lemmas in both "forward-style" and
"backward-style" proofs;
- how to reason about data constructors (in particular, how to use
the fact that they are injective and disjoint);