This paper suggests that Portuguese historical cities were based on a structured knowledge-based process from where itis possible to retrieve not only a generative parametric urban grammar but also to construct a computational model capable to generate Portuguese planimetric proportionate and symmetrical urban grammar. The grammar is described graphically and discursively, followed by the introduction of a 2D shape grammars interpreter UrbanGENE. The 2D shape grammar interpreter will allow the user to interact with the genetic and generative principles of Portuguese historical urban design from 16th to 18th century and additionally be deployed in urban history teaching and learning.