Este máster ha sido galardonado en 2010 con el Premio al Mejor Máster Universitario en la X edición de los premios del Consejo Social de la UPV.

 

 

Tesis de Fin de Máster, especialidad Métodos Formales
Cursos 2010/2012

Calculate the cost of a Prolog program using the MML principle

The thesis in which this Website is based is available here.

The files needed to work with the grammar example are here.

Calculate the cost of a program using Yap Prolog:

  1. No one of the predicates must start with ‘mml_’ in its name.
  2. You cannot use modules or I/O inside your program (only write to stdout using write/1,display/1…).
  3. You can use probabilities for each clause codifying them in this way: 0.252 :: f(X,Y):-X>0,Y is 3.
  4. The probability would be a real value between 0 and 1, but if not, we’ll normalize it. If there are clauses with the same predicate without a probability value, it will receive the remaining to arrive to 1.
  5. In the examples, you can use the symbol ‘#’ to indicate the number of repetitions, so this is like to repeat three times this example: 3 # f(0,1).
  6. If the Prolog code has errors or warnings (free variables, for example) it stops.

 

It can be runned interactivelly from command-line using Yap prolog. Download and try it.