Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Nicolas FRANCOIS <nicolas.francois@free.fr>
To: caml-list@inria.fr
Subject: [Caml-list] Problem formalizing a representation
Date: Tue, 12 Nov 2024 23:03:12 +0100	[thread overview]
Message-ID: <20241112230312.6fcf76ab.nicolas.francois@free.fr> (raw)

Hi.

I'd like to represent logical formulas for different logics.

A logic is syntactically represented by atoms, and rules involving (at
the very least) and, or, not, and possibly implies and equivalence...

What differs between my logics is the atoms :
- for propositional logic LP, atoms are just variables, and
  interpretations assign true or false to those variables ;
- the there is a logic LQ, where atoms are of the form
  "variable=r"
  r being a rational number (there may later be atoms of the form
  "variable >= r", and so on).

Then, with those logics, I can define new logics, for example, with LP,
I can define atoms of the form a^+, meaning a was false and becomes
true, or a^.1, meaning a was anything, but becomes true...

So what I would like to do is create some parametrized types (or
modules), taking atoms types as parameter, the methods for manipulating
logics (for example, computing a normal form) being defined in those
types (via modules, maybe ?), independently of the atoms types, and the
code for manipulating atoms being inside each atom type.

last but not least, certain methods would have to take two formulas
from a logic, and build with them a formula of a new type.

I don't know if I'm perfectly clear (as a matter of fact, I'm quite
sure I'm not :-(, but maybe I gave you a sufficiently clear image of
what I want to do for you to give me some tips...

The problem is I've never used parametrized modules or objects, so I
don't know how to start. If you could give me the initial thrust, maybe
I could fly :-)

Thank you for any tip, and sorry for my poor english.

\bye

-- 

Nicolas FRANCOIS                      |  /\ 
http://nicolas.francois.free.fr       | |__|
				      X--/\\
We are the Micro$oft.		        _\_V
Resistance is futile.		    
You will be assimilated.         darthvader penguin

             reply	other threads:[~2024-11-12 22:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-12 22:03 Nicolas FRANCOIS [this message]
2024-12-13 13:58 ` Oleg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241112230312.6fcf76ab.nicolas.francois@free.fr \
    --to=nicolas.francois@free.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox