PDF Printer
Pdf Printer
Today I stayed a lot of time trying to find a good PDF printer that works on my O.S., Windows x64 Vista. I tried the CutePDF and the PrimoPDF but none of them works, eventually I tried the BullzipPDFPrinter and it was my salvations it works fine on my system, without add-ons and is a freeware software.
Even thought I haven’t understood yet why the others softwares don’t works on my system. The installation process run ok, but they can install the printer. When I tried install by myself the printer I get a error when I tryed to add a special port to use the pdf Printer software. I will understand this later.
URML – Derivation Rules Example
Documentation
Author: Alex Pinheiro das Graças
Introduction
This documentation will show the use of derivation rules using concrete examples, through modeling of real rules, showing the symbols used and the correspondences between them and the URML meta-model.
The URML is a rule visual language, conceived to make easier the modeling of rules
Derivation Rule
Derivation rules specify how certain logical sentences may be derived from others. They consist of one or more conditions and one or more conclusions. For specific types of derivation rules, such as definite Horn clauses or normal logic programs, the types of condition and conclusion are specifically restricted.
In the URML a derivation rule is instanced by a circle with the acronym DR of derivation Rule. The conditions are represented by an incoming arrow and conclusion by a outgoing arrow. The symbols are shown below with their respective description.
|
Symbols |
Description |
|
|
This represents a derivation rule(DR). |
|
|
A outgoing arrow represents a conclusion |
|
|
A incoming arrow represents a condition |
|
|
A crossed incoming arrow represents a denied condition |
These are the symbols used in this document, beyond the usual UML notation.
Examples
In this section there are examples modeled using URML language will be exposed. The example was chosen trying to show different instances from URML concepts.
The examples are going to follow this structure:
- The URML model;
- The rule in natural language;
- The rule in Prolog;
- A correspondence between the URML meta-model and the example exposed or an explanation of model.
-
Example
Rule:
If Person plays bass then he is a Bass Player
Prolog: musician(X) :- player(X)
This example is a very simple model where a sub-concept is defined by means of a derivation rule. The condition is defined by a role condition. It is necessary for the instance of class Person to be a player to it be considered a musician.
The conclusion of this rule instantiates the object as a musician, hence it is a classification conclusion.
An interesting point of this example is that the rule doesn’t suppose anything about the instance of objects from class Instrument. The creation of the sub-concept musician is done on knowledge inferred over the role of the super class.
-
Example
Rule: If Person is born at a country whose name is Brazil then this person is a Brazilian.
Prolog: brazilian( X ):- person( X ) ,country( Y ) ,bornAt( X , Y ), countryName(Y,’Brazil’)
This is a simple model, it infers if a person is Brazilian or not. The conditions needed to make it true are that he or she are born at a country whose name is Brazil. This is an example where a sub-concept is defined by a derivation rule.
This rule is using two types of condition: a binary association condition, to testif there exists an association between the two object terms; and a classifier condition with a OCL filter, testing if a object term is an instance of a class In addition, the OCL filter creates a filter to the conditions instanced with the conditions described in the OCL expression.
-
Example
Rule: If the car last maintenance was more than 90 days or the service reading greater than 5000, then this car is scheduled for service.
Prolog:
rentalCarScheduledForSevice( Y ) :- rentalCar( Y ) , lastMaintenanceDate(Y , Date) , serviceReading( Y, SR ) , ( Date > 90 ; SR > 5000 )
Above it is shown a simple example in which it is wanted to know if a rental car is scheduled for service. To achieve this, it is used a classifier condition with an OCLFilter. Below there is a model depicted from the URML metamodel shown the relationships between the condition, the OCLFilter, and the ClassificationAtom.
As it is seen in the meta-model every condition has a filter, in this example an OCLFilter. The OCL is a acronym for Object Constrain Language and its specification can be found at the Object Management Group OMG.
www.omg.org/docs/ptc/03-10-14.pdf
-
Example
Rule:
If a car is stored in a branch, it is not assigned for rent and it is not scheduled for service, thus that car is available at the Branch.
Prolog:
isAvaliable(X,Y) :- isStored(X,Y), not isAssigned(X,Z),rental(Z),not rentalCarScheduledForService(X)
This example shows a far more complex rule than the others shown in the former examples, as this example has three conditions, and two of them are denied, and furthermore a conclusion that instantiate an association instead of a classifier.
As you can see in the meta-model of this condition has a property saying if condition is negated. As it was shown in the table above, negation is shown with a cross at the condition arrow.
The conclusion in this example is different from other examples shown until now, it instantiate a binary association between two classes.

-
Example
Rule: If a person is a woman and a mother, then she is a mother. If a person is a father and a man, then he is a father.
Prolog: mother(X) :- woman(X), isParent(X);
father(X) :- man(X), isParent(X).
This model is composed by two Rules that infer similar knowledge. These derivation rules consist of a role and a classification condition. The results include a classification conclusion, creating a sub-concept of a super class.

-
Example
Rule:
If a Person plays an Instrument and this instrument is a Bass than this person is a bassist.
Prolog: bassist(X) :- person(x),plays(X,Y),bass(Y)
This rule is refinement from musician example shown before. Now the objective is to know more than if he plays an instrument or not. It is a specific instrument, a bass. To achieve it, this rule is using a binary and a classifier condition. The classifier condition test if an instance is from the class expressed in the condition. The binary conditions test if there exists or not an association between a instances from class Personand and class Instrument.
-
Arquivos
- Dezembro 2008 (2)
- Novembro 2008 (5)
- Agosto 2008 (1)
- Abril 2008 (2)
- Novembro 2007 (2)
- Setembro 2007 (1)
- Agosto 2007 (4)
-
Categorias
-
RSS
Entradas RSS
Comentários RSS



