Javatpoint Logo

Computer Graphics

Computer Network

  • Interview Q

Prolog Tutorial

Clauses & predicates, satisfying goals, operations & arithmetic, input & output, preventing backtracking, prolog examples.

JavaTpoint

  • Send your Feedback to [email protected]

Help Others, Please Share

facebook

Learn Latest Tutorials

Splunk tutorial

Transact-SQL

Tumblr tutorial

Reinforcement Learning

R Programming tutorial

R Programming

RxJS tutorial

React Native

Python Design Patterns

Python Design Patterns

Python Pillow tutorial

Python Pillow

Python Turtle tutorial

Python Turtle

Keras tutorial

Preparation

Aptitude

Verbal Ability

Interview Questions

Interview Questions

Company Interview Questions

Company Questions

Trending Technologies

Artificial Intelligence

Artificial Intelligence

AWS Tutorial

Cloud Computing

Hadoop tutorial

Data Science

Angular 7 Tutorial

Machine Learning

DevOps Tutorial

B.Tech / MCA

DBMS tutorial

Data Structures

DAA tutorial

Operating System

Computer Network tutorial

Compiler Design

Computer Organization and Architecture

Computer Organization

Discrete Mathematics Tutorial

Discrete Mathematics

Ethical Hacking

Ethical Hacking

Computer Graphics Tutorial

Software Engineering

html tutorial

Web Technology

Cyber Security tutorial

Cyber Security

Automata Tutorial

C Programming

C++ tutorial

Control System

Data Mining Tutorial

Data Mining

Data Warehouse Tutorial

Data Warehouse

RSS Feed

[ next ] [ prev ] [ prev-tail ] [ tail ] [ up ]

2.3 Arithmetic in Prolog

2.3.1 length/2, 2.3.2 exercises.

[ next ] [ prev ] [ prev-tail ] [ front ] [ up ]

Prolog Tutorial

  • Prolog Tutorial
  • Prolog - Home
  • Prolog - Introduction
  • Prolog - Environment Setup
  • Prolog - Hello World
  • Prolog - Basics
  • Prolog - Relations
  • Prolog - Data Objects

Prolog - Operators

  • Loop & Decision Making
  • Conjunctions & Disjunctions
  • Prolog - Lists
  • Recursion and Structures
  • Prolog - Backtracking
  • Prolog - Different and Not
  • Prolog - Inputs and Outputs
  • Prolog - Built-In Predicates
  • Tree Data Structure (Case Study)
  • Prolog - Examples
  • Prolog - Basic Programs
  • Prolog - Examples of Cuts
  • Towers of Hanoi Problem
  • Prolog - Linked Lists
  • Monkey and Banana Problem
  • Prolog Useful Resources
  • Prolog - Quick Guide
  • Prolog - Useful Resources
  • Prolog - Discussion
  • Selected Reading
  • UPSC IAS Exams Notes
  • Developer's Best Practices
  • Questions and Answers
  • Effective Resume Writing
  • HR Interview Questions
  • Computer Glossary

In the following sections, we will see what are the different types of operators in Prolog. Types of the comparison operators and Arithmetic operators.

We will also see how these are different from any other high level language operators, how they are syntactically different, and how they are different in their work. Also we will see some practical demonstration to understand the usage of different operators.

Comparison Operators

Comparison operators are used to compare two equations or states. Following are different comparison operators −

You can see that the ‘=<’ operator, ‘=:=’ operator and ‘=\=’ operators are syntactically different from other languages. Let us see some practical demonstration to this.

Here we can see 1+2=:=2+1 is returning true, but 1+2=2+1 is returning false. This is because, in the first case it is checking whether the value of 1 + 2 is same as 2 + 1 or not, and the other one is checking whether two patterns ‘1+2’ and ‘2+1’ are same or not. As they are not same, it returns no (false). In the case of 1+A=B+2, A and B are two variables, and they are automatically assigned to some values that will match the pattern.

Arithmetic Operators in Prolog

Arithmetic operators are used to perform arithmetic operations. There are few different types of arithmetic operators as follows −

Let us see one practical code to understand the usage of these operators.

Note − The nl is used to create new line.

To Continue Learning Please Login

2.4. Prolog Arithmetic Operators

  • - subtraction
  • * multiplication
  • % remainder

The maximum integer value that can be represented is 9223372036854775807

The minimum integer value that can be represented is -9223372036854775808

Prolog evaluates numerical expressions using the BODMAS rule to determine the order in which operations are performed.

Variables must be instantiated to numerical terms before they can be used in calculations.

Examples of using decimal point numbers in calculations.

  • Sources/building
  • Docker images

External

  • Command line
  • Prolog syntax
  • HTML generation
  • Publications
  • Rev 7 Extensions
  • Getting started
  • Development tools
  • RDF namespaces
  • GUI options
  • Linux packages
  • Report a bug
  • Submit a patch
  • Submit an add-on
  • External links
  • Contributing
  • Code of Conduct
  • Contributors
  • SWI-Prolog items
  • View changes
  • Notation of Predicate Descriptions
  • Character representation
  • Loading Prolog source files
  • Editor Interface
  • Verify Type of a Term
  • Comparison and Unification of Terms
  • Control Predicates
  • Meta-Call Predicates
  • Delimited continuations
  • Exception handling
  • Printing messages
  • Handling signals
  • DCG Grammar rules
  • Declaring predicate properties
  • Examining the program
  • Input and output
  • Status of streams
  • Primitive character I/O
  • Term reading and writing
  • Analysing and Constructing Terms
  • Analysing and Constructing Atoms
  • Localization (locale) support
  • Character properties
  • Character Conversion
  • Special purpose integer arithmetic
  • General purpose arithmetic
  • Misc arithmetic support predicates
  • Built-in list operations
  • Finding all Solutions to a Goal
  • Formatted Write
  • Global variables
  • Terminal Control
  • Operating System Interaction
  • File System Interaction
  • User Top-level Manipulation
  • Creating a Protocol of the User Interaction
  • Debugging and Tracing Programs
  • Debugging and declaring determinism
  • Obtaining Runtime Statistics
  • Execution profiling
  • Memory Management
  • Windows DDE interface
  • Miscellaneous

4.27 Arithmetic

Arithmetic can be divided into some special purpose integer predicates and a series of general predicates for integer, floating point and rational arithmetic as appropriate. The general arithmetic predicates all handle expressions . An expression is either a simple number or a function . The arguments of a function are expressions. The functions are described in section 4.27.2.6 .

4.27.1 Special purpose integer arithmetic

The predicates in this section provide more logical operations between integers. They are not covered by the ISO standard, although they are‘part of the community’and found as either library or built-in in many other Prolog systems.

Note that this predicate is only available if SWI-Prolog is compiled with unbounded integer support. This is the case for all packaged versions.

4.27.2 General purpose arithmetic

The general arithmetic predicates are optionally compiled (see set_prolog_flag/2 and the -O command line option). Compiled arithmetic reduces global stack requirements and improves performance. Unfortunately compiled arithmetic cannot be traced, which is why it is optional.

4.27.2.1 Arithmetic types

SWI-Prolog defines the following numeric types:

Internally, SWI-Prolog has three integer representations. Small integers (defined by the Prolog flag max_tagged_integer ) are encoded directly. Larger integers are represented as 64-bit values on the global stack. Integers that do not fit in 64 bits are represented as serialised GNU MPZ structures on the global stack.

  • float Floating point numbers are represented using the C type double . On most of today's platforms these are 64-bit IEEE floating point numbers.

Arithmetic functions that require integer arguments accept, in addition to integers, rational numbers with (canonical) denominator‘1’. If the required argument is a float the argument is converted to float. Note that conversion of integers to floating point numbers may raise an overflow exception. In all other cases, arguments are converted to the same type using the order below.

integer → rational number → floating point number

4.27.2.2 Rational number examples

The use of rational numbers with unbounded integers allows for exact integer or fixed point arithmetic under addition, subtraction, multiplication, division and exponentiation ( ^/2 ). Support for rational numbers depends on the Prolog flag prefer_rationals . If this is true (default), the number division function ( //2 ) and exponentiation function ( ^/2 ) generate a rational number on integer and rational arguments and read/1 and friends read [-+][0-9_ ]+/[0-9_ ]+ into a rational number. See also section 2.15.1.6 . Here are some examples.

Note that floats cannot represent all decimal numbers exactly. The function rational/1 creates an exact equivalent of the float, while rationalize/1 creates a rational number that is within the float rounding error from the original float. Please check the documentation of these functions for details and examples.

Rational numbers can be printed as decimal numbers with arbitrary precision using the format/3 floating point conversion:

4.27.2.3 Rational numbers or floats

SWI-Prolog uses rational number arithmetic if the Prolog flag prefer_rationals is true and if this is defined for a function on the given operants. This results in perfectly precise answers. Unfortunately rational numbers can get really large and, if a precise answer is not needed, a big waste of memory and CPU time. In such cases one should use floating point arithmetic. The Prolog flag max_rational_size provides a tripwire to detect cases where rational numbers get big and react on these events.

Floating point arithmetic can be forced by forcing a float into an argument at any point, i.e., the result of a function with at least one float is always float except for the float-to-integer rounding and truncating functions such as round/1 , rational/1 or float_integer_part/1 .

Float arithmetic is typically forced by using a floating point constant as initial value or operant. Alternatively, the float/1 function forces conversion of the argument.

4.27.2.4 IEEE 754 floating point arithmetic

The Prolog ISO standard defines that floating point arithmetic returns a valid floating point number or raises an exception. IEEE floating point arithmetic defines two modes: raising exceptions and propagating the special float values NaN , Inf , -Inf and -0.0 . SWI-Prolog implements a part of the ECLiPSe proposal to support non-exception based processing of floating point numbers. There are four flags that define handling the four exceptional events in floating point arithmetic, providing the choice between error and returning the IEEE special value. Note that these flags only apply for floating point arithmetic. For example rational division by zero always raises an exception.

The Prolog flag float_rounding and the function roundtoward/2 control the rounding mode for floating point arithmetic. The default rounding is to_nearest and the following alternatives are provided: to_positive , to_negative and to_zero .

Float =:= Mantissa × Base^Exponent

If Low and/or High are variables they will be unified with tightest values that still meet the bounds criteria. The generated bounds will be integers if Num is an integer; otherwise they will be floats (also see nexttoward/2 for generating float bounds). Some examples:

4.27.2.5 Floating point arithmetic precision

SWI-Prolog represents floats using the C double type. On virtually all modern hardware this implies it uses 64-bit IEEE 754 floating point numbers. See also section 4.27.2.4 . All floating point arithmetic is performed using C. Different C compilers, different C math libraries and different hardware floating point support may yield different results for the same expression on different instances of SWI-Prolog.

4.27.2.6 Arithmetic Functions

Arithmetic functions are terms which are evaluated by the arithmetic predicates described in section 4.27.2 . There are four types of arguments to functions:

For systems using bounded integer arithmetic (default is unbounded, see section 4.27.2.1 for details), integer operations that would cause overflow automatically convert to floating point arithmetic.

SWI-Prolog provides many extensions to the set of floating point functions defined by the ISO standard. The current policy is to provide such functions on‘as-needed’basis if the function is widely supported elsewhere and notably if it is part of the C99 mathematical library. In addition, we try to maintain compatibility with other Prolog implementations.

The current default for the Prolog flag prefer_rationals is false . Future version may switch this to true , providing precise results when possible. The pitfall is that in general rational arithmetic is slower and can become very slow and produce huge numbers that require a lot of (global stack) memory. Code for which the exact results provided by rational numbers is not needed should force float results by making one of the operants float, for example by dividing by 10.0 rather than 10 or by using float/1 . Note that when one of the arguments is forced to a float the division is a float operation while if the result is forced to the float the division is done using rational arithmetic.

This function relates to the Prolog numerical comparison predicates >/2 , =:=/2 , etc. The Prolog numerical comparison converts the rational in a mixed rational/float comparison to a float, possibly rounding the value. This function converts the float to a rational, comparing the exact values.

Note that floating point arithmetic is provided by the C compiler and C runtime library. Unfortunately most C libraries do not correctly implement the rounding modes for notably the trigonometry and exponential functions. There exist correct libraries such as crlibm , but these libraries are large, most of them are poorly maintained or have an incompatible license. C runtime libraries do a better job using the default to nearest rounding mode. SWI-Prolog now assumes this mode is correct and translates upward rounding to be the nexttoward/2 infinity and downward rounding nexttoward/2 -infinity. If the “to nearest” rounding mode is correct, this ensures that the true value is between the downward and upward rounded values, although the generated interval is larger than needed. Unfortunately this is not the case as shown in Accuracy of Mathematical Functions in Single, Double, Extended Double and Quadruple Precision by Vincenzo Innocente and Paul Zimmermann .

The function maxr/2 is similar, but uses exact (rational) comparision if Expr1 and Expr2 have a different type, propagate the rational (integer) rather and the float if the two compare equal and propagate the non-NaN value in case one is NaN.

maxr/2 also treats NaN's as missing values so maxr(1,nan) evaluates to 1.

Getting access to character codes this way originates from DEC10 Prolog. ISO has the 0' syntax and the predicate char_code/2 . Future versions may drop support for X is "a" .

Warning! Although properly seeded (if supported on the OS), the Mersenne Twister algorithm does not produce cryptographically secure random numbers. To generate cryptographically secure random numbers, use crypto_n_random_bytes/2 from library library(crypto) provided by the ssl package.

For every normal float X the relation X =:= rational( X ) holds.

This function raises an evaluation_error(undefined) if Expr is NaN and evaluation_error(rational_overflow) if Expr is Inf.

For every normal float X the relation X =:= rationalize( X ) holds.

This function raises the same exceptions as rational/1 on non-normal floating point numbers.

Note that the ISO Prolog standard demands atan2(0.0,0.0) to raise an evaluation error, whereas the C99 and POSIX standards demand this to evaluate to 0.0. SWI-Prolog follows C99 and POSIX.

The ISO standard demands a float result for all inputs and introduces ^/2 for integer exponentiation. The function float/1 can be used on one or both arguments to force a floating point result. Note that casting the input result in a floating point computation, while casting the output performs integer exponentiation followed by a conversion to float.

In SWI-Prolog, ^/2 is equivalent to **/2 . The ISO version is similar, except that it produces a evaluation error if both Expr1 and Expr2 are integers and the result is not an integer. The table below illustrates the behaviour of the exponentiation functions in ISO and SWI. Note that if the exponent is negative the behavior of Int ^ Int depends on the flag prefer_rationals , producing either a rational number or a floating point number.

Bitvector functions

The functions below are not covered by the standard. The msb/1 function also appears in hProlog and SICStus Prolog. The getbit/2 function also appears in ECLiPSe, which also provides setbit(Vector,Index) and clrbit(Vector,Index) . The others are SWI-Prolog extensions that improve handling of ---unbounded--- integers as bit-vectors.

  • doc-needs-help

Picture of user Stefan Kral.

+IntExpr1 xor +IntExpr2 is marked [ISO] which suggests to me that xor/2 can be used as an infix operator in any [ISO] compliant processor. TC2, however, doesn't not prescribe that.

Consider ?- X is 1 xor 2.

  • does work out-of-the-box with SWI-Prolog 7.3.16, XSB-Prolog 3.6.0, and B-Prolog 8.1.
  • does not work out-of-the-box with GNU-Prolog 1.4.4 and SICStus Prolog 4.3.2.

How about clarifying the issue in the documentation?

Bottom line: xor(1,2) is more easily portable than 1 xor 2 —as long as no additional operators are defined.

Picture of user Peter MOUEZA 2.

For div, Q is div(X, Y) , M is mod(X, Y) , X =:= Y*Q+M.

Make error : ERROR: Arguments are not sufficiently instantiated ERROR: In: ERROR: [11] _1502 is _1508 div _1510 ERROR: [10] '<meta-call>'(user:user: ...) <foreign> ERROR: [9] toplevel_call(user:user: ...) at /usr/lib/swi- prolog/boot/toplevel.pl :1173

CSE 341 - Programming Languages

Language metaphors:, very brief prolog history, prolog programs, recursive rules, key concepts in prolog:, prolog data types:, unification, unification algorithm, declarative meaning, procedural meaning.

  • If the list is empty, terminate with success
  • Otherwise look for the first clause in the program whose head matches G1.
  • If none, terminate with failure.
  • If yes, replace G1 with the goals in the body of the clause, making the same unifications that were done to make G1 match the head of the clause. Recursively try to satisfy the list of goals. If this fails, look for another clause whose head matches G1.

Dangers of infinite search (infinite looping):

Some list manipulation programs:.

The two versions work the same most of the time, but the first one is the standard way to write this rule in Prolog, and is considered better style. It also has a stronger implication that this is the append relation rather than the append function .

Also, there are cases where the nonstandard rule gets stuck in an infinite search, while the standard one works OK. If you try this goal: ?- myappend(A,B,[1,2]) and backtrack through all the answers, the standard rule will give 3 answers and fail, while the non-standard one will give the same 3 answers and then get stuck in an infinite search. (Try tracing it to see why.)

Prolog warts:

More list examples.

Chapter 7: Introduction to Prolog

7.1 databases and searches for witnesses, 7.2 horn clauses and backwards chaining, 7.3 data structures and unification, 7.3.1 list data structures, 7.4 example: change making, 7.5 example: sorting, 7.6 a few additional useful prolog predicates, 7.7 an implementation you can use, 7.8 conclusion.

You are using an outdated browser. Upgrade your browser today or install Google Chrome Frame to better experience this site.

Learn X in Y minutes

Where x=prolog.

Get the code: learnprolog.pl

Prolog is a logic programming language first specified in 1972, and refined into multiple modern implementations.

Ready For More?

Got a suggestion? A correction, perhaps? Open an Issue on the GitHub Repo, or make a pull request yourself!

Originally contributed by hyphz, and updated by 4 contributors .

Assignment 6: Test Case Generation in Prolog

Due Monday, December 4 at 11:59 PM

Goals for This Assignment

By the time you have completed this work, you should be able to:

  • Write grammar-based test case generators in Prolog
  • arithmetic_tester.pl
  • collaborators.txt

Step-by-Step Instructions

Step 1: implement a basic grammar-based test case generator in prolog.

Download arithmetic_tester.pl . You will need to implement two procedures in this file:

  • makeTestWithNums

It is recommended to write makeTest first, and to make sure it's working first before moving on to makeTestWithNums . To this end, there is a test suite provided for both procedures (that is, a test suite for the test suite generator), with testMakeTest and testMakeTestWithNums , respectively. The comments in arithmetic_tester.pl provide further details.

You can implement these procedures however you wish, as long as it doesn't change how they are called. You can introduce as many helper procedures as you like. As a hint, it's possible to share some helpers between the same procedures which may help simplify things, though you are not required to implement things this way.

Step 2: Turn in Your Solution Using Canvas

Log into Canvas , and go to the COMP 410 class. Click “Assignments” on the left pane, then click “Assignment 6”. From here, you need to upload the following file:

In addition, if you collaborated with anyone else, be sure to download collaborators.txt and write the names of the people you collaborated with in the file, one per line. Please submit this file along with the other file.

You can turn in the assignment multiple times, but only the last version you submitted will be graded.

COMMENTS

  1. Arithmetic and lists in Prolog

    Arithmetic assignment . Like any computer language, Prolog has arithmetic computations and assignment statements. Arithmetic assignment is done by expressions with the infix is predicate. Querying these peculiar expressions has the side effect of binding some variable to the result of some arithmetic computation. For instance

  2. 5.1 Arithmetic in Prolog

    Integers, on the other hand, are useful for various tasks (such as finding the length of a list), so it is important to understand how to work with them. We'll start by looking at how Prolog handles the four basic operations of addition, multiplication, subtraction, and division. Arithmetic examples. Prolog Notation. 8 is 6+2. 12 is 6*2. 4 is 6-2.

  3. Arithmetic in Prolog

    The goal A is -4.2 which shows that A is bound to number -4.2, and the goal succeed. Arithmetic expression or number can be expressed by the second argument. For example. A = 6 * B + C - 3.2 + S - T / 4. A = 6 * B + C - 3.2 + S - T / 4. In arithmetic expression, any variables must already be bound. The value of these variables must be numerical.

  4. 2.3 Arithmetic in Prolog

    2.3. Arithmetic in Prolog. Prolog is not the programming language of choice for carrying out heavy-duty mathematics. It does, however, provide arithmetical capabilities. The pattern for evaluating arithmetic expressions is (where Expression is some arithmetical expression) X is Expression8. The variable X will be instantiated to the value of ...

  5. Prolog

    X is less than or equal to Y. X =:= Y. the X and Y values are equal. X =\= Y. the X and Y values are not equal. You can see that the '=<' operator, '=:=' operator and '=\=' operators are syntactically different from other languages. Let us see some practical demonstration to this.

  6. PDF Arithmetic Operations in Prolog

    We call such procedures built-in procedures. Arithmetic Operators. X+Y, the sum of X and Y. X-Y, the difference of X and Y. X*Y, the product of X and Y. X/Y, the quotient of X and Y. X^Y, X to the power of Y. -X, the negative of X. abs(X), the absolute value of X.

  7. Projog

    Prolog can be used to perform arithmetic. Prolog supports the common arithmetic operators: + addition. - subtraction. * multiplication. / division. % remainder. Arithmetic expressions can be used as the right-hand argument of the is operator to assign the result of the expression to a variable. Arithmetic expressions will also be evaluated if ...

  8. SWI-Prolog -- Arithmetic

    4.27.2.1 Arithmetic types. SWI-Prolog defines the following numeric types: integer If SWI-Prolog is built using the GNU multiple precision arithmetic library (GMP), integer arithmetic is unbounded, which means that the size of integers is limited by available memory only.Without GMP, SWI-Prolog integers are 64-bits, regardless of the native integer size of the platform.

  9. PDF Prolog

    Prolog - Arithmetic Prolog is a programming language, therefore, arithmetic is implemented as expected. The only difference to other programming languages is that assignment is done via the predicate is rather than the equal sign, since the equal sign has been used for

  10. Assignment

    Next: Prolog Arithmetic Queries Up: prolog Previous: Arithmetic Operators Assignment. The predicate ``N is E'' will succeed whenever N is an unbound variable and E is an arithmetic expression. Try: X is 1+1, prime(X).

  11. PDF Intro to Prolog

    Intro to Prolog. Prolog, which stands for PROgramming in LOGic, is the most widely available language in the logic programming paradigm using the mathematical notions of relations and logical inference. Prolog is a declarative language rather than procedural, meaning that rather than describing how to compute a solution, a program consists of a ...

  12. CSE 341

    Very brief Prolog history Prolog's roots are in predicate calculus and theorem proving Alain Colmerauer (Marseilles) invented Prolog in the early 70's ... Arithmetic In Prolog the operators +, *, and so forth just build up tree structures. So for example X = 3+4, Y = 5*X. succeeds with X=3+4 and Y=5*(3+4). Or try:

  13. Introduction to Prolog

    Prolog can handle data structures that are based on logical function symbols. For example, in arithmetic, when we write 3+2, the + is a function symbol. Prolog lets us invent function symbols useful to our subject area. (The function symbols, called functors, are actually the Skolem functions we saw in the previous chapter!)

  14. Learn prolog in Y Minutes

    X = Y fails, so Y is X+1 is then tried and succeeds, % giving the True answer. But Prolog still remembers there are more. % possibilities for nearby() (in Prolog terminology, "it has a. % choice point") even though "Y is X-1" is doomed to fail, and gives us. % the option of rejecting the True answer, which doesn't make a whole.

  15. Binary Arithmetic in Prolog : r/prolog

    The assignment is to essentially programme the basic arithmetic operations in Prolog, and we have it broken down in to the following tasks: Define incr(P1,P2) s.t. P2 = P1+1 Define legal(P) which is true for legal binary numbers (no leading zeroes, no null).

  16. PDF Prolog -Arithmetic

    Prolog -Arithmetic l Prolog is a programming language, therefore, arithmetic is implemented as expected. l The only difference to other programming languages is that assignment is done via the predicate israther than the equal sign, since the equal sign has been used for the unification operator.

  17. How does = operator works in Prolog

    is/2 resolves arithmetic expressions. If you have X = 2+3, Prolog will reply with X = 2+3. Only X is 2+3 will cause Prolog to report X=5. Arithmetic just isn't a huge part of classic Prolog usage; these days, people will quickly suggest you check out CLPFD, which enables you to do more interesting things like 15 #= X + Y and producing bindings ...

  18. Assignment 6: Test Case Generation in Prolog

    Click "Assignments" on the left pane, then click "Assignment 6". From here, you need to upload the following file: arithmetic_tester.pl; In addition, if you collaborated with anyone else, be sure to download collaborators.txt and write the names of the people you collaborated with in the file, one per line. Please submit this file along ...

  19. Perm, Russia

    Having a population of 1 million, Perm' is one of the largest cities in Russia and the second largest in the Urals. The city was formerly called Molotov, after the minister of foreign affairs during Joseph Stalin's ruling. Perm stretches 65 km along the impressive Kama River - Europe's 4th largest river by length.

  20. Sylva (river)

    Sylva (river) Scheme of the Kama River Basin. /  58.10778°N 56.63778°E  / 58.10778; 56.63778. The Sylva ( Russian: Сылва) is a river in Sverdlovsk Oblast and Perm Krai in Russia. It is 493 kilometres (306 mi) in length. [1] The area of the basin is 19,700 square kilometres (7,600 sq mi). [2] The Sylva flows into the Chusovoy Cove ...

  21. PDF Prolog -Arithmetic

    Prolog -Arithmetic l Prolog is a programming language,therefore, arithmetic is implemented as expected. l The only difference to other programming languages is that assignment is done via the predicate israther than the equal sign, since the equal sign has been used for the unification operator.

  22. Perm Krai

    Perm Krai (Russian: Пе́рмский край, romanized: Permsky kray, IPA: [ˈpʲɛrmskʲɪj ˈkraj]; Komi-Permyak: Перем ладор, romanized: Perem lador) is a federal subject of Russia (a krai), located in Eastern Europe.Its administrative center is Perm.The population of the krai was 2,532,405 (2021 Census).The krai was formed on 1 December 2005 as a result of the 2004 referendum ...

  23. Perm, Russia

    Perm (Russian: Пермь, IPA: ⓘ; Komi-Permyak: Перем; Komi: Перым), previously known as Yagoshikha (Ягошиха) (1723-1781), and Molotov (Молотов) (1940-1957), is the largest city and the administrative centre of Perm Krai, Russia.The city is located on the banks of the Kama River, near the Ural Mountains, covering an area of 799.68 square kilometres (308.76 square ...