Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Codigo Flex Win Prolog Medios De Transporte
1. Código Flex de WinProlog (Medios de Transporte).
frame medios_transporte ;
default satisface_necesidad is si
and default desplazamiento is no
and default nombre is vacio .
frame terrestres is a medios_transporte ;
default via_transporte is tierra
and default rapidez is media .
frame monociclo is a terrestres ;
default num_ruedas is 1
and default equilibrio is poco .
frame biciclo is a terrestres ;
default num_ruedas is 2
and default equilibrio is medio .
frame bicicleta is a biciclo ;
default tipo_propulsion is humana
and default cambios_velocidad is no
and default abreviatura is bici .
frame motocicleta is a biciclo ;
default tipo_propulsion is combustion
and default cambios_velocidad is si
and default abreviatura is moto .
frame cuatriciclo is a terrestres ;
default num_ruedas is 4
and default equilibrio is mucho .
frame automovil is a cuatriciclo ;
default utilidad is personal
and default nivel_contaminacion is medio .
frame autobus is a cuatriciclo ;
default utilidad is colectivo
and default nivel_contaminacion is alto .
frame aereos is a medios_transporte ;
2. default via_transporte is aire
and default rapidez is veloz .
frame aerodinos_aeronaves is a aereos ;
default pesados is si
and default alas is fijas_o_giratorias .
frame aerodinos_pasajeros is a aerodinos_aeronaves ;
default actividad is comercial
and default capacidad_personas is 800 .
frame concorde is a aerodinos_pasajeros ;
default envergadura_metros is 25
and default max_velocidad_kmXh is 2405 .
frame boeing767 is a aerodinos_pasajeros ;
default envergadura_metros is 47
and default max_velocidad_kmXh is 913 .
frame aerodinos_militar is a aerodinos_aeronaves ;
default actividad is milicia_y_espionaje
and default capacidad_personas is 20 .
frame cohete is a aerodinos_militar ;
default actividad is espacial
and default tipo_combustible is propelente_liquido
and default veloz is si .
frame helicoptero is a aerodinos_militar ;
default actividad is ataque_y_rescate
and default tipo_combustible is gasolina
and default veloz is si .
frame aerostatos_aeronaves is a aereos ;
default pesados is no
and default alas is no .
frame aerostatos_con_motor is a aerostatos_aeronaves ;
default motor is si
and default controlables is si .
frame dirigible is a aerostatos_con_motor ;
default tipo_gas is helio_y_hidrogeno
3. and default pesado is no .
frame aerostatos_sin_motor is a aerostatos_aeronaves ;
default motor is no
and default controlables is no .
frame globo is a aerostatos_sin_motor ;
default tipo_gas is vapor_de_agua_caliente
and default pesado is no .
frame acuaticos is a medios_transporte ;
default via_transporte is agua
and default rapidez is lenta .
frame maritimo is a acuaticos ;
default navegacion is oceanos_y_mares
and default actividad is comercial_y_turistica .
frame submaritimo is a acuaticos ;
default navegacion is aguas_submarinas
and default actividad is militar_y_vigilancia .
frame maritimo_viajes is a maritimo ;
default turistico is si
and default lujoso is si .
frame maritimo_carga is a maritimo ;
default turistico is no
and default lujoso is no .
frame crucero is a maritimo_viajes ;
default tipo_viaje is negocio_y_placer
and default tamaño is gigante
and default propulsion is motor .
frame yate is a maritimo_viajes ;
default tipo_viaje is recreo_y_ocio
and default tamaño is pequeño
and default propulsion is motor_o_vela .
frame portaaviones is a maritimo_carga ;
default carga is aviones
and default actividad is enfrentamiento_y_vigilancia .
4. frame submaritimo_civiles is a submaritimo ;
default tamaño is pequeño
and default tripulantes is civiles .
frame sumergible is a submaritimo_civiles ;
default accidentalidad is media
and default forma is alargada .
frame batisfera is a submaritimo_civiles ;
default accidentalidad is alta
and default forma is esferica .
frame submaritimo_rescate_militar is a submaritimo ;
default tamaño is grande
and default tripulantes is militares_y_expertos .
frame buque_subacuatico is a submaritimo_rescate_militar ;
default navegacion is bajo_agua
and default resistencia is alta_y_duradero .
question pregunta1
¿Qué tipo de vía de transporte utiliza el medio? ;
choose from 'Tierra' , 'Aire' , 'Agua'.
question pregunta2
¿Cuantas ruedas tiene el medio de transporte? ;
choose from '1 rueda' , '2 ruedas' , '4 ruedas'.
question pregunta3
¿Cual es el tipo de propulsión del medio de transporte? ;
choose from 'Humana' , 'Combustión' .
question pregunta4
¿Qué tipo de utilidad se le da al medio de transporte? ;
choose from 'Personal' , 'Colectivo' .
question pregunta5
¿El medio de transporte es pesado? ;
choose from 'Si' , 'No' .
question pregunta6
¿Para cuantas personas tiene capacidad el medio de transporte? ;
5. choose from '800 personas' , '20 personas' .
question pregunta7
¿Cual es la velocidad maxima que alcanza el medio de transporte? ;
choose from '2405 km/h' , '913 km/h' .
question pregunta8
¿Qué tipo de combustible utiliza el medio de transporte? ;
choose from 'Propelente solido' , 'Gasolina' .
question pregunta9
¿El medio de transporte tiene motor? ;
choose from 'Si' , 'No' .
question pregunta10
¿En qué aguas navega el medio de transporte? ;
choose from 'Oceanos y Mares' , 'Aguas submarinas' .
question pregunta11
¿El medio de transporte es lujoso? ;
choose from 'Si' , 'No' .
question pregunta12
¿Qué tipo de viajes se realiza en el medio de transporte? ;
choose from 'Negocio y Placer' , 'Recreo y Ocio' .
question pregunta13
¿Qué tripulantes traslada el medio de transporte? ;
choose from 'Civiles' , 'Militares' .
question pregunta14
¿Qué forma tiene el medio de transporte? ;
choose from 'Alargada' , 'Esferica' .
rule regla1
if the pregunta1 is 'Tierra'
and the pregunta2 is '1 rueda'
then the medios_transporte`s nombre becomes 'un Monociclo' .
rule regla2
if the pregunta1 is 'Tierra'
and the pregunta2 is '2 ruedas'
and the pregunta3 is 'Humana'
6. then the medios_transporte`s nombre becomes 'una Bicicleta' .
rule regla3
if the pregunta1 is 'Tierra'
and the pregunta2 is '2 ruedas'
and the pregunta3 is 'Combustión'
then the medios_transporte`s nombre becomes 'una Motocicleta' .
rule regla4
if the pregunta1 is 'Tierra'
and the pregunta2 is '4 ruedas'
and the pregunta4 is 'Personal'
then the medios_transporte`s nombre becomes 'un Automovil' .
rule regla5
if the pregunta1 is 'Tierra'
and the pregunta2 is '4 ruedas'
and the pregunta4 is 'Colectivo'
then the medios_transporte`s nombre becomes 'un Autobús' .
rule regla6
if the pregunta1 is 'Aire'
and the pregunta5 is 'Si'
and the pregunta6 is '800 personas'
and the pregunta7 is '2405 km/h'
then the medios_transporte`s nombre becomes 'un Corcorde' .
rule regla7
if the pregunta1 is 'Aire'
and the pregunta5 is 'Si'
and the pregunta6 is '800 personas'
and the pregunta7 is '913 km/h'
then the medios_transporte`s nombre becomes 'un Boeing 767' .
rule regla8
if the pregunta1 is 'Aire'
and the pregunta5 is 'Si'
and the pregunta6 is '20 personas'
and the pregunta8 is 'Propelente solido'
then the medios_transporte`s nombre becomes 'un Cohete' .
rule regla9
7. if the pregunta1 is 'Aire'
and the pregunta5 is 'Si'
and the pregunta6 is '20 personas'
and the pregunta8 is 'Gasolina'
then the medios_transporte`s nombre becomes 'un Helicoptero' .
rule regla10
if the pregunta1 is 'Aire'
and the pregunta5 is 'No'
and the pregunta9 is 'Si'
then the medios_transporte`s nombre becomes 'un Dirigible' .
rule regla11
if the pregunta1 is 'Aire'
and the pregunta5 is 'No'
and the pregunta9 is 'No'
then the medios_transporte`s nombre becomes 'un Globo' .
rule regla12
if the pregunta1 is 'Agua'
and the pregunta10 is 'Oceanos y Mares'
and the pregunta11 is 'Si'
and the pregunta12 is 'Negocio y Placer'
then the medios_transporte`s nombre becomes 'un Crucero' .
rule regla13
if the pregunta1 is 'Agua'
and the pregunta10 is 'Oceanos y Mares'
and the pregunta11 is 'Si'
and the pregunta12 is 'Recreo y Ocio'
then the medios_transporte`s nombre becomes 'un Yate' .
rule regla14
if the pregunta1 is 'Agua'
and the pregunta10 is 'Oceanos y Mares'
and the pregunta11 is 'No'
then the medios_transporte`s nombre becomes 'un Portaaviones' .
rule regla15
if the pregunta1 is 'Agua'
and the pregunta10 is 'Aguas submarinas'
and the pregunta13 is 'Civiles'
8. and the pregunta14 is 'Alargada'
then the medios_transporte`s nombre becomes 'un Sumergible' .
rule regla16
if the pregunta1 is 'Agua'
and the pregunta10 is 'Aguas submarinas'
and the pregunta13 is 'Civiles'
and the pregunta14 is 'Esferica'
then the medios_transporte`s nombre becomes 'una Batisfera' .
rule regla17
if the pregunta1 is 'Agua'
and the pregunta10 is 'Aguas submarinas'
and the pregunta13 is 'Militares'
then the medios_transporte`s nombre becomes 'un Buque Subacuatico' .
group general
regla1, regla2, regla3, regla4, regla5, regla6, regla7, regla8, regla9,
regla10, regla11, regla12, regla13, regla14, regla15, regla16, regla17 .
ruleset combustible
contains general ;
update ruleset by removing each selected rule .
action fin ;
do restart
and invoke ruleset combustible
and echo ('El Medio de Transporte que buscaba es', medios_transporte`s
nombre)
and nl .
9. Jesús David Ramos Martínez.
Universidad de Córdoba- Licenciatura en Informática y Medios Audiovisuales