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
#lang racket | |
;; A simple implementation of k-CFA. | |
;; Author: Matthew Might (translated by Jay McCarthy) | |
;; Site: http://matt.might.net/ | |
;; k-CFA is a well-known hierarchy of increasingly precise | |
;; control-flow analyses that approximate the solution to the | |
;; control-flow problem. |
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
#lang typed/racket | |
(require "ir.rkt") | |
(define-type Value (U Integer Boolean Closure)) | |
(define-type Env (HashTable Symbol (Boxof Value))) | |
(struct Closure ([params : (Listof Symbol)] | |
[body : Prog] | |
[env : Env]) | |
#:transparent) |
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
==> default: warning: Could not load fact file /tmp/vagrant-puppet/modules-81dadcc86aebb4f5a1b81aa09a8166ab/apt/lib/facter/apt_updates.rb: ./apt_updates.rb:36: syntax error, unexpected ':', expecting kEND | |
==> default: confine osfamily: 'Debian' | |
==> default: ^ | |
==> default: ./apt_updates.rb:41: syntax error, unexpected ':', expecting kEND | |
==> default: confine osfamily: 'Debian' | |
==> default: ^ | |
==> default: ./apt_updates.rb:46: syntax error, unexpected ':', expecting kEND | |
==> default: confine apt_has_updates: true | |
==> default: ^ | |
==> default: ./apt_updates.rb:57: syntax error, unexpected ':', expecting kEND |
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
#lang racket | |
;; this is the consieuten parser | |
(require parser-tools/lex | |
(prefix-in : parser-tools/lex-sre) | |
parser-tools/yacc) | |
;; token definitions: |
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
((λ (dividesP) | |
((λ (prime_loop) | |
((λ (isPrimeP) | |
((λ (loop) ((loop loop) 10000)) | |
(λ (loop) | |
(λ (n) | |
(ifleq0 | |
(+ n (* -1 2)) | |
(ifleq0 | |
(+ 2 (* -1 n)) |
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
name: Assignment 1 Captain Teach | |
id: a1-ct | |
description: Problem 3.3.3 Solution | |
steps: | |
- id: tests | |
instructions: "Submit your solution to problem 3.3.3" | |
reviews: | |
- student-submission: | |
id: student-reviews | |
amount: 2 |
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
pcp074832pcs:~/plt (git)-[master]- clements> time make CPUS=3 | |
if [ "3" = "" ] ; \ | |
then /Applications/Xcode.app/Contents/Developer/usr/bin/make plain-in-place PKGS="main-distribution main-distribution-test" ; \ | |
else /Applications/Xcode.app/Contents/Developer/usr/bin/make cpus-in-place CPUS="3" PKGS="main-distribution main-distribution-test" ; fi | |
/Applications/Xcode.app/Contents/Developer/usr/bin/make -j 3 plain-in-place JOB_OPTIONS="-j 3" PKGS="main-distribution main-distribution-test" | |
/Applications/Xcode.app/Contents/Developer/usr/bin/make base | |
mkdir -p build/config | |
echo '#hash((links-search-files . ()))' > build/config/config.rktd | |
mkdir -p racket/src/build | |
/Applications/Xcode.app/Contents/Developer/usr/bin/make racket/src/build/Makefile |
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
Process: racket [73045] | |
Path: /Users/USER/*/racket | |
Identifier: racket | |
Version: 0 | |
Code Type: X86-64 (Native) | |
Parent Process: make [66951] | |
Responsible: Terminal [352] | |
User ID: 501 | |
Date/Time: 2015-10-20 08:48:24.963 -0700 |
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
#lang plai-typed | |
#;(require rackunit) | |
(require (typed-in | |
racket (round : (number -> number)))) | |
;; let's implement quicksort. Using mutation. | |
;; a store is a map from numbers to numbers |
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
#lang plai-typed | |
#;(require rackunit) | |
(require (typed-in | |
racket (round : (number -> number)))) | |
;; let's implement quicksort. Using mutation. | |