/swish/pack/sCASP/prolog/scasp/program.pl
AllApplicationManualNameSummaryHelp

  • prolog
    • scasp
      • embed.pl -- Embed sCASP programs in Prolog sources
      • ops.pl
      • input.pl -- Read SASP source code
      • common.pl -- Common predicates used in multiple files
      • program.pl -- Input program access
        • defined_rule/4
        • defined_query/2
        • defined_predicates/1
        • defined_nmr_check/1
        • reserved_prefix/1
        • has_prefix/2
        • replace_prefix/4
        • non_printable/1
        • assert_program/1
        • assert_rule/1
        • assert_nmr_check/1
        • destroy_program/0
      • variables.pl -- Variable storage and access
      • source_ref.pl -- s(CASP) source references
      • compile.pl -- s(ASP) Ungrounded Stable Models Solver
      • predicates.pl -- Basic information about sCASP predicates
      • comp_duals.pl -- Dual rule computation
      • options.pl -- (Command line) option handling for sCASP
      • nmr_check.pl -- Detect OLON rules and construct nmr_check
      • call_graph.pl -- Build the call graph used for NMR check construction and indexing.
      • pr_rules.pl -- Output formatting and printing.
      • modules.pl -- Encode modules
      • solve.pl -- The sCASP solver
      • verbose.pl -- Print goal and stack in Ciao compatible format
      • model.pl -- sCASP model handling
      • output.pl -- Emit sCASP terms
      • stack.pl
      • listing.pl
      • human.pl -- Print s(CASP) output in human language
      • html.pl -- Render s(CASP) justification as HTML
      • html_text.pl -- Switch between HTML and plain text output
      • messages.pl
      • dyncall.pl --
      • swish.pl -- s(CASP) adapter for SWISH
      • json.pl -- s(CASP) JSON I/O
 assert_program(+Statements:list) is det
Get rules, initial query and called predicates and assert them for easy access. This fills the dynamic predicates
  • defined_predicates(List) with a list of predicate identifiers, atoms encoded as <name>_<arity>, e.g., parent_2 for parent/2.
  • defined_rule(Name, Head, Body, Origin) where Name is the functor name of Head and Body represents the conjunction of the body as a list, and Origin denotes the source of the rule's definition.
  • defined_query(List, Count) List is like Body above, expressing the query and Count is the number of answer sets to generate by default (based on the `Count { Query }.` syntax.
  • defined_nmr_check(List) When defined, a list of one atom containing the rule name for the NMR check.
Arguments:
Statements- List of rules and compute statements produced by DCG.