You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.6 KiB
45 lines
1.6 KiB
.PHONY: build run interactive clean test trace demo
|
|
|
|
# Build Docker image
|
|
build:
|
|
docker build -t lab8-task5-prolog .
|
|
|
|
# Run Prolog with domain database (show basic info and exit)
|
|
run: build
|
|
docker run --rm -v $(PWD):/app lab8-task5-prolog swipl -g "consult('domain.pl'), write('=== DOMAIN DESIGN TASK5 ==='), nl, show_domain_stats, halt"
|
|
|
|
# Interactive Prolog session
|
|
interactive: build
|
|
docker run -it --rm -v $(PWD):/app lab8-task5-prolog swipl domain.pl
|
|
|
|
# Run test queries
|
|
test: build
|
|
docker run --rm -v $(PWD):/app lab8-task5-prolog swipl -g "consult('domain.pl'), consult('tests.pl'), run_tests, halt"
|
|
|
|
# Run with tracing enabled
|
|
trace: build
|
|
docker run --rm -v $(PWD):/app lab8-task5-prolog swipl -g "consult('domain.pl'), trace, analyze_domain, notrace, halt"
|
|
|
|
# Show basic info about task5
|
|
info: build
|
|
docker run --rm -v $(PWD):/app lab8-task5-prolog swipl -g "consult('domain.pl'), write('=== TASK5 INFO ==='), nl, show_domain_stats, show_questions_analysis, halt"
|
|
|
|
# Run demo
|
|
demo: build
|
|
docker run --rm -v $(PWD):/app lab8-task5-prolog swipl -g "consult('domain.pl'), consult('demo.pl'), demo, halt"
|
|
|
|
# Clean Docker images
|
|
clean:
|
|
docker rmi lab8-task5-prolog || true
|
|
|
|
# Help
|
|
help:
|
|
@echo "Available commands for lab8 task5:"
|
|
@echo " make build - Build Docker image"
|
|
@echo " make run - Run and show domain structure"
|
|
@echo " make info - Show detailed task5 information"
|
|
@echo " make demo - Run demonstration queries"
|
|
@echo " make test - Run test queries"
|
|
@echo " make interactive - Start interactive Prolog session"
|
|
@echo " make trace - Run with tracing enabled"
|
|
@echo " make clean - Clean Docker images"
|