This file contains 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
class Task { | |
var prio: nat | |
var next: Task? | |
ghost var model: set<nat> | |
ghost var footprint: set<object> | |
ghost predicate valid() | |
reads this, footprint | |
decreases footprint + {this} |
This file contains 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
class LL { /* linked list nodes */ | |
var elem: int; | |
var next: LL?; /* may be null */ | |
constructor (x: int) | |
ensures elem == x && next == null | |
{ | |
elem, next := x, null; | |
} | |
} |
This file contains 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
class Node { | |
var data: int | |
var next: Node? | |
ghost var footprint: seq<Node> | |
opaque ghost predicate valid() | |
reads this, footprint | |
decreases |footprint| | |
{ |
This file contains 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
class Node { | |
var data: int | |
var next: Node? | |
ghost var contents: seq<int> | |
ghost var footprint: seq<Node> | |
opaque ghost predicate valid() | |
reads this, footprint |
This file contains 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
class Node { | |
var data: int | |
var next: Node? | |
ghost var contents: seq<int> | |
ghost var footprint: seq<Node> | |
opaque ghost predicate valid() | |
reads this, footprint |
This file contains 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
class Node { | |
var data: int | |
var next: Node? | |
ghost var footprint: set<object> | |
ghost var contents: seq<int> | |
ghost predicate valid() | |
reads this, footprint | |
{ |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>MooTweet</title> | |
<script type="text/javascript" charset="utf-8" src="js/cordova.js"></script> | |
<script type="text/javascript" charset="utf-8" src="js/jquery-min.js"></script> | |
<script type="text/javascript" charset="utf-8" src="js/sha1.js"></script> | |
<script type="text/javascript" charset="utf-8" src="js/codebird.js"></script> | |
<script type="text/javascript" charset="utf-8" src="js/some.js"></script> |
This file contains 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
/* thanks to amwelles / widget.html (https://gist.github.com/amwelles/5776750) | |
* for the following function. | |
* simple and elegant. | |
*/ | |
function parseText(text) { | |
var link = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; | |
var user = /@(\w+)/ig; | |
var hashTags = /#(\w+)/ig; | |
var desc = ""; |