is_vocab/1 (BB: Exercise 1.1.2) -Programmieren

Devise a simple Prolog notation for representing vocabularies (for example, use Prolog lists in place of the curly-brackets and ordered pairs). Write a predicate is_vocab/1 which checks that something written in your notation really is a first-order vocabulary. For example, it should check that each symbol is associated with a number giving its arity, and that no symbol is used in two different ways.

Hint 1: test your predicate on one of the following lines, depending on the vocabulary notation you have chosen.

Hint 2: you may use integer/1atom/1member/2 and not/1

Noch keine Kommentare eingereicht. Bitte hilf uns diese Aufgabe zu verbessern.

Schreibe einen Kommentar

Deine personenbezogenen Daten werden nicht gespeichert!