This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
package Env; | |
sub new { | |
my $class = shift; | |
my $names = shift; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Data.Set as Set | |
data Clause = Value Bool | Not Int | Literal Int | Or Clause Clause deriving (Eq,Ord) | |
type CNF = Set.Set Clause | |
instance Show Clause where | |
show (Value True) = "T" | |
show (Value False) = "F" | |
show (Not x) = "~" ++ show x | |
show (Literal x) = show x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var nsify = function(ns, selChunk) { | |
sels = selChunk.replace(/ /g, '').split(','); | |
for(var i = 0; i < sels.length; ++i) | |
if(sels[i][0].match(/[.#]/)) | |
sels[i] = sels[i][0] + ns + '-' + sels[i].substring(1); | |
return sels.join(','); |
NewerOlder