Install Windows Operating System on Mac OS Devices

Nowadays, there are many people using Mac devices like MacBook or iMac as their personal computer. In programming, there are many programming application make a program. But there are some problem that Microsoft Visual Studio is not compatible with OS X Devices.

So, What should we do? We need to have Windows device to codes? The answer is exactly not, because we can install  windows on Mac OS device. We should know that installing Windows on the Mac OS Device is approximately the same with dual boot on the Windows PC. But there are something different in Mac OS Device. So, we use the application provided by Apple to help us installing the Windows on Mac OS devices. 

Installation is quite easy and it takes about 30 minutes to complete all the installation. Remember that the hard drive format for Windows and Mac OS are very different. Mac is using FAT 32 and Windows is using NTFS.

Here are some installation guide provided by Microsoft to install Windows on Mac OS Device in the link below, Enjoy!

Install Windows Operating System on Mac OS Devices

Concept of Programming Languages: Chapter 16

2. What are the two parts of a compound term?

A compound term is composed of two parts: a functor, which is the function symbol that names the relation, and an ordered list of parameters, which

together represent an element of the relation. A compound term with a single

parameter is a 1-tuple; one with two parameters is a 2-tuple, and so forth.

7. What are the forms of Horn Clauses?

Horn clauses can be in only two forms: They have either a single atomic proposition on the left side or an empty left side.1

8. What is the basic concept of declarative semantics?

The basic concept of this semantics is that there is a simple way to determine the meaning of each statement, and it does not depend on how the statement might be used to solve a problem

10. What are the three forms of Prolog term?

Constant, variable or structure.

13. What is a conjunction?

Conjunctions contain multiple terms that are separated by logical AND operations.

Problem Set

1.”All predicate calculus propositions can be algorithmically converted to clausal form”. Is this statement true or false?


2. Describe how a logic programming language is different from a general programming language.

Programming that uses a form of symbolic logic as a programming language, unlike other general programming language, is often called logic programming; languages based on symbolic logic are called logic programming languages, or declarative languages.

6. Explain in which the arithmetic processing capabilities of LISP and Prolog are similar.

Arithmetic processing is simple to implement in LISP and Prolog.

7. In what way are the arithmetic processing capabilities of LISP and Prolog different?

LISP uses prefix operator in arithmetic processing, unlike Prolog.

Concept of Programming Languages: Chapter 16

Concept of Programming Languages : Chapter 15

2. What does a lambda expression specify?
The predicate function is often given as a lambda expression, which in ML is defined exactly like a function, except with the fn reserved word, instead of fun, and of course the lambda expression is nameless.

3.   What data types were parts of the original LISP?

Atoms and lists.

6.   What is a simple list?
A list which membership of a given atom in a given list that does not include sublists.

7.   What does the abbreviation REPL stand for?
REPL stand for read-evaluate-print loop.

8.   What are the three parameters to IF?

Three parameters to IF are: a predicate expression, a then expression, and an else expression.

18.   What is tail recursion? Why is it important to define functions that use recursion to specify repetition to be tail recursive?
A function is tail recursive if its recursive call is the last operation in the function. This means that the return value of the recursive call is the return value of the nonrecursive call to the function. It is important to specify repetition to be tail recursive because it is more efficient(increase the efficiency).

24.  What is stored in an ML evaluation environment?

A table called the evaluation environment stores the names of all implicitly and explicitly declared identifiers in a program, along with their types. This is like a run-time symbol table.

26. What is type inferencing, as used in ML?
Type inference refers to the automatic deduction of the type of an expression in a programming language. If some, but not all, type annotations are already present it is referred to as type reconstr

29. What is a curried function?
Curried function let new functions can be constructed from them by partial evaluation.uction.

35.   When is a programming language called a nonstrict language?

A language is nonstrict if it does not have the strict requirement.

Problem Set

2.  Give the general form of function declaration in ML.

Function declarations in ML appear in the general form
fun function_name( formal parameters ) = expression;

8. How is the functional operator pipeline ( |> ) used in F#?

The pipeline operator is a binary operator that sends the value of its left operand, which

is an expression, to the last parameter of the function call, which is the right operand. It is

used to chain together function calls while flowing the data being processed to each call.

9. What does the following Scheme function do?

(define (y s lis)


((null? lis) ‘() )

((equal? s (car lis)) lis)

(else (y s (cdr lis)))


y returns the given list with leading elements removed up to but not including the first

occurrence of the first given parameter.

Concept of Programming Languages : Chapter 15

Concept of Programming Languages : Chapter 14

2. When is an exception thrown or raised?

When an event associated with an exception occurs.

4. Give an example of hardware-detectable execution.

Division by zero

6. What is exception propagation in Ada?

– A powerful tool for constructing more reliable software systems.

9.   What is the scope of exception handlers in Ada?

An exception handler in Ada can occur in either a  subprogram body, a package body, a task, or a block.

10.  What are the four exceptions defined in the Standard package of Ada?

Constraint_aError, Program_Error, Storage_Error, Tasking_Error

13. Describe three problems with Ada’s exception handling.

The propagation model, which allows exceptions to be propagated to an outer scope in which the exception is not visible, inadequacy of exception handling for tasks, and exception handling was not extended to deal with new constructs in Ada 95.

16.  Which standard libraries define and throw the exception overflow_error in C++?

The exception overflow_error is thrown by math library functions.

Problem Set

1. What is the mechanism did early programming languages provide to detect or attempt to deal with errors?

Early programming languages were designed and implemented in such a way that the user program could neither detect nor attempt to deal with such errors, In these languages, the occurrence of such an errors simply cause the program to be terminated and could not be transfer to operating system.

2. Describe the approach for the detection of subscription range errors used in c and java:

In c subscript range are not checked, Java compilers usually generate codes to check the correctness of every subscript expression. If any exception generates, then an unchecked exception is thrown.

6. In languages without exception-handling facilities, it is common to have most subprograms include an “error” parameter, which can be set to some value representing “OK” or some other value representing “error in procedure.” What advantage does a linguistic exception-handling facility like that of Ada have over this method?

There are several advantages of a linguistic mechanism for handling exceptions, such as that found in Ada, over simply using a flag error parameter in all subprograms. One advantage is that the code to test the flag after every call is eliminated. Such testing makes programs longer and harder to read. Another advantage is that exceptions can be propagated farther than one level of control in a uniform and implicit way. Finally, there is the advantage that all programs use a uniform method for dealing with unusualcircumstances, leading to enhanced readability.

14. Summarize the arguments in favor of the termination and resumption models of continuation.

The resumption model is useful when the exception is only an unusual condition, rather than an error. The termination model is useful when the exception is an error and it is highly unlikely that the error can be corrected so that execution could continue in some useful way.

Concept of Programming Languages : Chapter 14

Concept of Programming Languages : Chapter 13

1. What are the three possible levels of conccurency in programs?

instruction level, statement level, unit level

5. What level of program concurrency is best supported by SIMD computers?

Unit level concurrency.

7. What is the difference between physical and logical concurrency?

Physical concurrency is several program units from the same program that literally execute simultaneously.

Logical concurrency is multiple processors providing actual concurrency, when in fact the actual execution of programs is taking place in interleaved fashion on a single processor.

8. What is the work of a scheduler?

Scheduler manages the sharing of processors among the tasks.

12. What is a heavyweight task? What is a lightweight task?

Heavyweight task executes in its own address space.

Lightweight task all run in the same address space.

16. What is a task descriptor?

Task descriptor is a data structure that stores all of the relevant information about the execution state of a task.

18. What is the purpose of a task-ready queue?

The purpose of a task-ready queue is to be storage of tasks that are ready to run.

21. What is a binary semaphore? What is a counting semaphore?

Binary semaphore is a semaphore that requires only a binary-valued counter, like the one used to provide competition synchronization. A counting semaphore is a synchronization object that can have an arbitrarily large number of states.

30. What is purpose of an Ada terminate clause?

The purpose of an Ada terminate clause is to mark that the task is finished with its job but is not yet terminated.

34. What does the Java sleep method do?

Sleep method blocks the the thread.

35. What does the Java yield method do?

Yield method surrenders the processor voluntarily as a request from the running thread.

55. What is Concurrent ML?

Concurrent ML is an extension to ML that includes a fform of threads and a form of synchronous message passing to support concurrency.


1. Explain clearly why a race condition can create problems for a system

Because two or more tasks are racing to use the shared resource and the behavior of the program depends on which task arrives first (and wins the race). The importance of competition synchronization should now be clear.

2. What are the different ways to handle deadlock?

Ignoring deadlock, detection, prevention, avoidance

3. Busy waiting is a method whereby a task waits for a given event by continuously checking for that event to occur. What is the main problem with this approach?

Busy-waiting or spinning is a technique in which a process repeatedly checks to see if a condition is true, such as whether keyboard input or a lock is available. Spinning can also be used to generate an arbitrary time delay, a technique that was necessary on systems that lacked a method of waiting a specific length of time. Processor speeds vary greatly from computer to computer, especially as some processors are designed to dynamically adjust speed based on external factors, such as the load on the operating system. Busy waiting may loop forever and it may cause a computer freezing.

Concept of Programming Languages : Chapter 13

Concept of Programming Languages : Chapter 12

2.  What are the problems associated with programming using abstract data types?

The problems associated with programming using abstract data types are:

• In nearly all cases, the features and capabilities of the existing type are not quite right for the new use.

• The type definitions are all independent and are at the same level.

3.   What is the advantage of inheritance?

The advantage of inheritance is inheritance offers a solution to both the modification problem posed by abstract data type reuse and the program organization problem. If a new abstract data type can inherit the data and functionality of some existing type, and is also allowed to modify some of those entities and add new entities, reuse is greatly facilitated without requiring changes to the reused abstract data type.

4.   What is message protocol?

Message protocol is the entire collection of methods of an object.

7. What is dynamic dispatch?
Dynamic dispatch is the third characteristic (after abstract data types and inheritance) of object-oriented programming language which is a kind of polymorhphism provided by the dynamic binding of messages to method definitions.

8.   What is an abstract method? What is an abstract class?

An abstract method is an implemented method which all of descendant class should have and it is included in Building.

An abstract class is  a class that includes at least one abstract method.

10.  What is an inner class?

An inner class is  a nonstatic class that is nested directly in another class.

12.  From where are Smalltalk objects allocates?

All Smalltalk objects are allocated from the heap and are referenced through reference variables, which are implicitly dereferenced.

15.  What kind of inheritance, single or multiple, does Smalltalk support?

Smalltalk supports single inheritance; it does not allow multiple inheritance.

19.  How are C++ heap-allocated objects deallocated?

C++ heap-allocated objects are deallocated using destructor.

29.  Does Objective-C support multiple inheritance?

No Objective-C doesn’t support it. Objective-C only supports single inheritance.

31.  What is the root class in Objective-C?

The root class in Objective-C is called NSObject

38.  What is boxing?

Boxing is primitive values in Java 5.0+ which is implicitly coerced when they are put in object context. This coercion converts the primitive value to an object of the wrapper class of the primitive value’s type.

49.  What access controls does Ruby support for instance variables?

Access control in Ruby is different for data than it is for methods. All instance data has private access by default, and that cannot be changed. If external access to an instance variable is required, accessor methods must be defined.


2.    In what ways can “compatible “ be defined for the relationship between an overridden method and the overriding method?

Every overriding method must have the same number of parameters as the overridden method and the types of the parameters and the return type must be compatible with those of the parent class.

3.   Compare the inheritance of C++ and Java.

• In Java, all objects are Inherited, either directly or indirectly. While in C++ a class can be defined to stand on its own without an ancestor.

•  The meaning of protected member access specifier is somewhat different in Java. In Java, protected members of a class “A” are accessible in other class “B” of same package, even if B doesn’t inherit from A (they both have to be in the same package).

•  Java uses extends keyword for inheritence. Unlike C++, Java doesn’t provide an inheritance specifier like public, protected or private. Therefore, we cannot change the protection level of members of base class in Java, if some data member is public or protected in base class then it remains public or protected in derived class. Like C++, private members of base class are not accessible in derived class. Unlike C++, in Java, we don’t have to remember those rules of inheritance which are combination of base class access specifier and inheritance specifier.

5.    Compare abstract class and interface in Java.

• First and major difference between abstract class and interface is that, abstract class is a class while interface is a interface, means by extending abstract class you can not extend another class because Java does not support multiple inheritance but you can implement multiple inheritance in Java.
• Second difference between interface and abstract class in Java is that you can not create non abstract method in interface, every method in interface is by default abstract, but you can create non abstract method in abstract class. Even a class which doesn’t contain any abstract method can be abstract by using abstract keyword.
• Third difference between abstract class and interface in Java is that abstract class are slightly faster than interface because interface involves a search before calling any overridden method in Java. This is not a significant difference in most of cases but if you are writing a time critical application than you may not want to leave any stone unturned.
• Fourth difference between abstract class vs interface in Java is that, interface are better suited for Type declaration and abstract class is more suited for code reuse and evolution perspective.
• Another notable difference between interface and abstract class is that when you add a new method in existing interface it breaks all its implementation and you need to provide an implementation in all clients which is not good. By using abstract class you can provide default implementation in super class.

7.   What is one programming situation where multiple inheritance has a significant disadvantage over interfaces?

A situation when there are two classes derived from a common parent and those two derived class has one child.

9.   Give an example of inheritance in C++, where a subclass overrides the superclass methods.

class Enemy{


int Hp;


void attack(){

cout<<”Enemy Attacks using GUN!!”<<endl;

class BossEnemy: public Enemy{


void attack(){

cout<<”Boss Enemy attacks using MAGIC!!”<<endl;

10.  Explain one advantage of inheritance.

One of the key benefits of inheritance is to minimize the amount of duplicate code in an application by sharing common  code amongst several subclasses. Where equivalent code exists in two related classes, the hierarchy can usually be  refactored to move the common code up to a mutual superclass. This also tends to result in a better organization of  code and smaller, simpler compilation units.

17.  What are the different options for object destruction in Java?

There is no explicit deallocation operator. A finalize method is implicitly called when the garbage collector is about to reclaim the storage occupied by the object.

Concept of Programming Languages : Chapter 12