• Want to help us with this year's BoS Trials?
    Let us know before 30 June. See this thread for details
  • Looking for HSC notes and resources?
    Check out our Notes & Resources page

prologged (1 Viewer)

jesterofenglish

New Member
Joined
Jul 13, 2004
Messages
26
Location
coming to a cinema near you.
Gender
Female
HSC
N/A
Who knows prolog?

Teach me!
(I was innocently working through the HSC 2003 paper when it pounced)

I kinda get it but what's the deal with the '!', ';', 'nl' and '/'

I'm not a big fan punctuation fan . . .
 

sunny

meh.
Joined
Jul 7, 2002
Messages
5,350
Gender
Male
HSC
2002
Questions in the HSC relating to programming languages can be figured out without actually knowing how to program in the language itself (provided you understand the paradigm enough) since the syllabus does not specify any specific programming language to be taught. Post up the question and see if anyone can figure it out.
 

jesterofenglish

New Member
Joined
Jul 13, 2004
Messages
26
Location
coming to a cinema near you.
Gender
Female
HSC
N/A
prolog

sunny said:
Questions in the HSC relating to programming languages can be figured out without actually knowing how to program in the language itself (provided you understand the paradigm enough)
But it helps! I literally spent 10 minutes (maybe 7.3) trying to decipher it, I got most of it but there are holes.

sunny said:
Post up the question and see if anyone can figure it out.
So I'll take ur advice sunny and see if anyone can explain 'nl' and '!' I don't need the answers, I got the std pack, but in a band 6 ans they had the '!' and 'nl'
 

neuro_logik

Member
Joined
Mar 22, 2004
Messages
581
Location
The Global Interweb
Gender
Male
HSC
2004
You don't need to understand prolog (or any specific language) to decipher a section of code! It should be from your experience with programming and software development!
 

Lazarus

Retired
Joined
Jul 6, 2002
Messages
5,965
Location
CBD
Gender
Male
HSC
2001
Prolog is such a fun language!

The 'nl' terminal just prints a newline character.

The '!' operator cuts the algorithm so that it can't recursively backtrack past the point where the operator was used. By default, Prolog will attempt to find all the possible solutions for a specified proposition (and will display them all accordingly). Use of the cut operator will prevent the program from backtracking to find further solutions after it has already found one.
 

JayWalker

Member
Joined
Mar 19, 2004
Messages
401
Location
Sydney
Gender
Male
HSC
2004
Lazarus said:
Prolog is such a fun language!

The 'nl' terminal just prints a newline character.

The '!' operator cuts the algorithm so that it can't recursively backtrack past the point where the operator was used. By default, Prolog will attempt to find all the possible solutions for a specified proposition (and will display them all accordingly). Use of the cut operator will prevent the program from backtracking to find further solutions after it has already found one.
You'll also want to remember that it is a paradigm (Logial i think) and it defines attributes such as
Hair (Sally, Red)
Tongue (Sally, Pierced)

Totally an example :p
 

Purp|e

miesynth
Joined
Jun 15, 2004
Messages
664
Location
sellin drugs in a school zone
Gender
Undisclosed
HSC
2004
your fucking kidding me ??? lol 7 marks on that ?!?!?!?!?!?! HOW ? we havnt had a question like that in ne of our exams ... that cant be too good for business ...

AHUH ! i guess cus im not doing evo of programing languages :p o0ps
 
Last edited:

JayWalker

Member
Joined
Mar 19, 2004
Messages
401
Location
Sydney
Gender
Male
HSC
2004
Well that isnt exactly a hard question,

Part 1 u identify that its prolog by observation, hence is logical paradigm, shown by it calling the knowledge base (init database), and the software assigning attributes to items such as the list...

Part 2 - just add onto it, using their language when they are adding the location to the lists, and go form there,, no need to understand prolog
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top