#Principal Of Programming Language

Author avatar
Brain DumpDec 12, 2024
Church Numerals

Church numerals are a way of representing natural numbers using lambda calculus. a foundational framework in mathematical logic and computer science. In essence

3 min read·General
Article cover
Author avatar
Brain DumpDec 12, 2024
Reduction Strategies For Lambda Calculus

Redex is a deducible expression. It is a lambda abstraction applied to an argumentReduction replaces a redex with the result of applying the function.Beta Reduc

3 min read·General
Article cover
Author avatar
Brain DumpDec 12, 2024
Lambda Calculus | Alpha renaming | Exercise 1

A formal system used to study functions, variables & how they interact through application & abstraction. It's a foundational mathematical framework tha

8 min read·General
Article cover
Author avatar
Prashant BasnetDec 12, 2024
Type Environment | Exercise 4

A type environment (T) maps variables names to theirs types. For example:+ is mapped to the type , Int -> Int -> Int y is mapped to the type Int Lambda E

4 min read·General
Article cover
Author avatar
Prashant BasnetDec 12, 2024
SubTyping | Exercise 7

In type theory, sub typing denoted by (<:) is a relation that describes when one type can be used in place of another type. It's more like flexible version o

2 min read·General
Article cover
Author avatar
Prashant BasnetDec 12, 2024
Constraint Solving in the context of programming language | Exercise 5.

Solve each of the following constraints. Let's first understand the tools to solve it:Constraint Solving in type inference involves finding a way to make d

7 min read·General
Article cover
Author avatar
Prashant BasnetDec 12, 2024
Type Environment | Exercise 4 for Final Exam

How to solve it?Let's learn.A type environment (T) maps variables names to theirs types. For example:+ is mapped to the type , Int -> Int -> Int y is map

4 min read·General
Article cover
Author avatar
Prashant BasnetDec 12, 2024
Static Typing | Dynamic Typing | Type Inference

Static TypingDefinition: In statically typed languages, type checking is done at compile time. This means that the types of all variables must be known before t

2 min read·General
Author avatar
Prashant BasnetDec 12, 2024
Soundness & Completeness in Type Theory

To explain the concepts of soundness and completeness, particularly in the context of type checking and type inference, we can use analogies to make them easier

4 min read·General
Article cover
Author avatar
Prashant BasnetDec 12, 2024
Different forms of polymorphism

1. Ad-hoc Polymorphism Function or operator overloading based on different typesint add(int a, int b) {   return a + b; } double add(double a, d

1 min read·General
Author avatar
Prashant BasnetNov 13, 2024
Understanding Subtyping in Programming Language Theory: A Step-by-Step Proof

this lecture is from CSCE-550, Nov 12, 2024.The Why?Why understand the lecture on Programming language theory (Subtyping) is important to study ? Today's lectur

7 min read·General
Article cover
Author avatar
Brain DumpOct 13, 2024
Programming Language Theory 101: Inference Rules and Extensions

Inference rules are fundamental concepts in formal logic & reasoning, widely used in mathematics, computer science & especially in programming language

14 min read·General
Article cover
Author avatar
Brain DumpSep 9, 2024
Recursive Thinking in Haskell: Practical Examples

1. Problem runLengthEncode Implement a function called runLengthEncode that performs run-length encoding on a list of elements. Run-length encoding is a simpl

4 min read·General
Article cover
Author avatar
Brain DumpSep 6, 2024
Basic of Haskell 101. Chapter 2.

1. Function Definition:Functions are defined using equations: double x = x + x 2. Function Application:means apply function f to arguments x & yf x y

6 min read·General
Article cover
Author avatar
Brain DumpSep 4, 2024
Why learn Haskell? Haskell 101. Chapter 1.

Before we learn any syntax or anything. Let's first explore the most important question to learn anything.That is to learn why learn Haskell?Let's explore what

9 min read·General
Article cover