Skip to content

Instantly share code, notes, and snippets.

View raoprasadv's full-sized avatar

prasad rao raoprasadv

  • Self
View GitHub Profile
@raoprasadv
raoprasadv / proplogic.ml
Created March 9, 2016 05:13
Rewrite based resolution for computing well-founded semantics of a propositional logic program.
(** proplog.ml:
* Author: Prasad Rao
* Email: raoprasadv AT gmail DOT com
* use propositional logic to show principles of
* prolog resolution
* using SLG (http://link.springer.com/chapter/10.1007/3-540-63255-7_33#page-1)
* for computing Well-founded semantics of a propositional logic program
*
* Intended for use as a teaching tool.
*)
@raoprasadv
raoprasadv / simplifiedSakura.lhs
Created September 23, 2015 20:00
Haskell computation of Sakura Tree Hash Mode greatly simplified to facilitate presentation
% Multi Core Parallel implementation of
% Simplified Sakura.
% Authors Prasad Rao, Stuart Haber, HP Labs
% Written in the Literate Haskell Mode
\begin{frame}{Highlights}
\begin{itemize}
\item Type definition for shape: Slide \ref{slide-shape}
\item Serial Tree Hash:Slide \ref{slide-serial-hash}
\item Parallel Tree Hash: Slide \ref{slide-parallel-hash}
@raoprasadv
raoprasadv / sudokuViaZ3
Created February 2, 2015 19:37
Example program to use Z3, a SMT solver from F# (Fsharp)
#I @".." // where the libs live
#r "Microsoft.Z3.dll"
open Microsoft.Z3
let test_str = "--2--1-6-\n--7--4---\n5-----9--\n-1-3-----\n8---5--4-\n-----6-2-\n--6-----7\n---8--3--\n-4-9--2--"
let cell_val (c: char): int option =
if c <= '9' && c >= '1' then
Some ((int)c - (int)'0')