

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
I am student at Baddi University of Emerging Sciences and Technologies. To help my friends in other universities, I am uploading my assignments of different courses. Its for Modern Programming Languages course. Other can see if they are searching following: Modern, Programming, Languages, Environmental, System, Premier, Web-Based, , Software, Solutions, Prolog
Typology: Exercises
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Total Marks: 20 Dead line: June 06, 2012
Intended purpose of this assignment is to give students an exercise using Prolog programming language and to make use of Prolog's fast incremental development cycle and rapid prototyping capabilities that have encouraged the use of the language as a tool for solving complex problems while working in any professional software development environments. After attempting this assignment students will be able to:
Familiarize with the Logical and declarative aspects and programming techniques used in the programming language like Prolog
Learn the basic syntax of Prolog as a highest level general-purpose language widely used today
Students will get comprehensive understanding of Working with Rules and Facts in Prolog.
Suppose you are developing an expert Environmental system at Alstrasoft Pvt Ltd that strives to be the premier provider of web-based software solutions for businesses worldwide. As a web development and software company, Alstrasoft specialize mainly in web design and software programming.
Now In the same Environmental systems that predict the weather, analyze water supplies, and so on. There is a need to develop an expert system in Prolog named ‘ Weather Modeling System’ , for National Center for Atmospheric Research .This expert system will provide relatively detailed, short term forecast of meteorological conditions. It is used particularly to model pollutant dispersion (for instance, acid rain deposition). Answer the following questions based on the scenario provided.
a) Why is PROLOG the language of choice for developers to develop expert system like ‘ Weather Modeling System’? [5]
b ) Write Prolog equivalent for the following statements? [5]
c) Consider a program that has following four facts and one rule. What will be the response of following queries in PROLOG also justify your answer against each query? [10]
Facts:
cloudy(South Carolina).
cloudy(Oslo). cold(Oslo). snowy(Toronto)
The rule is:
foggy(X) :- cloudy(X), cold(X).
Queries:
?- foggy(Oslo).
?- foggy(South Carolina).
?- foggy(Toronto).
?- foggy(C). C = X
?- foggy(Sweden).