IPS
hjalte01 / ips Goto Github PK
View Code? Open in Web Editor NEWIPS
IPS
Expand the current implementation of let as specified by the assignment.
let x = foo; y = bar; z = baz in qux
Implement the boolean false value as specified by the assignment.
// Exp -> false
false
Implement the boolean and operator as specified by the assignment.
// Exp -> Exp && Exp
true && true
Implement the boolean true value as specified by the assignment.
// Exp -> true
true
Implement dead-binding removal as specified in the assignment text.
Implement the multiplication operator as specified by the assignment.
// Exp -> Exp * Exp
a*b
Implement the replicate function as specified by the assignment:
// replicate(Exp, Exp)
replicate(5, 1) -> [1, 1, 1, 1, 1]
replicate(5, 'a') -> ['a', 'a', 'a', 'a', 'a']
Implement constant folding as specified in the assignment text.
Implement copy propagation as specified in the assignment text.
Implement the boolean negation operator as specified by the assignment.
// Exp -> not Exp
not true
Same as #28.
Same as #28
Implement the filter function as specified by the assignment.
// filter(FunArg, Exp)
filter(fn bool (int x) => x>2, [1, 2, 3]) -> [3]
Implement the boolean or operator as specified by the assignment.
// Exp -> Exp || Exp
true || false
I made a mistake testing for exceptions. Division by 0 fails the compiled test when you give it a .err file as input as you should. Apparently this should be checked and reported in TypeChecker.
Implement the scan function as specified by the assignment.
// scan(FunArgs, Exp, Exp)
scan(fn int (int acc, int x) => acc*x, 1, [1, 2, 3]) -> [1, 2, 6]
Implement the integer negation operator as specified by the assignment.
// Exp -> ~Exp
~a
Implement the division operator as specified by the assignment.
// Exp -> Exp / Exp
a/b
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.